提交 de6fbced 编写于 作者: S Sathvika Vasireddy 提交者: Michael Ellerman

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: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: NChristophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: NJosh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: NSathvika Vasireddy <sv@linux.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221114175754.1131267-13-sv@linux.ibm.com
上级 280981d6
...@@ -2392,9 +2392,11 @@ static int decode_sections(struct objtool_file *file) ...@@ -2392,9 +2392,11 @@ static int decode_sections(struct objtool_file *file)
* Must be before add_jump_destinations(), which depends on 'func' * Must be before add_jump_destinations(), which depends on 'func'
* being set for alternatives, to enable proper sibling call detection. * being set for alternatives, to enable proper sibling call detection.
*/ */
ret = add_special_section_alts(file); if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) {
if (ret) ret = add_special_section_alts(file);
return ret; if (ret)
return ret;
}
ret = add_jump_destinations(file); ret = add_jump_destinations(file);
if (ret) if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册