This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Do not add ignored absolute __tls_get_addr symbol for relocatable output.
AbandonedPublic

Authored by grimar on Nov 11 2016, 6:19 AM.

Details

Reviewers
ruiu
rafael
Summary

This was the reason of PR30984:

cad/iverilog fail to link under FreeBSD with next error:
/usr/bin/ld: error: relocation R_X86_64_PLT32 cannot refer to absolute symbol __tls_get_addr

We should not convert undefined symbol to absolute, but that was done for -r.

Diff Detail

Event Timeline

grimar updated this revision to Diff 77611.Nov 11 2016, 6:19 AM
grimar retitled this revision from to [ELF] - Do not add ignored absolute __tls_get_addr symbol for relocatable output..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: davide, emaste, evgeny777, grimar.
ruiu edited edge metadata.Nov 11 2016, 10:39 AM

Actually, we shouldn't add not only __tls_get_addr but most of the synthetic symbols, no?

In D26545#593017, @ruiu wrote:

Actually, we shouldn't add not only __tls_get_addr but most of the synthetic symbols, no?

Sure, but that is a subject for another patches (queued in my todo list).
Do you mean you prefer fix them all at once ? IMHO we should be able to land this separately as it is
isolated and unblocks few ports.