{
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 ()));
- /* FIXME: Should use section specific offset, not SECT_OFF_TEXT. */
- offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+
for (i = 0; i < number_of_symbols; i++)
{
sym = symbol_table[i];
continue;
}
+ offset = ANOFFSET (objfile->section_offsets, sym->section->index);
if (dynamic
&& sym->section == &bfd_und_section
&& (sym->flags & BSF_FUNCTION))
if (sym->section == &bfd_abs_section)
{
/* This is a hack to get the minimal symbol type
- right for Irix 5, which has absolute adresses
+ right for Irix 5, which has absolute addresses
with special section indices for dynamic symbols. */
unsigned short shndx =
((elf_symbol_type *) sym)->internal_elf_sym.st_shndx;
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)
{