forked from Imagelibrary/binutils-gdb
Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* objfiles.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS,
SECT_OFF_RODATA): Define as functions of OBJFILE. Add
sect_index_text, sect_index_data, sect_index_rodata,
sect_index_bss to objfile structure.
* gdb-stabs.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS,
SECT_OFF_RODATA): Remove.
* objfiles.c (allocate_objfile): Initialize
sect_index_{text,data,bss,rodata} to -1, for error detection.
* symfile.c (default_symfile_offsets): Initialize
sect_index_{text,data,bss,rodata} from bfd information.
* xcoffread.c (xcoff_symfile_offsets): Ditto.
* somread.c (som_symfile_offsets): Initialize
sect_index_{text,data,bss,rodata}.
* coffread.c, dbxread.c, elfread.c, hp-psymtab-read.c,
hp-symtab-read.c, hpread.c, mdebugread.c, minsyms.c,
mipsread.c, objfiles.c, os9kread.c, pa64solib.c, partial-stab.h,
remote-os9k.c, remote-vx.c, remote.c, rs6000-nat.c, somsolib.c,
stabsread.c, symfile.c, xcoffread.c:
Update use of SECT_OFF_{TEXT,DATA,BSS,RODATA} to depend on the
current objfile.
* xcoffread.c: Add new field objfile to find_targ_sec_arg.
This commit is contained in:
@@ -191,18 +191,18 @@ record_minimal_symbol_and_info (name, address, ms_type, info, bfd_section,
|
||||
{
|
||||
case mst_text:
|
||||
case mst_file_text:
|
||||
section = SECT_OFF_TEXT;
|
||||
section = SECT_OFF_TEXT (objfile);
|
||||
#ifdef SMASH_TEXT_ADDRESS
|
||||
SMASH_TEXT_ADDRESS (address);
|
||||
#endif
|
||||
break;
|
||||
case mst_data:
|
||||
case mst_file_data:
|
||||
section = SECT_OFF_DATA;
|
||||
section = SECT_OFF_DATA (objfile);
|
||||
break;
|
||||
case mst_bss:
|
||||
case mst_file_bss:
|
||||
section = SECT_OFF_BSS;
|
||||
section = SECT_OFF_BSS (objfile);
|
||||
break;
|
||||
default:
|
||||
section = -1;
|
||||
@@ -294,7 +294,7 @@ elf_symtab_read (objfile, dynamic)
|
||||
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);
|
||||
offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
for (i = 0; i < number_of_symbols; i++)
|
||||
{
|
||||
sym = symbol_table[i];
|
||||
@@ -460,15 +460,15 @@ elf_symtab_read (objfile, dynamic)
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user