Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [tip:sched/core 35/37] ld.lld: error: relocation refers to a symbol in a discarded section: __UNIQUE_ID_addressable_overflowuid_553
@ 2026-10-18  7:46 kernel test robot
  2026-10-19  4:00 ` Jemmy Wong
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-10-18  7:46 UTC (permalink / raw)
  To: Jemmy Wong; +Cc: llvm, oe-kbuild-all, linux-kernel, x86, Peter Zijlstra

[-- Attachment #1: Type: application/octet-stream, Size: 1236 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [tip:sched/core 35/37] ld.lld: error: relocation refers to a symbol in a discarded section: __UNIQUE_ID_addressable_overflowuid_553
  2026-10-18  7:46 [tip:sched/core 35/37] ld.lld: error: relocation refers to a symbol in a discarded section: __UNIQUE_ID_addressable_overflowuid_553 kernel test robot
@ 2026-10-19  4:00 ` Jemmy Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Jemmy Wong @ 2026-10-19  4:00 UTC (permalink / raw)
  To: kernel test robot
  Cc: Jemmy Wong, llvm, oe-kbuild-all, linux-kernel, x86,
	Peter Zijlstra


> On Oct 18, 2026, at 3:46 PM, kernel test robot <lkp@intel.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-19  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18  7:46 [tip:sched/core 35/37] ld.lld: error: relocation refers to a symbol in a discarded section: __UNIQUE_ID_addressable_overflowuid_553 kernel test robot
2026-10-19  4:00 ` Jemmy Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox