[PATCH] D26133: [ELF] Allow relative relocations to absolute symbols in PIC
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 09:06:00 PST 2016
On Dec 13, 2016 05:42, "Rafael Avila de Espindola" <
rafael.espindola at gmail.com> wrote:
> Hi Rafael,
> I found some discussion on the binutils bug tracker and mailing list
> It looks like the conclusion to be drawn is that BFD's behaviour is wrong.
Thank you so much. We should deferentially not copy the bug then.
If we want a way to refer to the image base from linker script I propose
a new magic variable: IMAGE_BASE.
Should this not work for referring to the image base?
ADDR(.interp) - ABSOLUTE(ADDR(.interp))
The advantage is that this avoids creating new syntax so is already
somewhat compatible with existing linkers. The downside is that you need to
specify a section, but in practice you can usually choose one that is known
I don't think we currently create a section relative symbol from that, but
that's just a bug we can fix.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits