This is an archive of the discontinued LLVM Phabricator instance.

Handle R_X86_64_GOTOFF64.
ClosedPublic

Authored by ruiu on Jun 11 2018, 4:56 PM.

Details

Summary

R_X86_64_GOTOFF64 is a relocation type to set to a distance betwween
a symbol and the beginning of the .got section. Previously, we always
created a dynamic relocation for the relocation type even though it
can be resolved at link-time.

Creating a dynamic relocation for R_X86_64_GOTOFF64 caused link failure
for some programs that do have a relocation of the type in a .text
section, as text relocations are prohibited in most configurations.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.Jun 11 2018, 4:56 PM
MaskRay accepted this revision.Jun 11 2018, 10:24 PM

..This is what I removed from https://reviews.llvm.org/D47098 (which is still blocked by https://reviews.llvm.org/D47507) because of reviewer's suggestion. Anyway LG.

This revision is now accepted and ready to land.Jun 11 2018, 10:24 PM
ruiu added a comment.Jun 12 2018, 12:53 PM

It is not me who requested you remove GOTOFF64 relocation support from your patch, but if you have a patch with a title "Add R_X86_64_GOTPC{32,64} support", I wouldn't be surprised if you are requested to remove code to support other types of relocations, as patches shouldn't contain unrelated changes. A best practice is to separate a patch to two or more.

This revision was automatically updated to reflect the committed changes.