NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/61105: kernel files order is suboptimal
>Number: 61105
>Category: kern
>Synopsis: kernel files order is suboptimal
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 01 14:35:00 +0000 2026
>Originator: Valery Ushakov
>Release: NetBSD 11.0
>Organization:
>Environment:
n/a
>Description:
When config(1) assembles the kernel makefile, it puts MD files at the
very start, but it puts kern/*.c files very far away in the second
part of the list of all files. This might make some kernel symbols
too bar away for efficient relocations.
>How-To-Repeat:
Compile a sparc64 kernel with
options KUBSAN
sanitizer instrumentation puffs up the object sizes. With 61087
problems fixed, the kernel compiles, but the link step fails:
locore.o: in function `cpu_mp_startup':
(.text+0x1254c): relocation truncated to fit: R_SPARC_WDISP22 against symbol `idle_loop' defined in .text section in kern_idle.o
lock_stubs.o: in function `mutex_enter':
(.text+0x20): relocation truncated to fit: R_SPARC_WDISP22 against symbol `mutex_vector_enter' defined in .text section in kern_mutex.o
lock_stubs.o: in function `mutex_exit':
(.text+0x68): relocation truncated to fit: R_SPARC_WDISP22 against symbol `mutex_vector_exit' defined in .text section in kern_mutex.o
*** Failed target: netbsd
>Fix:
sys/conf/files includes kern/files.kern nearly at the end, after
80-something other files. This puts a lot of wasteland of device and
filesystem code between MD bits and MI bits. We should move kern and
ddb as early in that file as possible.
Home |
Main Index |
Thread Index |
Old Index