commit binutils for openSUSE:Factory
Hello community, here is the log from the commit of package binutils for openSUSE:Factory checked in at 2019-05-02 19:15:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/binutils (Old) and /work/SRC/openSUSE:Factory/.binutils.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "binutils" Thu May 2 19:15:23 2019 rev:136 rq:699464 version:2.32 Changes: -------- --- /work/SRC/openSUSE:Factory/binutils/binutils.changes 2019-04-26 22:42:51.465692354 +0200 +++ /work/SRC/openSUSE:Factory/.binutils.new.5148/binutils.changes 2019-05-02 19:15:32.513196558 +0200 @@ -1,0 +2,5 @@ +Mon Apr 29 11:10:11 UTC 2019 - Martin Liška <mliska@suse.cz> + +- Add binutils-pr24486.patch: fix for PR24486 (boo#1133131 boo#1133232). + +------------------------------------------------------------------- cross-aarch64-binutils.changes: same change cross-arm-binutils.changes: same change cross-avr-binutils.changes: same change cross-epiphany-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-riscv64-binutils.changes: same change cross-rx-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-pr24486.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ binutils.spec ++++++ --- /var/tmp/diff_new_pack.Dd0DVJ/_old 2019-05-02 19:15:40.601215729 +0200 +++ /var/tmp/diff_new_pack.Dd0DVJ/_new 2019-05-02 19:15:40.605215739 +0200 @@ -96,6 +96,7 @@ Patch37: binutils-revert-plt32-in-branches.diff Patch38: riscv-abi-check.patch Patch39: rx-gas-padding-pr24464.patch +Patch40: binutils-pr24486.patch Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch Patch93: cross-avr-size.patch @@ -169,6 +170,7 @@ %endif %patch38 -p1 %patch39 -p1 +%patch40 -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.Dd0DVJ/_old 2019-05-02 19:15:40.621215777 +0200 +++ /var/tmp/diff_new_pack.Dd0DVJ/_new 2019-05-02 19:15:40.625215787 +0200 @@ -99,6 +99,7 @@ Patch37: binutils-revert-plt32-in-branches.diff Patch38: riscv-abi-check.patch Patch39: rx-gas-padding-pr24464.patch +Patch40: binutils-pr24486.patch Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch Patch93: cross-avr-size.patch @@ -172,6 +173,7 @@ %endif %patch38 -p1 %patch39 -p1 +%patch40 -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-epiphany-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-riscv64-binutils.spec: same change cross-rx-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-pr24486.patch ++++++
When undefined non-weak references in IR objects are optimized out by LTO, we can have weak dynamic referencs to symbols marked with bfd_link_hash_undefined. We shouldn't complain such undefined weak dynamic references. bfd/ PR ld/24486 * elflink.c (elf_link_output_extsym): Don't complain undefined weak dynamic reference. ld/ PR ld/24486 * testsuite/ld-plugin/lto.exp: Run PR ld/24486 tests. * testsuite/ld-plugin/pr24486a.c: New file. * testsuite/ld-plugin/pr24486b.c: Likewise. * testsuite/ld-plugin/pr24486c.c: Likewise. --- bfd/ChangeLog | 6 ++++++ bfd/elflink.c | 2 +- ld/ChangeLog | 8 ++++++++ ld/testsuite/ld-plugin/lto.exp | 12 ++++++++++++ ld/testsuite/ld-plugin/pr24486a.c | 8 ++++++++ ld/testsuite/ld-plugin/pr24486b.c | 8 ++++++++ ld/testsuite/ld-plugin/pr24486c.c | 1 + 7 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 ld/testsuite/ld-plugin/pr24486a.c create mode 100644 ld/testsuite/ld-plugin/pr24486b.c create mode 100644 ld/testsuite/ld-plugin/pr24486c.c diff --git a/bfd/elflink.c b/bfd/elflink.c index 81e667dab0..ddeaa08d50 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -9776,7 +9776,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) /* If we are reporting errors for this situation then do so now. */ if (!ignore_undef - && h->ref_dynamic + && h->ref_dynamic_nonweak && (!h->ref_regular || flinfo->info->gc_sections) && !elf_link_check_versioned_symbol (flinfo->info, bed, h) && flinfo->info->unresolved_syms_in_shared_libs != RM_IGNORE) diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index b13a77333f..e913c6f203 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -325,6 +325,18 @@ set lto_link_elf_tests [list \ [list {Build pr22220main.o} \ {} {-flto} \ {pr22220main.cc} {} {} {c++}] \ + [list "Build pr24486a.o" \ + "$plug_opt" "-flto -O2" \ + {pr24486a.c} {} "" "c"] \ + [list "Build pr24486b.so" \ + "-shared" "-O2 -fpic" \ + {pr24486b.c} {} "pr24486b.so" "c"] \ + [list "Build pr24486c.so" \ + "-shared -Wl,--no-as-needed tmpdir/pr24486b.so" "-O2 -fpic" \ + {pr24486c.c} {} "pr24486c.so" "c"] \ + [list "PR ld/24486" \ + "-O2 -flto tmpdir/pr24486a.o tmpdir/pr24486c.so -Wl,--as-needed tmpdir/pr24486b.so" "" \ + {dummy.c} {} "pr24486.exe"] \ ] # PR 14918 checks that libgcc is not spuriously included in a shared link of diff --git a/ld/testsuite/ld-plugin/pr24486a.c b/ld/testsuite/ld-plugin/pr24486a.c new file mode 100644 index 0000000000..def0139598 --- /dev/null +++ b/ld/testsuite/ld-plugin/pr24486a.c @@ -0,0 +1,8 @@ +extern int FLAGS_verbose; +extern void bar (void); +int +a(void) { +return FLAGS_verbose; +} +void unused (void) { bar(); } +int main() { return a (); } diff --git a/ld/testsuite/ld-plugin/pr24486b.c b/ld/testsuite/ld-plugin/pr24486b.c new file mode 100644 index 0000000000..3aabe2a395 --- /dev/null +++ b/ld/testsuite/ld-plugin/pr24486b.c @@ -0,0 +1,8 @@ +extern void bar (void) __attribute__((weak)); + +void +foo (void) +{ + if (bar) + bar (); +} diff --git a/ld/testsuite/ld-plugin/pr24486c.c b/ld/testsuite/ld-plugin/pr24486c.c new file mode 100644 index 0000000000..f289177d3e --- /dev/null +++ b/ld/testsuite/ld-plugin/pr24486c.c @@ -0,0 +1 @@ +int FLAGS_verbose; -- 2.21.0
participants (1)
-
root