* elfread.c (elf_symtab_read): Add bfd section address to bfd

symbols, now that they are section relative.
	* solib.c (bfd_lookup_symbol):  Ditto.
This commit is contained in:
Fred Fish
1993-06-10 20:31:47 +00:00
parent d7276c0ab4
commit a608f919de
3 changed files with 116 additions and 37 deletions

View File

@@ -255,7 +255,8 @@ elf_symtab_read (abfd, addr, objfile)
if ((sym -> flags & (BSF_GLOBAL | BSF_WEAK))
&& (sym -> section != NULL))
{
symaddr = sym -> value;
/* Bfd symbols are section relative. */
symaddr = sym -> value + sym -> section -> vma;
/* Relocate all non-absolute symbols by base address. */
if (sym -> section != &bfd_abs_section)
symaddr += addr;
@@ -343,7 +344,8 @@ elf_symtab_read (abfd, addr, objfile)
if (sectinfo->sections[index])
complain (&section_info_dup_complaint, sectinfo->filename);
symaddr = sym -> value;
/* Bfd symbols are section relative. */
symaddr = sym -> value + sym -> section -> vma;
/* Relocate all non-absolute symbols by base address. */
if (sym -> section != &bfd_abs_section)
symaddr += addr;