From 3d5a1c720c0f824ea68610e4a570d25e2e6a4311 Mon Sep 17 00:00:00 2001 From: guenther Date: Sun, 14 Nov 2021 21:51:48 +0000 Subject: [PATCH] Make sure efiboot is built with RELA/REL relocations and not RELR, as self_reloc.c only handles the former. ok deraadt@ kettenis@ --- sys/arch/amd64/stand/efiboot/Makefile.common | 3 ++- sys/arch/arm64/stand/efiboot/Makefile | 3 ++- sys/arch/armv7/stand/efiboot/Makefile | 4 ++-- sys/arch/riscv64/stand/efiboot/Makefile | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/arch/amd64/stand/efiboot/Makefile.common b/sys/arch/amd64/stand/efiboot/Makefile.common index 66b26ce8fd2..80b36b71a68 100644 --- a/sys/arch/amd64/stand/efiboot/Makefile.common +++ b/sys/arch/amd64/stand/efiboot/Makefile.common @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.common,v 1.21 2020/08/02 15:38:52 deraadt Exp $ +# $OpenBSD: Makefile.common,v 1.22 2021/11/14 21:51:48 guenther Exp $ S= ${.CURDIR}/../../../../.. SADIR= ${.CURDIR}/../.. @@ -10,6 +10,7 @@ OBJDUMP?= objdump EFI_HEAP_LIMIT= 0xc00000 LDFLAGS+= -nostdlib -T${.CURDIR}/../${LDSCRIPT} -Bsymbolic -shared +LDFLAGS+= --pack-dyn-relocs=none COPTS+= -DEFIBOOT -DFWRANDOM -DNEEDS_HEAP_H -I${.CURDIR}/.. COPTS+= -I${EFIDIR}/include -I${S}/stand/boot diff --git a/sys/arch/arm64/stand/efiboot/Makefile b/sys/arch/arm64/stand/efiboot/Makefile index 9b802203724..2d7cd68b837 100644 --- a/sys/arch/arm64/stand/efiboot/Makefile +++ b/sys/arch/arm64/stand/efiboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2020/02/29 11:58:57 otto Exp $ +# $OpenBSD: Makefile,v 1.13 2021/11/14 21:51:48 guenther Exp $ NOMAN= # @@ -19,6 +19,7 @@ OBJCOPY?= objcopy OBJDUMP?= objdump LDFLAGS+=-nostdlib -T ${.CURDIR}/ldscript.arm64 -Bsymbolic -shared +LDFLAGS+=--pack-dyn-relocs=none .PATH: ${S}/stand/boot SRCS+= boot.c cmd.c vars.c diff --git a/sys/arch/armv7/stand/efiboot/Makefile b/sys/arch/armv7/stand/efiboot/Makefile index 82064728914..d6ffc41bf38 100644 --- a/sys/arch/armv7/stand/efiboot/Makefile +++ b/sys/arch/armv7/stand/efiboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.16 2020/03/01 15:04:48 otto Exp $ +# $OpenBSD: Makefile,v 1.17 2021/11/14 21:51:48 guenther Exp $ NOMAN= # @@ -18,7 +18,7 @@ OBJCOPY?= objcopy OBJDUMP?= objdump LDFLAGS+= -nostdlib -T ${.CURDIR}/ldscript.arm -Bsymbolic -shared -LDFLAGS+= -z notext -z norelro +LDFLAGS+= -z notext -z norelro --pack-dyn-relocs=none .PATH: ${S}/stand/boot SRCS+= boot.c cmd.c vars.c diff --git a/sys/arch/riscv64/stand/efiboot/Makefile b/sys/arch/riscv64/stand/efiboot/Makefile index 5f5eee08dfb..a9906d58a01 100644 --- a/sys/arch/riscv64/stand/efiboot/Makefile +++ b/sys/arch/riscv64/stand/efiboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2021/04/28 19:01:00 drahn Exp $ +# $OpenBSD: Makefile,v 1.2 2021/11/14 21:51:48 guenther Exp $ NOMAN= # @@ -19,6 +19,7 @@ OBJCOPY?= objcopy OBJDUMP?= objdump LDFLAGS+=-nostdlib -T ${.CURDIR}/ldscript.riscv64 -Bsymbolic -shared +LDFLAGS+=--pack-dyn-relocs=none .PATH: ${S}/stand/boot SRCS+= boot.c cmd.c vars.c -- 2.20.1