1ffac8e636
Proposal for adding SHT_RELR sections in the generic-abi is at https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg This CL requires clang-r328903. The following test results are on clang-r339409. Size comparison for "aosp_marlin-userdebug": $ du -B1 -s {none,pack,relr,both}/out/target/product/marlin/system 1014616064 none/out/target/product/marlin/system 1001074688 pack/out/target/product/marlin/system 1004273664 relr/out/target/product/marlin/system 1000099840 both/out/target/product/marlin/system none contains a build with no packing (--pack-dyn-relocs=none). pack contains a build with current settings (--pack-dyn-relocs=android). relr contains a build with relr packing only (--pack-dyn-relocs=relr). both contains a build with both options enabled (--pack-dyn-relocs=android+relr). With --pack-dyn-relocs=android+relr, lld will encode the relative relocations in a SHT_ANDROID_RELR section, and pack the rest of the dynamic relocations in a SHT_ANDROID_REL(A) section. --pack-dyn-relocs=android was saving us 13,541,376 bytes (1.35%) (none - pack). --pack-dyn-relocs=relr will save us 10,342,400 bytes (1.03%) (none - relr). --pack-dyn-relocs=android+relr is saving us 14,516,224 bytes (1.45%) (none - both). Size comparison for the "system/bin" directory: $ du -B1 -s {none,pack,relr,both}/out/target/product/marlin/system/bin 29413376 none/out/target/product/marlin/system/bin 28319744 pack/out/target/product/marlin/system/bin 28258304 relr/out/target/product/marlin/system/bin 28180480 both/out/target/product/marlin/system/bin --pack-dyn-relocs=android was saving us 1,093,632 bytes (3.72%) (none - pack). --pack-dyn-relocs=relr will save us 1,155,072 bytes (3.93%) (none - relr). --pack-dyn-relocs=android+relr is saving us 1,232,896 bytes (4.19%) (none - both). Bug: None Test: Built aosp_marlin-userdebug image, boots on device. Test: Built aosp_x86_64-userdebug image, boots in emulator. Change-Id: Ibb726c3b9d87688f387a7f2974fdae9bfc24efc9 |
||
---|---|---|
.. | ||
config | ||
libbuildversion | ||
androidmk.go | ||
binary.go | ||
builder.go | ||
cc.go | ||
cc_test.go | ||
check.go | ||
cmakelists.go | ||
compdb.go | ||
compiler.go | ||
coverage.go | ||
gen.go | ||
gen_stub_libs.py | ||
gen_test.go | ||
genrule.go | ||
installer.go | ||
kernel_headers.go | ||
library.go | ||
library_test.go | ||
linker.go | ||
llndk_library.go | ||
lto.go | ||
makevars.go | ||
ndk_headers.go | ||
ndk_library.go | ||
ndk_prebuilt.go | ||
ndk_sysroot.go | ||
object.go | ||
pgo.go | ||
prebuilt.go | ||
proto.go | ||
pylintrc | ||
rs.go | ||
sabi.go | ||
sanitize.go | ||
stl.go | ||
strip.go | ||
test.go | ||
test_data_test.go | ||
test_gen_stub_libs.py | ||
tidy.go | ||
toolchain_library.go | ||
util.go | ||
util_test.go | ||
vendor_public_library.go | ||
vndk.go | ||
vndk_prebuilt.go |