mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
binutils: 2.26 -> 2.26.1
See announcement at http://lists.gnu.org/archive/html/info-gnu/2016-07/msg00000.html
This commit is contained in:
parent
d936272b79
commit
281449424f
@ -2,7 +2,7 @@
|
||||
, cross ? null, gold ? true, bison ? null
|
||||
}:
|
||||
|
||||
let basename = "binutils-2.26"; in
|
||||
let basename = "binutils-2.26.1"; in
|
||||
|
||||
with { inherit (stdenv.lib) optional optionals optionalString; };
|
||||
|
||||
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/binutils/${basename}.tar.bz2";
|
||||
sha256 = "1ngc2h3knhiw8s22l8y6afycfaxr5grviqy7mwvm4bsl14cf9b62";
|
||||
sha256 = "1n4zjibdvqwz63kkzkjdqdp1nh993pn0lml6yyr19yx4gb44dhrr";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -32,12 +32,6 @@ stdenv.mkDerivation rec {
|
||||
# This is needed, for instance, so that running "ldd" on a binary that is
|
||||
# PaX-marked to disable mprotect doesn't fail with permission denied.
|
||||
./pt-pax-flags.patch
|
||||
|
||||
# Bug fix backported from binutils master.
|
||||
./fix-bsymbolic.patch
|
||||
|
||||
# Bug fix backported from binutils master.
|
||||
./fix-update-symbol-version.patch
|
||||
];
|
||||
|
||||
outputs = (optional (cross == null) "dev") ++ [ "out" "info" ];
|
||||
|
@ -1,47 +0,0 @@
|
||||
http://lists.gnu.org/archive/html/bug-binutils/2016-01/msg00193.html
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=19615
|
||||
|
||||
From 1dab972d797c060e17229c2e10da01852ba82629 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 11 Feb 2016 15:31:15 -0800
|
||||
Subject: [PATCH] Enable -Bsymbolic and -Bsymbolic-functions to PIE
|
||||
|
||||
Before binutils 2.26, -Bsymbolic and -Bsymbolic-functions were also
|
||||
applied to PIE so that "ld -pie -Bsymbolic -E" can be used to export
|
||||
symbols in PIE with local binding. This patch re-enables -Bsymbolic
|
||||
and -Bsymbolic-functions for PIE.
|
||||
|
||||
diff --git a/ld/lexsup.c b/ld/lexsup.c
|
||||
index 4cad209..e2fb212 100644
|
||||
--- a/ld/lexsup.c
|
||||
+++ b/ld/lexsup.c
|
||||
@@ -1586,15 +1586,14 @@ parse_args (unsigned argc, char **argv)
|
||||
/* We may have -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data,
|
||||
--dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and
|
||||
--dynamic-list FILE. -Bsymbolic and -Bsymbolic-functions are
|
||||
- for shared libraries. -Bsymbolic overrides all others and vice
|
||||
- versa. */
|
||||
+ for PIC outputs. -Bsymbolic overrides all others and vice versa. */
|
||||
switch (command_line.symbolic)
|
||||
{
|
||||
case symbolic_unset:
|
||||
break;
|
||||
case symbolic:
|
||||
- /* -Bsymbolic is for shared library only. */
|
||||
- if (bfd_link_dll (&link_info))
|
||||
+ /* -Bsymbolic is for PIC output only. */
|
||||
+ if (bfd_link_pic (&link_info))
|
||||
{
|
||||
link_info.symbolic = TRUE;
|
||||
/* Should we free the unused memory? */
|
||||
@@ -1603,8 +1602,8 @@ parse_args (unsigned argc, char **argv)
|
||||
}
|
||||
break;
|
||||
case symbolic_functions:
|
||||
- /* -Bsymbolic-functions is for shared library only. */
|
||||
- if (bfd_link_dll (&link_info))
|
||||
+ /* -Bsymbolic-functions is for PIC output only. */
|
||||
+ if (bfd_link_pic (&link_info))
|
||||
command_line.dynamic_list = dynamic_list_data;
|
||||
break;
|
||||
}
|
@ -1,106 +0,0 @@
|
||||
NOTE: removed Changelog diffs to avoid the patch failing to apply
|
||||
|
||||
From 544ddf9322b1b83982e5cb84a54d084ee7e718ea Mon Sep 17 00:00:00 2001
|
||||
From: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Wed, 24 Feb 2016 15:13:35 -0800
|
||||
Subject: [PATCH] Update symbol version for symbol from linker script
|
||||
|
||||
We need to update symbol version for symbols from linker script.
|
||||
|
||||
Backport from master
|
||||
|
||||
bfd/
|
||||
|
||||
PR ld/19698
|
||||
* elflink.c (bfd_elf_record_link_assignment): Set versioned if
|
||||
symbol version is unknown.
|
||||
|
||||
ld/
|
||||
|
||||
PR ld/19698
|
||||
* testsuite/ld-elf/pr19698.d: New file.
|
||||
* testsuite/ld-elf/pr19698.s: Likewise.
|
||||
* testsuite/ld-elf/pr19698.t: Likewise.
|
||||
---
|
||||
bfd/ChangeLog | 9 +++++++++
|
||||
bfd/elflink.c | 13 +++++++++++++
|
||||
ld/ChangeLog | 10 ++++++++++
|
||||
ld/testsuite/ld-elf/pr19698.d | 10 ++++++++++
|
||||
ld/testsuite/ld-elf/pr19698.s | 5 +++++
|
||||
ld/testsuite/ld-elf/pr19698.t | 11 +++++++++++
|
||||
6 files changed, 58 insertions(+), 0 deletions(-)
|
||||
create mode 100644 ld/testsuite/ld-elf/pr19698.d
|
||||
create mode 100644 ld/testsuite/ld-elf/pr19698.s
|
||||
create mode 100644 ld/testsuite/ld-elf/pr19698.t
|
||||
|
||||
diff --git a/bfd/elflink.c b/bfd/elflink.c
|
||||
index ae8d148..8fcaadd 100644
|
||||
--- a/bfd/elflink.c
|
||||
+++ b/bfd/elflink.c
|
||||
@@ -555,6 +555,19 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
|
||||
if (h == NULL)
|
||||
return provide;
|
||||
|
||||
+ if (h->versioned == unknown)
|
||||
+ {
|
||||
+ /* Set versioned if symbol version is unknown. */
|
||||
+ char *version = strrchr (name, ELF_VER_CHR);
|
||||
+ if (version)
|
||||
+ {
|
||||
+ if (version > name && version[-1] != ELF_VER_CHR)
|
||||
+ h->versioned = versioned_hidden;
|
||||
+ else
|
||||
+ h->versioned = versioned;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
switch (h->root.type)
|
||||
{
|
||||
case bfd_link_hash_defined:
|
||||
diff --git a/ld/testsuite/ld-elf/pr19698.d b/ld/testsuite/ld-elf/pr19698.d
|
||||
new file mode 100644
|
||||
index 0000000..a39f67a
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr19698.d
|
||||
@@ -0,0 +1,10 @@
|
||||
+#ld: -shared $srcdir/$subdir/pr19698.t
|
||||
+#readelf : --dyn-syms --wide
|
||||
+#target: *-*-linux* *-*-gnu* *-*-solaris*
|
||||
+
|
||||
+Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||
+#...
|
||||
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1
|
||||
+#...
|
||||
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2
|
||||
+#pass
|
||||
diff --git a/ld/testsuite/ld-elf/pr19698.s b/ld/testsuite/ld-elf/pr19698.s
|
||||
new file mode 100644
|
||||
index 0000000..875dca4
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr19698.s
|
||||
@@ -0,0 +1,5 @@
|
||||
+ .text
|
||||
+ .globl foo
|
||||
+ .type foo, %function
|
||||
+foo:
|
||||
+ .byte 0
|
||||
diff --git a/ld/testsuite/ld-elf/pr19698.t b/ld/testsuite/ld-elf/pr19698.t
|
||||
new file mode 100644
|
||||
index 0000000..09d9125
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr19698.t
|
||||
@@ -0,0 +1,11 @@
|
||||
+"foo@VERS.1" = foo;
|
||||
+
|
||||
+VERSION {
|
||||
+VERS.2 {
|
||||
+ global:
|
||||
+ foo;
|
||||
+};
|
||||
+
|
||||
+VERS.1 {
|
||||
+};
|
||||
+}
|
||||
--
|
||||
1.7.1
|
||||
|
Loading…
Reference in New Issue
Block a user