[PATCH] D27276: [ELF] Allow defined symbols to be assigned from linker script
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 13:14:48 PST 2017
>
> A few observations from the above:
>
> 1. Symbols defined *inside* output section descriptors should live in
> that section (e.g. `d`, `f`).
>
> 2. Symbols defined *outside* output section descriptors should be *ABS*
> (e.g. `a`, `b`, `c`, and `e`).
I don't think that is the correct way.
The meaning of ABS on ELF is that the value is really absolute. It
doesn't represent any position in the file. It is a bug that bfd doesn't
always behave that way (see
https://groups.google.com/forum/#!topic/generic-abi/MC4b4sqnKC0).
This means that being absolute is just a property of the expression. We
have to track it as the expression is constructed so that ". + 42" is
not absolute, "ADDR(foo) + 42" is not absolute, etc.
Cheers,
Rafael
More information about the llvm-commits
mailing list