This is an archive of the discontinued LLVM Phabricator instance.

[Sparc] Include __tls_get_addr in symbol table for TLS calls to it
ClosedPublic

Authored by jrtc27 on Feb 13 2018, 5:36 PM.

Details

Summary

Global Dynamic and Local Dynamic call relocations only implicitly
reference __tls_get_addr; there is no connection in the ELF file between
the relocations and the symbol other than the specification for the
relocations' semantics. However, it still needs to be in the symbol
table despite the lack of explicit references to the symbol table entry,
since it needs to be bound at link time for these relocations, otherwise
any objects will fail to link. For details, see
https://sourceware.org/bugzilla/show_bug.cgi?id=22832.

Diff Detail

Event Timeline

jrtc27 created this revision.Feb 13 2018, 5:36 PM

A small nit but otherwise no objections from my part.

lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp
198

Could you make this comment a little more concise and move the rest of the explanation/motivation (as well as the link to the PR) part of the commit message?

jrtc27 updated this revision to Diff 134968.Feb 19 2018, 2:05 PM

Shortened comment, moving description to commit message as requested

jrtc27 marked an inline comment as done.Feb 19 2018, 2:05 PM
jrtc27 edited the summary of this revision. (Show Details)Feb 19 2018, 5:11 PM
JDevlieghere accepted this revision.Feb 20 2018, 2:12 AM

LGTM! Let me know if you want me to commit this for you.

This revision is now accepted and ready to land.Feb 20 2018, 2:12 AM

Cool, thank you! \o/

Hope to see it in 6.0 as well :).

LGTM! Let me know if you want me to commit this for you.

Please do; thanks!

This revision was automatically updated to reflect the committed changes.