aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-legacy.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2006-02-28 04:29:10 +0000
committerAlexandre Oliva <aoliva@redhat.com>2006-02-28 04:29:10 +0000
commitcc10cae34af928d41c47ed1014abafde99165c28 (patch)
tree2c3f3ca2a60ceff5fbdffd0b28c62617b35ca585 /gdb/solib-legacy.c
parent10cd14b412f60d6d99ab6ce6c40b1c56c2a8195c (diff)
downloadgdb-cc10cae34af928d41c47ed1014abafde99165c28.zip
gdb-cc10cae34af928d41c47ed1014abafde99165c28.tar.gz
gdb-cc10cae34af928d41c47ed1014abafde99165c28.tar.bz2
gdb/ChangeLog:
* solib-svr4.h (struct link_map_offsets): Add l_ld_offset and l_ld_size fields. * solib-svr4.c (struct lm_info): Add l_addr field. (LM_ADDR_FROM_LINK_MAP): Renamed from LM_ADDR. (HAS_LM_DYNAMIC_FROM_LINK_MAP): New. (LM_DYNAMIC_FROM_LINK_MAP): New. (LM_ADDR_CHECK): New. Use it instead of LM_ADDR. (svr4_current_sos): Initialize l_addr. Adjust. (svr4_relocate_section_addresses): Adjust. (svr4_ilp32_fetch_link_map_offsets): Define new members. (svr4_lp64_fetch_link_map_offsets): Likewise. * solib-legacy.c (legacy_svr4_fetch_link_map_offsets): Likewise. * mipsnbsd-tdep.c (mipsnbsd_ilp32_fetch_link_map_offsets): Likewise. (mipsnbsd_lp64_fetch_link_map_offsets): Likewise. * Makefile.in (solib-svr4.o): Depend on $(elf_bfd_h). gdb/testsuite/ChangeLog: * gdb.base/prelink.exp: New test. * gdb.base/prelink.c, gdb.base/prelink-lib.c: New sources.
Diffstat (limited to 'gdb/solib-legacy.c')
-rw-r--r--gdb/solib-legacy.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/solib-legacy.c b/gdb/solib-legacy.c
index 6789993..eba92d0 100644
--- a/gdb/solib-legacy.c
+++ b/gdb/solib-legacy.c
@@ -69,6 +69,9 @@ legacy_svr4_fetch_link_map_offsets (void)
lmo.l_next_offset = offsetof (struct link_map, l_next);
lmo.l_next_size = fieldsize (struct link_map, l_next);
+ lmo.l_ld_offset = offsetof (struct link_map, l_ld);
+ lmo.l_ld_size = fieldsize (struct link_map, l_ld);
+
lmo.l_prev_offset = offsetof (struct link_map, l_prev);
lmo.l_prev_size = fieldsize (struct link_map, l_prev);
@@ -84,6 +87,10 @@ legacy_svr4_fetch_link_map_offsets (void)
lmo.l_next_offset = offsetof (struct link_map, lm_next);
lmo.l_next_size = fieldsize (struct link_map, lm_next);
+ /* FIXME: Is this the right field name, or is it available at all? */
+ lmo.l_ld_offset = offsetof (struct link_map, lm_ld);
+ lmo.l_ld_size = fieldsize (struct link_map, lm_ld);
+
lmo.l_name_offset = offsetof (struct link_map, lm_name);
lmo.l_name_size = fieldsize (struct link_map, lm_name);
#else /* !defined(HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS) */
@@ -98,6 +105,10 @@ legacy_svr4_fetch_link_map_offsets (void)
lmo.l_name_offset = offsetof (struct so_map, som_path);
lmo.l_name_size = fieldsize (struct so_map, som_path);
+
+ /* FIXME: Is the address of the dynamic table available? */
+ lmo.l_ld_offset = 0;
+ lmo.l_ld_size = 0;
#endif /* HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */
#endif /* HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */
#endif /* HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS */