diff mbox

netbsd: respect -symbolic

Message ID 1432987950-10039-1-git-send-email-vapier@gentoo.org
State New
Headers show

Commit Message

Mike Frysinger May 30, 2015, 12:12 p.m. UTC
The current netbsd elf spec doesn't respect -symbolic which prevents
passing -Bsymbolic down to the linker.  This causes problems when you
try to link the runtime linker as it creates an ELF with incorrect
sections in it leading it to crash at startup.

2015-05-30  Benigno B. Junior  <bbj@gentoo.org>

	* config/netbsd-elf.h (NETBSD_LINK_SPEC_ELF): Turn -symbolic into
	-Bsymbolic.
---
 gcc/config/netbsd-elf.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Jeff Law June 3, 2015, 1:30 p.m. UTC | #1
On 05/30/2015 06:12 AM, Mike Frysinger wrote:
> The current netbsd elf spec doesn't respect -symbolic which prevents
> passing -Bsymbolic down to the linker.  This causes problems when you
> try to link the runtime linker as it creates an ELF with incorrect
> sections in it leading it to crash at startup.
>
> 2015-05-30  Benigno B. Junior  <bbj@gentoo.org>
>
> 	* config/netbsd-elf.h (NETBSD_LINK_SPEC_ELF): Turn -symbolic into
> 	-Bsymbolic.
Thanks.  Installed on the trunk.

jeff
diff mbox

Patch

diff --git a/gcc/config/netbsd-elf.h b/gcc/config/netbsd-elf.h
index ea09429..a679bbd 100644
--- a/gcc/config/netbsd-elf.h
+++ b/gcc/config/netbsd-elf.h
@@ -70,6 +70,7 @@  along with GCC; see the file COPYING3.  If not see
 #define NETBSD_LINK_SPEC_ELF \
   "%{assert*} %{R*} %{rpath*} \
    %{shared:-shared} \
+   %{symbolic:-Bsymbolic} \
    %{!shared: \
      -dc -dp \
      %{!nostdlib: \