[PATCH] Arm: drop bogus ALIGN() from linker script

Jan Beulich posted 1 patch 11 months ago
Failed in applying to current master (apply log)
[PATCH] Arm: drop bogus ALIGN() from linker script
Posted by Jan Beulich 11 months ago
Having ALIGN() inside a section definition usually makes sense only with
a label definition following (an exception case is a few lines out of
context, where cache line sharing is intended to be avoided).
Constituents of .bss.page_aligned need to specify their own alignment
correctly anyway, or else they're susceptible to link order changing.
This requirement is already met: Arm-specific code has no such object,
while common (EFI) code has another one. That one has suitable alignment
specified.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Note how RISC-V had this dropped pretty recently.

--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -199,7 +199,6 @@ SECTIONS
   .bss : {                     /* BSS */
        __bss_start = .;
        *(.bss.stack_aligned)
-       . = ALIGN(PAGE_SIZE);
        *(.bss.page_aligned)
        . = ALIGN(PAGE_SIZE);
        __per_cpu_start = .;
Re: [PATCH] Arm: drop bogus ALIGN() from linker script
Posted by Stefano Stabellini 11 months ago
On Wed, 14 Jun 2023, Jan Beulich wrote:
> Having ALIGN() inside a section definition usually makes sense only with
> a label definition following (an exception case is a few lines out of
> context, where cache line sharing is intended to be avoided).
> Constituents of .bss.page_aligned need to specify their own alignment
> correctly anyway, or else they're susceptible to link order changing.
> This requirement is already met: Arm-specific code has no such object,
> while common (EFI) code has another one. That one has suitable alignment
> specified.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
> Note how RISC-V had this dropped pretty recently.
> 
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -199,7 +199,6 @@ SECTIONS
>    .bss : {                     /* BSS */
>         __bss_start = .;
>         *(.bss.stack_aligned)
> -       . = ALIGN(PAGE_SIZE);
>         *(.bss.page_aligned)
>         . = ALIGN(PAGE_SIZE);
>         __per_cpu_start = .;
>