Add the dl_iterate_phdr function to libdl for arm.

Bug: 8410085

Merge from internal master.

(cherry-picked from cb491bc66dc0abc145930b09086eb9189a30f6c2)

Change-Id: I94ed51bc5d4c626df7552c0e85c31ccee2d6568f
diff --git a/libc/arch-arm/arm.mk b/libc/arch-arm/arm.mk
index e87ef38..5f2443f 100644
--- a/libc/arch-arm/arm.mk
+++ b/libc/arch-arm/arm.mk
@@ -21,10 +21,11 @@
 # These are used by the static and dynamic versions of the libc
 # respectively.
 _LIBC_ARCH_STATIC_SRC_FILES := \
-    arch-arm/bionic/exidx_static.c
+    arch-arm/bionic/exidx_static.c \
+    bionic/dl_iterate_phdr_static.c \
 
 _LIBC_ARCH_DYNAMIC_SRC_FILES := \
-    arch-arm/bionic/exidx_dynamic.c
+    arch-arm/bionic/exidx_dynamic.c \
 
 # Remove the C++ fortify function implementations for which there is an
 # arm assembler version.
diff --git a/libc/include/link.h b/libc/include/link.h
index 842b448..0edf5df 100644
--- a/libc/include/link.h
+++ b/libc/include/link.h
@@ -43,11 +43,11 @@
   ElfW(Half) dlpi_phnum;
 };
 
+int dl_iterate_phdr(int (*cb)(struct dl_phdr_info*, size_t, void*), void*);
+
 #ifdef __arm__
 typedef long unsigned int* _Unwind_Ptr;
 _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int* pcount);
-#else
-int dl_iterate_phdr(int (*cb)(struct dl_phdr_info*, size_t, void*), void*);
 #endif
 
 __END_DECLS