elf-x86_64.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright 2003 PathScale, Inc.
  3. *
  4. * Licensed under the GPL
  5. */
  6. #ifndef __UM_ELF_X86_64_H
  7. #define __UM_ELF_X86_64_H
  8. #include <asm/user.h>
  9. typedef unsigned long elf_greg_t;
  10. #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
  11. typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  12. typedef struct { } elf_fpregset_t;
  13. /*
  14. * This is used to ensure we don't load something for the wrong architecture.
  15. */
  16. #define elf_check_arch(x) \
  17. ((x)->e_machine == EM_X86_64)
  18. #define ELF_CLASS ELFCLASS64
  19. #define ELF_DATA ELFDATA2LSB
  20. #define ELF_ARCH EM_X86_64
  21. #define ELF_PLAT_INIT(regs, load_addr) do { \
  22. PT_REGS_RBX(regs) = 0; \
  23. PT_REGS_RCX(regs) = 0; \
  24. PT_REGS_RDX(regs) = 0; \
  25. PT_REGS_RSI(regs) = 0; \
  26. PT_REGS_RDI(regs) = 0; \
  27. PT_REGS_RBP(regs) = 0; \
  28. PT_REGS_RAX(regs) = 0; \
  29. PT_REGS_R8(regs) = 0; \
  30. PT_REGS_R9(regs) = 0; \
  31. PT_REGS_R10(regs) = 0; \
  32. PT_REGS_R11(regs) = 0; \
  33. PT_REGS_R12(regs) = 0; \
  34. PT_REGS_R13(regs) = 0; \
  35. PT_REGS_R14(regs) = 0; \
  36. PT_REGS_R15(regs) = 0; \
  37. } while (0)
  38. #ifdef TIF_IA32 /* XXX */
  39. clear_thread_flag(TIF_IA32); \
  40. #endif
  41. #define USE_ELF_CORE_DUMP
  42. #define ELF_EXEC_PAGESIZE 4096
  43. #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
  44. extern long elf_aux_hwcap;
  45. #define ELF_HWCAP (elf_aux_hwcap)
  46. #define ELF_PLATFORM "x86_64"
  47. #define SET_PERSONALITY(ex, ibcs2) do ; while(0)
  48. #endif
  49. /*
  50. * Overrides for Emacs so that we follow Linus's tabbing style.
  51. * Emacs will notice this stuff at the end of the file and automatically
  52. * adjust the settings for this buffer only. This must remain at the end
  53. * of the file.
  54. * ---------------------------------------------------------------------------
  55. * Local variables:
  56. * c-file-style: "linux"
  57. * End:
  58. */