aboutsummaryrefslogtreecommitdiff
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r--linux-user/elfload.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 703f7434a0..80085b8a30 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3327,9 +3327,10 @@ static void load_elf_interp(const char *filename, struct image_info *info,
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) {
@@ -3338,7 +3339,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;