This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF] Split handleNoRelaxTlsRelocation into ARM and Mips specific impls [NFC]
ClosedPublic

Authored by peter.smith on Apr 6 2017, 3:25 AM.

Details

Summary

The handleNoRelaxTlsRelocation handled both ARM and Mips as at a high-level the actions of what to do when encountering a local dynamic or global dynamic TLS relocation are the same. However due to Mips using a custom GOT the differences of the implementation are enough that the function became difficult to understand.

This change replaces handleNotRelaxTlsRelocation into handleARMTlsRelocation() and handleMipsTlsRelocation() so that the ARM and Mips specific code is isolated.

This refactoring change has been split out of D31672

Diff Detail

Repository
rL LLVM

Event Timeline

peter.smith created this revision.Apr 6 2017, 3:25 AM
rafael edited edge metadata.Apr 6 2017, 3:10 PM

I am OK with this. Once we get every case working we can try to find some commonalities with the regular case (mips I am pretty sure will remain special).

So LGTM, but please wait to see if Rui agrees.

ruiu accepted this revision.Apr 6 2017, 4:05 PM

LGTM. Yes, I think this makes things a bit better by making the difference more explicit than before.

This revision is now accepted and ready to land.Apr 6 2017, 4:05 PM
This revision was automatically updated to reflect the committed changes.