This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Rename R_TLS to R_TPREL and R_NEG_TLS to R_TPREL_NEG. NFC
ClosedPublic

Authored by MaskRay on Dec 17 2020, 9:30 AM.

Details

Summary

The scope of R_TLS (TP offset relocation types (TPREL/TPOFF) used for the
local-exec TLS model) is actually narrower than its name may imply. R_TLS_NEG
is only used by Solaris R_386_TLS_LE_32.

Rename them so that they will be less confusing.

Diff Detail

Event Timeline

MaskRay created this revision.Dec 17 2020, 9:30 AM
MaskRay requested review of this revision.Dec 17 2020, 9:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2020, 9:30 AM

No objections from me, looks like a sensible change.

Going to be on holiday till the end of the year so may be a bit slow to respond to reviews.

I also think this is a good change.

Maybe R_TPREL_NEG, so it sorts next to R_TPREL in ELF/Relocations.h? We also have R_RELAX_TLS_GD_TO_LE[_NEG].

MaskRay updated this revision to Diff 312640.Dec 17 2020, 4:18 PM
MaskRay retitled this revision from [ELF] Rename R_TLS to R_TPREL and R_NEG_TLS to R_NEG_TPREL. NFC to [ELF] Rename R_TLS to R_TPREL and R_NEG_TLS to R_TPREL_NEG. NFC.
MaskRay edited the summary of this revision. (Show Details)

R_TPREL_NEG

grimar accepted this revision.Dec 18 2020, 12:46 AM

Looks fine to me either.

This revision is now accepted and ready to land.Dec 18 2020, 12:46 AM