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

Rafael Avila de Espindola via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 21 14:05:46 PST 2017

Carlo Kok <ck at remobjects.com> writes:

> On 2017-02-21 20:33, Rafael Avila de Espindola wrote:
>>> Input files:
>>> https://www.dropbox.com/s/8yn3dggx05atn47/binLinux.zip?dl=0
>> If you pass --reproduce foo.tar to lld it will create a foo.tar file
>> with all that is needed to reproduce the link.
>> Can you also share how you created the various .o files? If so I might
>> be able to try reducing the issue.
> It's created by my own compiler.
> https://www.dropbox.com/s/rmkyqks4lnr85rz/foo.tar?dl=0
> My biggest problem is that I have no idea where I can start trying to 
> narrow it down, on the so side, or on the executable side, the error is 
> rather strange to begin with.

I would suggest setting up a script that links each .so and executable
with either lld or bfd. That way you should be able to find which link
causes the problem.

After that start reducing the problem. If it was c++, you would run
delta on the .ii file checking that the bfd linked program/library works
and that the lld linked one fails to load.


More information about the llvm-dev mailing list