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.
This commit is contained in:
parent
c344416ecd
commit
094b40659f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352032
@ -65,6 +65,7 @@ CFLAGS+= -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface
|
|||||||
# Experience has shown that problems arise between ~520k to ~530k.
|
# Experience has shown that problems arise between ~520k to ~530k.
|
||||||
CFLAGS.clang+= -Oz
|
CFLAGS.clang+= -Oz
|
||||||
CFLAGS.gcc+= -Os
|
CFLAGS.gcc+= -Os
|
||||||
|
CFLAGS+= -ffunction-sections -fdata-sections
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# GELI Support, with backward compat hooks (mostly)
|
# GELI Support, with backward compat hooks (mostly)
|
||||||
|
@ -47,7 +47,7 @@ HELP_FILES= ${.CURDIR}/help.i386
|
|||||||
CLEANFILES+= ${LOADER} ${LOADER}.bin
|
CLEANFILES+= ${LOADER} ${LOADER}.bin
|
||||||
|
|
||||||
CFLAGS+= -Wall
|
CFLAGS+= -Wall
|
||||||
LDFLAGS+= -static -Ttext 0x0
|
LDFLAGS+= -static -Ttext 0x0 -Wl,--gc-sections
|
||||||
|
|
||||||
# i386 standalone support library
|
# i386 standalone support library
|
||||||
LIBI386= ${BOOTOBJ}/i386/libi386/libi386.a
|
LIBI386= ${BOOTOBJ}/i386/libi386/libi386.a
|
||||||
|
Loading…
Reference in New Issue
Block a user