elf.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef __ASM_ARC_ELF_H
  9. #define __ASM_ARC_ELF_H
  10. #include <linux/types.h>
  11. #include <uapi/asm/elf.h>
  12. /* These ELF defines belong to uapi but libc elf.h already defines them */
  13. #define EM_ARCOMPACT 93
  14. /* ARC Relocations (kernel Modules only) */
  15. #define R_ARC_32 0x4
  16. #define R_ARC_32_ME 0x1B
  17. #define R_ARC_S25H_PCREL 0x10
  18. #define R_ARC_S25W_PCREL 0x11
  19. /*to set parameters in the core dumps */
  20. #define ELF_ARCH EM_ARCOMPACT
  21. #define ELF_CLASS ELFCLASS32
  22. #ifdef CONFIG_CPU_BIG_ENDIAN
  23. #define ELF_DATA ELFDATA2MSB
  24. #else
  25. #define ELF_DATA ELFDATA2LSB
  26. #endif
  27. /*
  28. * To ensure that
  29. * -we don't load something for the wrong architecture.
  30. * -The userspace is using the correct syscall ABI
  31. */
  32. struct elf32_hdr;
  33. extern int elf_check_arch(const struct elf32_hdr *);
  34. #define elf_check_arch elf_check_arch
  35. #define CORE_DUMP_USE_REGSET
  36. #define ELF_EXEC_PAGESIZE PAGE_SIZE
  37. /*
  38. * This is the location that an ET_DYN program is loaded if exec'ed. Typical
  39. * use of this is to invoke "./ld.so someprog" to test out a new version of
  40. * the loader. We need to make sure that it is out of the way of the program
  41. * that it will "exec", and that there is sufficient room for the brk.
  42. */
  43. #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
  44. /*
  45. * When the program starts, a1 contains a pointer to a function to be
  46. * registered with atexit, as per the SVR4 ABI. A value of 0 means we
  47. * have no such handler.
  48. */
  49. #define ELF_PLAT_INIT(_r, load_addr) ((_r)->r0 = 0)
  50. /*
  51. * This yields a mask that user programs can use to figure out what
  52. * instruction set this cpu supports.
  53. */
  54. #define ELF_HWCAP (0)
  55. /*
  56. * This yields a string that ld.so will use to load implementation
  57. * specific libraries for optimization. This is more specific in
  58. * intent than poking at uname or /proc/cpuinfo.
  59. */
  60. #define ELF_PLATFORM (NULL)
  61. #endif