summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-07-20 19:21:13 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2024-07-21 19:24:22 +0300
commit1d48f8feb86ee773e65c6d54856bbfb7702bd35d (patch)
tree19166043e1f8c661f734556242ff4df200ff2228 /scripts
parentf9c3d671dd816ea4d5604dd04ef98d42921656a7 (diff)
downloadlinux-1d48f8feb86ee773e65c6d54856bbfb7702bd35d.tar.xz
kallsyms: unify seq and start_pos fields of struct sym_entry
The struct sym_entry uses the 'seq' and 'start_pos' fields to remember the index in the symbol table. They serve the same purpose and are not used simultaneously. Unify them. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index e291e34a450b..9a0535c59702 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -36,7 +36,6 @@ struct sym_entry {
unsigned long long addr;
unsigned int len;
unsigned int seq;
- unsigned int start_pos;
unsigned int percpu_absolute;
unsigned char sym[];
};
@@ -278,7 +277,7 @@ static void read_map(const char *in)
if (!sym)
continue;
- sym->start_pos = table_cnt;
+ sym->seq = table_cnt;
if (table_cnt >= table_size) {
table_size += 10000;
@@ -762,7 +761,7 @@ static int compare_symbols(const void *a, const void *b)
return wa - wb;
/* sort by initial order, so that other symbols are left undisturbed */
- return sa->start_pos - sb->start_pos;
+ return sa->seq - sb->seq;
}
static void sort_symbols(void)