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.

Reply via email to