diff mbox series

[v2,1/2] arm: page align EFI binary section

Message ID 20240226212408.7535-2-heinrich.schuchardt@canonical.com
State Accepted, archived
Commit 3b3d61df3b2b31b0491c67090a30cd67e44c342a
Delegated to: Heinrich Schuchardt
Headers show
Series arm: separate .data and .text sections of EFI binaries | expand

Commit Message

Heinrich Schuchardt Feb. 26, 2024, 9:24 p.m. UTC
Change the alignment of the relocation code in EFI binaries to match page
boundaries.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
v2:
	new patch
---
 arch/arm/lib/crt0_arm_efi.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ilias Apalodimas Feb. 28, 2024, 11:07 a.m. UTC | #1
On Mon, 26 Feb 2024 at 23:24, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> Change the alignment of the relocation code in EFI binaries to match page
> boundaries.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         new patch
> ---
>  arch/arm/lib/crt0_arm_efi.S | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/lib/crt0_arm_efi.S b/arch/arm/lib/crt0_arm_efi.S
> index 75ee37b7d3..7a4e5dff75 100644
> --- a/arch/arm/lib/crt0_arm_efi.S
> +++ b/arch/arm/lib/crt0_arm_efi.S
> @@ -115,14 +115,14 @@ section_table:
>         .short  0               /* NumberOfLineNumbers  (0 for executables) */
>         .long   0xe0500020      /* Characteristics (section flags) */
>
> -       .align          9
> +       .align          12
>  _start:
>         stmfd           sp!, {r0-r2, lr}
>
>         adr             r1, .L_DYNAMIC
>         ldr             r0, [r1]
>         add             r1, r0, r1
> -       adr             r0, image_base
> +       adrl            r0, image_base
>         bl              _relocate
>         teq             r0, #0
>         bne             0f
> --
> 2.43.0
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/arch/arm/lib/crt0_arm_efi.S b/arch/arm/lib/crt0_arm_efi.S
index 75ee37b7d3..7a4e5dff75 100644
--- a/arch/arm/lib/crt0_arm_efi.S
+++ b/arch/arm/lib/crt0_arm_efi.S
@@ -115,14 +115,14 @@  section_table:
 	.short	0		/* NumberOfLineNumbers  (0 for executables) */
 	.long	0xe0500020	/* Characteristics (section flags) */
 
-	.align		9
+	.align		12
 _start:
 	stmfd		sp!, {r0-r2, lr}
 
 	adr		r1, .L_DYNAMIC
 	ldr		r0, [r1]
 	add		r1, r0, r1
-	adr		r0, image_base
+	adrl		r0, image_base
 	bl		_relocate
 	teq		r0, #0
 	bne		0f