[PATCH] D30319: [ELF] Make __ehdr_start point to ELF file headers

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 07:33:42 PST 2017


Petr Hosek via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:

> phosek added a comment.
>
> When comparing the output from gold, ld and lld, one difference I noticed is that gold emits this symbol as `SHN_ABS`, ld uses index of `.text`, while lld uses `SHN_UNDEF`. It's the same for other reserved symbols like `_end`, `_etext`, `_edata`. Is there a particular reason why lld uses `SHN_UNDEF` or is that a bug?

Sounds like a bug. It doesn't matter which section index gets used, but
it should be a valid index (not undef or abs).

Cheers,
Rafael


More information about the llvm-commits mailing list