From 584425eb2a2cc84186ee6b025b6fc91601c6be5f Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Tue, 23 May 2023 15:37:42 +0100 Subject: [PATCH 1/2] ctors.S: Fix section definitions Using @ doesn't work on ARM32 Signed-off-by: Callum Farmer --- lib/ctors.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ctors.S b/lib/ctors.S index de3f231..8aa36dc 100644 --- a/lib/ctors.S +++ b/lib/ctors.S @@ -8,28 +8,28 @@ * end/END definitions, and the fact that they're mergeable, they can also * have NULLs which aren't guaranteed to be at the end. */ - .section .init_array, "aw", @init_array + .section .init_array,"aw",%init_array .p2align 3, 0 .globl __init_array_start __init_array_start: .p2align 3, 0 .globl __init_array_end __init_array_end: - .section .ctors, "aw", @progbits + .section .ctors,"aw",%progbits .p2align 3, 0 .globl __CTOR_LIST__ __CTOR_LIST__: .p2align 3, 0 .globl __CTOR_END__ __CTOR_END__: - .section .dtors, "aw", @progbits + .section .dtors,"aw",%progbits .p2align 3, 0 .globl __DTOR_LIST__ __DTOR_LIST__: .p2align 3, 0 .globl __DTOR_END__ __DTOR_END__: - .section .fini_array, "aw", @fini_array + .section .fini_array,"aw",%fini_array .p2align 3, 0 .globl __fini_array_start __fini_array_start: From 0fe8def9b6948af8207098f2ee04c5789820a238 Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Tue, 23 May 2023 15:44:14 +0100 Subject: [PATCH 2/2] ARM32: fix L_DYNAMIC L_DYNAMIC must be 32bits to be PCREL Signed-off-by: Callum Farmer --- gnuefi/crt0-efi-arm.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnuefi/crt0-efi-arm.S b/gnuefi/crt0-efi-arm.S index 21e92b9..d40e63c 100644 --- a/gnuefi/crt0-efi-arm.S +++ b/gnuefi/crt0-efi-arm.S @@ -142,7 +142,7 @@ _start: ldr pc, [sp], #4 .L_DYNAMIC: - .2byte _DYNAMIC - . + .4byte _DYNAMIC - . #if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack,"",%progbits