aboutsummaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-02-11 00:03:02 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-02-11 00:03:03 +0000
commiteeb9a9f59a58a2f042e8f6fd1a4911ae92ac5493 (patch)
tree7e2ee59d14ba82f70ed233195ccb04ae5f2afa34 /libc
parente74fc3a64fe9296813e5bd867d0c66bd8213be6a (diff)
parent3a9c5d66dc8d41272f51482b713717af7049697e (diff)
downloadandroid_bionic-eeb9a9f59a58a2f042e8f6fd1a4911ae92ac5493.tar.gz
android_bionic-eeb9a9f59a58a2f042e8f6fd1a4911ae92ac5493.tar.bz2
android_bionic-eeb9a9f59a58a2f042e8f6fd1a4911ae92ac5493.zip
Merge "Fix <link.h>."
Diffstat (limited to 'libc')
-rw-r--r--libc/include/link.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/libc/include/link.h b/libc/include/link.h
index 341fbf197..cb8e139ac 100644
--- a/libc/include/link.h
+++ b/libc/include/link.h
@@ -33,7 +33,11 @@
__BEGIN_DECLS
-#define ElfW(type) Elf_##type
+#if __LP64__
+#define ElfW(type) Elf64_ ## type
+#else
+#define ElfW(type) Elf32_ ## type
+#endif
struct dl_phdr_info {
ElfW(Addr) dlpi_addr;
@@ -42,13 +46,35 @@ struct dl_phdr_info {
ElfW(Half) dlpi_phnum;
};
-int dl_iterate_phdr(int (*cb)(struct dl_phdr_info*, size_t, void*), void*);
+int dl_iterate_phdr(int (*)(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);
+_Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr, int*);
#endif
+/* Used by the dynamic linker to communicate with the debugger. */
+struct link_map {
+ ElfW(Addr) l_addr;
+ char* l_name;
+ ElfW(Dyn)* l_ld;
+ struct link_map* l_next;
+ struct link_map* l_prev;
+};
+
+/* Used by the dynamic linker to communicate with the debugger. */
+struct r_debug {
+ int32_t r_version;
+ struct link_map* r_map;
+ ElfW(Addr) r_brk;
+ enum {
+ RT_CONSISTENT,
+ RT_ADD,
+ RT_DELETE
+ } r_state;
+ ElfW(Addr) r_ldbase;
+};
+
__END_DECLS
#endif /* _LINK_H_ */