Il 04/04/2013 16:09, Peter Maydell ha scritto:
> Agreed in principle, but you seem to have missed some structs
> which use target_ulong currently and which presumably should
> use abi_ulong instead, eg all the target_ucontext etc structs
> in linux-user/signal.c
Right.
> Also linux-user/elfload.c:symfind() is casting a pointer to
> target_ulong* and dereferencing it, and that might now cause
> an alignment fault on some host CPUs if the host CPU alignment
> requirements are stricter than the guest's.
I had seen this, but it is only used with bsearch and safe:
static const char *lookup_symbolxx(struct syminfo *s, target_ulong orig_addr)
{
#if ELF_CLASS == ELFCLASS32
struct elf_sym *syms = s->disas_symtab.elf32;
#else
struct elf_sym *syms = s->disas_symtab.elf64;
#endif
// binary search
struct elf_sym *sym;
sym = bsearch(&orig_addr, syms, s->disas_num_syms, sizeof(*syms), symfind);
...
}
Paolo