Extend relocation packing to cover arm64.
commita8feebb366febd527512da9568487e3e70735a57
authorsimonb@chromium.org <simonb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 30 Jul 2014 13:59:45 +0000 (30 13:59 +0000)
committersimonb@chromium.org <simonb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 30 Jul 2014 13:59:45 +0000 (30 13:59 +0000)
treea25ca71619743a630f18c55b48cb39cf90bca326
parent79a9c773a337829924bd0a157f3abcf77860332f
Extend relocation packing to cover arm64.

Add new delta encoder and signed LEB128 classes to pack relocations with
addends.  Add associated unit tests.

Add packer functions to handle vectors of ELF::Rela structures
(relocations with addends).  Update unit tests.

Templatize elf_file functions to provide versions that handle both
ELF::Rel and ELF::Rela.

Provide 'golden' 64 bit ARM unpacked and packed test data for
elf_file_unittest.  Add gyp targets, actions, and a helper python
script to easily produce these test data files from source using NDK
toolchains.

Tidy terminology in comments, update --help output, and update the
README.TXT.

BUG=385553

Review URL: https://codereview.chromium.org/410933004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286503 0039d316-1c4b-4281-b951-d872f2087c98
24 files changed:
tools/relocation_packer/README.TXT
tools/relocation_packer/relocation_packer.gyp
tools/relocation_packer/src/delta_encoder.cc [new file with mode: 0644]
tools/relocation_packer/src/delta_encoder.h [new file with mode: 0644]
tools/relocation_packer/src/delta_encoder_unittest.cc [new file with mode: 0644]
tools/relocation_packer/src/elf_file.cc
tools/relocation_packer/src/elf_file.h
tools/relocation_packer/src/elf_file_unittest.cc
tools/relocation_packer/src/elf_traits.h
tools/relocation_packer/src/leb128.h
tools/relocation_packer/src/main.cc
tools/relocation_packer/src/packer.cc
tools/relocation_packer/src/packer.h
tools/relocation_packer/src/packer_unittest.cc
tools/relocation_packer/src/run_length_encoder.cc
tools/relocation_packer/src/run_length_encoder.h
tools/relocation_packer/src/sleb128.cc [new file with mode: 0644]
tools/relocation_packer/src/sleb128.h [copied from tools/relocation_packer/src/leb128.h with 60% similarity]
tools/relocation_packer/src/sleb128_unittest.cc [new file with mode: 0644]
tools/relocation_packer/test_data/elf_file_unittest_relocs.cc
tools/relocation_packer/test_data/elf_file_unittest_relocs.so [deleted file]
tools/relocation_packer/test_data/elf_file_unittest_relocs_packed.so [deleted file]
tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.py [new file with mode: 0755]
tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.sh [new file with mode: 0755]