summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2025-10-20 14:23:58 +0200
committerPeter Zijlstra <peterz@infradead.org>2025-10-22 15:21:55 +0200
commit49c98f30f4021b560676a336f8a46a4f642eee2b (patch)
treec7ad0eee868fa7fa54ab36dcbb6aa5a82923a098
parentdbdf2a7feb422f9bacfd12774e624cf26f503eb0 (diff)
downloadlinux-49c98f30f4021b560676a336f8a46a4f642eee2b.tar.gz
linux-49c98f30f4021b560676a336f8a46a4f642eee2b.tar.bz2
linux-49c98f30f4021b560676a336f8a46a4f642eee2b.zip
objtool: Fix failure when being compiled on x32 system
Fix compilation failure when compiling the kernel with the x32 toolchain. In file included from check.c:16: check.c: In function ¡check_abs_references¢: /usr/src/git/linux-2.6/tools/objtool/include/objtool/warn.h:47:17: error: format ¡%lx¢ expects argument of type ¡long unsigned int¢, but argument 7 has type ¡u64¢ {aka ¡long long unsigned int¢} [-Werror=format=] 47 | "%s%s%s: objtool" extra ": " format "\n", \ | ^~~~~~~~~~~~~~~~~ /usr/src/git/linux-2.6/tools/objtool/include/objtool/warn.h:54:9: note: in expansion of macro ¡___WARN¢ 54 | ___WARN(severity, "", format, ##__VA_ARGS__) | ^~~~~~~ /usr/src/git/linux-2.6/tools/objtool/include/objtool/warn.h:74:27: note: in expansion of macro ¡__WARN¢ 74 | #define WARN(format, ...) __WARN(WARN_STR, format, ##__VA_ARGS__) | ^~~~~~ check.c:4713:33: note: in expansion of macro ¡WARN¢ 4713 | WARN("section %s has absolute relocation at offset 0x%lx", | ^~~~ Fixes: 0d6e4563fc03 ("objtool: Add action to check for absence of absolute relocations") Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Link: https://patch.msgid.link/1ac32fff-2e67-5155-f570-69aad5bf5412@redhat.com
-rw-r--r--tools/objtool/check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 3c7ab910b189..620854fdaaf6 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4711,8 +4711,8 @@ static int check_abs_references(struct objtool_file *file)
for_each_reloc(sec->rsec, reloc) {
if (arch_absolute_reloc(file->elf, reloc)) {
- WARN("section %s has absolute relocation at offset 0x%lx",
- sec->name, reloc_offset(reloc));
+ WARN("section %s has absolute relocation at offset 0x%llx",
+ sec->name, (unsigned long long)reloc_offset(reloc));
ret++;
}
}