This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - simplify Target interface, relocPointsToGot() removed.
ClosedPublic

Authored by grimar on Nov 25 2015, 12:04 PM.

Details

Summary

relocPointsToGot() is used only for x86. I think we can remove it and move calculation to i386 code.

Description (https://docs.oracle.com/cd/E19683-01/817-3677/chapter6-26/index.html) says:
R_386_GOTPC
Resembles R_386_PC32, except that it uses the address of the global offset table in its calculation. The symbol referenced in this relocation normally is _GLOBAL_OFFSET_TABLE_, which also instructs the link-editor to create the global offset table.

Currently _GLOBAL_OFFSET_TABLE_ has value == zero. And we use GOT address to calculate the relocation. This patch does not changes that. It just removes the method which is used only for x86. So it is close to non functional change.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 41163.Nov 25 2015, 12:04 PM
grimar retitled this revision from to [ELF] - simplify Target interface, relocPointsToGot() removed..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: grimar, llvm-commits.
ruiu accepted this revision.Nov 25 2015, 12:12 PM
ruiu edited edge metadata.

Cool. Thank you for doing this.

This revision is now accepted and ready to land.Nov 25 2015, 12:12 PM
This revision was automatically updated to reflect the committed changes.