creates and additional section .note.gnu.property. With that the
linker creates a section .plt in gap.o. In the end, a .plt section
is also present in the kernel. There it does not make sense. As
a quick fix explcitly disable cf protection when compiling gapdummy.c
to gapdummy.o. There is no code to protect anyway.
OK deraadt@
-# $OpenBSD: Makefile.amd64,v 1.131 2023/04/17 01:14:24 deraadt Exp $
+# $OpenBSD: Makefile.amd64,v 1.132 2023/04/21 13:24:20 bluhm Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
gapdummy.o:
echo '__asm(".section .rodata,\"a\"");' > gapdummy.c
- ${CC} -c ${CFLAGS} ${CPPFLAGS} gapdummy.c -o $@
+ ${CC} -c ${CFLAGS} ${CPPFLAGS} -fcf-protection=none gapdummy.c -o $@
makegap.sh:
cp $S/conf/makegap.sh $@