]> git.pld-linux.org Git - packages/binutils.git/commitdiff
- rel 3; replace fix with official upstream one auto/th/binutils-2.31.1-3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 10 Aug 2018 20:37:26 +0000 (22:37 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 10 Aug 2018 20:37:38 +0000 (22:37 +0200)
binutils-bug-23499.patch [new file with mode: 0644]
binutils-do-not-provide-shared-section-symbols.patch [deleted file]
binutils.spec

diff --git a/binutils-bug-23499.patch b/binutils-bug-23499.patch
new file mode 100644 (file)
index 0000000..698fc2f
--- /dev/null
@@ -0,0 +1,70 @@
+commit 48e30f5238c70e738f44474d595c476ef4e4ec38
+Author: H.J. Lu <hjl.tools@gmail.com>
+Date:   Fri Aug 10 12:21:58 2018 -0700
+
+    Always clear h->verinfo.verdef when overriding a dynamic definition
+    
+    When linker defines a symbol to override a dynamic definition, it should
+    always clear h->verinfo.verdef so that the symbol won't be associated
+    with the version information from the dynamic object.  This happened to
+    the symbol "_edata" when creating an unversioned dynamic object linking
+    against:
+    
+    1. libKF5ConfigCore.so.5.49.0
+    2. libKF5CoreAddons.so.5.49.0
+    3. libKF5I18n.so.5.49.0
+    4. libKF5DBusAddons.so.5.49.0
+    5. libQt5Xml.so.5.11.1
+    6. libQt5DBus.so.5.11.1
+    7. libQt5Core.so.5.11.1
+    
+    Among them
+    
+    libQt5Xml.so.5.11.1
+       299: 000000000003e000     0 NOTYPE  GLOBAL DEFAULT   18 _edata@@Qt_5
+    libQt5DBus.so.5.11.1
+       597: 0000000000092018     0 NOTYPE  GLOBAL DEFAULT   18 _edata@@Qt_5
+    libQt5Core.so.5.11.1
+      2292: 00000000004df640     0 NOTYPE  GLOBAL DEFAULT   21 _edata@Qt_5
+      2293: 00000000004df640     0 NOTYPE  GLOBAL DEFAULT   21 _edata@Qt_5
+    
+    The problem is triggered by 2 duplicated entries of _edata@Qt_5 in
+    libQt5Core.so.5.11.1 which was created by gold.  Before this commit,
+    ld created the dynamic object with "_edata" in its dynamic symbol table
+    which was linker defined and associated with the version information
+    from libQt5Core.so.5.11.1.  The code in question was there when the
+    binutils source was imported to sourceware.org.  When such a dynamic
+    object was used later, we got:
+    
+    /usr/bin/ld: bin/libKF5Service.so.5.49.0: _edata: invalid version 21 (max 0)
+    /usr/bin/ld: bin/libKF5Service.so.5.49.0: error adding symbols: bad value
+    
+    Tested with many ELF targets.
+    
+            PR ld/23499
+            * elflink.c (bfd_elf_record_link_assignment): Always clear
+            h->verinfo.verdef when overriding a dynamic definition.
+
+diff --git a/bfd/elflink.c b/bfd/elflink.c
+index b24fb95848..02618bed8f 100644
+--- a/bfd/elflink.c
++++ b/bfd/elflink.c
+@@ -686,13 +686,11 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
+       && !h->def_regular)
+     h->root.type = bfd_link_hash_undefined;
+-  /* If this symbol is not being provided by the linker script, and it is
+-     currently defined by a dynamic object, but not by a regular object,
+-     then clear out any version information because the symbol will not be
+-     associated with the dynamic object any more.  */
+-  if (!provide
+-      && h->def_dynamic
+-      && !h->def_regular)
++  /* If this symbol is currently defined by a dynamic object, but not
++     by a regular object, then clear out any version information because
++     the symbol will not be associated with the dynamic object any
++     more.  */
++  if (h->def_dynamic && !h->def_regular)
+     h->verinfo.verdef = NULL;
+   /* Make sure this symbol is not garbage collected.  */
diff --git a/binutils-do-not-provide-shared-section-symbols.patch b/binutils-do-not-provide-shared-section-symbols.patch
deleted file mode 100644 (file)
index 02a7350..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index 444aef2942..8a3858d32b 100644
---- a/ld/scripttempl/elf.sc
-+++ b/ld/scripttempl/elf.sc
-@@ -637,9 +637,9 @@ cat <<EOF
-   ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
-   ${DATA_SDATA-${SDATA}}
-   ${DATA_SDATA-${OTHER_SDATA_SECTIONS}}
--  ${RELOCATING+${DATA_END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}_edata = .${CREATE_SHLIB+)}; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
-+  ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
-   ${RELOCATING+. = .;}
--  ${RELOCATING+${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}__bss_start = .${CREATE_SHLIB+)};}
-+  ${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}
-   ${RELOCATING+${OTHER_BSS_SYMBOLS}}
-   ${DATA_SDATA-${SBSS}}
-   ${BSS_PLT+${PLT}}
-@@ -672,7 +672,7 @@ cat <<EOF
-   ${LARGE_BSS_AFTER_BSS-${LARGE_BSS}}
-   ${RELOCATING+. = ALIGN(${ALIGNMENT});}
-   ${RELOCATING+${OTHER_END_SYMBOLS}}
--  ${RELOCATING+${END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}_end = .${CREATE_SHLIB+)}; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
-+  ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
-   ${RELOCATING+${DATA_SEGMENT_END}}
-   ${TINY_DATA_SECTION}
-   ${TINY_BSS_SECTION}
index 01dc57d723dbb6fc81d6ccf676ed6f4f43cc5c4d..fc23ef81b15d343425a01be4d35e3bd8caae3975 100644 (file)
@@ -24,7 +24,7 @@ Summary(tr.UTF-8):    GNU geliştirme araçları
 Summary(uk.UTF-8):     Набір інструментів GNU для побудови виконуваних програм
 Name:          binutils
 Version:       2.31.1
-Release:       2
+Release:       3
 Epoch:         4
 License:       GPL v3+
 Group:         Development/Tools
@@ -43,8 +43,7 @@ Patch7:               %{name}-libtool-m.patch
 Patch8:                %{name}-build-id.patch
 Patch9:                %{name}-tooldir.patch
 Patch10:       %{name}-sanity-check.patch
-# https://bugzilla.redhat.com/show_bug.cgi?id=1599521
-Patch11:       binutils-do-not-provide-shared-section-symbols.patch
+Patch11:       binutils-bug-23499.patch
 Patch12:       fd-leak.patch
 URL:           http://sources.redhat.com/binutils/
 BuildRequires: autoconf >= 2.64
This page took 0.207823 seconds and 4 git commands to generate.