diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-04-17 16:29:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-04-17 16:29:43 +0000 |
commit | f02004e95a630e512f87122a5511666c1ee7a59e (patch) | |
tree | 807f6a94c939e96eb79179efd7ad6bb81e8223f1 /bfd/elflink.h | |
parent | 6e2183b1a77a5bf3ba7386b05e279ec32a981bbf (diff) | |
download | gdb-f02004e95a630e512f87122a5511666c1ee7a59e.zip gdb-f02004e95a630e512f87122a5511666c1ee7a59e.tar.gz gdb-f02004e95a630e512f87122a5511666c1ee7a59e.tar.bz2 |
* elflink.h (elf_link_add_object_symbols): Only subtract the
section VMA from the symbol value if this is a fully linked file.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r-- | bfd/elflink.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h index c44163c..8ab07e6 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; |