From 72dd29de21c4eb19cacfac62e49d392a71f65cb4e2fbe60f830717f888d6259d Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 24 Jan 2023 12:54:02 +0000 Subject: [PATCH] - Remove broken arm32-avoid-copyreloc.patch to fix [gcc#108515] OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=428 --- arm32-avoid-copyreloc.patch | 61 ------------------------------------- binutils.changes | 5 +++ binutils.spec | 4 +-- 3 files changed, 6 insertions(+), 64 deletions(-) delete mode 100644 arm32-avoid-copyreloc.patch diff --git a/arm32-avoid-copyreloc.patch b/arm32-avoid-copyreloc.patch deleted file mode 100644 index f5e18f4..0000000 --- a/arm32-avoid-copyreloc.patch +++ /dev/null @@ -1,61 +0,0 @@ -When a writable input section (i.e. data) refers to a symbol defined in an -ET_DYN object, BFD ld for ARM targets generates a COPY dynamic reloc. For -other targets like x86, this situation generates a plain data dynamic -reloc. Gold for ARM also generates the plain data dynamic reloc. - -https://bugzilla.suse.com/show_bug.cgi?id=1200962 -https://sourceware.org/bugzilla/show_bug.cgi?id=16177 - ---- - bfd/elf32-arm.c | 25 +++++++++++++++++++------ - 1 file changed, 19 insertions(+), 6 deletions(-) -Index: binutils-2.39/bfd/elf32-arm.c -=================================================================== ---- binutils-2.39.orig/bfd/elf32-arm.c -+++ binutils-2.39/bfd/elf32-arm.c -@@ -16196,6 +16196,21 @@ elf32_arm_adjust_dynamic_symbol (struct - if (bfd_link_pic (info) || globals->root.is_relocatable_executable) - return true; - -+ /* If -z nocopyreloc was given, we won't generate them either. */ -+ if (info->nocopyreloc) -+ { -+ h->non_got_ref = 0; -+ return true; -+ } -+ -+ /* If we don't find any dynamic relocs in read-only sections, then -+ we'll be keeping the dynamic relocs and avoiding the copy reloc. */ -+ if (!_bfd_elf_readonly_dynrelocs (h)) -+ { -+ h->non_got_ref = 0; -+ return true; -+ } -+ - /* We must allocate the symbol in our .dynbss section, which will - become part of the .bss section of the executable. There will be - an entry for this symbol in the .dynsym section. The dynamic -@@ -16205,9 +16220,9 @@ elf32_arm_adjust_dynamic_symbol (struct - determine the address it must put in the global offset table, so - both the dynamic object and the regular object will refer to the - same memory location for the variable. */ -- /* If allowed, we must generate a R_ARM_COPY reloc to tell the dynamic -- linker to copy the initial value out of the dynamic object and into -- the runtime process image. We need to remember the offset into the -+ /* We must generate a R_ARM_COPY reloc to tell the dynamic linker to -+ copy the initial value out of the dynamic object and into the -+ runtime process image. We need to remember the offset into the - .rel(a).bss section we are going to use. */ - if ((h->root.u.def.section->flags & SEC_READONLY) != 0) - { -@@ -16219,9 +16234,7 @@ elf32_arm_adjust_dynamic_symbol (struct - s = globals->root.sdynbss; - srel = globals->root.srelbss; - } -- if (info->nocopyreloc == 0 -- && (h->root.u.def.section->flags & SEC_ALLOC) != 0 -- && h->size != 0) -+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0) - { - elf32_arm_allocate_dynrelocs (info, srel, 1); - h->needs_copy = 1; diff --git a/binutils.changes b/binutils.changes index 48a2e21..f0d4607 100644 --- a/binutils.changes +++ b/binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 24 12:52:49 UTC 2023 - Richard Biener + +- Remove broken arm32-avoid-copyreloc.patch to fix [gcc#108515] + ------------------------------------------------------------------- Sat Dec 10 10:00:56 UTC 2022 - Dirk Müller diff --git a/binutils.spec b/binutils.spec index 7506275..de5734f 100644 --- a/binutils.spec +++ b/binutils.spec @@ -1,7 +1,7 @@ # # spec file for package binutils # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -125,7 +125,6 @@ Patch6: unit-at-a-time.patch Patch8: ld-relro.diff Patch9: testsuite.diff Patch10: enable-targets-gold.diff -Patch11: arm32-avoid-copyreloc.patch Patch12: s390-pic-dso.diff Patch14: binutils-build-as-needed.diff Patch15: binutils-znow.patch @@ -247,7 +246,6 @@ cp ld/ldgram.y ld/ldgram.y.orig %patch8 %patch9 %patch10 -%patch11 -p1 %patch12 %patch14 %patch15