This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Support mixed TLSDESC and TLS GD
ClosedPublic

Authored by MaskRay on Jan 9 2022, 2:17 PM.

Details

Summary

We only support both TLSDESC and TLS GD for x86 so this is an x86-specific
problem. If both are used, only one R_X86_64_TLSDESC is produced and TLS GD
accesses will incorrectly reference R_X86_64_TLSDESC. Fix this by introducing
SymbolAux::tlsDescIdx.

Diff Detail

Event Timeline

MaskRay created this revision.Jan 9 2022, 2:17 PM
MaskRay requested review of this revision.Jan 9 2022, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 9 2022, 2:17 PM
ikudrin accepted this revision.Jan 10 2022, 2:33 AM

LGTM

lld/test/ELF/x86-64-tlsdesc-gd-mixed.s
6

The comment should be updated.

This revision is now accepted and ready to land.Jan 10 2022, 2:33 AM
MaskRay updated this revision to Diff 398682.Jan 10 2022, 9:49 AM
MaskRay marked an inline comment as done.

update comment

This revision was automatically updated to reflect the committed changes.