Fix <link.h>.
Also move some of the stuff that should be in <link.h> out of the
private "linker.h", to make it clearer that these are public API
known to gdb that we can't change.
Bug: 12554197
Change-Id: I830e1260d3d8b833ed99bc1518f1c6b6102be8af
diff --git a/linker/linker.h b/linker/linker.h
index 972050f..654ee5f 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -61,31 +61,6 @@
// itself at the start of a page.
#define PAGE_END(x) PAGE_START((x) + (PAGE_SIZE-1))
-// Magic shared structures that GDB knows about.
-
-struct link_map_t {
- uintptr_t l_addr;
- char* l_name;
- uintptr_t l_ld;
- link_map_t* l_next;
- link_map_t* l_prev;
-};
-
-// Values for r_debug->state
-enum {
- RT_CONSISTENT,
- RT_ADD,
- RT_DELETE
-};
-
-struct r_debug {
- int32_t r_version;
- link_map_t* r_map;
- void (*r_brk)(void);
- int32_t r_state;
- uintptr_t r_ldbase;
-};
-
#define FLAG_LINKED 0x00000001
#define FLAG_EXE 0x00000004 // The main executable
#define FLAG_LINKER 0x00000010 // The linker itself
@@ -172,7 +147,7 @@
#endif
size_t ref_count;
- link_map_t link_map;
+ link_map link_map_head;
bool constructors_called;