section VMA from the symbol value if this is a fully linked file.
Thu Apr 17 11:10:54 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
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;