This is an archive of the discontinued LLVM Phabricator instance.

[ELF][X86_64] Handle R_X86_64_PC64 relocation
ClosedPublic

Authored by davide on Feb 22 2015, 5:49 PM.

Diff Detail

Event Timeline

davide updated this revision to Diff 20483.Feb 22 2015, 5:49 PM
davide retitled this revision from to [ELF][X86_64] Handle R_X86_64_PC64 relocation.
davide updated this object.
davide edited the test plan for this revision. (Show Details)
davide added a reviewer: shankarke.
davide set the repository for this revision to rL LLVM.
davide added a project: lld.
davide added subscribers: emaste, Unknown Object (MLST).
shankarke accepted this revision.Feb 22 2015, 6:02 PM
shankarke edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Feb 22 2015, 6:02 PM
ruiu added a subscriber: ruiu.Feb 22 2015, 7:25 PM
ruiu added inline comments.
lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp
62

Can you add using llvm::support::ulittle64_t at beginning of the file and use that here?

64

Not sure if clang-format formatted like this, but I think there should be no space around "*".

Commments inline.

lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp
62

This follows the style of the rest of the file, wouldn't be better commit the patch as is and change the style for the whole file in a subsequent pass?

64

Ditto. No, it did not, I tried to be consistent to what was already there.

davide closed this revision.Feb 24 2015, 10:00 PM
silvas added a subscriber: silvas.Feb 26 2015, 3:58 PM
silvas added inline comments.
lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp
64

Can you just use endian::read and endian::write functions?

ruiu added a comment.Feb 26 2015, 4:53 PM

Can we add llvm::support::endian::read{le,be}{16,32,64}(void *)
and llvm::support::endian::write{le,be}{16,32,64}(void *, uint64_t)?