mips.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. // mips.h -- ELF definitions specific to EM_MIPS -*- C++ -*-
  2. // Copyright (C) 2012-2017 Free Software Foundation, Inc.
  3. // Written by Sasa Stankovic <sasa.stankovic@imgtec.com>
  4. // and Aleksandar Simeonov <aleksandar.simeonov@rt-rk.com>.
  5. // This file is part of elfcpp.
  6. // This program is free software; you can redistribute it and/or
  7. // modify it under the terms of the GNU Library General Public License
  8. // as published by the Free Software Foundation; either version 2, or
  9. // (at your option) any later version.
  10. // In addition to the permissions in the GNU Library General Public
  11. // License, the Free Software Foundation gives you unlimited
  12. // permission to link the compiled version of this file into
  13. // combinations with other programs, and to distribute those
  14. // combinations without any restriction coming from the use of this
  15. // file. (The Library Public License restrictions do apply in other
  16. // respects; for example, they cover modification of the file, and
  17. /// distribution when not linked into a combined executable.)
  18. // This program is distributed in the hope that it will be useful, but
  19. // WITHOUT ANY WARRANTY; without even the implied warranty of
  20. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  21. // Library General Public License for more details.
  22. // You should have received a copy of the GNU Library General Public
  23. // License along with this program; if not, write to the Free Software
  24. // Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  25. // 02110-1301, USA.
  26. #ifndef ELFCPP_MIPS_H
  27. #define ELFCPP_MIPS_H
  28. // Documentation for the MIPS relocs is taken from
  29. // http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf
  30. namespace elfcpp
  31. {
  32. //
  33. // MIPS Relocation Codes
  34. //
  35. enum
  36. {
  37. R_MIPS_NONE = 0,
  38. R_MIPS_16 = 1,
  39. R_MIPS_32 = 2, // In Elf 64: alias R_MIPS_ADD
  40. R_MIPS_REL32 = 3, // In Elf 64: alias R_MIPS_REL
  41. R_MIPS_26 = 4,
  42. R_MIPS_HI16 = 5,
  43. R_MIPS_LO16 = 6,
  44. R_MIPS_GPREL16 = 7, // In Elf 64: alias R_MIPS_GPREL
  45. R_MIPS_LITERAL = 8,
  46. R_MIPS_GOT16 = 9, // In Elf 64: alias R_MIPS_GOT
  47. R_MIPS_PC16 = 10,
  48. R_MIPS_CALL16 = 11, // In Elf 64: alias R_MIPS_CALL
  49. R_MIPS_GPREL32 = 12,
  50. R_MIPS_UNUSED1 = 13,
  51. R_MIPS_UNUSED2 = 14,
  52. R_MIPS_UNUSED3 = 15,
  53. R_MIPS_SHIFT5 = 16,
  54. R_MIPS_SHIFT6 = 17,
  55. R_MIPS_64 = 18,
  56. R_MIPS_GOT_DISP = 19,
  57. R_MIPS_GOT_PAGE = 20,
  58. R_MIPS_GOT_OFST = 21,
  59. R_MIPS_GOT_HI16 = 22,
  60. R_MIPS_GOT_LO16 = 23,
  61. R_MIPS_SUB = 24,
  62. R_MIPS_INSERT_A = 25,
  63. R_MIPS_INSERT_B = 26,
  64. R_MIPS_DELETE = 27,
  65. R_MIPS_HIGHER = 28,
  66. R_MIPS_HIGHEST = 29,
  67. R_MIPS_CALL_HI16 = 30,
  68. R_MIPS_CALL_LO16 = 31,
  69. R_MIPS_SCN_DISP = 32,
  70. R_MIPS_REL16 = 33,
  71. R_MIPS_ADD_IMMEDIATE = 34,
  72. R_MIPS_PJUMP = 35,
  73. R_MIPS_RELGOT = 36,
  74. R_MIPS_JALR = 37,
  75. // TLS relocations.
  76. R_MIPS_TLS_DTPMOD32 = 38,
  77. R_MIPS_TLS_DTPREL32 = 39,
  78. R_MIPS_TLS_DTPMOD64 = 40,
  79. R_MIPS_TLS_DTPREL64 = 41,
  80. R_MIPS_TLS_GD = 42,
  81. R_MIPS_TLS_LDM = 43,
  82. R_MIPS_TLS_DTPREL_HI16 = 44,
  83. R_MIPS_TLS_DTPREL_LO16 = 45,
  84. R_MIPS_TLS_GOTTPREL = 46,
  85. R_MIPS_TLS_TPREL32 = 47,
  86. R_MIPS_TLS_TPREL64 = 48,
  87. R_MIPS_TLS_TPREL_HI16 = 49,
  88. R_MIPS_TLS_TPREL_LO16 = 50,
  89. R_MIPS_GLOB_DAT = 51,
  90. R_MIPS_PC21_S2 = 60,
  91. R_MIPS_PC26_S2 = 61,
  92. R_MIPS_PC18_S3 = 62,
  93. R_MIPS_PC19_S2 = 63,
  94. R_MIPS_PCHI16 = 64,
  95. R_MIPS_PCLO16 = 65,
  96. // These relocs are used for the mips16.
  97. R_MIPS16_26 = 100,
  98. R_MIPS16_GPREL = 101,
  99. R_MIPS16_GOT16 = 102,
  100. R_MIPS16_CALL16 = 103,
  101. R_MIPS16_HI16 = 104,
  102. R_MIPS16_LO16 = 105,
  103. R_MIPS16_TLS_GD = 106,
  104. R_MIPS16_TLS_LDM = 107,
  105. R_MIPS16_TLS_DTPREL_HI16 = 108,
  106. R_MIPS16_TLS_DTPREL_LO16 = 109,
  107. R_MIPS16_TLS_GOTTPREL = 110,
  108. R_MIPS16_TLS_TPREL_HI16 = 111,
  109. R_MIPS16_TLS_TPREL_LO16 = 112,
  110. R_MIPS_COPY = 126,
  111. R_MIPS_JUMP_SLOT = 127,
  112. // These relocations are specific to microMIPS.
  113. R_MICROMIPS_26_S1 = 133,
  114. R_MICROMIPS_HI16 = 134,
  115. R_MICROMIPS_LO16 = 135,
  116. R_MICROMIPS_GPREL16 = 136, // In Elf 64: alias R_MICROMIPS_GPREL
  117. R_MICROMIPS_LITERAL = 137,
  118. R_MICROMIPS_GOT16 = 138, // In Elf 64: alias R_MICROMIPS_GOT
  119. R_MICROMIPS_PC7_S1 = 139,
  120. R_MICROMIPS_PC10_S1 = 140,
  121. R_MICROMIPS_PC16_S1 = 141,
  122. R_MICROMIPS_CALL16 = 142, // In Elf 64: alias R_MICROMIPS_CALL
  123. R_MICROMIPS_GOT_DISP = 145,
  124. R_MICROMIPS_GOT_PAGE = 146,
  125. R_MICROMIPS_GOT_OFST = 147,
  126. R_MICROMIPS_GOT_HI16 = 148,
  127. R_MICROMIPS_GOT_LO16 = 149,
  128. R_MICROMIPS_SUB = 150,
  129. R_MICROMIPS_HIGHER = 151,
  130. R_MICROMIPS_HIGHEST = 152,
  131. R_MICROMIPS_CALL_HI16 = 153,
  132. R_MICROMIPS_CALL_LO16 = 154,
  133. R_MICROMIPS_SCN_DISP = 155,
  134. R_MICROMIPS_JALR = 156,
  135. R_MICROMIPS_HI0_LO16 = 157,
  136. // TLS relocations.
  137. R_MICROMIPS_TLS_GD = 162,
  138. R_MICROMIPS_TLS_LDM = 163,
  139. R_MICROMIPS_TLS_DTPREL_HI16 = 164,
  140. R_MICROMIPS_TLS_DTPREL_LO16 = 165,
  141. R_MICROMIPS_TLS_GOTTPREL = 166,
  142. R_MICROMIPS_TLS_TPREL_HI16 = 169,
  143. R_MICROMIPS_TLS_TPREL_LO16 = 170,
  144. // microMIPS GP- and PC-relative relocations.
  145. R_MICROMIPS_GPREL7_S2 = 172,
  146. R_MICROMIPS_PC23_S2 = 173,
  147. // This was a GNU extension used by embedded-PIC. It was co-opted by
  148. // mips-linux for exception-handling data. GCC stopped using it in
  149. // May, 2004, then started using it again for compact unwind tables.
  150. R_MIPS_PC32 = 248,
  151. R_MIPS_EH = 249,
  152. // This relocation is used internally by gas.
  153. R_MIPS_GNU_REL16_S2 = 250,
  154. // These are GNU extensions to enable C++ vtable garbage collection.
  155. R_MIPS_GNU_VTINHERIT = 253,
  156. R_MIPS_GNU_VTENTRY = 254
  157. };
  158. // Processor specific flags for the ELF header e_flags field.
  159. enum
  160. {
  161. // At least one .noreorder directive appears in the source.
  162. EF_MIPS_NOREORDER = 0x00000001,
  163. // File contains position independent code.
  164. EF_MIPS_PIC = 0x00000002,
  165. // Code in file uses the standard calling sequence for calling
  166. // position independent code.
  167. EF_MIPS_CPIC = 0x00000004,
  168. // ??? Unknown flag, set in IRIX 6's BSDdup2.o in libbsd.a.
  169. EF_MIPS_XGOT = 0x00000008,
  170. // Code in file uses UCODE (obsolete)
  171. EF_MIPS_UCODE = 0x00000010,
  172. // Code in file uses new ABI (-n32 on Irix 6).
  173. EF_MIPS_ABI2 = 0x00000020,
  174. // Process the .MIPS.options section first by ld
  175. EF_MIPS_OPTIONS_FIRST = 0x00000080,
  176. // Architectural Extensions used by this file
  177. EF_MIPS_ARCH_ASE = 0x0f000000,
  178. // Use MDMX multimedia extensions
  179. EF_MIPS_ARCH_ASE_MDMX = 0x08000000,
  180. // Use MIPS-16 ISA extensions
  181. EF_MIPS_ARCH_ASE_M16 = 0x04000000,
  182. // Use MICROMIPS ISA extensions.
  183. EF_MIPS_ARCH_ASE_MICROMIPS = 0x02000000,
  184. // Indicates code compiled for a 64-bit machine in 32-bit mode.
  185. // (regs are 32-bits wide.)
  186. EF_MIPS_32BITMODE = 0x00000100,
  187. // 32-bit machine but FP registers are 64 bit (-mfp64).
  188. EF_MIPS_FP64 = 0x00000200,
  189. /// Code in file uses the IEEE 754-2008 NaN encoding convention.
  190. EF_MIPS_NAN2008 = 0x00000400,
  191. // MIPS dynamic
  192. EF_MIPS_DYNAMIC = 0x40
  193. };
  194. // Machine variant if we know it. This field was invented at Cygnus,
  195. // but it is hoped that other vendors will adopt it. If some standard
  196. // is developed, this code should be changed to follow it.
  197. enum
  198. {
  199. EF_MIPS_MACH = 0x00FF0000,
  200. // Cygnus is choosing values between 80 and 9F;
  201. // 00 - 7F should be left for a future standard;
  202. // the rest are open.
  203. E_MIPS_MACH_3900 = 0x00810000,
  204. E_MIPS_MACH_4010 = 0x00820000,
  205. E_MIPS_MACH_4100 = 0x00830000,
  206. E_MIPS_MACH_4650 = 0x00850000,
  207. E_MIPS_MACH_4120 = 0x00870000,
  208. E_MIPS_MACH_4111 = 0x00880000,
  209. E_MIPS_MACH_SB1 = 0x008a0000,
  210. E_MIPS_MACH_OCTEON = 0x008b0000,
  211. E_MIPS_MACH_XLR = 0x008c0000,
  212. E_MIPS_MACH_OCTEON2 = 0x008d0000,
  213. E_MIPS_MACH_OCTEON3 = 0x008e0000,
  214. E_MIPS_MACH_5400 = 0x00910000,
  215. E_MIPS_MACH_5900 = 0x00920000,
  216. E_MIPS_MACH_5500 = 0x00980000,
  217. E_MIPS_MACH_9000 = 0x00990000,
  218. E_MIPS_MACH_LS2E = 0x00A00000,
  219. E_MIPS_MACH_LS2F = 0x00A10000,
  220. E_MIPS_MACH_LS3A = 0x00A20000,
  221. };
  222. // MIPS architecture
  223. enum
  224. {
  225. // Four bit MIPS architecture field.
  226. EF_MIPS_ARCH = 0xf0000000,
  227. // -mips1 code.
  228. E_MIPS_ARCH_1 = 0x00000000,
  229. // -mips2 code.
  230. E_MIPS_ARCH_2 = 0x10000000,
  231. // -mips3 code.
  232. E_MIPS_ARCH_3 = 0x20000000,
  233. // -mips4 code.
  234. E_MIPS_ARCH_4 = 0x30000000,
  235. // -mips5 code.
  236. E_MIPS_ARCH_5 = 0x40000000,
  237. // -mips32 code.
  238. E_MIPS_ARCH_32 = 0x50000000,
  239. // -mips64 code.
  240. E_MIPS_ARCH_64 = 0x60000000,
  241. // -mips32r2 code.
  242. E_MIPS_ARCH_32R2 = 0x70000000,
  243. // -mips64r2 code.
  244. E_MIPS_ARCH_64R2 = 0x80000000,
  245. // -mips32r6 code.
  246. E_MIPS_ARCH_32R6 = 0x90000000,
  247. // -mips64r6 code.
  248. E_MIPS_ARCH_64R6 = 0xa0000000,
  249. };
  250. // Values for the xxx_size bytes of an ABI flags structure.
  251. enum
  252. {
  253. // No registers.
  254. AFL_REG_NONE = 0x00,
  255. // 32-bit registers.
  256. AFL_REG_32 = 0x01,
  257. // 64-bit registers.
  258. AFL_REG_64 = 0x02,
  259. // 128-bit registers.
  260. AFL_REG_128 = 0x03
  261. };
  262. // Masks for the ases word of an ABI flags structure.
  263. enum
  264. {
  265. // DSP ASE.
  266. AFL_ASE_DSP = 0x00000001,
  267. // DSP R2 ASE.
  268. AFL_ASE_DSPR2 = 0x00000002,
  269. // Enhanced VA Scheme.
  270. AFL_ASE_EVA = 0x00000004,
  271. // MCU (MicroController) ASE.
  272. AFL_ASE_MCU = 0x00000008,
  273. // MDMX ASE.
  274. AFL_ASE_MDMX = 0x00000010,
  275. // MIPS-3D ASE.
  276. AFL_ASE_MIPS3D = 0x00000020,
  277. // MT ASE.
  278. AFL_ASE_MT = 0x00000040,
  279. // SmartMIPS ASE.
  280. AFL_ASE_SMARTMIPS = 0x00000080,
  281. // VZ ASE.
  282. AFL_ASE_VIRT = 0x00000100,
  283. // MSA ASE.
  284. AFL_ASE_MSA = 0x00000200,
  285. // MIPS16 ASE.
  286. AFL_ASE_MIPS16 = 0x00000400,
  287. // MICROMIPS ASE.
  288. AFL_ASE_MICROMIPS = 0x00000800,
  289. // XPA ASE.
  290. AFL_ASE_XPA = 0x00001000
  291. };
  292. // Values for the isa_ext word of an ABI flags structure.
  293. enum
  294. {
  295. // RMI Xlr instruction.
  296. AFL_EXT_XLR = 1,
  297. // Cavium Networks Octeon2.
  298. AFL_EXT_OCTEON2 = 2,
  299. // Cavium Networks OcteonP.
  300. AFL_EXT_OCTEONP = 3,
  301. // Loongson 3A.
  302. AFL_EXT_LOONGSON_3A = 4,
  303. // Cavium Networks Octeon.
  304. AFL_EXT_OCTEON = 5,
  305. // MIPS R5900 instruction.
  306. AFL_EXT_5900 = 6,
  307. // MIPS R4650 instruction.
  308. AFL_EXT_4650 = 7,
  309. // LSI R4010 instruction.
  310. AFL_EXT_4010 = 8,
  311. // NEC VR4100 instruction.
  312. AFL_EXT_4100 = 9,
  313. // Toshiba R3900 instruction.
  314. AFL_EXT_3900 = 10,
  315. // MIPS R10000 instruction.
  316. AFL_EXT_10000 = 11,
  317. // Broadcom SB-1 instruction.
  318. AFL_EXT_SB1 = 12,
  319. // NEC VR4111/VR4181 instruction.
  320. AFL_EXT_4111 = 13,
  321. // NEC VR4120 instruction.
  322. AFL_EXT_4120 = 14,
  323. // NEC VR5400 instruction.
  324. AFL_EXT_5400 = 15,
  325. // NEC VR5500 instruction.
  326. AFL_EXT_5500 = 16,
  327. // ST Microelectronics Loongson 2E.
  328. AFL_EXT_LOONGSON_2E = 17,
  329. // ST Microelectronics Loongson 2F.
  330. AFL_EXT_LOONGSON_2F = 18,
  331. // Cavium Networks Octeon3.
  332. AFL_EXT_OCTEON3 = 19
  333. };
  334. // Masks for the flags1 word of an ABI flags structure.
  335. enum
  336. {
  337. // Uses odd single-precision registers.
  338. AFL_FLAGS1_ODDSPREG = 1
  339. };
  340. // Object attribute tags.
  341. enum
  342. {
  343. // 0-3 are generic.
  344. // Floating-point ABI used by this object file.
  345. Tag_GNU_MIPS_ABI_FP = 4,
  346. // MSA ABI used by this object file.
  347. Tag_GNU_MIPS_ABI_MSA = 8
  348. };
  349. // Object attribute values.
  350. enum
  351. {
  352. // Values defined for Tag_GNU_MIPS_ABI_FP.
  353. // Not tagged or not using any ABIs affected by the differences.
  354. Val_GNU_MIPS_ABI_FP_ANY = 0,
  355. // Using hard-float -mdouble-float.
  356. Val_GNU_MIPS_ABI_FP_DOUBLE = 1,
  357. // Using hard-float -msingle-float.
  358. Val_GNU_MIPS_ABI_FP_SINGLE = 2,
  359. // Using soft-float.
  360. Val_GNU_MIPS_ABI_FP_SOFT = 3,
  361. // Using -mips32r2 -mfp64.
  362. Val_GNU_MIPS_ABI_FP_OLD_64 = 4,
  363. // Using -mfpxx
  364. Val_GNU_MIPS_ABI_FP_XX = 5,
  365. // Using -mips32r2 -mfp64.
  366. Val_GNU_MIPS_ABI_FP_64 = 6,
  367. // Using -mips32r2 -mfp64 -mno-odd-spreg.
  368. Val_GNU_MIPS_ABI_FP_64A = 7,
  369. // This is reserved for backward-compatibility with an earlier
  370. // implementation of the MIPS NaN2008 functionality.
  371. Val_GNU_MIPS_ABI_FP_NAN2008 = 8,
  372. // Values defined for Tag_GNU_MIPS_ABI_MSA.
  373. // Not tagged or not using any ABIs affected by the differences.
  374. Val_GNU_MIPS_ABI_MSA_ANY = 0,
  375. // Using 128-bit MSA.
  376. Val_GNU_MIPS_ABI_MSA_128 = 1
  377. };
  378. enum
  379. {
  380. // Mask to extract ABI version, not really a flag value.
  381. EF_MIPS_ABI = 0x0000F000,
  382. // The original o32 abi.
  383. E_MIPS_ABI_O32 = 0x00001000,
  384. // O32 extended to work on 64 bit architectures
  385. E_MIPS_ABI_O64 = 0x00002000,
  386. // EABI in 32 bit mode
  387. E_MIPS_ABI_EABI32 = 0x00003000,
  388. // EABI in 64 bit mode
  389. E_MIPS_ABI_EABI64 = 0x00004000,
  390. };
  391. // Dynamic section MIPS flags
  392. enum
  393. {
  394. // None
  395. RHF_NONE = 0x00000000,
  396. // Use shortcut pointers
  397. RHF_QUICKSTART = 0x00000001,
  398. // Hash size not power of two
  399. RHF_NOTPOT = 0x00000002,
  400. // Ignore LD_LIBRARY_PATH
  401. RHF_NO_LIBRARY_REPLACEMENT = 0x00000004
  402. };
  403. // Special values for the st_other field in the symbol table.
  404. enum
  405. {
  406. // Two topmost bits denote the MIPS ISA for .text symbols:
  407. // + 00 -- standard MIPS code,
  408. // + 10 -- microMIPS code,
  409. // + 11 -- MIPS16 code; requires the following two bits to be set too.
  410. // Note that one of the MIPS16 bits overlaps with STO_MIPS_PIC.
  411. STO_MIPS_ISA = 0xc0,
  412. // The mask spanning the rest of MIPS psABI flags. At most one is expected
  413. // to be set except for STO_MIPS16.
  414. STO_MIPS_FLAGS = ~(STO_MIPS_ISA | 0x3),
  415. // The MIPS psABI was updated in 2008 with support for PLTs and copy
  416. // relocs. There are therefore two types of nonzero SHN_UNDEF functions:
  417. // PLT entries and traditional MIPS lazy binding stubs. We mark the former
  418. // with STO_MIPS_PLT to distinguish them from the latter.
  419. STO_MIPS_PLT = 0x8,
  420. // This value is used to mark PIC functions in an object that mixes
  421. // PIC and non-PIC. Note that this bit overlaps with STO_MIPS16,
  422. // although MIPS16 symbols are never considered to be MIPS_PIC.
  423. STO_MIPS_PIC = 0x20,
  424. // This value is used for a mips16 .text symbol.
  425. STO_MIPS16 = 0xf0,
  426. // This value is used for a microMIPS .text symbol. To distinguish from
  427. // STO_MIPS16, we set top two bits to be 10 to denote STO_MICROMIPS. The
  428. // mask is STO_MIPS_ISA.
  429. STO_MICROMIPS = 0x80
  430. };
  431. // Values for base offsets for thread-local storage
  432. enum
  433. {
  434. TP_OFFSET = 0x7000,
  435. DTP_OFFSET = 0x8000
  436. };
  437. bool
  438. elf_st_is_mips16(unsigned char st_other)
  439. { return (st_other & elfcpp::STO_MIPS16) == elfcpp::STO_MIPS16; }
  440. bool
  441. elf_st_is_micromips(unsigned char st_other)
  442. { return (st_other & elfcpp::STO_MIPS_ISA) == elfcpp::STO_MICROMIPS; }
  443. // Whether the ABI is N32.
  444. bool
  445. abi_n32(elfcpp::Elf_Word e_flags)
  446. { return (e_flags & elfcpp::EF_MIPS_ABI2) != 0; }
  447. // Whether the ISA is R6.
  448. bool
  449. r6_isa(elfcpp::Elf_Word e_flags)
  450. {
  451. return ((e_flags & elfcpp::EF_MIPS_ARCH) == elfcpp::E_MIPS_ARCH_32R6)
  452. || ((e_flags & elfcpp::EF_MIPS_ARCH) == elfcpp::E_MIPS_ARCH_64R6);
  453. }
  454. // Whether the file has microMIPS code.
  455. bool
  456. is_micromips(elfcpp::Elf_Word e_flags)
  457. { return (e_flags & elfcpp::EF_MIPS_ARCH_ASE_MICROMIPS) != 0; }
  458. // Values which may appear in the kind field of an Elf_Options structure.
  459. enum
  460. {
  461. // Undefined.
  462. ODK_NULL = 0,
  463. // Register usage and GP value.
  464. ODK_REGINFO = 1,
  465. // Exception processing information.
  466. ODK_EXCEPTIONS = 2,
  467. // Section padding information.
  468. ODK_PAD = 3,
  469. // Hardware workarounds performed.
  470. ODK_HWPATCH = 4,
  471. // Fill value used by the linker.
  472. ODK_FILL = 5,
  473. // Reserved space for desktop tools.
  474. ODK_TAGS = 6,
  475. // Hardware workarounds, AND bits when merging.
  476. ODK_HWAND = 7,
  477. // Hardware workarounds, OR bits when merging.
  478. ODK_HWOR = 8,
  479. // GP group to use for text/data sections.
  480. ODK_GP_GROUP = 9,
  481. // ID information.
  482. ODK_IDENT = 10
  483. };
  484. } // End namespace elfcpp.
  485. #endif // !defined(ELFCPP_MIPS_H)