From 0036605bb930e8fa684ed85410ea4a7746c5daa8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 17 Apr 2023 00:05:35 +0000 Subject: [PATCH] The bootblocks are 32-bit binaries which use the ENTRY() macros which now include endbr64 macros. That's not going to work, so use the simple method of -Dendbr64= to remove them from the instruction stream. ok kettenis guenther --- sys/arch/amd64/stand/boot/Makefile | 3 ++- sys/arch/amd64/stand/cdboot/Makefile | 3 ++- sys/arch/amd64/stand/pxeboot/Makefile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arch/amd64/stand/boot/Makefile b/sys/arch/amd64/stand/boot/Makefile index e2a9d154fc0..99d1e453033 100644 --- a/sys/arch/amd64/stand/boot/Makefile +++ b/sys/arch/amd64/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.48 2021/07/08 20:04:56 deraadt Exp $ +# $OpenBSD: Makefile,v 1.49 2023/04/17 00:05:35 deraadt Exp $ COPTS?= MAN?= boot.8 @@ -17,6 +17,7 @@ PROG?= boot SRCS= srt0.S conf.c LD?= ld SIZE?= size +AFLAGS+=-Dendbr64= LDFLAGS+=-nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -nopie -znorelro LDFLAGS+=-melf_i386 -L/usr/libdata diff --git a/sys/arch/amd64/stand/cdboot/Makefile b/sys/arch/amd64/stand/cdboot/Makefile index 8579597e138..e16154f83fb 100644 --- a/sys/arch/amd64/stand/cdboot/Makefile +++ b/sys/arch/amd64/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.43 2021/07/08 20:04:57 deraadt Exp $ +# $OpenBSD: Makefile,v 1.44 2023/04/17 00:05:35 deraadt Exp $ MAN= cdboot.8 @@ -10,6 +10,7 @@ PROG= cdboot SRCS= srt0.S boot.c conf.c LD?= ld SIZE?= size +AFLAGS+=-Dendbr64= LDFLAGS+=-nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -nopie -znorelro LDFLAGS+=-melf_i386 -L/usr/libdata INSTALL_STRIP= diff --git a/sys/arch/amd64/stand/pxeboot/Makefile b/sys/arch/amd64/stand/pxeboot/Makefile index 9b028d8f4aa..f718fb6e633 100644 --- a/sys/arch/amd64/stand/pxeboot/Makefile +++ b/sys/arch/amd64/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.41 2021/07/08 20:04:57 deraadt Exp $ +# $OpenBSD: Makefile,v 1.42 2023/04/17 00:05:35 deraadt Exp $ MAN= pxeboot.8 @@ -10,6 +10,7 @@ PROG= pxeboot SRCS= srt0.S conf.c devopen.c open.c LD?= ld SIZE?= size +AFLAGS+=-Dendbr64= LDFLAGS+=-nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -nopie -znorelro LDFLAGS+=-melf_i386 -L/usr/libdata INSTALL_STRIP= -- 2.20.1