[llvm-objcopy] Add support for dynamic relocations
authorJake Ehrlich <jakehehrlich@google.com>
Tue, 26 Sep 2017 18:02:25 +0000 (18:02 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Tue, 26 Sep 2017 18:02:25 +0000 (18:02 +0000)
commit9f1a390f72ea5ee64f3e7859133983e878835c0a
treef68df258ececeb26efed3e0db6227150b86f8df2
parent448e8ad94326713b2ef3d19b7fdc397e81114750
[llvm-objcopy] Add support for dynamic relocations

This change adds support for dynamic relocations (allocated
SHT_REL/SHT_RELA sections with a dynamic symbol table as their link).

The binary I added for the test is here:
https://drive.google.com/file/d/0B3gtIAmiMwZXSjJUZE9pUjd4M0k/view?usp=sharing

Unless support for dynamic symbol tables in yaml2obj is added this is
needed.

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

llvm-svn: 314227
llvm/test/tools/llvm-objcopy/Inputs/dynrel.elf [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/dynamic-relocations.test [new file with mode: 0644]
llvm/tools/llvm-objcopy/Object.cpp
llvm/tools/llvm-objcopy/Object.h