aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-11-04 23:03:03 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-11-04 23:03:03 +0000
commitc7d4c4c8ce0763a9a8eb6a72f6496436decfa9ca (patch)
tree5f38255fb04e89c556cd06492f5bb399dd9de0e1 /gdb/dbxread.c
parentbaf205c4f292bc962ade82d1aaa9dc7294b15158 (diff)
downloadfsf-binutils-gdb-c7d4c4c8ce0763a9a8eb6a72f6496436decfa9ca.zip
fsf-binutils-gdb-c7d4c4c8ce0763a9a8eb6a72f6496436decfa9ca.tar.gz
fsf-binutils-gdb-c7d4c4c8ce0763a9a8eb6a72f6496436decfa9ca.tar.bz2
* dbxread.c (process_one_symbol): Do relocate 'S' symbols by
the text offset (revert 12 Oct 93 change).
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 2642b62..e5ac069 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1787,9 +1787,17 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
p = strchr (name, ':');
if (p != 0 && p[1] == 'S')
{
- /* The linker relocated it. There used to be a kludge here
- to add the text offset, but that will break if we ever
- start using the text offset (currently it is always zero). */
+ /* The linker relocated it. We don't want to add an
+ elfstab_offset_sections-type offset, but we *do* want
+ to add whatever solib.c passed to symbol_file_add as
+ addr (this is known to affect SunOS4, and I suspect ELF
+ too). Since elfstab_offset_sections currently does not
+ muck with the text offset (there is no Ttext.text
+ symbol), we can get addr from the text offset. If
+ elfstab_offset_sections ever starts dealing with the
+ text offset, and we still need to do this, we need to
+ invent a SECT_OFF_ADDR_KLUDGE or something. */
+ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
goto define_a_symbol;
}
/* Since it's not the kludge case, re-dispatch to the right handler. */