Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 2020 18:54:56 +0000 (UTC)
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361402 - head/sys/conf
Message-ID:  <202005221854.04MIsuns088261@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mhorne
Date: Fri May 22 18:54:56 2020
New Revision: 361402
URL: https://svnweb.freebsd.org/changeset/base/361402

Log:
  Simplify the RISC-V kernel linker invocation
  
  Remove our custom SYSTEM_LD definition. This generates program headers
  that are more consistent with other architectures, and more importantly,
  are in line with what loader(8) expects when loading a kernel.
  
  As noted in https://reviews.freebsd.org/D22920, there is no apparent
  reason why the kernel would need a writable text segment, so removal of
  the -N flag isn't likely to cause issue.
  
  Reviewed by:	kp, br
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D24909

Modified:
  head/sys/conf/Makefile.riscv

Modified: head/sys/conf/Makefile.riscv
==============================================================================
--- head/sys/conf/Makefile.riscv	Fri May 22 18:11:17 2020	(r361401)
+++ head/sys/conf/Makefile.riscv	Fri May 22 18:54:56 2020	(r361402)
@@ -35,12 +35,7 @@ INCLUDES+= -I$S/contrib/libfdt
 # We set this value using --defsym rather than hardcoding it in ldscript.riscv
 # so that different kernel configs can override the load address.
 KERNEL_LMA?=	0x80200000
-
-SYSTEM_LD= @${LD} -N -m ${LD_EMULATION} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} \
-	--no-warn-mismatch --warn-common --export-dynamic \
-	--defsym='kernel_lma=${KERNEL_LMA}' \
-	--dynamic-linker /red/herring \
-	-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
+LDFLAGS+= --defsym='kernel_lma=${KERNEL_LMA}'
 
 .if !empty(DDB_ENABLED)
 CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls



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