Revision 28490231
b/linux-user/elfload.c | ||
---|---|---|
95 | 95 |
#define ELIBBAD 80 |
96 | 96 |
#endif |
97 | 97 |
|
98 |
#ifdef TARGET_WORDS_BIGENDIAN |
|
99 |
#define ELF_DATA ELFDATA2MSB |
|
100 |
#else |
|
101 |
#define ELF_DATA ELFDATA2LSB |
|
102 |
#endif |
|
103 |
|
|
98 | 104 |
typedef target_ulong target_elf_greg_t; |
99 | 105 |
#ifdef USE_UID16 |
100 | 106 |
typedef uint16_t target_uid_t; |
... | ... | |
132 | 138 |
#define elf_check_arch(x) ( ((x) == ELF_ARCH) ) |
133 | 139 |
|
134 | 140 |
#define ELF_CLASS ELFCLASS64 |
135 |
#define ELF_DATA ELFDATA2LSB |
|
136 | 141 |
#define ELF_ARCH EM_X86_64 |
137 | 142 |
|
138 | 143 |
static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop) |
... | ... | |
196 | 201 |
* These are used to set parameters in the core dumps. |
197 | 202 |
*/ |
198 | 203 |
#define ELF_CLASS ELFCLASS32 |
199 |
#define ELF_DATA ELFDATA2LSB |
|
200 | 204 |
#define ELF_ARCH EM_386 |
201 | 205 |
|
202 | 206 |
static inline void init_thread(struct target_pt_regs *regs, |
... | ... | |
259 | 263 |
#define elf_check_arch(x) ( (x) == EM_ARM ) |
260 | 264 |
|
261 | 265 |
#define ELF_CLASS ELFCLASS32 |
262 |
#ifdef TARGET_WORDS_BIGENDIAN |
|
263 |
#define ELF_DATA ELFDATA2MSB |
|
264 |
#else |
|
265 |
#define ELF_DATA ELFDATA2LSB |
|
266 |
#endif |
|
267 | 266 |
#define ELF_ARCH EM_ARM |
268 | 267 |
|
269 | 268 |
static inline void init_thread(struct target_pt_regs *regs, |
... | ... | |
352 | 351 |
#endif |
353 | 352 |
|
354 | 353 |
#define ELF_CLASS ELFCLASS64 |
355 |
#define ELF_DATA ELFDATA2MSB |
|
356 | 354 |
#define ELF_ARCH EM_SPARCV9 |
357 | 355 |
|
358 | 356 |
#define STACK_BIAS 2047 |
... | ... | |
382 | 380 |
#define elf_check_arch(x) ( (x) == EM_SPARC ) |
383 | 381 |
|
384 | 382 |
#define ELF_CLASS ELFCLASS32 |
385 |
#define ELF_DATA ELFDATA2MSB |
|
386 | 383 |
#define ELF_ARCH EM_SPARC |
387 | 384 |
|
388 | 385 |
static inline void init_thread(struct target_pt_regs *regs, |
... | ... | |
416 | 413 |
|
417 | 414 |
#endif |
418 | 415 |
|
419 |
#ifdef TARGET_WORDS_BIGENDIAN |
|
420 |
#define ELF_DATA ELFDATA2MSB |
|
421 |
#else |
|
422 |
#define ELF_DATA ELFDATA2LSB |
|
423 |
#endif |
|
424 | 416 |
#define ELF_ARCH EM_PPC |
425 | 417 |
|
426 | 418 |
/* Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP). |
... | ... | |
554 | 546 |
#else |
555 | 547 |
#define ELF_CLASS ELFCLASS32 |
556 | 548 |
#endif |
557 |
#ifdef TARGET_WORDS_BIGENDIAN |
|
558 |
#define ELF_DATA ELFDATA2MSB |
|
559 |
#else |
|
560 |
#define ELF_DATA ELFDATA2LSB |
|
561 |
#endif |
|
562 | 549 |
#define ELF_ARCH EM_MIPS |
563 | 550 |
|
564 | 551 |
static inline void init_thread(struct target_pt_regs *regs, |
... | ... | |
626 | 613 |
#define elf_check_arch(x) ( (x) == EM_MICROBLAZE || (x) == EM_MICROBLAZE_OLD) |
627 | 614 |
|
628 | 615 |
#define ELF_CLASS ELFCLASS32 |
629 |
#define ELF_DATA ELFDATA2MSB |
|
630 | 616 |
#define ELF_ARCH EM_MICROBLAZE |
631 | 617 |
|
632 | 618 |
static inline void init_thread(struct target_pt_regs *regs, |
... | ... | |
666 | 652 |
#define elf_check_arch(x) ( (x) == EM_SH ) |
667 | 653 |
|
668 | 654 |
#define ELF_CLASS ELFCLASS32 |
669 |
#define ELF_DATA ELFDATA2LSB |
|
670 | 655 |
#define ELF_ARCH EM_SH |
671 | 656 |
|
672 | 657 |
static inline void init_thread(struct target_pt_regs *regs, |
... | ... | |
722 | 707 |
#define elf_check_arch(x) ( (x) == EM_CRIS ) |
723 | 708 |
|
724 | 709 |
#define ELF_CLASS ELFCLASS32 |
725 |
#define ELF_DATA ELFDATA2LSB |
|
726 | 710 |
#define ELF_ARCH EM_CRIS |
727 | 711 |
|
728 | 712 |
static inline void init_thread(struct target_pt_regs *regs, |
... | ... | |
742 | 726 |
#define elf_check_arch(x) ( (x) == EM_68K ) |
743 | 727 |
|
744 | 728 |
#define ELF_CLASS ELFCLASS32 |
745 |
#define ELF_DATA ELFDATA2MSB |
|
746 | 729 |
#define ELF_ARCH EM_68K |
747 | 730 |
|
748 | 731 |
/* ??? Does this need to do anything? |
... | ... | |
796 | 779 |
#define elf_check_arch(x) ( (x) == ELF_ARCH ) |
797 | 780 |
|
798 | 781 |
#define ELF_CLASS ELFCLASS64 |
799 |
#define ELF_DATA ELFDATA2MSB |
|
800 | 782 |
#define ELF_ARCH EM_ALPHA |
801 | 783 |
|
802 | 784 |
static inline void init_thread(struct target_pt_regs *regs, |
Also available in: Unified diff