<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/tools/objtool/tests/generic/test-module-vmlinux-reloc.sh, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/tools/objtool/tests/generic/test-module-vmlinux-reloc.sh?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/tools/objtool/tests/generic/test-module-vmlinux-reloc.sh?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-09-21T09:11:36Z</updated>
<entry>
<title>objtool/klp: Add test for vmlinux relocs in a patched module</title>
<updated>2026-09-21T09:11:36Z</updated>
<author>
<name>Song Liu</name>
<email>song@kernel.org</email>
</author>
<published>2026-09-16T18:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=65b0aac4125c18280efbda38174ec14bcef887b2'/>
<id>urn:sha1:65b0aac4125c18280efbda38174ec14bcef887b2</id>
<content type='text'>
The kernel refuses a module-targeted klp relocation which names a vmlinux
symbol.  An EXPORT_SYMBOL_FOR_MODULES() symbol needs a klp relocation, so
patching a module function that references one only loads if klp diff files
that relocation under vmlinux rather than under the patched module.

This fails at load, not at build: klp-build produces a module and static
checks of it find nothing wrong.  Hence the assertion on which object the
relocation is filed against.

Reported by Dylan Hatch, whose mod-ns-lp branch carries the kernel-side
half of this case.

Co-developed-by: Dylan Hatch &lt;dylanbhatch@google.com&gt;
Signed-off-by: Dylan Hatch &lt;dylanbhatch@google.com&gt;
Signed-off-by: Song Liu &lt;song@kernel.org&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Assisted-by: Claude:claude-opus-5
Link: https://patch.msgid.link/20260916184351.2720310-30-song@kernel.org
</content>
</entry>
</feed>
