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 <b...@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(+) 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: \ -- 2.4.1