diff options
| author | Mark Brown <broonie@kernel.org> | 2026-10-09 21:20:03 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-09 21:20:03 +0200 |
| commit | 42e6288df48dbec158b14d7ffaf170bd6febfd31 (patch) | |
| tree | 5e03b05fdd02126d86df6568e1180a7420aeeb78 /scripts/sorttable.c | |
| parent | 7f1e046d644d54d477b0d1dc887e25b39551be18 (diff) | |
| parent | 20cb500b2dfd87e055b2a494665121d0c7d20f76 (diff) | |
| download | linux-next-42e6288df48dbec158b14d7ffaf170bd6febfd31.tar.gz linux-next-42e6288df48dbec158b14d7ffaf170bd6febfd31.zip | |
Merge branch 'kbuild-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git
# Conflicts:
# init/Kconfig
# scripts/kallsyms.c
# scripts/remove-stale-files
Diffstat (limited to 'scripts/sorttable.c')
| -rw-r--r-- | scripts/sorttable.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/sorttable.c b/scripts/sorttable.c index d7b50581c732..88e49a5c4251 100644 --- a/scripts/sorttable.c +++ b/scripts/sorttable.c @@ -322,10 +322,23 @@ static int parse_symbols(const char *fname) return -1; } - while (fscanf(fp, "%16s %16s %c %*s\n", addr_str, size_str, &type) == 3) { + while (fscanf(fp, "%16s %16s %c%*[^\n]", addr_str, size_str, &type) == 3) { uint64_t addr; uint64_t size; + /* + * nm outputs size-less entries with a missing 2nd value, which + * means fscanf() just misread its fields. + * + * These don't matter as a call site cannot be in an empty + * function, so just skip them. + * + * nm pads address and size to the same width, so if their + * widths differ, this is a misread. + */ + if (strlen(size_str) != strlen(addr_str)) + continue; + /* Only care about functions */ if (type != 't' && type != 'T' && type != 'W') continue; |
