diff options
author | Fred Fish <fnf@specifix.com> | 1993-06-10 20:31:47 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1993-06-10 20:31:47 +0000 |
commit | a608f919de4afb1b94dfc5d23dd2dcf683c1a9a1 (patch) | |
tree | dad9e5399035bc123682ebe562ffda90e50953eb /gdb/elfread.c | |
parent | d7276c0ab4210189c65f8c35dd017e557b4d147c (diff) | |
download | gdb-a608f919de4afb1b94dfc5d23dd2dcf683c1a9a1.zip gdb-a608f919de4afb1b94dfc5d23dd2dcf683c1a9a1.tar.gz gdb-a608f919de4afb1b94dfc5d23dd2dcf683c1a9a1.tar.bz2 |
* elfread.c (elf_symtab_read): Add bfd section address to bfd
symbols, now that they are section relative.
* solib.c (bfd_lookup_symbol): Ditto.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r-- | gdb/elfread.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index a0345f8..4e1afe9 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -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 (§ion_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; |