Revision 7a3148a9 linux-user/elfload.c

b/linux-user/elfload.c
313 313

  
314 314
#endif
315 315

  
316
#ifdef TARGET_ALPHA
317

  
318
#define ELF_START_MMAP (0x30000000000ULL)
319

  
320
#define elf_check_arch(x) ( (x) == ELF_ARCH )
321

  
322
#define ELF_CLASS      ELFCLASS64
323
#define ELF_DATA       ELFDATA2MSB
324
#define ELF_ARCH       EM_ALPHA
325

  
326
static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop)
327
{
328
    regs->pc = infop->entry;
329
    regs->ps = 8;
330
    regs->usp = infop->start_stack;
331
    regs->unique = infop->start_data; /* ? */
332
    printf("Set unique value to " TARGET_FMT_lx " (" TARGET_FMT_lx ")\n",
333
           regs->unique, infop->start_data);
334
}
335

  
336
#define USE_ELF_CORE_DUMP
337
#define ELF_EXEC_PAGESIZE        8192
338

  
339
#endif /* TARGET_ALPHA */
340

  
316 341
#ifndef ELF_PLATFORM
317 342
#define ELF_PLATFORM (NULL)
318 343
#endif
......
431 456
    bswaptls(&shdr->sh_entsize);
432 457
}
433 458

  
434
static void bswap_sym(Elf32_Sym *sym)
459
static void bswap_sym(struct elf_sym *sym)
435 460
{
436 461
    bswap32s(&sym->st_name);
437
    bswap32s(&sym->st_value);
438
    bswap32s(&sym->st_size);
462
    bswaptls(&sym->st_value);
463
    bswaptls(&sym->st_size);
439 464
    bswap16s(&sym->st_shndx);
440 465
}
441 466
#endif

Also available in: Unified diff