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
This commit is contained in:
Ed Maste 2018-04-06 02:57:58 +00:00
parent 756181b8f5
commit 93b980a802
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332090

View File

@ -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