* elflink.h (elf_link_add_object_symbols): Only subtract the

section VMA from the symbol value if this is a fully linked file.
This commit is contained in:
Ian Lance Taylor 1997-04-17 16:29:43 +00:00
parent 6e2183b1a7
commit f02004e95a
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
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.

View File

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