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:
@@ -471,10 +471,24 @@ som_symfile_offsets (objfile, addrs)
|
||||
objfile->section_offsets = (struct section_offsets *)
|
||||
obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
|
||||
|
||||
/* FIXME: ezannoni 2000-04-20 The section names in SOM are not
|
||||
.text, .data, etc, but $TEXT$, $DATA$,... We should initialize
|
||||
SET_OFF_* from bfd. (See default_symfile_offsets()). But I don't
|
||||
know the correspondence between SOM sections and GDB's idea of
|
||||
section names. So for now we default to what is was before these
|
||||
changes.*/
|
||||
objfile->sect_index_text = 0;
|
||||
objfile->sect_index_data = 1;
|
||||
objfile->sect_index_bss = 2;
|
||||
objfile->sect_index_rodata = 3;
|
||||
|
||||
/* First see if we're a shared library. If so, get the section
|
||||
offsets from the library, else get them from addrs. */
|
||||
if (!som_solib_section_offsets (objfile, objfile->section_offsets))
|
||||
{
|
||||
/* Note: Here is OK to compare with ".text" because this is the
|
||||
name that gdb itself gives to that section, not the SOM
|
||||
name. */
|
||||
for (i = 0; i < SECT_OFF_MAX && addrs->other[i].name; i++)
|
||||
if (strcmp (addrs->other[i].name, ".text") == 0)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user