<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/tools/objtool/tests/generic/fixtures/checksum_position.c, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-09-21T09:12:06+00:00</updated>
<entry>
<title>objtool/klp: Add test for position-independent checksums</title>
<updated>2026-09-21T09:12:06+00:00</updated>
<author>
<name>Song Liu</name>
<email>song@kernel.org</email>
</author>
<published>2026-09-16T18:43:29+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=f55eae8f37ea5ff547a8ac4ddafcef21047d5874'/>
<id>urn:sha1:f55eae8f37ea5ff547a8ac4ddafcef21047d5874</id>
<content type='text'>
A function that only moves has not changed, and its checksum must not move
with it.  Otherwise every patch reports as changed everything that shifted
because something ahead of it grew.

The fixture is built with -fno-function-sections, overriding the harness
default: with per-function sections every function sits at offset 0 of its
own section and nothing ever moves, so the test would prove nothing.  It
also calls across to another function rather than looping within itself --
a loop branch keeps the same displacement wherever the function goes, so it
is not position-dependent to begin with.

This tests the behavior of commit cca84cb12908 ("objtool/klp: Fix
position-dependent checksums for non-relocated jumps/calls").

Assisted-by: Claude:claude-opus-4
Based-on-test-by: Joe Lawrence &lt;joe.lawrence@redhat.com&gt;
Assisted-by: Claude:claude-opus-5
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;
Link: https://patch.msgid.link/20260916184351.2720310-37-song@kernel.org
</content>
</entry>
</feed>
