* bfd/elf.c (_bfd_elf_copy_private_symbol_data): Don't copy shndx if
authorCatherine Moore <clm@redhat.com>
Tue, 11 Dec 2007 13:13:59 +0000 (13:13 +0000)
committerCatherine Moore <clm@redhat.com>
Tue, 11 Dec 2007 13:13:59 +0000 (13:13 +0000)
        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.

bfd/ChangeLog
bfd/elf.c
gas/testsuite/ChangeLog
gas/testsuite/gas/elf/symtab.d [new file with mode: 0644]
gas/testsuite/gas/elf/symtab.s [new file with mode: 0644]

index bd7deca090093fe0e00c50e9b48dacac47767657..613172801a0a5df805c92062638a94b33f2d4f6f 100644 (file)
@@ -1,3 +1,8 @@
+2007-12-11  Catherine Moore  <clm@codesourcery.com>
+
+        * 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  <amodra@bigpond.net.au>
 
        * elf.c (elf_fake_sections): Add "warning:" to "..changed to PROGBITS"
index ffc82c70e9a33e109565ecfd9212ac5247648e60..f0b2e4d9fa1ec3bd0a663e36009274d6f75eb865 100644 (file)
--- 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))
     {
index 61450ebdd942e84789c460d07a8b5c78df40c96f..9de18549dd23963410b0e06e4f5bd505c474e489 100644 (file)
@@ -1,3 +1,9 @@
+2007-12-11  Catherine Moore  <clm@codesourcery.com>
+
+        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  <rsandifo@nildram.co.uk>
 
        * 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 (file)
index 0000000..b69b717
--- /dev/null
@@ -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 (file)
index 0000000..9219cf8
--- /dev/null
@@ -0,0 +1,5 @@
+.text
+       .global foo
+foo:
+       .set    shift, 32
+       .set    shift, shift - 1
This page took 0.047914 seconds and 4 git commands to generate.