This is an archive of the discontinued LLVM Phabricator instance.

Don't create a dummy __tls_get_addr
ClosedPublic

Authored by rafael on Oct 6 2017, 7:09 PM.

Details

Reviewers
peter.smith
ruiu
Summary

We just don't need one with the current setup.

We only error on undefined references that are used by some relocation.

If we managed to relax all uses of __tls_get_addr, no relocation uses it and we don't produce an error.

This is less code and fixes the case were we fail to relax. Before we would produce a broken output, but now we produce an error.

Diff Detail

Event Timeline

rafael created this revision.Oct 6 2017, 7:09 PM
peter.smith edited edge metadata.Oct 9 2017, 2:16 AM

I think that this is the right thing to do. On Arm and Mips there is no TLS relaxation so we can have a reference to __tls_get_addr at static link time that isn't removed, however the static libraries for these platforms do provide a definition. At the time of implementation in D25978 we had special cases to not add this symbol on Arm and Mips, I don't remember when these were deleted.

ruiu accepted this revision.Oct 9 2017, 5:46 PM

LGTM

This revision is now accepted and ready to land.Oct 9 2017, 5:46 PM
espindola closed this revision.Mar 14 2018, 3:41 PM
espindola added a subscriber: espindola.

315334