armvirt: disable LD dead code elimination on ARM32
authorMathew McBride <matt@traverse.com.au>
Wed, 28 Sep 2022 05:47:30 +0000 (15:47 +1000)
committerPetr Štetiar <ynezz@true.cz>
Fri, 2 Jun 2023 09:36:08 +0000 (11:36 +0200)
This interferes with the generation of the EFI stub section for
ARM32. As this target is not size constrained, disable the dead code
data elimination hack.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
target/linux/armvirt/patches-6.1/221-armvirt-disable-gc_sections.patch [new file with mode: 0644]

diff --git a/target/linux/armvirt/patches-6.1/221-armvirt-disable-gc_sections.patch b/target/linux/armvirt/patches-6.1/221-armvirt-disable-gc_sections.patch
new file mode 100644 (file)
index 0000000..cb124c1
--- /dev/null
@@ -0,0 +1,23 @@
+From b77c0ecdc7915e5c5c515da1aa6cfaf6f4eb8351 Mon Sep 17 00:00:00 2001
+From: Mathew McBride <matt@traverse.com.au>
+Date: Wed, 28 Sep 2022 16:39:31 +1000
+Subject: [PATCH] arm: disable code size reduction measures
+ (gc-sections,-f*-sections)
+
+This interferes with the EFI boot stub on armv7l.
+
+Signed-off-by: Mathew McBride <matt@traverse.com.au>
+---
+ arch/arm/Kconfig | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -122,7 +122,6 @@ config ARM
+       select HAVE_UID16
+       select HAVE_VIRT_CPU_ACCOUNTING_GEN
+       select IRQ_FORCED_THREADING
+-      select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
+       select MODULES_USE_ELF_REL
+       select NEED_DMA_MAP_STATE
+       select OF_EARLY_FLATTREE if OF