Michal Jireš <mji...@suse.cz> writes: > On 9/3/25 7:58 PM, Sam James wrote: >> Michal Jires <mji...@suse.cz> writes: >> >>> Check that must_remain_in_tu is partitioned correctly, and that >>> refereced_from_asm is not renamed. >>> >>> gcc/lto/ChangeLog: >>> >>> * lto-partition.cc (lto_1_to_1_map): must_remain_in_tu check. >>> (privatize_symbol_name_1): refereced_from_asm check. >> I get this when trying out the patches: >> # LDFINAL vmlinux.o >> sh >> /var/tmp/portage/sys-kernel/gentoo-kernel-6.16.4/work/linux-6.16/scripts/gcc-ld >> -flinker-output=nolto-rel -flto=jobserver -flto-partition=1to1 >> -fwhole-program -m elf_x86_64 --compre >> ss-debug-sections=zlib -z noexecstack --no-warn-rwx-segments -r -o >> vmlinux.o --whole-archive vmlinux.a --no-whole-archive --start-group >> --end-group ; ./tools/objtool/objtool --hacks= >> jump_label --hacks=noinstr --ibt --orc --retpoline --rethunk --sls >> --static-call --uaccess --link vmlinux.o >> x86_64-pc-linux-gnu-gcc -nostdlib -flinker-output=nolto-rel >> -flto=jobserver -flto-partition=1to1 -fwhole-program >> -Wl,-m,elf_x86_64 -Wl,--compress-debug-sections=zlib >> -Wl,-z,noexecstack - >> Wl,--no-warn-rwx-segments -r -o vmlinux.o -Wl,--whole-archive vmlinux.a >> -Wl,--no-whole-archive -Wl,--start-group -Wl,--end-group >> lto1: fatal error: Tried to privatize symbol sp_mod_init. >> compilation terminated. >> lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status >> compilation terminated. >> I haven't tried to figure out why though. >> > > That means that I missed some optimization pass to restrict with > refereced_from_asm. > > Do you have some way I could reproduce it? I did try to build v6.16.4 > kernel with this driver enabled and didn't encounter the issue.
Can you try this .config? I'm looking at narrowing it down now. sam
.config.xz
Description: application/xz