aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2000-08-04 23:13:50 +0000
committerKevin Buettner <kevinb@redhat.com>2000-08-04 23:13:50 +0000
commit7a78d0eec8f3c753f2ba505458d876142e575cf4 (patch)
treebaafcaef505dd585237dc57c6903dca3d0fadbfb /gdb/objfiles.c
parent3d4ae3c0c6cbd480d202a6b1dcb6d3a5b75f9915 (diff)
downloadgdb-7a78d0eec8f3c753f2ba505458d876142e575cf4.zip
gdb-7a78d0eec8f3c753f2ba505458d876142e575cf4.tar.gz
gdb-7a78d0eec8f3c753f2ba505458d876142e575cf4.tar.bz2
Fixup SYMBOL_SECTION for objfiles_relocate().
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 5cdfb98..f5b1119 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -564,6 +564,9 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
for (j = 0; j < BLOCK_NSYMS (b); ++j)
{
struct symbol *sym = BLOCK_SYM (b, j);
+
+ fixup_symbol_section (sym, objfile);
+
/* The RS6000 code from which this was taken skipped
any symbols in STRUCT_NAMESPACE or UNDEF_NAMESPACE.
But I'm leaving out that test, on the theory that
@@ -606,15 +609,21 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
for (psym = objfile->global_psymbols.list;
psym < objfile->global_psymbols.next;
psym++)
- if (SYMBOL_SECTION (*psym) >= 0)
- SYMBOL_VALUE_ADDRESS (*psym) += ANOFFSET (delta,
- SYMBOL_SECTION (*psym));
+ {
+ fixup_psymbol_section (*psym, objfile);
+ if (SYMBOL_SECTION (*psym) >= 0)
+ SYMBOL_VALUE_ADDRESS (*psym) += ANOFFSET (delta,
+ SYMBOL_SECTION (*psym));
+ }
for (psym = objfile->static_psymbols.list;
psym < objfile->static_psymbols.next;
psym++)
- if (SYMBOL_SECTION (*psym) >= 0)
- SYMBOL_VALUE_ADDRESS (*psym) += ANOFFSET (delta,
- SYMBOL_SECTION (*psym));
+ {
+ fixup_psymbol_section (*psym, objfile);
+ if (SYMBOL_SECTION (*psym) >= 0)
+ SYMBOL_VALUE_ADDRESS (*psym) += ANOFFSET (delta,
+ SYMBOL_SECTION (*psym));
+ }
}
{