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/linker/linker.h b/linker/linker.h
index 296dcd6..8ed433c 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -37,6 +37,7 @@
#ifdef __cplusplus
extern "C" {
#endif
+#include <link.h>
#undef PAGE_MASK
#undef PAGE_SIZE
@@ -72,16 +73,6 @@
struct link_map * l_prev;
};
-/* needed for dl_iterate_phdr to be passed to the callbacks provided */
-struct dl_phdr_info
-{
- Elf32_Addr dlpi_addr;
- const char *dlpi_name;
- const Elf32_Phdr *dlpi_phdr;
- Elf32_Half dlpi_phnum;
-};
-
-
// Values for r_debug->state
enum {
RT_CONSISTENT,
@@ -241,13 +232,6 @@
Elf32_Sym *soinfo_lookup(soinfo *si, const char *name);
void soinfo_call_constructors(soinfo *si);
-#if defined(ANDROID_ARM_LINKER)
-typedef long unsigned int *_Unwind_Ptr;
-_Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int *pcount);
-#elif defined(ANDROID_X86_LINKER) || defined(ANDROID_MIPS_LINKER)
-int dl_iterate_phdr(int (*cb)(struct dl_phdr_info *, size_t, void *), void *);
-#endif
-
#ifdef __cplusplus
};
#endif