Skip to content
Commit fd2ab2f6 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

scripts/kallsyms: fix offset overflow of kallsyms_relative_base

Since commit 5e5c4fa7 ("scripts/kallsyms: shrink table before
sorting it"), kallsyms_relative_base can be larger than _text, which
causes overflow when building the 32-bit kernel.

https://lkml.org/lkml/2019/12/7/156



This is because _text is, unless --all-symbols is specified, now
trimmed from the symbol table before record_relative_base() is called.

Handle the offset signedness also for kallsyms_relative_base. Introduce
a new helper, output_address(), to reduce the code duplication.

Fixes: 5e5c4fa7 ("scripts/kallsyms: shrink table before sorting it")
Reported-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent c8f3dea9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment