aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1994-04-18 20:26:32 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1994-04-18 20:26:32 +0000
commitbe78eb1ab19f8be94e32cbce2031d3c70e726f52 (patch)
tree6cf31e6665864311320c63b3ae37f7bb5018af28 /gdb/dbxread.c
parentfe15373a50890d37ab755827554f4a1b9feacfe3 (diff)
downloadfsf-binutils-gdb-be78eb1ab19f8be94e32cbce2031d3c70e726f52.zip
fsf-binutils-gdb-be78eb1ab19f8be94e32cbce2031d3c70e726f52.tar.gz
fsf-binutils-gdb-be78eb1ab19f8be94e32cbce2031d3c70e726f52.tar.bz2
* dbxread.c (read_dbx_dynamic_symtab): Relocate BFD symbols by
section vma. Do not read dynamic relocs for sun3 executables to avoid BFD assertion message.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 54bcea2..512fa87 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -894,6 +894,9 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
sym_value = sym->value;
sec = bfd_get_section (sym);
+
+ /* BFD symbols are section relative. */
+ sym_value += sec->vma;
if (bfd_get_section_flags (abfd, sec) & SEC_CODE)
{
sym_value += ANOFFSET (section_offsets, SECT_OFF_TEXT);
@@ -915,11 +918,20 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
if (sym->flags & BSF_GLOBAL)
type |= N_EXT;
- record_minimal_symbol (bfd_asymbol_name (sym), sym_value,
+ record_minimal_symbol ((char *) bfd_asymbol_name (sym), sym_value,
type, objfile);
}
}
+ /* FIXME: Reading the dynamic relocs currently causes a bfd_assertion
+ for sun3 executables. Do not read dynamic relocs till BFD is prepared
+ to handle them. */
+ if (bfd_get_arch (abfd) != bfd_arch_sparc)
+ {
+ do_cleanups (back_to);
+ return;
+ }
+
/* Symbols from shared libraries have a dynamic relocation entry
that points to the associated slot in the procedure linkage table.
We make a mininal symbol table entry with type mst_solib_trampoline