Make sure efiboot is built with RELA/REL relocations and not RELR,
authorguenther <guenther@openbsd.org>
Sun, 14 Nov 2021 21:51:48 +0000 (21:51 +0000)
committerguenther <guenther@openbsd.org>
Sun, 14 Nov 2021 21:51:48 +0000 (21:51 +0000)
as self_reloc.c only handles the former.

ok deraadt@ kettenis@

sys/arch/amd64/stand/efiboot/Makefile.common
sys/arch/arm64/stand/efiboot/Makefile
sys/arch/armv7/stand/efiboot/Makefile
sys/arch/riscv64/stand/efiboot/Makefile

index 66b26ce..80b36b7 100644 (file)
@@ -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
index 9b80220..2d7cd68 100644 (file)
@@ -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
index 8206472..d6ffc41 100644 (file)
@@ -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
index 5f5eee0..a9906d5 100644 (file)
@@ -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