Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Sep 2019 19:39:46 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352032 - in head/stand: . i386/loader
Message-ID:  <201909081939.x88Jdk1u098159@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Sun Sep  8 19:39:45 2019
New Revision: 352032
URL: https://svnweb.freebsd.org/changeset/base/352032

Log:
  loader: --gc-sections needs sections to work with
  
  --gc-sections is not really useful unless we generate sections with
  -ffunction-sections -fdata-sections
  
  While there, i386/loader would win from --gc-sections too.

Modified:
  head/stand/defs.mk
  head/stand/i386/loader/Makefile

Modified: head/stand/defs.mk
==============================================================================
--- head/stand/defs.mk	Sun Sep  8 16:24:34 2019	(r352031)
+++ head/stand/defs.mk	Sun Sep  8 19:39:45 2019	(r352032)
@@ -65,6 +65,7 @@ CFLAGS+=	-Ddouble=jagged-little-pill -Dfloat=floaty-mc
 # Experience has shown that problems arise between ~520k to ~530k.
 CFLAGS.clang+=	-Oz
 CFLAGS.gcc+=	-Os
+CFLAGS+=	-ffunction-sections -fdata-sections
 .endif
 
 # GELI Support, with backward compat hooks (mostly)

Modified: head/stand/i386/loader/Makefile
==============================================================================
--- head/stand/i386/loader/Makefile	Sun Sep  8 16:24:34 2019	(r352031)
+++ head/stand/i386/loader/Makefile	Sun Sep  8 19:39:45 2019	(r352032)
@@ -47,7 +47,7 @@ HELP_FILES=	${.CURDIR}/help.i386
 CLEANFILES+=	${LOADER} ${LOADER}.bin
 
 CFLAGS+=	-Wall
-LDFLAGS+=	-static -Ttext 0x0
+LDFLAGS+=	-static -Ttext 0x0 -Wl,--gc-sections
 
 # i386 standalone support library
 LIBI386=	${BOOTOBJ}/i386/libi386/libi386.a



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