* 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.
This commit is contained in:
Peter Schauer 1994-04-18 20:26:32 +00:00
parent fe15373a50
commit be78eb1ab1
2 changed files with 19 additions and 1 deletions

View File

@ -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.

View File

@ -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