-kingdon). */
static void
-elf_locate_sections (ignore_abfd, sectp, eip)
- bfd *ignore_abfd;
- asection *sectp;
- PTR eip;
+elf_locate_sections (bfd *ignore_abfd, asection *sectp, PTR eip)
{
register struct elfinfo *ei;
#if 0 /* Currently unused */
char *
-elf_interpreter (abfd)
- bfd *abfd;
+elf_interpreter (bfd *abfd)
{
sec_ptr interp_sec;
unsigned size;
#endif
static struct minimal_symbol *
-record_minimal_symbol_and_info (name, address, ms_type, info, bfd_section,
- objfile)
- char *name;
- CORE_ADDR address;
- enum minimal_symbol_type ms_type;
- char *info; /* FIXME, is this really char *? */
- asection *bfd_section;
- struct objfile *objfile;
+record_minimal_symbol_and_info (char *name, CORE_ADDR address,
+ enum minimal_symbol_type ms_type, char *info, /* FIXME, is this really char *? */
+ asection *bfd_section, struct objfile *objfile)
{
int section;
*/
static void
-elf_symtab_read (objfile, dynamic)
- struct objfile *objfile;
- int dynamic;
+elf_symtab_read (struct objfile *objfile, int dynamic)
{
long storage_needed;
asymbol *sym;
(char *) filesym->name;
}
}
- if (sectinfo->sections[index] != 0)
- {
- complain (§ion_info_dup_complaint,
- sectinfo->filename);
+ if (index != -1)
+ {
+ if (sectinfo->sections[index] != 0)
+ {
+ complain (§ion_info_dup_complaint,
+ sectinfo->filename);
+ }
}
+ else
+ internal_error ("Section index uninitialized.");
/* Bfd symbols are section relative. */
symaddr = sym->value + sym->section->vma;
/* Relocate non-absolute symbols by the section offset. */
{
symaddr += offset;
}
- sectinfo->sections[index] = symaddr;
+ if (index != -1)
+ sectinfo->sections[index] = symaddr;
+ else
+ internal_error ("Section index uninitialized.");
/* The special local symbols don't go in the
minimal symbol table, so ignore this one. */
continue;
capability even for files compiled without -g. */
static void
-elf_symfile_read (objfile, mainline)
- struct objfile *objfile;
- int mainline;
+elf_symfile_read (struct objfile *objfile, int mainline)
{
bfd *abfd = objfile->obfd;
struct elfinfo ei;
stab_section_info's, that might be dangling from it. */
static void
-free_elfinfo (objp)
- PTR objp;
+free_elfinfo (PTR objp)
{
struct objfile *objfile = (struct objfile *) objp;
struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info;
We reinitialize buildsym, since we may be reading stabs from an ELF file. */
static void
-elf_new_init (ignore)
- struct objfile *ignore;
+elf_new_init (struct objfile *ignore)
{
stabsread_new_init ();
buildsym_new_init ();
objfile struct from the global list of known objfiles. */
static void
-elf_symfile_finish (objfile)
- struct objfile *objfile;
+elf_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_stab_info != NULL)
{
just a stub. */
static void
-elf_symfile_init (objfile)
- struct objfile *objfile;
+elf_symfile_init (struct objfile *objfile)
{
/* ELF objects may be reordered, so set OBJF_REORDERED. If we
find this causes a significant slowdown in gdb then we could
with wierd names. Go get 'em when needed. */
void
-elfstab_offset_sections (objfile, pst)
- struct objfile *objfile;
- struct partial_symtab *pst;
+elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
{
char *filename = pst->filename;
struct dbx_symfile_info *dbx = objfile->sym_stab_info;
pst->section_offsets = (struct section_offsets *)
obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
for (i = 0; i < SECT_OFF_MAX; i++)
- ANOFFSET (pst->section_offsets, i) = maybe->sections[i];
+ (pst->section_offsets)->offsets[i] = maybe->sections[i];
return;
}
};
void
-_initialize_elfread ()
+_initialize_elfread (void)
{
add_symtab_fns (&elf_sym_fns);
}