From: Catherine Moore Date: Tue, 11 Dec 2007 13:13:59 +0000 (+0000) Subject: * bfd/elf.c (_bfd_elf_copy_private_symbol_data): Don't copy shndx if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8424d8f538ffb17bf5e61ac73137f86e47bc8952;p=binutils-gdb.git * 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bd7deca0900..613172801a0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-12-11 Catherine Moore + + * elf.c (_bfd_elf_copy_private_symbol_data): Don't copy shndx if + the symbol's section is the undefined section. + 2007-12-11 Alan Modra * elf.c (elf_fake_sections): Add "warning:" to "..changed to PROGBITS" diff --git a/bfd/elf.c b/bfd/elf.c index ffc82c70e9a..f0b2e4d9fa1 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)) { diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 61450ebdd94..9de18549dd2 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Catherine Moore + + gas/elf/symtab.s: New test. + gas/elf/symtab.d: New expected output. + gas/elf/elf.exp: Run the new symbtab test. + 2007-12-10 Richard Sandiford * gas/mips/align2.s, gas/mips/align2.d, gas/mips/align2-el.d: New diff --git a/gas/testsuite/gas/elf/symtab.d b/gas/testsuite/gas/elf/symtab.d new file mode 100644 index 00000000000..b69b717abdc --- /dev/null +++ b/gas/testsuite/gas/elf/symtab.d @@ -0,0 +1,6 @@ +#readelf: -s +#name: .set with expression + +#... +.*ABS.*shift.* +#pass diff --git a/gas/testsuite/gas/elf/symtab.s b/gas/testsuite/gas/elf/symtab.s new file mode 100644 index 00000000000..9219cf88098 --- /dev/null +++ b/gas/testsuite/gas/elf/symtab.s @@ -0,0 +1,5 @@ +.text + .global foo +foo: + .set shift, 32 + .set shift, shift - 1