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
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index f851af4..e3b4827 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -104,6 +104,7 @@
-Wl,-z,noexecstack \
-Wl,-z,relro \
-Wl,-z,now \
+ -Wl,--build-id=md5 \
-Wl,--warn-shared-textrel \
-Wl,--fatal-warnings \
$(arch_variant_ldflags)