svn commit: r352032 - in head/stand: . i386/loader
Toomas Soome
tsoome at FreeBSD.org
Sun Sep 8 19:39:46 UTC 2019
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
More information about the svn-src-all
mailing list