X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=bsd-user%2Felfload.c;h=48ec4ac150ee677dd946f6ef52c368942642a657;hb=refs%2Fheads%2Flinux-user-for-upstream;hp=a04552935afa121b931bbc8db72b65889b346881;hpb=84778508d7403cd32fb4527550738f19aa7b1aa5;p=qemu diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index a045529..48ec4ac 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -12,7 +12,7 @@ #include "qemu.h" #include "disas.h" -#ifdef __powerpc64__ +#ifdef _ARCH_PPC64 #undef ARCH_DLINFO #undef ELF_PLATFORM #undef ELF_HWCAP @@ -545,8 +545,6 @@ static inline void memcpy_fromfs(void * to, const void * from, unsigned long n) memcpy(to, from, n); } -extern unsigned long x86_stack_size; - static int load_aout_interp(void * exptr, int interp_fd); #ifdef BSWAP_NEEDED @@ -1014,7 +1012,7 @@ static const char *lookup_symbolxx(struct syminfo *s, target_ulong orig_addr) key.st_value = orig_addr; sym = bsearch(&key, syms, s->disas_num_syms, sizeof(*syms), symfind); - if (sym != 0) { + if (sym != NULL) { return s->disas_strtab + sym->st_name; } @@ -1295,7 +1293,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, } if (interp_elf_ex.e_ident[0] != 0x7f || - strncmp(&interp_elf_ex.e_ident[1], "ELF",3) != 0) { + strncmp((char *)&interp_elf_ex.e_ident[1], "ELF",3) != 0) { interpreter_type &= ~INTERPRETER_ELF; } @@ -1456,7 +1454,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, free(elf_phdata); - if (loglevel) + if (qemu_log_enabled()) load_symbols(&elf_ex, bprm->fd); if (interpreter_type != INTERPRETER_AOUT) close(bprm->fd);