Fix LDFLAGS for arm and x86

Change-Id: I5366f4499cb4da3a51b8484ab3e4ff785f0888ab
diff --git a/libc/Android.mk b/libc/Android.mk
index 3d06ea7..2ea96d4 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -1417,13 +1417,17 @@
 LOCAL_CXX_STL := none
 LOCAL_SYSTEM_SHARED_LIBRARIES :=
 
+# TODO: This is to work around b/24465209. Remove after root cause is fixed
+LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
+LOCAL_LDFLAGS_x86 := -Wl,--hash-style=both
+
 # Don't re-export new/delete and friends, even if the compiler really wants to.
-LOCAL_LDFLAGS_arm    := -Wl,--version-script,$(LOCAL_PATH)/libc.arm.map
-LOCAL_LDFLAGS_arm64  := -Wl,--version-script,$(LOCAL_PATH)/libc.arm64.map
-LOCAL_LDFLAGS_mips   := -Wl,--version-script,$(LOCAL_PATH)/libc.mips.map
-LOCAL_LDFLAGS_mips64 := -Wl,--version-script,$(LOCAL_PATH)/libc.mips64.map
-LOCAL_LDFLAGS_x86    := -Wl,--version-script,$(LOCAL_PATH)/libc.x86.map
-LOCAL_LDFLAGS_x86_64 := -Wl,--version-script,$(LOCAL_PATH)/libc.x86_64.map
+LOCAL_LDFLAGS_arm    += -Wl,--version-script,$(LOCAL_PATH)/libc.arm.map
+LOCAL_LDFLAGS_arm64  += -Wl,--version-script,$(LOCAL_PATH)/libc.arm64.map
+LOCAL_LDFLAGS_mips   += -Wl,--version-script,$(LOCAL_PATH)/libc.mips.map
+LOCAL_LDFLAGS_mips64 += -Wl,--version-script,$(LOCAL_PATH)/libc.mips64.map
+LOCAL_LDFLAGS_x86    += -Wl,--version-script,$(LOCAL_PATH)/libc.x86.map
+LOCAL_LDFLAGS_x86_64 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86_64.map
 
 # We'd really like to do this for all architectures, but since this wasn't done
 # before, these symbols must continue to be exported on LP32 for binary
@@ -1434,10 +1438,6 @@
 # prevent the build system from using this flag.
 LOCAL_NO_EXCLUDE_LIBS := true
 
-# TODO: This is to work around b/24465209. Remove after root cause is fixed
-LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
-LOCAL_LDFLAGS_x86 := -Wl,--hash-style=both
-
 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files))
 
diff --git a/libc/libc.arm.map b/libc/libc.arm.map
index ae9dc3d..fce04ee 100644
--- a/libc/libc.arm.map
+++ b/libc/libc.arm.map
@@ -385,7 +385,6 @@
     endmntent;
     endpwent;
     endservent;
-    endusershell;
     endutent;
     environ;
     epoll_create;
@@ -576,7 +575,6 @@
     gettid;
     gettimeofday;
     getuid;
-    getusershell;
     getutent;
     getwc;
     getwchar;
@@ -1024,7 +1022,6 @@
     setstate;
     settimeofday;
     setuid;
-    setusershell;
     setutent;
     setvbuf;
     setxattr;
diff --git a/libc/libc.arm64.map b/libc/libc.arm64.map
index a36a57f..a58b757 100644
--- a/libc/libc.arm64.map
+++ b/libc/libc.arm64.map
@@ -243,7 +243,6 @@
     endmntent;
     endpwent;
     endservent;
-    endusershell;
     endutent;
     environ;
     epoll_create;
@@ -428,7 +427,6 @@
     gettid;
     gettimeofday;
     getuid;
-    getusershell;
     getutent;
     getwc;
     getwchar;
@@ -881,7 +879,6 @@
     setstate;
     settimeofday;
     setuid;
-    setusershell;
     setutent;
     setvbuf;
     setxattr;
diff --git a/libc/libc.mips.map b/libc/libc.mips.map
index 01309cc..e71d5ec 100644
--- a/libc/libc.mips.map
+++ b/libc/libc.mips.map
@@ -349,7 +349,6 @@
     endmntent;
     endpwent;
     endservent;
-    endusershell;
     endutent;
     environ;
     epoll_create;
@@ -540,7 +539,6 @@
     gettid;
     gettimeofday;
     getuid;
-    getusershell;
     getutent;
     getwc;
     getwchar;
@@ -987,7 +985,6 @@
     setstate;
     settimeofday;
     setuid;
-    setusershell;
     setutent;
     setvbuf;
     setxattr;
diff --git a/libc/libc.mips64.map b/libc/libc.mips64.map
index a36a57f..a58b757 100644
--- a/libc/libc.mips64.map
+++ b/libc/libc.mips64.map
@@ -243,7 +243,6 @@
     endmntent;
     endpwent;
     endservent;
-    endusershell;
     endutent;
     environ;
     epoll_create;
@@ -428,7 +427,6 @@
     gettid;
     gettimeofday;
     getuid;
-    getusershell;
     getutent;
     getwc;
     getwchar;
@@ -881,7 +879,6 @@
     setstate;
     settimeofday;
     setuid;
-    setusershell;
     setutent;
     setvbuf;
     setxattr;
diff --git a/libc/libc.x86.map b/libc/libc.x86.map
index 624a18b..6f60524 100644
--- a/libc/libc.x86.map
+++ b/libc/libc.x86.map
@@ -347,7 +347,6 @@
     endmntent;
     endpwent;
     endservent;
-    endusershell;
     endutent;
     environ;
     epoll_create;
@@ -538,7 +537,6 @@
     gettid;
     gettimeofday;
     getuid;
-    getusershell;
     getutent;
     getwc;
     getwchar;
@@ -985,7 +983,6 @@
     setstate;
     settimeofday;
     setuid;
-    setusershell;
     setutent;
     setvbuf;
     setxattr;
diff --git a/libc/libc.x86_64.map b/libc/libc.x86_64.map
index a36a57f..a58b757 100644
--- a/libc/libc.x86_64.map
+++ b/libc/libc.x86_64.map
@@ -243,7 +243,6 @@
     endmntent;
     endpwent;
     endservent;
-    endusershell;
     endutent;
     environ;
     epoll_create;
@@ -428,7 +427,6 @@
     gettid;
     gettimeofday;
     getuid;
-    getusershell;
     getutent;
     getwc;
     getwchar;
@@ -881,7 +879,6 @@
     setstate;
     settimeofday;
     setuid;
-    setusershell;
     setutent;
     setvbuf;
     setxattr;
diff --git a/libm/Android.mk b/libm/Android.mk
index e9ed523..bd51e7c 100644
--- a/libm/Android.mk
+++ b/libm/Android.mk
@@ -525,12 +525,12 @@
 LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
 LOCAL_LDFLAGS_x86 := -Wl,--hash-style=both
 
-LOCAL_LDFLAGS_arm    := -Wl,--version-script,$(LOCAL_PATH)/libm.arm.map
-LOCAL_LDFLAGS_arm64  := -Wl,--version-script,$(LOCAL_PATH)/libm.arm64.map
-LOCAL_LDFLAGS_mips   := -Wl,--version-script,$(LOCAL_PATH)/libm.mips.map
-LOCAL_LDFLAGS_mips64 := -Wl,--version-script,$(LOCAL_PATH)/libm.mips64.map
-LOCAL_LDFLAGS_x86    := -Wl,--version-script,$(LOCAL_PATH)/libm.x86.map
-LOCAL_LDFLAGS_x86_64 := -Wl,--version-script,$(LOCAL_PATH)/libm.x86_64.map
+LOCAL_LDFLAGS_arm    += -Wl,--version-script,$(LOCAL_PATH)/libm.arm.map
+LOCAL_LDFLAGS_arm64  += -Wl,--version-script,$(LOCAL_PATH)/libm.arm64.map
+LOCAL_LDFLAGS_mips   += -Wl,--version-script,$(LOCAL_PATH)/libm.mips.map
+LOCAL_LDFLAGS_mips64 += -Wl,--version-script,$(LOCAL_PATH)/libm.mips64.map
+LOCAL_LDFLAGS_x86    += -Wl,--version-script,$(LOCAL_PATH)/libm.x86.map
+LOCAL_LDFLAGS_x86_64 += -Wl,--version-script,$(LOCAL_PATH)/libm.x86_64.map
 
 
 LOCAL_MODULE := libm