Disable loop unrolling in skein for sys/boot
When tsoome@ added skein support to the ZFS boot code and zfsloader, it resulted in an explosion in code size, running close to a number of limits. The default for the C version of skein is to unroll all loops for skein-256 and 512 Disabling the loop unrolling saves 20-28kb from each binary boot1.efi gptzfsboot loader.efi userboot.so zfsloader Reviewed by: emaste, tsoome Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D7826
This commit is contained in:
parent
8eb92614fd
commit
3595d72f86
@ -28,6 +28,8 @@ SRCS= boot1.c self_reloc.c start.S ufs_module.c
|
||||
.if ${MK_ZFS} != "no"
|
||||
SRCS+= zfs_module.c
|
||||
SRCS+= skein.c skein_block.c
|
||||
# Do not unroll skein loops, reduce code size
|
||||
CFLAGS+= -DSKEIN_LOOP=111
|
||||
.PATH: ${.CURDIR}/../../../crypto/skein
|
||||
.endif
|
||||
|
||||
|
@ -25,6 +25,8 @@ SRCS= autoload.c \
|
||||
SRCS+= zfs.c
|
||||
.PATH: ${.CURDIR}/../../zfs
|
||||
SRCS+= skein.c skein_block.c
|
||||
# Do not unroll skein loops, reduce code size
|
||||
CFLAGS+= -DSKEIN_LOOP=111
|
||||
.PATH: ${.CURDIR}/../../../crypto/skein
|
||||
|
||||
# Disable warnings that are currently incompatible with the zfs boot code
|
||||
|
@ -36,6 +36,9 @@ CFLAGS= -DBOOTPROG=\"gptzfsboot\" \
|
||||
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
|
||||
-Winline -Wno-tentative-definition-incomplete-type -Wno-pointer-sign
|
||||
|
||||
# Do not unroll skein loops, reduce code size
|
||||
CFLAGS+= -DSKEIN_LOOP=111
|
||||
|
||||
.if !defined(LOADER_NO_GELI_SUPPORT)
|
||||
CFLAGS+= -DLOADER_GELI_SUPPORT
|
||||
CFLAGS+= -I${.CURDIR}/../../geli
|
||||
|
@ -35,6 +35,8 @@ CFLAGS= -DBOOTPROG=\"zfsboot\" \
|
||||
-Winline
|
||||
|
||||
CFLAGS.gcc+= --param max-inline-insns-single=100
|
||||
# Do not unroll skein loops, reduce code size
|
||||
CFLAGS+= -DSKEIN_LOOP=111
|
||||
|
||||
LD_FLAGS=${LD_FLAGS_BIN}
|
||||
|
||||
|
@ -8,6 +8,9 @@ INTERNALLIB=
|
||||
|
||||
SRCS+= zfs.c skein.c skein_block.c
|
||||
|
||||
# Do not unroll skein loops, reduce code size
|
||||
CFLAGS+= -DSKEIN_LOOP=111
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
|
||||
|
@ -6,6 +6,8 @@ INTERNALLIB=
|
||||
SRCS+= zfs.c
|
||||
|
||||
SRCS+= skein.c skein_block.c
|
||||
# Do not unroll skein loops, reduce code size
|
||||
CFLAGS+= -DSKEIN_LOOP=111
|
||||
.PATH: ${.CURDIR}/../../crypto/skein
|
||||
|
||||
CFLAGS+= -DBOOTPROG=\"zfsloader\"
|
||||
|
Loading…
x
Reference in New Issue
Block a user