From: Ian Lance Taylor Date: Thu, 17 Apr 1997 16:29:43 +0000 (+0000) Subject: * elflink.h (elf_link_add_object_symbols): Only subtract the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f02004e95a630e512f87122a5511666c1ee7a59e;p=binutils-gdb.git * elflink.h (elf_link_add_object_symbols): Only subtract the section VMA from the symbol value if this is a fully linked file. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3bd90c7daba..5e783798e44 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Thu Apr 17 11:10:54 1997 Ian Lance Taylor + * elflink.h (elf_link_add_object_symbols): Only subtract the + section VMA from the symbol value if this is a fully linked file. + * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define. (struct elf_i386_link_hash_entry): Define. (struct elf_i386_link_hash_table): Define. diff --git a/bfd/elflink.h b/bfd/elflink.h index c44163c3bd4..8ab07e6871f 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -732,10 +732,10 @@ elf_link_add_object_symbols (abfd, info) else if (sym.st_shndx > 0 && sym.st_shndx < SHN_LORESERVE) { sec = section_from_elf_index (abfd, sym.st_shndx); - if (sec != NULL) - value -= sec->vma; - else + if (sec == NULL) sec = bfd_abs_section_ptr; + else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) + value -= sec->vma; } else if (sym.st_shndx == SHN_ABS) sec = bfd_abs_section_ptr;