2019-11-23 13:30:25

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 14/16] scripts/kallsyms: check no valid symbol earlier

insert_real_symbols_in_table() does not touch table_cnt, so the
no valid symbol check can be moved before it.

Signed-off-by: Masahiro Yamada <[email protected]>
---

scripts/kallsyms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 144f43363c4d..919cb45ce9db 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -608,14 +608,14 @@ static void optimize_token_table(void)
{
build_initial_tok_table();

- insert_real_symbols_in_table();
-
/* When valid symbol is not registered, exit to error */
if (!table_cnt) {
fprintf(stderr, "No valid symbol.\n");
exit(1);
}

+ insert_real_symbols_in_table();
+
optimize_result();
}

--
2.17.1