--p; --tmp; --len;
if (--offset < 0) {
offset = p % TARGET_PAGE_SIZE;
- pag = (char *)page[p / TARGET_PAGE_SIZE];
+ pag = page[p / TARGET_PAGE_SIZE];
if (!pag) {
pag = g_try_malloc0(TARGET_PAGE_SIZE);
page[p / TARGET_PAGE_SIZE] = pag;
* patch target_mmap(), but it is more complicated as the file
* size must be known.
*/
- if (qemu_real_host_page_size < qemu_host_page_size) {
+ if (qemu_real_host_page_size() < qemu_host_page_size) {
abi_ulong end_addr, end_addr1;
end_addr1 = REAL_HOST_PAGE_ALIGN(elf_bss);
end_addr = HOST_PAGE_ALIGN(elf_bss);
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) {
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;
/* OK, This is the point of no return */
info->end_data = 0;
info->end_code = 0;
- info->start_mmap = (abi_ulong)ELF_START_MMAP;
- info->mmap = 0;
elf_entry = (abi_ulong) elf_ex.e_entry;
/* XXX Join this with PT_INTERP search? */
bprm->stringp, &elf_ex, load_addr,
et_dyn_addr, interp_load_addr, info);
info->load_addr = reloc_func_desc;
- info->start_brk = info->brk = elf_brk;
+ info->brk = elf_brk;
info->start_stack = bprm->p;
info->load_bias = 0;