summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2012-12-19 05:08:07 +0100
committerrofl0r <retnyg@gmx.net>2012-12-19 05:08:13 +0100
commit26cf9c3c6b8dd8d8c94867fefaac64bac7df02a4 (patch)
treeceea9eb085322f3aeeeb2fb37fc8d50e1acd332d /include
parent58bba42d1bd14e1ab01f3249ffc98afdbf841a6a (diff)
downloadmusl-26cf9c3c6b8dd8d8c94867fefaac64bac7df02a4.tar.gz
musl-26cf9c3c6b8dd8d8c94867fefaac64bac7df02a4.tar.bz2
musl-26cf9c3c6b8dd8d8c94867fefaac64bac7df02a4.tar.xz
musl-26cf9c3c6b8dd8d8c94867fefaac64bac7df02a4.zip
link.h: expose glibc/svr4 dynlinker debugging glue
this is already implemented in the dynliker (see struct debug), but was not exposed. we need it to do so to make wine happy...
Diffstat (limited to 'include')
-rw-r--r--include/link.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/link.h b/include/link.h
index d5160e7e..c30431e9 100644
--- a/include/link.h
+++ b/include/link.h
@@ -3,6 +3,7 @@
#include <elf.h>
#define __NEED_size_t
+#define __NEED_uint32_t
#include <bits/alltypes.h>
#if UINTPTR_MAX > 0xffffffff
@@ -11,6 +12,9 @@
#define ElfW(type) Elf32_ ## type
#endif
+/* this is the same everywhere except alpha and s390 */
+typedef uint32_t Elf_Symndx;
+
struct dl_phdr_info {
ElfW(Addr) dlpi_addr;
const char *dlpi_name;
@@ -22,6 +26,21 @@ struct dl_phdr_info {
void *dlpi_tls_data;
};
+struct link_map {
+ ElfW(Addr) l_addr;
+ char *l_name;
+ ElfW(Dyn) *l_ld;
+ struct link_map *l_next, *l_prev;
+};
+
+struct r_debug {
+ int r_version;
+ struct link_map *r_map;
+ ElfW(Addr) r_brk;
+ enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state;
+ ElfW(Addr) r_ldbase;
+};
+
int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *), void *);
#endif