Messages in this thread Patch in this message | | | Date | Wed, 25 Mar 2020 18:45:35 +0100 | From | Peter Zijlstra <> | Subject | [PATCH v4 10/13] objtool: Avoid iterating !text section symbols |
| |
validate_functions() iterates all sections their symbols; this is pointless to do for !text sections as they won't have instructions anyway.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> --- tools/objtool/check.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
--- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2621,8 +2621,12 @@ static int validate_functions(struct obj struct section *sec; int warnings = 0; - for_each_sec(file, sec) + for_each_sec(file, sec) { + if (!(sec->sh.sh_flags & SHF_EXECINSTR)) + continue; + warnings += validate_section(file, sec); + } return warnings; }
| |