interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
if (interp_sect != NULL)
{
- CORE_ADDR sect_addr = bfd_section_vma (exec_bfd, interp_sect);
int sect_size = bfd_section_size (exec_bfd, interp_sect);
buf = xmalloc (sect_size);
if (arch_size == 32)
{
Elf32_External_Dyn *dynp = (Elf32_External_Dyn *) buf;
+
dyn_tag = extract_unsigned_integer ((gdb_byte *) dynp->d_tag,
4, byte_order);
dyn_ptr = extract_unsigned_integer ((gdb_byte *) dynp->d_un.d_ptr,
else
{
Elf64_External_Dyn *dynp = (Elf64_External_Dyn *) buf;
+
dyn_tag = extract_unsigned_integer ((gdb_byte *) dynp->d_tag,
8, byte_order);
dyn_ptr = extract_unsigned_integer ((gdb_byte *) dynp->d_un.d_ptr,
struct type *ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
gdb_byte *pbuf;
int pbuf_size = TYPE_LENGTH (ptr_type);
+
pbuf = alloca (pbuf_size);
/* DT_MIPS_RLD_MAP contains a pointer to the address
of the dynamic link structure. */
}
/* Find the first element in the inferior's dynamic link map, and
- return its address in the inferior.
+ return its address in the inferior. Return zero if the address
+ could not be determined.
FIXME: Perhaps we should validate the info somehow, perhaps by
checking r_version for a known version number, or r_state for
{
struct regcache *regcache
= get_thread_arch_regcache (inferior_ptid, target_gdbarch);
+
load_addr = (regcache_read_pc (regcache)
- exec_entry_point (tmp_bfd, tmp_bfd_target));
}
static void
svr4_solib_create_inferior_hook (int from_tty)
{
+#if defined(_SCO_DS)
struct inferior *inf;
struct thread_info *tp;
+#endif /* defined(_SCO_DS) */
struct svr4_info *info;
info = get_svr4_info ();
svr4_have_link_map_offsets (void)
{
struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch, solib_svr4_data);
+
return (ops->fetch_link_map_offsets != NULL);
}
\f