aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorCatherine Moore <clm@redhat.com>2007-12-11 13:13:59 +0000
committerCatherine Moore <clm@redhat.com>2007-12-11 13:13:59 +0000
commit8424d8f538ffb17bf5e61ac73137f86e47bc8952 (patch)
tree6d05220be2c584124b481c8d3424bbcaf2f62a89 /bfd/elf.c
parent60955fda27cd4a8336e710b83b25f49262defb4f (diff)
downloadgdb-8424d8f538ffb17bf5e61ac73137f86e47bc8952.zip
gdb-8424d8f538ffb17bf5e61ac73137f86e47bc8952.tar.gz
gdb-8424d8f538ffb17bf5e61ac73137f86e47bc8952.tar.bz2
* bfd/elf.c (_bfd_elf_copy_private_symbol_data): Don't copy shndx if
the symbol's section is the undefined section. * gas/testsuite/gas/elf/symtab.s: New test. gas/testsuite/gas/elf/symtab.d: New expected output. gas/testsuite/gas/elf/elf.exp: Run the new symbtab test.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index ffc82c7..f0b2e4d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6046,6 +6046,7 @@ _bfd_elf_copy_private_symbol_data (bfd *ibfd,
osym = elf_symbol_from (obfd, osymarg);
if (isym != NULL
+ && isym->internal_elf_sym.st_shndx != 0
&& osym != NULL
&& bfd_is_abs_section (isym->symbol.section))
{