From b6235a759a4552d21c5b68d16c894aa5b96d4b96 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 3 May 2023 08:23:27 +0100 Subject: disas: Remove target_ulong from the interface Use uint64_t for the pc, and size_t for the size. Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson Message-Id: <20230503072331.1747057-81-richard.henderson@linaro.org> --- bsd-user/elfload.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bsd-user') diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index fbcdc94..1f650bd 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -352,9 +352,10 @@ static abi_ulong load_elf_interp(struct elfhdr *interp_elf_ex, static int symfind(const void *s0, const void *s1) { - target_ulong addr = *(target_ulong *)s0; struct elf_sym *sym = (struct elf_sym *)s1; + __typeof(sym->st_value) addr = *(uint64_t *)s0; int result = 0; + if (addr < sym->st_value) { result = -1; } else if (addr >= sym->st_value + sym->st_size) { @@ -363,7 +364,7 @@ static int symfind(const void *s0, const void *s1) return result; } -static const char *lookup_symbolxx(struct syminfo *s, target_ulong orig_addr) +static const char *lookup_symbolxx(struct syminfo *s, uint64_t orig_addr) { #if ELF_CLASS == ELFCLASS32 struct elf_sym *syms = s->disas_symtab.elf32; -- cgit v1.1