Adjust addends rather than targets for RELA configurations.
commit60319add4dc45996150b57148fd1c24763ba7de2
authorsimonb@chromium.org <simonb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 4 Aug 2014 17:10:26 +0000 (4 17:10 +0000)
committersimonb@chromium.org <simonb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 4 Aug 2014 17:10:26 +0000 (4 17:10 +0000)
tree318e1988c1a536b4b97e09a20ef653e50cc6d5f0
parent9b092e568cd106e670a83303921e18d0d4b37414
Adjust addends rather than targets for RELA configurations.

Relocations with addend use the addend rather that the location pointed
to by the relocation as the target of the relocations.  For RELA
relocations, ignore the target and instead adjust the addend for the
hole being created in the file.  Change unit test data accordingly.

Ensure that sections we resize are never zero-length when we load the
Elf file, and that we never set either to zero-length on packing.

BUG=385553

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287354 0039d316-1c4b-4281-b951-d872f2087c98
tools/relocation_packer/src/elf_file.cc
tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64_packed.so