libbpf: Fix sym->st_value print on 32-bit arches
The st_value field is a 64-bit value and causing this error on 32-bit arches:
In file included from libbpf.c:52:
libbpf.c: In function 'bpf_program__record_reloc':
libbpf_internal.h:59:22: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'Elf64_Addr' {aka 'const long long unsigned int'} [-Werror=format=]
Fix it with (__u64) cast.
Fixes: 1f8e2bcb ("libbpf: Refactor relocation handling")
Reported-by:
Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by:
Alexei Starovoitov <ast@kernel.org>
Loading
Please sign in to comment