diff options
author | Sathvika Vasireddy <[email protected]> | 2022-11-14 23:27:50 +0530 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2022-11-18 19:00:16 +1100 |
commit | de6fbcedf5abce4c321eeb15d7d286b79804b8b6 (patch) | |
tree | ba070be03befad24b1fd7bb14285a43443f4bd58 | |
parent | 280981d6994e0700abd36647b141e73059851e66 (diff) |
objtool: Read special sections with alts only when specific options are selected
Call add_special_section_alts() only when stackval or orc or uaccess or
noinstr options are passed to objtool.
Tested-by: Naveen N. Rao <[email protected]>
Reviewed-by: Naveen N. Rao <[email protected]>
Reviewed-by: Christophe Leroy <[email protected]>
Acked-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Sathvika Vasireddy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | tools/objtool/check.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 71cf4b4ba1da..752a6ffd5c4c 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2392,9 +2392,11 @@ static int decode_sections(struct objtool_file *file) * Must be before add_jump_destinations(), which depends on 'func' * being set for alternatives, to enable proper sibling call detection. */ - ret = add_special_section_alts(file); - if (ret) - return ret; + if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) { + ret = add_special_section_alts(file); + if (ret) + return ret; + } ret = add_jump_destinations(file); if (ret) |