[llvm-dev] [lld] elf linker creates undefined empty symbol

Rafael Avila de Espindola via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 22 06:14:33 PST 2017


Sean Silva <chisophugis at gmail.com> writes:
>> When __libc_start_main is hidden, it doesn't end up in the dynamic symbol
>> table and so we use the default DynsymIndex of 0.
>>
>
>
> I think BFD is doing the right thing. The `extern_weak hidden` is resolved
> to null since by virtue of being hidden it doesn't refer to the function in
> libc.so (and there is no definition in the executable). For some reason,
> LLD thinks that it needs to resolve __libc_start_main dynamically and
> things go horribly wrong. Rafael, what do you think?

If it is hidden it should really not end up in the dynamic symbol
table. I will try to take a look at your reproducible latter in the day.

Cheers,
Rafael


More information about the llvm-dev mailing list