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: NOlof Johansson <olof@lixom.net> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
Showing
想要评论请 注册 或 登录