aboutsummaryrefslogtreecommitdiffstats
path: root/tools/relocation_packer
Commit message (Collapse)AuthorAgeFilesLines
* Fix Mac checkbuild.Ying Wang2015-06-081-0/+3
| | | | | | Bug: 21669400 Change-Id: I54691661605a2e2c1871781964aed343840b8560 (cherry-pick from commit 33c2d441b8f816722bed984c6e12b82b888c3ca2)
* Do not adjust PT_GNU_STACK segmentDmitriy Ivanov2015-05-041-0/+7
| | | | | | Bug: http://b/20687795 Bug: http://b/18051137 Change-Id: Ie8af3892cfbebcc0249e7981284c4ad97ff40317
* Adjust DT_MIPS_RLD_MAP2 valueDmitriy Ivanov2015-04-292-0/+14
| | | | | | | | | | | | DT_MIPS_RLD_MAP2 stores the difference between dynamic entry address and the address of the _r_debug (used by GDB) since the dynamic section and target address are on the different sides of the hole it needs to be adjusted accordingly Bug: http://b/20658994 Bug: http://b/18051137 Change-Id: I4c5e379e8a4c68f029467df6dc660f81a7013a09 (cherry picked from commit 18c935ceabb54a32aff42f99c6d20680ac333157)
* Reduce p_align for program header to page size.Dmitriy Ivanov2015-04-272-2/+8
| | | | | | | | | | | | | | Having p_align > page_size leads to the situation when striping packed executables results in unnecessary p_vaddr adjustments. And it also may result (with probability 1 - 1/sizeof(uintptr_t)) in misaligned segments following .dynstr Bug: http://b/20629834 Bug: http://b/18051137 (cherry picked from commit b293969c6d4acede62ac7b035dcb598e63574ca0) Change-Id: I2fb15cf5cb52fada6511d5af93df099fc2cbf7ba
* Exit normally when relocations are already packed.Dmitriy Ivanov2015-04-242-4/+4
| | | | | Bug: http://b/18051137 Change-Id: Idfffac5fe965e3cdeabe6d3b2dcd8c275c6ae5df
* Exit normally when packing relocs saves no space.Dmitriy Ivanov2015-04-231-1/+1
| | | | | Bug: http://b/18051137 Change-Id: I43ea5678a677e5d39fb54fafcf3a2f3a252c79b0
* Always use signed leb128 encodingDmitriy Ivanov2015-04-2211-317/+50
| | | | | | | | | | | According to runs on /system/lib there using unsigned leb128 does not save us any additional space. In order to keep packing as simple as possible switch to using signed leb128 for everything. Bug: http://b/18051137 Change-Id: I1a47cb9eb2175895b3c3f7c13b4c6b1060de86c0
* Statically link libc++ for prebuiltsDmitriy Ivanov2015-04-221-0/+3
| | | | | | | | Statically link libc++ to relocation_packer in order to make it work from prebuilts Bug: http://b/18051137 Change-Id: I933ed6a0e48780a26b261069eb6a293432824fe7
* Adjust DT_VERSYM/VERNEED/VERDEF dynamic sectionsDmitriy Ivanov2015-04-211-6/+9
| | | | | | | | | | | | | | This is recent addition to bionic linker. The symbol versioning was not supported before therefore this bug went unnoticed. Also normal exit when there is not enought relocations to pack. This is to enable integration of relocation_packer to android build system. Bug: http://b/20139821 Bug: http://b/18051137 Change-Id: Iaf36ae11c8e4b15cf785b6dd1712a3bdcf47cc45
* Fix comment drift in assorted relocation packer modules.Simon Baldwin2015-03-265-87/+8
| | | | | | | | | | | Some of the commentary in relocation packer code is relevant only to the packing strategy employed by chromium, and no longer applies here. This change fixes or deletes it. Code comment change only; no functional effect. Change-Id: Id229ee1d802bba608be15b79bc75bf90df557dab Signed-off-by: Simon Baldwin <simonb@google.com>
* Remove unused/unusable relocation packer files.Simon Baldwin2015-03-254-339/+0
| | | | | | | | | | | | | Removes: - src/run_length_encoder.h artifact of the original packing tool, not used here - test_data/generate_elf_file_unittest_relocs.sh - test_data/generate_elf_file_unittest_relocs.py test data generation for chromium/gyp, not usable here - README.TXT because it is now almost entirely outdated Change-Id: Ic4cd372647d9a365dc52833a6cc1cf66f0c95ec9
* Generalize compression toolDmitriy Ivanov2015-03-0627-2091/+1580
| | | | | | | | | | 1. One binary for all architectures 2. Generalize (and slightly improve) compression 2.1 works on all relocation types (rela?.dyn section only so far) 2.2 Uses same format to encode ElfW(Rel) as well as ElfW(Rela) tables Bug: 18051137 Change-Id: I66c95d9076954ca115816fc577d0f5ef274e5e72
* Import relocation packer from chromium repoDmitriy Ivanov2015-03-0636-0/+5485
Bug: 18051137 Change-Id: Ia67fa11da8247e3f86f70a8ce99e6695f2c05423