On 01.04.2025 15:08, Roger Pau Monne wrote:
> @@ -218,12 +214,15 @@ SECTIONS
> */
> *(.altinstr_replacement)
>
> -#ifdef EFI /* EFI wants to merge all of .init.* ELF doesn't. */
> - . = ALIGN(SMP_CACHE_BYTES);
> -#else
> } PHDR(text)
> - DECL_SECTION(.init.data) {
> +#ifdef EFI
> + /*
> + * Align to prevent the data section from re-using the tail of an RX
> mapping
> + * from the previous text section.
> + */
> + . = ALIGN(SECTION_ALIGN);
Does this need to be SECTION_ALIGN, growing image size by perhaps more than
1Mb (at least that's what I expect as an effect)? Wouldn't PAGE_SIZE suffice
for our purposes?
Jan
> #endif
> + DECL_SECTION(.init.data) {
> *(.init.bss.stack_aligned)
>
> . = ALIGN(POINTER_ALIGN);