binutils: Apply upstream bug fix
This broke syslinux: http://hydra.nixos.org/build/32430411/nixlog/89/raw
This commit is contained in:
parent
d5bb6a1f9c
commit
89742e6b05
@ -32,6 +32,9 @@ 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
|
||||
];
|
||||
|
||||
outputs = [ "out" "info" ];
|
||||
|
47
pkgs/development/tools/misc/binutils/fix-bsymbolic.patch
Normal file
47
pkgs/development/tools/misc/binutils/fix-bsymbolic.patch
Normal file
@ -0,0 +1,47 @@
|
||||
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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user