[PATCH] arm64: Fix transient negative image size observed by the linker

Arnd Bergmann arnd at arndb.de
Tue Dec 1 00:52:24 PST 2026


On Mon, Nov 30, 2026, at 18:51, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb at kernel.org>
>
> LLD occasionally errors out with a mysterious 'assignment to symbol foo
> does not converge', usually with a 16k page size kernel config.
>
> This turns out to be caused by the evaluation of the SPAN_NR_ENTRIES()
> macro using a preliminary value for _end that is below KIMAGE_VADDR,
> resulting in the difference to become negative. Subsequent passes
> usually recover from this, but not always, hence the config-dependent
> error.
>
> So ensure that SPAN_NR_ENTRIES() returns 1 for spans where the end
> address is smaller than or equal to the start address. This never
> occurs on the linker passes that matter, but prevents the iterative
> algorithm that LLD implements from diverging.
>
> This reverts commit dc0a08394804 ("arm64: Work around convergence
> issue with LLD linker"), which is superseded by this change.
>
> Reported-by: kernel test robot <lkp at intel.com>
> Closes: 
> https://lore.kernel.org/oe-kbuild-all/20261129124345.eiR8unSx-lkp@intel.com/
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>

Hi Ard,

I've successfully tested one known instance of the bug being fixed by
this. I'll keep my randconfig tests running to ensure there are no
remaining corner cases that still run into the same symptom. If you
don't hear back from my by tomorrow:

Tested-by: Arnd Bergmann <arnd at arndb.de>



More information about the linux-arm-kernel mailing list