summaryrefslogtreecommitdiff
path: root/ldso/ldso/link.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-04-23 17:43:54 +0000
committerEric Andersen <andersen@codepoet.org>2001-04-23 17:43:54 +0000
commit66f269d2a51dae6a2cb10f1a9ae4aaeba815219b (patch)
treee2094832990caf6d849ba90e4b1a82a6264f86b3 /ldso/ldso/link.h
parentc4a3f3f81ea90e3df93c352ac0e2161a4bfd3327 (diff)
Initial checkin for ld.so. This is a combination of effort from Manuel Novoa
III and me. I've been working on stripping out arch dependant stuff and replacing it with generic stuff whenever possible. -Erik
Diffstat (limited to 'ldso/ldso/link.h')
-rw-r--r--ldso/ldso/link.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/ldso/ldso/link.h b/ldso/ldso/link.h
new file mode 100644
index 000000000..adaa20e4a
--- /dev/null
+++ b/ldso/ldso/link.h
@@ -0,0 +1,37 @@
+#ifndef _LINK_H
+#define _LINK_H
+
+#include "elf.h"
+
+/* Header file that describes the internal data structures used by the
+ * ELF dynamic linker. */
+
+struct link_map
+{
+ /* These entries must be in this order to be compatible with the
+ * interface used by gdb to obtain the list of symbols. */
+ unsigned long l_addr; /* address at which object is mapped */
+ char *l_name; /* full name of loaded object */
+ Elf32_Dyn *l_ld; /* dynamic structure of object */
+ struct link_map *l_next;
+ struct link_map *l_prev;
+};
+
+/* The DT_DEBUG entry in the .dynamic section is given the address of
+ * this structure. gdb can pick this up to obtain the correct list of
+ * loaded modules. */
+struct r_debug
+{
+ int r_version; /* debugging info version no */
+ struct link_map *r_map; /* address of link_map */
+ unsigned long r_brk; /* address of update routine */
+ enum
+ {
+ RT_CONSISTENT,
+ RT_ADD,
+ RT_DELETE
+ } r_state;
+ unsigned long r_ldbase; /* base addr of ld.so */
+};
+
+#endif /* _LINK_H */