a.out.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. typedef struct Exec Exec;
  2. struct Exec
  3. {
  4. long magic; /* magic number */
  5. long text; /* size of text segment */
  6. long data; /* size of initialized data */
  7. long bss; /* size of uninitialized data */
  8. long syms; /* size of symbol table */
  9. long entry; /* entry point */
  10. long spsz; /* size of pc/sp offset table */
  11. long pcsz; /* size of pc/line number table */
  12. };
  13. #define _MAGIC(b) ((((4*b)+0)*b)+7)
  14. #define A_MAGIC _MAGIC(8) /* 68020 */
  15. #define I_MAGIC _MAGIC(11) /* intel 386 */
  16. #define J_MAGIC _MAGIC(12) /* intel 960 (retired) */
  17. #define K_MAGIC _MAGIC(13) /* sparc */
  18. #define V_MAGIC _MAGIC(16) /* mips 3000 BE */
  19. #define X_MAGIC _MAGIC(17) /* att dsp 3210 (retired) */
  20. #define M_MAGIC _MAGIC(18) /* mips 4000 BE */
  21. #define D_MAGIC _MAGIC(19) /* amd 29000 (retired) */
  22. #define E_MAGIC _MAGIC(20) /* arm */
  23. #define Q_MAGIC _MAGIC(21) /* powerpc */
  24. #define N_MAGIC _MAGIC(22) /* mips 4000 LE */
  25. #define L_MAGIC _MAGIC(23) /* dec alpha */
  26. #define P_MAGIC _MAGIC(24) /* mips 3000 LE */
  27. #define U_MAGIC _MAGIC(25) /* sparc64 */
  28. #define S_MAGIC _MAGIC(26) /* amd64 */
  29. #define MIN_MAGIC 8
  30. #define MAX_MAGIC 26
  31. #define DYN_MAGIC 0x80000000 /* or'd in for dynamically loaded modules */
  32. typedef struct Sym Sym;
  33. struct Sym
  34. {
  35. long value;
  36. char type;
  37. char *name;
  38. };