Emit unique linker buildid in all binaries.

We want to store the symbol information for all android binaries in a global database.

* We ingest unstripped binaries into the global database
* When we collect address data from device (e.g. instruction pointer address), we want to lookup its symbol information through the global database. The key of the mapping is a unique build id, which is the same between binaries on device (stripped) and unstripped binaries.

After applying this patch, the system.img size increases by 0.0047% (16.3KB).

Change-Id: Id92faf2951f43a30947e8d2b690c1af6bf7e3f54
This commit is contained in:
Dehao Chen 2015-01-14 11:21:22 -08:00
parent 64606bd5b0
commit 734de7a8b4
6 changed files with 6 additions and 0 deletions

View file

@ -133,6 +133,7 @@ $(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += \
-Wl,-z,noexecstack \
-Wl,-z,relro \
-Wl,-z,now \
-Wl,--build-id=md5 \
-Wl,--warn-shared-textrel \
-Wl,--fatal-warnings \
-Wl,--icf=safe \

View file

@ -108,6 +108,7 @@ TARGET_GLOBAL_LDFLAGS += \
-Wl,-z,noexecstack \
-Wl,-z,relro \
-Wl,-z,now \
-Wl,--build-id=md5 \
-Wl,--warn-shared-textrel \
-Wl,--fatal-warnings \
-Wl,-maarch64linux \

View file

@ -104,6 +104,7 @@ $(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += \
-Wl,-z,noexecstack \
-Wl,-z,relro \
-Wl,-z,now \
-Wl,--build-id=md5 \
-Wl,--warn-shared-textrel \
-Wl,--fatal-warnings \
$(arch_variant_ldflags)

View file

@ -104,6 +104,7 @@ TARGET_GLOBAL_LDFLAGS += \
-Wl,-z,noexecstack \
-Wl,-z,relro \
-Wl,-z,now \
-Wl,--build-id=md5 \
-Wl,--warn-shared-textrel \
-Wl,--fatal-warnings \
$(arch_variant_ldflags)

View file

@ -122,6 +122,7 @@ $(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -m32
$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,-z,noexecstack
$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,-z,relro -Wl,-z,now
$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--build-id=md5
$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--warn-shared-textrel
$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--fatal-warnings
$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--gc-sections

View file

@ -127,6 +127,7 @@ TARGET_GLOBAL_LDFLAGS += -m64
TARGET_GLOBAL_LDFLAGS += -Wl,-z,noexecstack
TARGET_GLOBAL_LDFLAGS += -Wl,-z,relro -Wl,-z,now
TARGET_GLOBAL_LDFLAGS += -Wl,--build-id=md5
TARGET_GLOBAL_LDFLAGS += -Wl,--warn-shared-textrel
TARGET_GLOBAL_LDFLAGS += -Wl,--fatal-warnings
TARGET_GLOBAL_LDFLAGS += -Wl,--gc-sections