From 3685e697fd1a7c75bf6e5e03996d97d0aa8b6e15 Mon Sep 17 00:00:00 2001 From: Elena Zannoni Date: Thu, 4 May 2000 16:52:34 +0000 Subject: Elena Zannoni * 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. --- gdb/pa64solib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gdb/pa64solib.c') diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c index cb991b2c09d..ab568f57581 100644 --- a/gdb/pa64solib.c +++ b/gdb/pa64solib.c @@ -328,9 +328,9 @@ pa64_solib_load_symbols (so, name, from_tty, text_addr, target) return; } - ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT) + ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile)) = so->pa64_solib_desc.text_base; - ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA) + ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile)) = so->pa64_solib_desc.data_base; /* Relocate all the sections based on where they got loaded. */ @@ -338,13 +338,13 @@ pa64_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)); } } -- cgit v1.2.1