Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2018 13:50:18 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340834 - head/stand/i386
Message-ID:  <201811231350.wANDoIvl040441@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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"



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