README.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Note, the files `elf_common.h' and `elfstructs.h' are from FreeBSD.
  2. git://github.com/freebsd/freebsd.git
  3. But with slight modifications shown below:
  4. diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h
  5. index 8f02ef1..7601abb 100644
  6. --- a/sys/sys/elf_common.h
  7. +++ b/sys/sys/elf_common.h
  8. @@ -30,6 +30,9 @@
  9. #ifndef _SYS_ELF_COMMON_H_
  10. #define _SYS_ELF_COMMON_H_ 1
  11. +typedef uint32_t u_int32_t;
  12. +typedef uint32_t Elf_Symndx;
  13. +
  14. /*
  15. * ELF definitions that are independent of architecture or word size.
  16. */
  17. @@ -117,9 +120,6 @@ typedef struct {
  18. #define ELFOSABI_ARM 97 /* ARM */
  19. #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
  20. -#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */
  21. -#define ELFOSABI_MONTEREY ELFOSABI_AIX /* Monterey */
  22. -
  23. /* e_ident */
  24. #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
  25. (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
  26. @@ -242,7 +242,6 @@ typedef struct {
  27. #define EM_486 6 /* Intel i486. */
  28. #define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */
  29. #define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */
  30. -#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI) */
  31. /* Special section indexes. */
  32. #define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */
  33. @@ -441,6 +440,8 @@ typedef struct {
  34. #define DT_MOVETAB 0x6ffffefe /* move table */
  35. #define DT_SYMINFO 0x6ffffeff /* syminfo table */
  36. #define DT_ADDRRNGHI 0x6ffffeff
  37. +#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) /* Reverse order! */
  38. +#define DT_ADDRNUM 11
  39. #define DT_VERSYM 0x6ffffff0 /* Address of versym section. */
  40. #define DT_RELACOUNT 0x6ffffff9 /* number of RELATIVE relocations */
  41. @@ -505,12 +506,9 @@ typedef struct {
  42. #define STT_FILE 4 /* Source file. */
  43. #define STT_COMMON 5 /* Uninitialized common block. */
  44. #define STT_TLS 6 /* TLS object. */
  45. -#define STT_NUM 7
  46. #define STT_LOOS 10 /* Reserved range for operating system */
  47. #define STT_GNU_IFUNC 10
  48. #define STT_HIOS 12 /* specific semantics. */
  49. -#define STT_LOPROC 13 /* reserved range for processor */
  50. -#define STT_HIPROC 15 /* specific semantics. */
  51. /* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */
  52. #define STV_DEFAULT 0x0 /* Default visibility (see binding). */