I’ve got an interesting problem with objtool.
It seems to be injecting duplicate symbols into my kernel module object.
All the source files compile just fine, and the module works under Ubuntu with kernel 6.9.1. But I’ve noticed Ubuntu just links with ld, while opensuse calls objtool to do some post-processing.
savedcmd_/home/user/source/src/drivers/pci/driver.o := ld -m elf_x86_64 -z noexecstack --no-warn-rwx-segments -r -o /home/user/source/src/drivers/pci/aim_mil.o @/home/user/source/src/drivers/pci/aim_mil.mod ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --ibt --orc --retpoline --rethunk --sls --static-call --uaccess --prefix=16 --link --module /home/user/source/src/drivers/pci/driver.o
/home/user/source/src/drivers/pci/driver.o: $(wildcard ./tools/objtool/objtool)
Unfortunately, this post-processing is introducing duplicate symbols. Running objdump
before/after ld and objtool are executed shows the issue, but I don’t have a minimal reproduction.
Is there a way to bypass this symbol relocation somehow?
I’m buliding on microos/tumbleweed with kernel 6.9.7 at the moment.
The OS is partially locked down, so it’s tough to experiment.