loader: stop linking libdl/c/m into the loader
This is to prevent situations when libgcc.a calls into incorrect
implementation of dl_iterate_phdr.
Bug: http://b/27106625
Test: build && run bionic-unit-tests --getst_filter=dl*:Dl*
Change-Id: I4cba8c4a156f91f17ba3d95c39cb80f9b70c9d8f
diff --git a/libc/Android.bp b/libc/Android.bp
index 05df811..b1d077d 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1578,10 +1578,9 @@
// dynamic linker.
cc_library_static {
+ name: "libc_nomalloc",
+
defaults: ["libc_defaults"],
- srcs: [
- "bionic/dl_iterate_phdr_static.cpp",
- ],
arch: {
arm: {
@@ -1591,8 +1590,6 @@
cflags: ["-DLIBC_STATIC"],
- name: "libc_nomalloc",
-
whole_static_libs: [
"libc_common",
"libc_init_static",