This is an archive of the discontinued LLVM Phabricator instance.

Delete comparison with GlobalOffsetTable.
Needs ReviewPublic

Authored by espindola on Jun 28 2017, 4:17 PM.

Details

Reviewers
kettenis
ruiu
Summary

Now that _GLOBAL_OFFSET_TABLE_ is defined, we can just use R_PC for it
if needed.

Diff Detail

Event Timeline

rafael created this revision.Jun 28 2017, 4:17 PM

Sorry, I git-svn committed it by mistake. Let me know if you think it is broken :-(

kettenis edited edge metadata.Jun 29 2017, 3:08 AM

It is not completely obvious to me that this is indeed equivalent as the semantics of R_GOTONLY_PC, but it seems to work. I think it works because we define _GLOBAL_OFFSET_TABLE_ as hidden. This no longer forces the creation of an empty GOT but I think the use of these relocation implies that there is a non-empty GOT already.

Benefit of your change as that this will allow us to make _GLOBAL_OFFSET_TABLE_ point somewhere in the middle of the GOT as suggested by the ABI. So let's keep this for now.

espindola commandeered this revision.Mar 15 2018, 8:52 AM
espindola added a reviewer: rafael.