]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
objtool: Fix address references in alternatives
authorAlexandre Chartre <alexandre.chartre@oracle.com>
Fri, 21 Nov 2025 09:53:34 +0000 (10:53 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 21 Nov 2025 14:30:14 +0000 (15:30 +0100)
commit4aae0d3f77b1104e55847870d15c3749ca575fcf
tree809ff37131aa4812b8bcf8ee13ce397b9fcadb98
parent7e017720aae87dc2ca2471ac295e34e2b240e5f5
objtool: Fix address references in alternatives

When using the --disas option, alternatives are disassembled but
address references in non-default alternatives can be incorrect.

The problem is that alternatives are shown as if they were replacing the
original code of the alternative. So if an alternative is referencing
an address inside the alternative then the reference has to be
adjusted to the location of the original code.

Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://patch.msgid.link/20251121095340.464045-25-alexandre.chartre@oracle.com
tools/objtool/disas.c