Hello community,

here is the log from the commit of package binutils for openSUSE:Factory 
checked in at 2014-05-22 20:37:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/binutils (Old)
 and      /work/SRC/openSUSE:Factory/.binutils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "binutils"

Changes:
--------
--- /work/SRC/openSUSE:Factory/binutils/binutils.changes        2014-04-08 
11:31:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.binutils.new/binutils.changes   2014-05-22 
20:37:31.000000000 +0200
@@ -1,0 +2,6 @@
+Tue May  6 14:02:26 UTC 2014 - [email protected]
+
+- binutils-2.24-bso16746.diff: Fix bso#16746, spurious warnings
+  for warn annotated symbols with LTO.
+
+-------------------------------------------------------------------
cross-aarch64-binutils.changes: same change
cross-arm-binutils.changes: same change
cross-avr-binutils.changes: same change
cross-hppa-binutils.changes: same change
cross-hppa64-binutils.changes: same change
cross-i386-binutils.changes: same change
cross-ia64-binutils.changes: same change
cross-m68k-binutils.changes: same change
cross-mips-binutils.changes: same change
cross-ppc-binutils.changes: same change
cross-ppc64-binutils.changes: same change
cross-ppc64le-binutils.changes: same change
cross-s390-binutils.changes: same change
cross-s390x-binutils.changes: same change
cross-sparc-binutils.changes: same change
cross-sparc64-binutils.changes: same change
cross-spu-binutils.changes: same change
cross-x86_64-binutils.changes: same change

New:
----
  binutils-2.24-bso16746.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ binutils.spec ++++++
--- /var/tmp/diff_new_pack.KYyBzp/_old  2014-05-22 20:37:41.000000000 +0200
+++ /var/tmp/diff_new_pack.KYyBzp/_new  2014-05-22 20:37:41.000000000 +0200
@@ -99,6 +99,7 @@
 Patch23:        pie-m68k.patch
 Patch24:        binutils-2.24-auto-plugin.diff
 Patch25:        ld-testsuite.patch
+Patch26:        binutils-2.24-bso16746.diff
 Patch90:        cross-avr-nesc-as.patch
 Patch92:        cross-avr-omit_section_dynsym.patch
 Patch93:        cross-avr-size.patch
@@ -172,6 +173,7 @@
 %patch23 -p1
 %patch24 -p1
 %patch25 -p1
+%patch26 -p1
 %if "%{TARGET}" == "avr"
 cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
 %patch90

++++++ cross-aarch64-binutils.spec ++++++
--- /var/tmp/diff_new_pack.KYyBzp/_old  2014-05-22 20:37:41.000000000 +0200
+++ /var/tmp/diff_new_pack.KYyBzp/_new  2014-05-22 20:37:41.000000000 +0200
@@ -102,6 +102,7 @@
 Patch23:        pie-m68k.patch
 Patch24:        binutils-2.24-auto-plugin.diff
 Patch25:        ld-testsuite.patch
+Patch26:        binutils-2.24-bso16746.diff
 Patch90:        cross-avr-nesc-as.patch
 Patch92:        cross-avr-omit_section_dynsym.patch
 Patch93:        cross-avr-size.patch
@@ -175,6 +176,7 @@
 %patch23 -p1
 %patch24 -p1
 %patch25 -p1
+%patch26 -p1
 %if "%{TARGET}" == "avr"
 cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
 %patch90

cross-arm-binutils.spec: same change
cross-avr-binutils.spec: same change
cross-hppa-binutils.spec: same change
cross-hppa64-binutils.spec: same change
cross-i386-binutils.spec: same change
cross-ia64-binutils.spec: same change
cross-m68k-binutils.spec: same change
cross-mips-binutils.spec: same change
cross-ppc-binutils.spec: same change
cross-ppc64-binutils.spec: same change
cross-ppc64le-binutils.spec: same change
cross-s390-binutils.spec: same change
cross-s390x-binutils.spec: same change
cross-sparc-binutils.spec: same change
cross-sparc64-binutils.spec: same change
cross-spu-binutils.spec: same change
cross-x86_64-binutils.spec: same change
++++++ binutils-2.24-bso16746.diff ++++++
commit 26c2ff33f8fcd57d52194a159226b639a4fee00c
Author: H.J. Lu <[email protected]>
Date:   Tue Mar 25 13:33:51 2014 -0700

    Don't issue a warning for reference in LTO IR
    
    References in LTO IR may be removed by LTO later.  Instead, make a
    warning symbol if needed.  Warnings will be handled after LTO resolves
    all references.
    
    bfd/
    
        PR ld/16746
        * linker.c (_bfd_generic_link_add_one_symbol): Don't issue a
        warning for reference in LTO IR which may be removed by LTO later.
    
    ld/testsuite/
    
        PR ld/16746
        * ld-plugin/lto.exp: Add 4 tests for PR ld/16746.
        * ld-plugin/pr16746a.c: New file.
        * ld-plugin/pr16746b.c: Likewise.
        * ld-plugin/pr16746c.c: Likewise.
        * ld-plugin/pr16746d.c: Likewise.

Index: binutils-2.24/bfd/linker.c
===================================================================
--- binutils-2.24.orig/bfd/linker.c     2014-05-06 16:08:45.649990914 +0200
+++ binutils-2.24/bfd/linker.c  2014-05-06 16:08:49.819990627 +0200
@@ -1904,8 +1904,10 @@ _bfd_generic_link_add_one_symbol (struct
          break;
 
        case WARNC:
-         /* Issue a warning and cycle.  */
-         if (h->u.i.warning != NULL)
+         /* Issue a warning and cycle.  Don't issue a warning for
+            reference in LTO IR which may be removed by LTO later. */
+         if (h->u.i.warning != NULL
+             && (abfd->flags & BFD_PLUGIN) == 0)
            {
              if (! (*info->callbacks->warning) (info, h->u.i.warning,
                                                 h->root.string, abfd,
@@ -1930,6 +1932,11 @@ _bfd_generic_link_add_one_symbol (struct
          break;
 
        case WARN:
+         /* Don't issue a warning for reference in LTO IR which may be
+            removed by LTO later.  Make a warning symbol instead.  */
+         if ((hash_entry_bfd (h)->flags & BFD_PLUGIN) != 0)
+           goto mwarn;
+
          /* Issue a warning.  */
          if (! (*info->callbacks->warning) (info, string, h->root.string,
                                             hash_entry_bfd (h), NULL, 0))
@@ -1951,6 +1958,7 @@ _bfd_generic_link_add_one_symbol (struct
            }
          /* Fall through.  */
        case MWARN:
+mwarn:
          /* Make a warning symbol.  */
          {
            struct bfd_link_hash_entry *sub;
Index: binutils-2.24/ld/testsuite/ld-plugin/lto.exp
===================================================================
--- binutils-2.24.orig/ld/testsuite/ld-plugin/lto.exp   2014-05-06 
16:08:45.649990914 +0200
+++ binutils-2.24/ld/testsuite/ld-plugin/lto.exp        2014-05-06 
16:10:14.334984808 +0200
@@ -206,6 +206,18 @@ set lto_link_elf_tests {
   {"Build libpr15146d.a"
    "" "-flto -O2"
    {pr15146d.c} {} "lib15146d.a"}
+  {"Build libpr16746a.a"
+   "" ""
+   {pr16746a.c pr16746b.c} {} "lib16746a.a"}
+  {"Build libpr16746b.a"
+   "" "-O2 -flto"
+   {pr16746c.c pr16746d.c} {} "lib16746b.a"}
+  {"PR ld/16746 (1)"
+   "-O2 -flto -fuse-linker-plugin tmpdir/pr16746a.o tmpdir/pr16746c.o" "-O2 
-flto"
+   {dummy.c} {} "pr16746a.exe"}
+  {"PR ld/16746 (2)"
+   "-O2 -flto -fuse-linker-plugin tmpdir/pr16746c.o tmpdir/pr16746a.o" "-O2 
-flto"
+   {dummy.c} {} "pr16746b.exe"}
 }
 
 # Check final symbols in executables.
@@ -309,6 +321,20 @@ if { [is_elf_format]
        pass $testname
     } {
        fail $testname
+    }
+    set testname "PR ld/16746 (3)"
+    set exec_output [run_host_cmd "$CC" "$gcc_gas_flag $gcc_ld_flag -O2 -flto 
-fuse-linker-plugin tmpdir/pr16746b.o tmpdir/pr16746d.o"]
+    if { [ regexp "warning: foobar" $exec_output ] && ![ regexp "symbol from 
plugin" $exec_output ] } {
+       pass $testname
+    } {
+       fail $testname
+    }
+    set testname "PR ld/16746 (4)"
+    set exec_output [run_host_cmd "$CC" "$gcc_gas_flag $gcc_ld_flag -O2 -flto 
-fuse-linker-plugin tmpdir/pr16746d.o tmpdir/pr16746b.o"]
+    if { [ regexp "warning: foobar" $exec_output ] && ![ regexp "symbol from 
plugin" $exec_output ] } {
+       pass $testname
+    } {
+       fail $testname
     }
 }
 
Index: binutils-2.24/ld/testsuite/ld-plugin/pr16746a.c
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.24/ld/testsuite/ld-plugin/pr16746a.c     2014-05-06 
16:08:49.819990627 +0200
@@ -0,0 +1,3 @@
+static const char __evoke_link_warning_foobar[]
+ __attribute__ ((used, section (".gnu.warning.foobar\n\t#")))
+ = "foobar";
Index: binutils-2.24/ld/testsuite/ld-plugin/pr16746b.c
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.24/ld/testsuite/ld-plugin/pr16746b.c     2014-05-06 
16:08:49.820990627 +0200
@@ -0,0 +1,5 @@
+static const char __evoke_link_warning_foobar[]
+ __attribute__ ((used, section (".gnu.warning.foobar\n\t#")))
+ = "foobar";
+
+void foobar (void) {}
Index: binutils-2.24/ld/testsuite/ld-plugin/pr16746c.c
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.24/ld/testsuite/ld-plugin/pr16746c.c     2014-05-06 
16:08:49.820990627 +0200
@@ -0,0 +1,8 @@
+extern void foobar (void);
+int
+main (int argc, char **argv)
+{
+  if (__builtin_constant_p (argc))
+    foobar ();
+  return 0;
+}
Index: binutils-2.24/ld/testsuite/ld-plugin/pr16746d.c
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.24/ld/testsuite/ld-plugin/pr16746d.c     2014-05-06 
16:08:49.820990627 +0200
@@ -0,0 +1,8 @@
+extern void foobar (void);
+int
+main (int argc, char **argv)
+{
+  if (!__builtin_constant_p (argc))
+    foobar ();
+  return 0;
+}
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to