Add link.h for all platforms with dl_phdr_info
This header is used on bionic build and should be propagated into
sysroot on toolchain rebuild. Discussion re. this header is here:
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00936.html
It is available already in mips NDK platforms:
development/ndk/platforms/android-9/arch-mips/include/link.h
Change-Id: I39ff467cdac9f448e31c11ee3e14a6200e82ab57
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
diff --git a/libc/bionic/dl_iterate_phdr_static.c b/libc/bionic/dl_iterate_phdr_static.c
index 4eecff6..b8ef9e9 100644
--- a/libc/bionic/dl_iterate_phdr_static.c
+++ b/libc/bionic/dl_iterate_phdr_static.c
@@ -28,16 +28,7 @@
#include <sys/types.h>
#include <linux/elf.h>
-
-/* TODO: Move this into a header that linker.h can also pull it in.
- * Silly to have same struct in 2 places. This is temporary. */
-struct dl_phdr_info
-{
- Elf32_Addr dlpi_addr;
- const char *dlpi_name;
- const Elf32_Phdr *dlpi_phdr;
- Elf32_Half dlpi_phnum;
-};
+#include <link.h>
/* Dynamic binaries get this from the dynamic linker (system/linker), which
* we don't pull in for static bins. We also don't have a list of so's to