[PATCH] D26133: [ELF] Allow relative relocations to absolute symbols in PIC

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 09:29:12 PST 2016

Peter Collingbourne <peter at pcc.me.uk> writes:
> 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
> to exist.
> I don't think we currently create a section relative symbol from that, but
> that's just a bug we can fix.

Yes, that looks better than having a new magic variable.

Thanks again,

More information about the llvm-commits mailing list