Skip to content

Commit c3b7d04

Browse files
achartrePeter Zijlstra
authored andcommitted
objtool: Do not validate IBT for .return_sites and .call_sites
The .return_sites and .call_sites sections reference text addresses, but not with the intent to indirect branch to them, so they don't need to be validated for IBT. This is useful when running objtool on object files which already have .return_sites or .call_sites sections, for example to re-run objtool after it has reported an error or a warning. 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-17-alexandre.chartre@oracle.com
1 parent 350c7ab commit c3b7d04

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/objtool/check.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4753,6 +4753,8 @@ static int validate_ibt(struct objtool_file *file)
47534753
!strcmp(sec->name, ".llvm.call-graph-profile") ||
47544754
!strcmp(sec->name, ".llvm_bb_addr_map") ||
47554755
!strcmp(sec->name, "__tracepoints") ||
4756+
!strcmp(sec->name, ".return_sites") ||
4757+
!strcmp(sec->name, ".call_sites") ||
47564758
!strcmp(sec->name, "__patchable_function_entries"))
47574759
continue;
47584760

0 commit comments

Comments
 (0)