svn commit: r340834 - head/stand/i386
Ed Maste
emaste at FreeBSD.org
Fri Nov 23 13:50:19 UTC 2018
Author: emaste
Date: Fri Nov 23 13:50:18 2018
New Revision: 340834
URL: https://svnweb.freebsd.org/changeset/base/340834
Log:
Disable build-id in i386 binary boot components
A user may enable build-id for all builds by adding
LDFLAGS=-Wl,--build-id=sha1 to /etc/make.conf. In this case the build-id
note ends added up to mbr and pmbr's .text, which makes it too large (it
ends up being 532 bytes). To avoid this explicitly turn off build-id for
these components.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15470
Modified:
head/stand/i386/Makefile.inc
Modified: head/stand/i386/Makefile.inc
==============================================================================
--- head/stand/i386/Makefile.inc Fri Nov 23 13:12:04 2018 (r340833)
+++ head/stand/i386/Makefile.inc Fri Nov 23 13:50:18 2018 (r340834)
@@ -2,6 +2,8 @@
#
# $FreeBSD$
+.include "bsd.linker.mk"
+
LOADER_ADDRESS?=0x200000
LDFLAGS+= -nostdlib
LDFLAGS.lld+= -Wl,--no-rosegment
@@ -22,6 +24,9 @@ LDSCRIPT= ${BOOTSRC}/i386/boot.ldscript
# LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary
# LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections
LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary
+.if ${LINKER_FEATURES:Mbuild-id} != ""
+LDFLAGS_BIN+=-Wl,--build-id=none
+.endif
LD_FLAGS_BIN=-static -N --gc-sections
.if ${MACHINE_CPUARCH} == "amd64"
More information about the svn-src-head
mailing list