Date: Wed, 12 Mar 2025 13:07:58 -0400 From: Ed Maste <emaste@freebsd.org> To: FreeBSD Current <freebsd-current@freebsd.org> Subject: Heads-up: Kernel module symbol resolution changing Message-ID: <CAPyFy2C3PVx-85e4-9s%2Brn0e9OQNaJKoeaquTVipb2YyOH7-uw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Our in-kernel module linker currently performs symbol resolution against local symbols from other modules, which is a bug. In commits 95c20faf11a1 and ecd8245e0d77 kib introduced support to have the kernel linker stop resolving local symbols from other files, but did not change it by default to avoid surprises. The debug.link_elf_leak_locals sysctl controls this behaviour, currently defaulting to resolving against local symbols (1). Setting it to 0 turns this off. I plan to flip the default soon, in advance of FreeBSD 15.0. See PR207898 and https://reviews.freebsd.org/D47742 for more information. Next steps: 1. https://github.com/freebsd/drm-kmod/pull/338 needs to land, otherwise drm-kmod will not load. 2. Developers and users can test with debug.link_elf_leak_locals=0 and report any kernel modules that fail to load so that their build systems can be updated. 3. Commit the default change. 4. Address any additional failing kernel modules.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2C3PVx-85e4-9s%2Brn0e9OQNaJKoeaquTVipb2YyOH7-uw>