aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/dbxread.c14
2 files changed, 19 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0b42648..2535c50 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+Mon Apr 18 13:18:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * 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.
+
Mon Apr 18 10:08:07 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
* nm-hppab.h (KERNEL_U_ADDR): Define.
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