This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Remove R_X86_64_GOTTPOFF from static relocation proccessing
ClosedPublic

Authored by grimar on Feb 4 2016, 3:50 AM.

Diff Detail

Event Timeline

grimar updated this revision to Diff 46890.Feb 4 2016, 3:50 AM
grimar retitled this revision from to [ELF] - Remove R_X86_64_GOTTPOFF from static relocation proccessing.
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
ruiu added inline comments.Feb 5 2016, 10:19 AM
ELF/Target.h
29

The other dynamic relocation for GOT is "GotRel", so we don't need to add "Dyn", no?

Also, since this is now just an accessor that does nothing, please remove this function and use the field directly.

grimar updated this revision to Diff 47304.Feb 9 2016, 1:47 AM
  • Rebased
  • Addressed review comments.
ELF/Target.h
29

I am already using the field directly, but there is still one place where accessor is required.
It is used directly for place (after rebase it is the only one place I think) where dynamic relocation is created. That is why I added "Dyn" to field name.
'Accessor' is still used in InputSectionBase<ELFT>::relocate() where static relocation calculation is applied, it is not an accessor though, because it returns result depending on argument for static relocation resolving.

rafael accepted this revision.Feb 10 2016, 7:37 PM
rafael edited edge metadata.

LGTM if you keep the TlsGotRel name.

This revision is now accepted and ready to land.Feb 10 2016, 7:37 PM
This revision was automatically updated to reflect the committed changes.

LGTM if you keep the TlsGotRel name.

Done. Thanks for review !