svn commit: r320235 - head/sys/conf
Ed Maste
emaste at FreeBSD.org
Thu Jun 22 15:09:43 UTC 2017
Author: emaste
Date: Thu Jun 22 15:09:42 2017
New Revision: 320235
URL: https://svnweb.freebsd.org/changeset/base/320235
Log:
retire arm64 kernel module linker workaround
Relocatable linking in aarch64 ld from binutils 2.25.1 does not work.
The linker corrupts the references to the external symbols which are
defined by other object in the linking set and should therefore lose
the GOT entry.
The problem is fixed in later versions of GNU ld and does not exist in
the in-tree lld linker that we now use by default for arm64, so the
workaround can be removed.
Reviewed by: kib
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11302
Modified:
head/sys/conf/kmod.mk
Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk Thu Jun 22 14:30:09 2017 (r320234)
+++ head/sys/conf/kmod.mk Thu Jun 22 15:09:42 2017 (r320235)
@@ -209,18 +209,8 @@ ${PROG}.debug: ${FULLPROG}
.if ${__KLD_SHARED} == yes
${FULLPROG}: ${KMOD}.kld
-.if ${MACHINE_CPUARCH} != "aarch64"
${LD} -m ${LD_EMULATION} -Bshareable -znotext ${_LDFLAGS} \
-o ${.TARGET} ${KMOD}.kld
-.else
-#XXXKIB Relocatable linking in aarch64 ld from binutils 2.25.1 does
-# not work. The linker corrupts the references to the external
-# symbols which are defined by other object in the linking set
-# and should therefore loose the GOT entry. The problem seems
-# to be fixed in the binutils-gdb git HEAD as of 2015-10-04. Hack
-# below allows to get partially functioning modules for now.
- ${LD} -m ${LD_EMULATION} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${OBJS}
-.endif
.if !defined(DEBUG_FLAGS)
${OBJCOPY} --strip-debug ${.TARGET}
.endif
More information about the svn-src-all
mailing list