/* Defined in exec.c; used to prevent dangling pointer bug. */
extern struct target_ops exec_ops;
-static CORE_ADDR
- bfd_lookup_symbol PARAMS ((bfd *, char *));
+static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
/* This lives in hppa-tdep.c. */
-extern struct unwind_table_entry *find_unwind_entry PARAMS ((CORE_ADDR pc));
+extern struct unwind_table_entry *find_unwind_entry (CORE_ADDR pc);
/* These ought to be defined in some public interface, but aren't. They
identify dynamic linker events. */
static dld_cache_t dld_cache;
-static void pa64_sharedlibrary_info_command PARAMS ((char *, int));
+static void pa64_sharedlibrary_info_command (char *, int);
-static void pa64_solib_sharedlibrary_command PARAMS ((char *, int));
+static void pa64_solib_sharedlibrary_command (char *, int);
-static void * pa64_target_read_memory PARAMS ((void *, CORE_ADDR, size_t, int));
+static void *pa64_target_read_memory (void *, CORE_ADDR, size_t, int);
-static boolean read_dld_descriptor PARAMS ((struct target_ops *));
+static boolean read_dld_descriptor (struct target_ops *);
-static boolean read_dynamic_info PARAMS ((asection *, dld_cache_t *));
+static boolean read_dynamic_info (asection *, dld_cache_t *);
-static void add_to_solist PARAMS ((boolean, char *, struct load_module_desc *,
- CORE_ADDR, struct target_ops *));
+static void add_to_solist (boolean, char *, struct load_module_desc *,
+ CORE_ADDR, struct target_ops *);
/* When examining the shared library for debugging information we have to
look for HP debug symbols, stabs and dwarf2 debug symbols. */
bfd *tmp_bfd;
asection *sec;
obj_private_data_t *obj_private;
+ struct section_addr_info section_addrs;
+ memset (§ion_addrs, 0, sizeof (section_addrs));
/* We need the BFD so that we can look at its sections. We open up the
file temporarily, then close it when we are done. */
tmp_bfd = bfd_openr (name, gnutarget);
tmp_bfd = NULL;
/* Now let the generic code load up symbols for this library. */
- so->objfile = symbol_file_add (name, from_tty, text_addr, 0, 0, 0, 0, 1);
+ section_addrs.other[0].addr = text_addr;
+ section_addrs.other[0].name = ".text";
+ so->objfile = symbol_file_add (name, from_tty, §ion_addrs, 0, OBJF_SHARED);
so->abfd = so->objfile->obfd;
/* Mark this as a shared library and save private data. */
return;
}
- ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT)
+ ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile))
= so->pa64_solib_desc.text_base;
- ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA)
+ ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile))
= so->pa64_solib_desc.data_base;
/* Relocate all the sections based on where they got loaded. */
{
if (p->the_bfd_section->flags & SEC_CODE)
{
- p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT);
- p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT);
+ p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile));
+ p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile));
}
else if (p->the_bfd_section->flags & SEC_DATA)
{
- p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA);
- p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA);
+ p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile));
+ p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile));
}
}
if (exec_bfd == NULL)
{
- printf_unfiltered ("no exec file.\n");
+ printf_unfiltered ("No executable file.\n");
return;
}