This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold linker: rejected multiple definitions with the same absolute value
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Michael Orlitzky <michael at orlitzky dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 27 Nov 2017 10:22:18 -0800
- Subject: Re: gold linker: rejected multiple definitions with the same absolute value
- Authentication-results: sourceware.org; auth=none
- References: <2cd52b7c-cf85-099a-7b54-35e96155cc65@orlitzky.com> <CAJimCsHE_BdLVvHy6JLp-f027x7WCN-LYZPbbfWpYP=cGKteWQ@mail.gmail.com> <b75739c8-e419-94bb-cfc5-54d48a6891a5@orlitzky.com>
>> Let me ask you this, though: when the error was pointed out, did you
>> feel like it was a simple mistake, easily fixed, or do you think
>> there's a rationale for having the definition in both files?
>
> In this case I think the duplication is intentional. Those symbols are
> from the RAP plugin,
>
> https://grsecurity.net/rap_faq.php
>
> which is designed to prevent code-reuse attacks by (among other things)
> checking that a function's signature matches at its definition and call
> sites. It does that, somehow, by emitting those "__rap_hash" symbols.
> Presumably the fact that their two values are equal is a good thing.
That actually sounds like a pretty good rationale. It reminds me of
template meta-programming.
-cary