aboutsummaryrefslogtreecommitdiff
path: root/stand/i386/Makefile.inc
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-04-06 02:57:58 +0000
committerEd Maste <emaste@FreeBSD.org>2018-04-06 02:57:58 +0000
commit93b980a802996c9b000d3b5598b170b2c4854b47 (patch)
treec85de0bd07582c414e90fb4a9467a0d198f9a0bf /stand/i386/Makefile.inc
parent756181b8f509f507a1f57f32341596ad83cbf40f (diff)
downloadsrc-93b980a802996c9b000d3b5598b170b2c4854b47.tar.gz
src-93b980a802996c9b000d3b5598b170b2c4854b47.zip
stand: pass --no-rosegment for i386 bits when linking with lld
btxld does not correctly handle input with other than 2 PT_LOAD segments. Passing --no-rosegment lets lld produce output eqivalent to ld.bfd: 2 PT_LOAD segments and no PT_GNU_RELRO. PR: 225775 MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14956
Notes
Notes: svn path=/head/; revision=332090
Diffstat (limited to 'stand/i386/Makefile.inc')
-rw-r--r--stand/i386/Makefile.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/stand/i386/Makefile.inc b/stand/i386/Makefile.inc
index a3140190a135..788365bbdf30 100644
--- a/stand/i386/Makefile.inc
+++ b/stand/i386/Makefile.inc
@@ -2,8 +2,13 @@
#
# $FreeBSD$
+.sinclude <bsd.linker.mk>
+
LOADER_ADDRESS?=0x200000
LDFLAGS+= -nostdlib
+.if defined(LINKER_TYPE) && ${LINKER_TYPE} == "lld"
+LDFLAGS+= -Wl,--no-rosegment
+.endif
# BTX components
BTXDIR= ${BOOTOBJ}/i386/btx