diff options
author | emaste <emaste@FreeBSD.org> | 2018-04-27 01:21:52 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2018-04-27 01:21:52 +0000 |
commit | edb44f37a215e509542dd754cb343a1911ea6c25 (patch) | |
tree | b5cb82fe5a57405017525ace75a318126a90bfb9 /stand | |
parent | 8b5e8679f46b5dd22905f07fb3709e1372cf7e83 (diff) | |
download | FreeBSD-src-edb44f37a215e509542dd754cb343a1911ea6c25.zip FreeBSD-src-edb44f37a215e509542dd754cb343a1911ea6c25.tar.gz |
MFC r332090: 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
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'stand')
-rw-r--r-- | stand/i386/Makefile.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/stand/i386/Makefile.inc b/stand/i386/Makefile.inc index 042ee1b..ef351fc 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 |