Index: gdb/nacl-tdep.c |
diff --git a/gdb/nacl-tdep.c b/gdb/nacl-tdep.c |
index edb376398bc6410b8ee3b97b0125e12c7df3dab4..53dc8f9f253bc94ca38354b33b667f8b8441cf6c 100644 |
--- a/gdb/nacl-tdep.c |
+++ b/gdb/nacl-tdep.c |
@@ -71,6 +71,34 @@ amd64_nacl_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame) |
return amd64_nacl_addr_bits_remove (gdbarch, sp); |
} |
+struct link_map_offsets * |
+amd64_nacl_fetch_link_map_offsets (void) |
+{ |
+ static struct link_map_offsets lmo; |
+ static struct link_map_offsets *lmp = NULL; |
+ |
+ if (lmp == NULL) |
+ { |
+ lmp = &lmo; |
+ |
+ lmo.r_version_offset = 0; |
+ lmo.r_version_size = 4; |
+ lmo.r_map_offset = 4; |
+ lmo.r_brk_offset = 8; |
+ /* Dynamic linker is in the normal list of shared objects. */ |
+ lmo.r_ldsomap_offset = -1; |
+ |
+ lmo.link_map_size = 24; |
+ lmo.l_addr_offset = 0; |
+ lmo.l_name_offset = 8; |
+ lmo.l_ld_offset = 12; |
+ lmo.l_next_offset = 16; |
+ lmo.l_prev_offset = 20; |
+ } |
+ |
+ return lmp; |
+} |
+ |
static void |
amd64_nacl_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) |
{ |
@@ -79,7 +107,7 @@ amd64_nacl_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) |
amd64_init_abi (info, gdbarch); |
tdep->tdesc = tdesc_amd64_linux; |
set_solib_svr4_fetch_link_map_offsets (gdbarch, |
- svr4_lp64_fetch_link_map_offsets); |
+ amd64_nacl_fetch_link_map_offsets); |
nacl_init_abi (info, gdbarch); |
/* NaCl data model. |