This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj][ELF] Teach llvm-readobj to show dynamic relocation in REL format
ClosedPublic

Authored by atanasyan on Jan 12 2016, 7:01 AM.

Details

Summary

MIPS 32-bit ABI uses REL relocation record format to save dynamic relocations. The patch teaches llvm-readobj to show dynamic relocations in this format.

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan updated this revision to Diff 44632.Jan 12 2016, 7:01 AM
atanasyan retitled this revision from to [llvm-readobj][ELF] Teach llvm-readobj to show dynamic relocation in REL format.
atanasyan updated this object.
atanasyan added a reviewer: rafael.
atanasyan set the repository for this revision to rL LLVM.
atanasyan added a subscriber: llvm-commits.
davide added a subscriber: davide.Jan 12 2016, 10:11 AM

The change looks good, please include a comment explaining how you generated (including the code itself, maybe) the object so we can regenerate that if needed.

davide added inline comments.Jan 12 2016, 10:17 AM
tools/llvm-readobj/ELFDumper.cpp
110 ↗(On Diff #44632)

Actually, this is out of order.

955 ↗(On Diff #44632)

Ditto.

1029 ↗(On Diff #44632)

Can you use 'RELA' as typename? (given you're dealing with rela(s))

atanasyan marked an inline comment as done.Jan 12 2016, 3:23 PM
atanasyan added inline comments.
tools/llvm-readobj/ELFDumper.cpp
955 ↗(On Diff #44632)

I use here the same order as used for DT_RELAxx entries.

atanasyan updated this revision to Diff 44689.Jan 12 2016, 3:43 PM
  • Add instructions how to create dyn-rel.so.elf-mips
  • s/REL/RELA/ in template argument
  • Order printDynamicRelocation declaration properly
davide accepted this revision.Jan 15 2016, 9:31 AM
davide added a reviewer: davide.

LGTM.

This revision is now accepted and ready to land.Jan 15 2016, 9:31 AM
This revision was automatically updated to reflect the committed changes.