From 12bb0de6f9b6ee6504410c9370634a79d2ccb2ba Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Wed, 12 Mar 2025 23:46:05 +0000 Subject: [PATCH] vdso: correct data types for ELF hash table sizes Let's change the data types of `nbucket` and `nchain` to uint32. This should fix the following compile-time error on arm32: /criu/criu/pie/util-vdso.c:336: undefined reference to `__aeabi_uldivmod' Signed-off-by: Andrei Vagin --- criu/pie/util-vdso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/criu/pie/util-vdso.c b/criu/pie/util-vdso.c index af3c08985..8daf5c71f 100644 --- a/criu/pie/util-vdso.c +++ b/criu/pie/util-vdso.c @@ -302,7 +302,7 @@ static bool elf_symbol_match(uintptr_t mem, size_t size, static unsigned long elf_symbol_lookup(uintptr_t mem, size_t size, const char *symbol, uint32_t symbol_hash, unsigned int sym_off, uintptr_t dynsymbol_names, Dyn_t *dyn_symtab, Phdr_t *load, - uint64_t nbucket, uint64_t nchain, void *_bucket, Hash_t *chain, + uint32_t nbucket, uint32_t nchain, void *_bucket, Hash_t *chain, const size_t vdso_symbol_length, bool use_gnu_hash) { unsigned int j; @@ -360,7 +360,7 @@ static int parse_elf_symbols(uintptr_t mem, size_t size, Phdr_t *load, void *bucket = NULL; Hash_t *chain = NULL; - uint64_t nbucket, nchain = 0; + uint32_t nbucket, nchain = 0; unsigned int sym_off = 0; unsigned int i = 0;