Re: [tip:sched/core 35/37] ld.lld: error: relocation refers to a symbol in a discarded section: __UNIQUE_ID_addressable_overflowuid_553

From: Jemmy Wong

Date: Mon Oct 19 2026 - 00:01:03 EST



> On Oct 18, 2026, at 3:46 PM, kernel test robot <lkp@xxxxxxxxx> wrote:
>
> <Mail Attachment>

Hi,

I reproduced discarded-section relocation errors on tip's sched/core
branch using the reported configuration, adjusted by olddefconfig:

- fcceb7da9465 ("sched/cache: Avoid publishing partial LLC utilization")
- Its parent, 96a494c9cfd8 ("sched/cputime: Don't account idle time twice after dyntick-idle")
- The earlier ancestor 840e23085b03 ("Merge branch 'tip/sched/urgent'")

ALl were tested with Clang/LLD with 23.1.3. It fails similarly.
All tests used separate build directories on macOS, with a host-only
gen_init_cpio compatibility workaround and no kernel source changes.

The generated ELF32 `vmlinux.o` files contain:

fcceb7da9465: 21,371,209 symbols
96a494c9cfd8: 21,370,053 symbols
840e23085b03: 21,370,091 symbols

These exceed the 24-bit symbol-index range of ELF32 relocations. In the
840e23085b03 build, I inspected the relocation for the basic_stm_init
initcall:

Encoded symbol index: 1,427,711 -> unrelated .L0 label
Encoded index plus 2^24: 18,204,927 -> basic_stm_init

This demonstrates symbol-index wrap in the local build, explains
the references to unrelated symbols and suggests a toolchain issue
requiring a fix in ELF32 relocation handling.
The local failure occurs without my scheduler patch.


Thanks,
Jemmy