bootexec.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. struct coffsect
  2. {
  3. char name[8];
  4. ulong phys;
  5. ulong virt;
  6. ulong size;
  7. ulong fptr;
  8. ulong fptrreloc;
  9. ulong fptrlineno;
  10. ulong nrelocnlineno;
  11. ulong flags;
  12. };
  13. /*
  14. * proprietary exec headers, needed to bootstrap various machines
  15. */
  16. struct mipsexec
  17. {
  18. short mmagic; /* (0x160) mips magic number */
  19. short nscns; /* (unused) number of sections */
  20. long timdat; /* (unused) time & date stamp */
  21. long symptr; /* offset to symbol table */
  22. long nsyms; /* size of symbol table */
  23. short opthdr; /* (0x38) sizeof(optional hdr) */
  24. short pcszs; /* flags */
  25. short amagic; /* see above */
  26. short vstamp; /* version stamp */
  27. long tsize; /* text size in bytes */
  28. long dsize; /* initialized data */
  29. long bsize; /* uninitialized data */
  30. long mentry; /* entry pt. */
  31. long text_start; /* base of text used for this file */
  32. long data_start; /* base of data used for this file */
  33. long bss_start; /* base of bss used for this file */
  34. long gprmask; /* general purpose register mask */
  35. union{
  36. long cprmask[4]; /* co-processor register masks */
  37. long pcsize;
  38. };
  39. long gp_value; /* the gp value used for this object */
  40. };
  41. struct mips4kexec
  42. {
  43. struct mipsexec h;
  44. struct coffsect itexts;
  45. struct coffsect idatas;
  46. struct coffsect ibsss;
  47. };
  48. struct sparcexec
  49. {
  50. short sjunk; /* dynamic bit and version number */
  51. short smagic; /* 0407 */
  52. ulong stext;
  53. ulong sdata;
  54. ulong sbss;
  55. ulong ssyms;
  56. ulong sentry;
  57. ulong strsize;
  58. ulong sdrsize;
  59. };
  60. struct nextexec
  61. {
  62. struct nexthdr{
  63. ulong nmagic;
  64. ulong ncputype;
  65. ulong ncpusubtype;
  66. ulong nfiletype;
  67. ulong ncmds;
  68. ulong nsizeofcmds;
  69. ulong nflags;
  70. };
  71. struct nextcmd{
  72. ulong cmd;
  73. ulong cmdsize;
  74. uchar segname[16];
  75. ulong vmaddr;
  76. ulong vmsize;
  77. ulong fileoff;
  78. ulong filesize;
  79. ulong maxprot;
  80. ulong initprot;
  81. ulong nsects;
  82. ulong flags;
  83. }textc;
  84. struct nextsect{
  85. char sectname[16];
  86. char segname[16];
  87. ulong addr;
  88. ulong size;
  89. ulong offset;
  90. ulong align;
  91. ulong reloff;
  92. ulong nreloc;
  93. ulong flags;
  94. ulong reserved1;
  95. ulong reserved2;
  96. }texts;
  97. struct nextcmd datac;
  98. struct nextsect datas;
  99. struct nextsect bsss;
  100. struct nextsym{
  101. ulong cmd;
  102. ulong cmdsize;
  103. ulong symoff;
  104. ulong nsyms;
  105. ulong spoff;
  106. ulong pcoff;
  107. }symc;
  108. };
  109. struct i386exec
  110. {
  111. struct i386coff{
  112. ulong isectmagic;
  113. ulong itime;
  114. ulong isyms;
  115. ulong insyms;
  116. ulong iflags;
  117. };
  118. struct i386hdr{
  119. ulong imagic;
  120. ulong itextsize;
  121. ulong idatasize;
  122. ulong ibsssize;
  123. ulong ientry;
  124. ulong itextstart;
  125. ulong idatastart;
  126. };
  127. struct coffsect itexts;
  128. struct coffsect idatas;
  129. struct coffsect ibsss;
  130. struct coffsect icomments;
  131. };
  132. struct i960exec
  133. {
  134. struct i960coff{
  135. ulong i6sectmagic;
  136. ulong i6time;
  137. ulong i6syms;
  138. ulong i6nsyms;
  139. ulong i6opthdrflags;
  140. };
  141. struct i960hdr{
  142. ulong i6magic;
  143. ulong i6textsize;
  144. ulong i6datasize;
  145. ulong i6bsssize;
  146. ulong i6entry;
  147. ulong i6textstart;
  148. ulong i6datastart;
  149. ulong i6tagentries;
  150. };
  151. struct i960sect{
  152. char name[8];
  153. ulong phys;
  154. ulong virt;
  155. ulong size;
  156. ulong fptr;
  157. ulong fptrreloc;
  158. ulong fptrlineno;
  159. ulong nrelocnlineno;
  160. ulong flags;
  161. ulong align;
  162. }i6texts;
  163. struct i960sect i6datas;
  164. };