aboutsummaryrefslogtreecommitdiff
path: root/gdb/somsolib.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-05-04 16:52:34 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-05-04 16:52:34 +0000
commitb8fbeb1874605f3dfe03e0b3ced670f6308b95f5 (patch)
treeba47cc4aeefd9f6fd6515a2a4f5fe296511d6bf3 /gdb/somsolib.c
parent70d1b0e82047b6bb257d95311fce2689dae98074 (diff)
downloadgdb-b8fbeb1874605f3dfe03e0b3ced670f6308b95f5.zip
gdb-b8fbeb1874605f3dfe03e0b3ced670f6308b95f5.tar.gz
gdb-b8fbeb1874605f3dfe03e0b3ced670f6308b95f5.tar.bz2
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.
Diffstat (limited to 'gdb/somsolib.c')
-rw-r--r--gdb/somsolib.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 5d559a0..fa7ecd0 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -355,13 +355,13 @@ som_solib_load_symbols (so, name, from_tty, text_addr, target)
{
if (p->the_bfd_section->flags & SEC_CODE)
{
- p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT);
- p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT);
+ p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile));
+ p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile));
}
else if (p->the_bfd_section->flags & SEC_DATA)
{
- p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA);
- p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA);
+ p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile));
+ p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile));
}
}
@@ -1407,11 +1407,11 @@ som_solib_section_offsets (objfile, offsets)
asection *private_section;
/* The text offset is easy. */
- ANOFFSET (offsets, SECT_OFF_TEXT)
+ ANOFFSET (offsets, SECT_OFF_TEXT (objfile))
= (so_list->som_solib.text_addr
- so_list->som_solib.text_link_addr);
- ANOFFSET (offsets, SECT_OFF_RODATA)
- = ANOFFSET (offsets, SECT_OFF_TEXT);
+ ANOFFSET (offsets, SECT_OFF_RODATA (objfile))
+ = ANOFFSET (offsets, SECT_OFF_TEXT (objfile));
/* We should look at presumed_dp in the SOM header, but
that's not easily available. This should be OK though. */
@@ -1420,14 +1420,14 @@ som_solib_section_offsets (objfile, offsets)
if (!private_section)
{
warning ("Unable to find $PRIVATE$ in shared library!");
- ANOFFSET (offsets, SECT_OFF_DATA) = 0;
- ANOFFSET (offsets, SECT_OFF_BSS) = 0;
+ ANOFFSET (offsets, SECT_OFF_DATA (objfile)) = 0;
+ ANOFFSET (offsets, SECT_OFF_BSS (objfile)) = 0;
return 1;
}
- ANOFFSET (offsets, SECT_OFF_DATA)
+ ANOFFSET (offsets, SECT_OFF_DATA (objfile))
= (so_list->som_solib.data_start - private_section->vma);
- ANOFFSET (offsets, SECT_OFF_BSS)
- = ANOFFSET (offsets, SECT_OFF_DATA);
+ ANOFFSET (offsets, SECT_OFF_BSS (objfile))
+ = ANOFFSET (offsets, SECT_OFF_DATA (objfile));
return 1;
}
so_list = so_list->next;