llvm-readobj: Add support for reading relocations in the Android packed format.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 25 Oct 2017 03:37:12 +0000 (03:37 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 25 Oct 2017 03:37:12 +0000 (03:37 +0000)
commit689e6c052e0514020e4a2c7623cb49056888c502
tree75561fd06d3c6639c9128e14b13c850c35156faf
parent9f46ece85a1844c23a710645d9f84d936197d8de
llvm-readobj: Add support for reading relocations in the Android packed format.

This is in preparation for testing lld's upcoming relocation packing
feature (D39152). I have verified that this implementation correctly
unpacks the relocations from a Chromium DSO built with gold and the
Android relocation packer for ARM32 and ARM64.

Differential Revision: https://reviews.llvm.org/D39272

llvm-svn: 316543
14 files changed:
llvm/include/llvm/BinaryFormat/ELF.h
llvm/include/llvm/Object/ELF.h
llvm/lib/Object/ELF.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/llvm-readobj/Inputs/elf-packed-relocs1.s [new file with mode: 0644]
llvm/test/tools/llvm-readobj/Inputs/elf-packed-relocs2.s [new file with mode: 0644]
llvm/test/tools/llvm-readobj/elf-packed-relocs-empty.s [new file with mode: 0644]
llvm/test/tools/llvm-readobj/elf-packed-relocs-error1.s [new file with mode: 0644]
llvm/test/tools/llvm-readobj/elf-packed-relocs-error2.s [new file with mode: 0644]
llvm/test/tools/llvm-readobj/elf-packed-relocs-error3.s [new file with mode: 0644]
llvm/test/tools/llvm-readobj/elf-packed-relocs-error4.s [new file with mode: 0644]
llvm/test/tools/llvm-readobj/elf-packed-relocs-error5.s [new file with mode: 0644]
llvm/test/tools/llvm-readobj/elf-packed-relocs.test [new file with mode: 0644]
llvm/tools/llvm-readobj/ELFDumper.cpp