[PATCH 05/14] arm64: Fix EFI linking with -fdata-sections

Josh Poimboeuf posted 14 patches 1 month ago
There is a newer version of this series
[PATCH 05/14] arm64: Fix EFI linking with -fdata-sections
Posted by Josh Poimboeuf 1 month ago
When building with func-fdata-sections, the .init.bss section gets split
up into a bunch of .init.bss.<var> sections.  Make sure they get linked
into .init.data.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 arch/arm64/kernel/vmlinux.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index ad6133b89e7a..1f5e4f996a21 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -269,7 +269,7 @@ SECTIONS
 		INIT_CALLS
 		CON_INITCALL
 		INIT_RAM_FS
-		*(.init.altinstructions .init.bss)	/* from the EFI stub */
+		*(.init.altinstructions .init.bss .init.bss.*)	/* from the EFI stub */
 	}
 	.exit.data : {
 		EXIT_DATA
-- 
2.53.0
Re: [PATCH 05/14] arm64: Fix EFI linking with -fdata-sections
Posted by Song Liu 4 weeks, 1 day ago
On Wed, Mar 4, 2026 at 7:31 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
>
> When building with func-fdata-sections, the .init.bss section gets split
> up into a bunch of .init.bss.<var> sections.  Make sure they get linked
> into .init.data.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

Acked-by: Song Liu <song@kernel.org>