#include "complaints.h"
#include "demangle.h"
-extern void _initialize_elfread PARAMS ((void));
+extern void _initialize_elfread (void);
/* The struct elfinfo is available only during ELF symbol table and
psymtab reading. It is destroyed at the completion of psymtab-reading.
struct complaint stab_info_questionable_complaint =
{"elf/stab section information questionable for %s", 0, 0};
-static void
-elf_symfile_init PARAMS ((struct objfile *));
+static void elf_symfile_init (struct objfile *);
-static void
-elf_new_init PARAMS ((struct objfile *));
+static void elf_new_init (struct objfile *);
-static void
-elf_symfile_read PARAMS ((struct objfile *, int));
+static void elf_symfile_read (struct objfile *, int);
-static void
-elf_symfile_finish PARAMS ((struct objfile *));
+static void elf_symfile_finish (struct objfile *);
-static void
-elf_symtab_read PARAMS ((struct objfile *, int));
+static void elf_symtab_read (struct objfile *, int);
-static void
-free_elfinfo PARAMS ((void *));
+static void free_elfinfo (void *);
-static struct minimal_symbol *
- record_minimal_symbol_and_info PARAMS ((char *, CORE_ADDR,
- enum minimal_symbol_type, char *,
- asection * bfd_section,
- struct objfile *));
+static struct minimal_symbol *record_minimal_symbol_and_info (char *,
+ CORE_ADDR,
+ enum
+ minimal_symbol_type,
+ char *,
+ asection *
+ bfd_section,
+ struct objfile
+ *);
-static void
-elf_locate_sections PARAMS ((bfd *, asection *, void *));
+static void elf_locate_sections (bfd *, asection *, void *);
/* We are called once per section from elf_symfile_read. We
need to examine each section we are passed, check to see
{
case mst_text:
case mst_file_text:
- section = SECT_OFF_TEXT;
+ section = bfd_section->index;
#ifdef SMASH_TEXT_ADDRESS
SMASH_TEXT_ADDRESS (address);
#endif
break;
case mst_data:
case mst_file_data:
- section = SECT_OFF_DATA;
- break;
case mst_bss:
case mst_file_bss:
- section = SECT_OFF_BSS;
+ section = bfd_section->index;
break;
default:
section = -1;
if (number_of_symbols < 0)
error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd),
bfd_errmsg (bfd_get_error ()));
+
for (i = 0; i < number_of_symbols; i++)
{
sym = symbol_table[i];
- offset = ANOFFSET (objfile->section_offsets, sym->section->index);
if (sym->name == NULL || *sym->name == '\0')
{
/* Skip names that don't exist (shouldn't happen), or names
continue;
}
+ offset = ANOFFSET (objfile->section_offsets, sym->section->index);
if (dynamic
&& sym->section == &bfd_und_section
&& (sym->flags & BSF_FUNCTION))
index = SECT_OFF_MAX;
if (STREQ ("Bbss.bss", sym->name))
{
- index = SECT_OFF_BSS;
+ index = SECT_OFF_BSS (objfile);
}
else if (STREQ ("Ddata.data", sym->name))
{
- index = SECT_OFF_DATA;
+ index = SECT_OFF_DATA (objfile);
}
else if (STREQ ("Drodata.rodata", sym->name))
{
- index = SECT_OFF_RODATA;
+ index = SECT_OFF_RODATA (objfile);
}
if (index != SECT_OFF_MAX)
{
CORE_ADDR offset;
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup_discard_minimal_symbols ();
memset ((char *) &ei, 0, sizeof (ei));