diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-04-21 13:24:21 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-04-21 13:24:21 +0000 |
commit | 902bea4ec8059a9e73832d155f8bce0a9b9139a0 (patch) | |
tree | aeb242501f36b735382fa62a3af1348a525073a4 | |
parent | 3278fcd1b069d086e850315d027164ba342e07d5 (diff) |
If gapdummy.c is compiled with -fcf-protection=branch, clang 13
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@
-rw-r--r-- | sys/arch/amd64/conf/Makefile.amd64 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index 7fd82c320f1..7759b875d7f 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $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. @@ -177,7 +177,7 @@ ld.script: ${_machdir}/conf/ld.script 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 $@ |