Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2017 00:33:16 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320179 - head/sys/conf
Message-ID:  <201706210033.v5L0XGVc027941@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Wed Jun 21 00:33:16 2017
New Revision: 320179
URL: https://svnweb.freebsd.org/changeset/base/320179

Log:
  add -znotext to kernel module link invocation
  
  ARM kernel modules require .text relocations (DT_TEXTREL) in shared
  object ouptut, which is not allowed by default by lld.  Add the -znotext
  option to enable this.  For simplicity add it unconditionally: it is
  already default and thus either redundant (GNU BFD ld and gold from
  ports) or ignored as an unknown option (GNU BFD ld 2.17.50 in the base
  system).
  
  Reviewed by:	kib
  MFC after:	3 weeks
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D11250

Modified:
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Wed Jun 21 00:30:57 2017	(r320178)
+++ head/sys/conf/kmod.mk	Wed Jun 21 00:33:16 2017	(r320179)
@@ -210,8 +210,8 @@ ${PROG}.debug: ${FULLPROG}
 .if ${__KLD_SHARED} == yes
 ${FULLPROG}: ${KMOD}.kld
 .if ${MACHINE_CPUARCH} != "aarch64"
-	${LD} -m ${LD_EMULATION} -Bshareable ${_LDFLAGS} -o ${.TARGET} \
-	    ${KMOD}.kld
+	${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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706210033.v5L0XGVc027941>