From eb70d94704a42668110755a5f7ade223d8176b9e Mon Sep 17 00:00:00 2001 From: Alex Hornung Date: Fri, 20 May 2011 10:53:06 +0100 Subject: [PATCH] rtld-elf - Don't pass -elf to the linker * Don't pass -elf to the linker, only our binutils217 understands it. All others interpret it as using the symbol 'lf' as entry point. We didn't have a problem so far because the regular ld (bfd) falls back to a reasonable entry point (start of .text), but gold doesn't and falls back to 0. * This enables us to run world linked with gold. --- libexec/rtld-elf/i386/Makefile.inc | 1 - libexec/rtld-elf/x86_64/Makefile.inc | 1 - 2 files changed, 2 deletions(-) diff --git a/libexec/rtld-elf/i386/Makefile.inc b/libexec/rtld-elf/i386/Makefile.inc index ba39193cf8..1025449e2f 100644 --- a/libexec/rtld-elf/i386/Makefile.inc +++ b/libexec/rtld-elf/i386/Makefile.inc @@ -1,5 +1,4 @@ CFLAGS+= -elf -LDFLAGS+= -elf # Uncomment this to build the dynamic linker as an executable instead # of a shared library: #LDSCRIPT= ${.CURDIR}/${MACHINE_ARCH}/elf_rtld.x diff --git a/libexec/rtld-elf/x86_64/Makefile.inc b/libexec/rtld-elf/x86_64/Makefile.inc index ba39193cf8..1025449e2f 100644 --- a/libexec/rtld-elf/x86_64/Makefile.inc +++ b/libexec/rtld-elf/x86_64/Makefile.inc @@ -1,5 +1,4 @@ CFLAGS+= -elf -LDFLAGS+= -elf # Uncomment this to build the dynamic linker as an executable instead # of a shared library: #LDSCRIPT= ${.CURDIR}/${MACHINE_ARCH}/elf_rtld.x -- 2.41.0