From 0a4d5647cc8c1309768be3a6a8fdb503971c2549 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Mon, 1 Mar 2010 03:55:48 +0000 Subject: [PATCH] Disassembler symbol lookup fix Fix function signature for userspace disassembler symbol lookup. Signed-off-by: Paul Brook --- disas.h | 4 ++++ linux-user/elfload.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/disas.h b/disas.h index 06abab2..6a9332d 100644 --- a/disas.h +++ b/disas.h @@ -22,7 +22,11 @@ struct syminfo; struct elf32_sym; struct elf64_sym; +#if defined(CONFIG_USER_ONLY) +typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_ulong orig_addr); +#else typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_phys_addr_t orig_addr); +#endif struct syminfo { lookup_symbol_t lookup_symbol; diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 1d5f651..71ed2d6 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1448,10 +1448,10 @@ static void load_symbols(struct elfhdr *hdr, int fd) s->disas_num_syms = nsyms; #if ELF_CLASS == ELFCLASS32 s->disas_symtab.elf32 = syms; - s->lookup_symbol = (lookup_symbol_t)lookup_symbolxx; + s->lookup_symbol = lookup_symbolxx; #else s->disas_symtab.elf64 = syms; - s->lookup_symbol = (lookup_symbol_t)lookup_symbolxx; + s->lookup_symbol = lookup_symbolxx; #endif s->next = syminfos; syminfos = s; -- 2.7.4