elf.h 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524
  1. #ifndef _ELF_H
  2. #define _ELF_H 1
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdint.h>
  7. typedef uint16_t Elf32_Half;
  8. typedef uint16_t Elf64_Half;
  9. typedef uint32_t Elf32_Word;
  10. typedef int32_t Elf32_Sword;
  11. typedef uint32_t Elf64_Word;
  12. typedef int32_t Elf64_Sword;
  13. typedef uint64_t Elf32_Xword;
  14. typedef int64_t Elf32_Sxword;
  15. typedef uint64_t Elf64_Xword;
  16. typedef int64_t Elf64_Sxword;
  17. typedef uint32_t Elf32_Addr;
  18. typedef uint64_t Elf64_Addr;
  19. typedef uint32_t Elf32_Off;
  20. typedef uint64_t Elf64_Off;
  21. typedef uint16_t Elf32_Section;
  22. typedef uint16_t Elf64_Section;
  23. typedef Elf32_Half Elf32_Versym;
  24. typedef Elf64_Half Elf64_Versym;
  25. #define EI_NIDENT (16)
  26. typedef struct {
  27. unsigned char e_ident[EI_NIDENT];
  28. Elf32_Half e_type;
  29. Elf32_Half e_machine;
  30. Elf32_Word e_version;
  31. Elf32_Addr e_entry;
  32. Elf32_Off e_phoff;
  33. Elf32_Off e_shoff;
  34. Elf32_Word e_flags;
  35. Elf32_Half e_ehsize;
  36. Elf32_Half e_phentsize;
  37. Elf32_Half e_phnum;
  38. Elf32_Half e_shentsize;
  39. Elf32_Half e_shnum;
  40. Elf32_Half e_shstrndx;
  41. } Elf32_Ehdr;
  42. typedef struct {
  43. unsigned char e_ident[EI_NIDENT];
  44. Elf64_Half e_type;
  45. Elf64_Half e_machine;
  46. Elf64_Word e_version;
  47. Elf64_Addr e_entry;
  48. Elf64_Off e_phoff;
  49. Elf64_Off e_shoff;
  50. Elf64_Word e_flags;
  51. Elf64_Half e_ehsize;
  52. Elf64_Half e_phentsize;
  53. Elf64_Half e_phnum;
  54. Elf64_Half e_shentsize;
  55. Elf64_Half e_shnum;
  56. Elf64_Half e_shstrndx;
  57. } Elf64_Ehdr;
  58. #define EI_MAG0 0
  59. #define ELFMAG0 0x7f
  60. #define EI_MAG1 1
  61. #define ELFMAG1 'E'
  62. #define EI_MAG2 2
  63. #define ELFMAG2 'L'
  64. #define EI_MAG3 3
  65. #define ELFMAG3 'F'
  66. #define ELFMAG "\177ELF"
  67. #define SELFMAG 4
  68. #define EI_CLASS 4
  69. #define ELFCLASSNONE 0
  70. #define ELFCLASS32 1
  71. #define ELFCLASS64 2
  72. #define ELFCLASSNUM 3
  73. #define EI_DATA 5
  74. #define ELFDATANONE 0
  75. #define ELFDATA2LSB 1
  76. #define ELFDATA2MSB 2
  77. #define ELFDATANUM 3
  78. #define EI_VERSION 6
  79. #define EI_OSABI 7
  80. #define ELFOSABI_NONE 0
  81. #define ELFOSABI_SYSV 0
  82. #define ELFOSABI_HPUX 1
  83. #define ELFOSABI_NETBSD 2
  84. #define ELFOSABI_LINUX 3
  85. #define ELFOSABI_SOLARIS 6
  86. #define ELFOSABI_AIX 7
  87. #define ELFOSABI_IRIX 8
  88. #define ELFOSABI_FREEBSD 9
  89. #define ELFOSABI_TRU64 10
  90. #define ELFOSABI_MODESTO 11
  91. #define ELFOSABI_OPENBSD 12
  92. #define ELFOSABI_ARM 97
  93. #define ELFOSABI_STANDALONE 255
  94. #define EI_ABIVERSION 8
  95. #define EI_PAD 9
  96. #define ET_NONE 0
  97. #define ET_REL 1
  98. #define ET_EXEC 2
  99. #define ET_DYN 3
  100. #define ET_CORE 4
  101. #define ET_NUM 5
  102. #define ET_LOOS 0xfe00
  103. #define ET_HIOS 0xfeff
  104. #define ET_LOPROC 0xff00
  105. #define ET_HIPROC 0xffff
  106. #define EM_NONE 0
  107. #define EM_M32 1
  108. #define EM_SPARC 2
  109. #define EM_386 3
  110. #define EM_68K 4
  111. #define EM_88K 5
  112. #define EM_860 7
  113. #define EM_MIPS 8
  114. #define EM_S370 9
  115. #define EM_MIPS_RS3_LE 10
  116. #define EM_PARISC 15
  117. #define EM_VPP500 17
  118. #define EM_SPARC32PLUS 18
  119. #define EM_960 19
  120. #define EM_PPC 20
  121. #define EM_PPC64 21
  122. #define EM_S390 22
  123. #define EM_V800 36
  124. #define EM_FR20 37
  125. #define EM_RH32 38
  126. #define EM_RCE 39
  127. #define EM_ARM 40
  128. #define EM_FAKE_ALPHA 41
  129. #define EM_SH 42
  130. #define EM_SPARCV9 43
  131. #define EM_TRICORE 44
  132. #define EM_ARC 45
  133. #define EM_H8_300 46
  134. #define EM_H8_300H 47
  135. #define EM_H8S 48
  136. #define EM_H8_500 49
  137. #define EM_IA_64 50
  138. #define EM_MIPS_X 51
  139. #define EM_COLDFIRE 52
  140. #define EM_68HC12 53
  141. #define EM_MMA 54
  142. #define EM_PCP 55
  143. #define EM_NCPU 56
  144. #define EM_NDR1 57
  145. #define EM_STARCORE 58
  146. #define EM_ME16 59
  147. #define EM_ST100 60
  148. #define EM_TINYJ 61
  149. #define EM_X86_64 62
  150. #define EM_PDSP 63
  151. #define EM_FX66 66
  152. #define EM_ST9PLUS 67
  153. #define EM_ST7 68
  154. #define EM_68HC16 69
  155. #define EM_68HC11 70
  156. #define EM_68HC08 71
  157. #define EM_68HC05 72
  158. #define EM_SVX 73
  159. #define EM_ST19 74
  160. #define EM_VAX 75
  161. #define EM_CRIS 76
  162. #define EM_JAVELIN 77
  163. #define EM_FIREPATH 78
  164. #define EM_ZSP 79
  165. #define EM_MMIX 80
  166. #define EM_HUANY 81
  167. #define EM_PRISM 82
  168. #define EM_AVR 83
  169. #define EM_FR30 84
  170. #define EM_D10V 85
  171. #define EM_D30V 86
  172. #define EM_V850 87
  173. #define EM_M32R 88
  174. #define EM_MN10300 89
  175. #define EM_MN10200 90
  176. #define EM_PJ 91
  177. #define EM_OPENRISC 92
  178. #define EM_ARC_A5 93
  179. #define EM_XTENSA 94
  180. #define EM_NUM 95
  181. #define EM_ALPHA 0x9026
  182. #define EV_NONE 0
  183. #define EV_CURRENT 1
  184. #define EV_NUM 2
  185. typedef struct {
  186. Elf32_Word sh_name;
  187. Elf32_Word sh_type;
  188. Elf32_Word sh_flags;
  189. Elf32_Addr sh_addr;
  190. Elf32_Off sh_offset;
  191. Elf32_Word sh_size;
  192. Elf32_Word sh_link;
  193. Elf32_Word sh_info;
  194. Elf32_Word sh_addralign;
  195. Elf32_Word sh_entsize;
  196. } Elf32_Shdr;
  197. typedef struct {
  198. Elf64_Word sh_name;
  199. Elf64_Word sh_type;
  200. Elf64_Xword sh_flags;
  201. Elf64_Addr sh_addr;
  202. Elf64_Off sh_offset;
  203. Elf64_Xword sh_size;
  204. Elf64_Word sh_link;
  205. Elf64_Word sh_info;
  206. Elf64_Xword sh_addralign;
  207. Elf64_Xword sh_entsize;
  208. } Elf64_Shdr;
  209. #define SHN_UNDEF 0
  210. #define SHN_LORESERVE 0xff00
  211. #define SHN_LOPROC 0xff00
  212. #define SHN_BEFORE 0xff00
  213. #define SHN_AFTER 0xff01
  214. #define SHN_HIPROC 0xff1f
  215. #define SHN_LOOS 0xff20
  216. #define SHN_HIOS 0xff3f
  217. #define SHN_ABS 0xfff1
  218. #define SHN_COMMON 0xfff2
  219. #define SHN_XINDEX 0xffff
  220. #define SHN_HIRESERVE 0xffff
  221. #define SHT_NULL 0
  222. #define SHT_PROGBITS 1
  223. #define SHT_SYMTAB 2
  224. #define SHT_STRTAB 3
  225. #define SHT_RELA 4
  226. #define SHT_HASH 5
  227. #define SHT_DYNAMIC 6
  228. #define SHT_NOTE 7
  229. #define SHT_NOBITS 8
  230. #define SHT_REL 9
  231. #define SHT_SHLIB 10
  232. #define SHT_DYNSYM 11
  233. #define SHT_INIT_ARRAY 14
  234. #define SHT_FINI_ARRAY 15
  235. #define SHT_PREINIT_ARRAY 16
  236. #define SHT_GROUP 17
  237. #define SHT_SYMTAB_SHNDX 18
  238. #define SHT_NUM 19
  239. #define SHT_LOOS 0x60000000
  240. #define SHT_GNU_ATTRIBUTES 0x6ffffff5
  241. #define SHT_GNU_HASH 0x6ffffff6
  242. #define SHT_GNU_LIBLIST 0x6ffffff7
  243. #define SHT_CHECKSUM 0x6ffffff8
  244. #define SHT_LOSUNW 0x6ffffffa
  245. #define SHT_SUNW_move 0x6ffffffa
  246. #define SHT_SUNW_COMDAT 0x6ffffffb
  247. #define SHT_SUNW_syminfo 0x6ffffffc
  248. #define SHT_GNU_verdef 0x6ffffffd
  249. #define SHT_GNU_verneed 0x6ffffffe
  250. #define SHT_GNU_versym 0x6fffffff
  251. #define SHT_HISUNW 0x6fffffff
  252. #define SHT_HIOS 0x6fffffff
  253. #define SHT_LOPROC 0x70000000
  254. #define SHT_HIPROC 0x7fffffff
  255. #define SHT_LOUSER 0x80000000
  256. #define SHT_HIUSER 0x8fffffff
  257. #define SHF_WRITE (1 << 0)
  258. #define SHF_ALLOC (1 << 1)
  259. #define SHF_EXECINSTR (1 << 2)
  260. #define SHF_MERGE (1 << 4)
  261. #define SHF_STRINGS (1 << 5)
  262. #define SHF_INFO_LINK (1 << 6)
  263. #define SHF_LINK_ORDER (1 << 7)
  264. #define SHF_OS_NONCONFORMING (1 << 8)
  265. #define SHF_GROUP (1 << 9)
  266. #define SHF_TLS (1 << 10)
  267. #define SHF_MASKOS 0x0ff00000
  268. #define SHF_MASKPROC 0xf0000000
  269. #define SHF_ORDERED (1 << 30)
  270. #define SHF_EXCLUDE (1 << 31)
  271. #define GRP_COMDAT 0x1
  272. typedef struct {
  273. Elf32_Word st_name;
  274. Elf32_Addr st_value;
  275. Elf32_Word st_size;
  276. unsigned char st_info;
  277. unsigned char st_other;
  278. Elf32_Section st_shndx;
  279. } Elf32_Sym;
  280. typedef struct {
  281. Elf64_Word st_name;
  282. unsigned char st_info;
  283. unsigned char st_other;
  284. Elf64_Section st_shndx;
  285. Elf64_Addr st_value;
  286. Elf64_Xword st_size;
  287. } Elf64_Sym;
  288. typedef struct {
  289. Elf32_Half si_boundto;
  290. Elf32_Half si_flags;
  291. } Elf32_Syminfo;
  292. typedef struct {
  293. Elf64_Half si_boundto;
  294. Elf64_Half si_flags;
  295. } Elf64_Syminfo;
  296. #define SYMINFO_BT_SELF 0xffff
  297. #define SYMINFO_BT_PARENT 0xfffe
  298. #define SYMINFO_BT_LOWRESERVE 0xff00
  299. #define SYMINFO_FLG_DIRECT 0x0001
  300. #define SYMINFO_FLG_PASSTHRU 0x0002
  301. #define SYMINFO_FLG_COPY 0x0004
  302. #define SYMINFO_FLG_LAZYLOAD 0x0008
  303. #define SYMINFO_NONE 0
  304. #define SYMINFO_CURRENT 1
  305. #define SYMINFO_NUM 2
  306. #define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4)
  307. #define ELF32_ST_TYPE(val) ((val) & 0xf)
  308. #define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
  309. #define ELF64_ST_BIND(val) ELF32_ST_BIND (val)
  310. #define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val)
  311. #define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type))
  312. #define STB_LOCAL 0
  313. #define STB_GLOBAL 1
  314. #define STB_WEAK 2
  315. #define STB_NUM 3
  316. #define STB_LOOS 10
  317. #define STB_GNU_UNIQUE 10
  318. #define STB_HIOS 12
  319. #define STB_LOPROC 13
  320. #define STB_HIPROC 15
  321. #define STT_NOTYPE 0
  322. #define STT_OBJECT 1
  323. #define STT_FUNC 2
  324. #define STT_SECTION 3
  325. #define STT_FILE 4
  326. #define STT_COMMON 5
  327. #define STT_TLS 6
  328. #define STT_NUM 7
  329. #define STT_LOOS 10
  330. #define STT_GNU_IFUNC 10
  331. #define STT_HIOS 12
  332. #define STT_LOPROC 13
  333. #define STT_HIPROC 15
  334. #define STN_UNDEF 0
  335. #define ELF32_ST_VISIBILITY(o) ((o) & 0x03)
  336. #define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o)
  337. #define STV_DEFAULT 0
  338. #define STV_INTERNAL 1
  339. #define STV_HIDDEN 2
  340. #define STV_PROTECTED 3
  341. typedef struct
  342. {
  343. Elf32_Addr r_offset;
  344. Elf32_Word r_info;
  345. } Elf32_Rel;
  346. typedef struct {
  347. Elf64_Addr r_offset;
  348. Elf64_Xword r_info;
  349. } Elf64_Rel;
  350. typedef struct {
  351. Elf32_Addr r_offset;
  352. Elf32_Word r_info;
  353. Elf32_Sword r_addend;
  354. } Elf32_Rela;
  355. typedef struct {
  356. Elf64_Addr r_offset;
  357. Elf64_Xword r_info;
  358. Elf64_Sxword r_addend;
  359. } Elf64_Rela;
  360. #define ELF32_R_SYM(val) ((val) >> 8)
  361. #define ELF32_R_TYPE(val) ((val) & 0xff)
  362. #define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
  363. #define ELF64_R_SYM(i) ((i) >> 32)
  364. #define ELF64_R_TYPE(i) ((i) & 0xffffffff)
  365. #define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type))
  366. typedef struct {
  367. Elf32_Word p_type;
  368. Elf32_Off p_offset;
  369. Elf32_Addr p_vaddr;
  370. Elf32_Addr p_paddr;
  371. Elf32_Word p_filesz;
  372. Elf32_Word p_memsz;
  373. Elf32_Word p_flags;
  374. Elf32_Word p_align;
  375. } Elf32_Phdr;
  376. typedef struct {
  377. Elf64_Word p_type;
  378. Elf64_Word p_flags;
  379. Elf64_Off p_offset;
  380. Elf64_Addr p_vaddr;
  381. Elf64_Addr p_paddr;
  382. Elf64_Xword p_filesz;
  383. Elf64_Xword p_memsz;
  384. Elf64_Xword p_align;
  385. } Elf64_Phdr;
  386. #define PT_NULL 0
  387. #define PT_LOAD 1
  388. #define PT_DYNAMIC 2
  389. #define PT_INTERP 3
  390. #define PT_NOTE 4
  391. #define PT_SHLIB 5
  392. #define PT_PHDR 6
  393. #define PT_TLS 7
  394. #define PT_NUM 8
  395. #define PT_LOOS 0x60000000
  396. #define PT_GNU_EH_FRAME 0x6474e550
  397. #define PT_GNU_STACK 0x6474e551
  398. #define PT_GNU_RELRO 0x6474e552
  399. #define PT_LOSUNW 0x6ffffffa
  400. #define PT_SUNWBSS 0x6ffffffa
  401. #define PT_SUNWSTACK 0x6ffffffb
  402. #define PT_HISUNW 0x6fffffff
  403. #define PT_HIOS 0x6fffffff
  404. #define PT_LOPROC 0x70000000
  405. #define PT_HIPROC 0x7fffffff
  406. #define PF_X (1 << 0)
  407. #define PF_W (1 << 1)
  408. #define PF_R (1 << 2)
  409. #define PF_MASKOS 0x0ff00000
  410. #define PF_MASKPROC 0xf0000000
  411. #define NT_PRSTATUS 1
  412. #define NT_FPREGSET 2
  413. #define NT_PRPSINFO 3
  414. #define NT_PRXREG 4
  415. #define NT_TASKSTRUCT 4
  416. #define NT_PLATFORM 5
  417. #define NT_AUXV 6
  418. #define NT_GWINDOWS 7
  419. #define NT_ASRS 8
  420. #define NT_PSTATUS 10
  421. #define NT_PSINFO 13
  422. #define NT_PRCRED 14
  423. #define NT_UTSNAME 15
  424. #define NT_LWPSTATUS 16
  425. #define NT_LWPSINFO 17
  426. #define NT_PRFPXREG 20
  427. #define NT_PRXFPREG 0x46e62b7f
  428. #define NT_PPC_VMX 0x100
  429. #define NT_PPC_SPE 0x101
  430. #define NT_PPC_VSX 0x102
  431. #define NT_386_TLS 0x200
  432. #define NT_386_IOPERM 0x201
  433. #define NT_VERSION 1
  434. typedef struct {
  435. Elf32_Sword d_tag;
  436. union {
  437. Elf32_Word d_val;
  438. Elf32_Addr d_ptr;
  439. } d_un;
  440. } Elf32_Dyn;
  441. typedef struct {
  442. Elf64_Sxword d_tag;
  443. union {
  444. Elf64_Xword d_val;
  445. Elf64_Addr d_ptr;
  446. } d_un;
  447. } Elf64_Dyn;
  448. #define DT_NULL 0
  449. #define DT_NEEDED 1
  450. #define DT_PLTRELSZ 2
  451. #define DT_PLTGOT 3
  452. #define DT_HASH 4
  453. #define DT_STRTAB 5
  454. #define DT_SYMTAB 6
  455. #define DT_RELA 7
  456. #define DT_RELASZ 8
  457. #define DT_RELAENT 9
  458. #define DT_STRSZ 10
  459. #define DT_SYMENT 11
  460. #define DT_INIT 12
  461. #define DT_FINI 13
  462. #define DT_SONAME 14
  463. #define DT_RPATH 15
  464. #define DT_SYMBOLIC 16
  465. #define DT_REL 17
  466. #define DT_RELSZ 18
  467. #define DT_RELENT 19
  468. #define DT_PLTREL 20
  469. #define DT_DEBUG 21
  470. #define DT_TEXTREL 22
  471. #define DT_JMPREL 23
  472. #define DT_BIND_NOW 24
  473. #define DT_INIT_ARRAY 25
  474. #define DT_FINI_ARRAY 26
  475. #define DT_INIT_ARRAYSZ 27
  476. #define DT_FINI_ARRAYSZ 28
  477. #define DT_RUNPATH 29
  478. #define DT_FLAGS 30
  479. #define DT_ENCODING 32
  480. #define DT_PREINIT_ARRAY 32
  481. #define DT_PREINIT_ARRAYSZ 33
  482. #define DT_NUM 34
  483. #define DT_LOOS 0x6000000d
  484. #define DT_HIOS 0x6ffff000
  485. #define DT_LOPROC 0x70000000
  486. #define DT_HIPROC 0x7fffffff
  487. #define DT_PROCNUM DT_MIPS_NUM
  488. #define DT_VALRNGLO 0x6ffffd00
  489. #define DT_GNU_PRELINKED 0x6ffffdf5
  490. #define DT_GNU_CONFLICTSZ 0x6ffffdf6
  491. #define DT_GNU_LIBLISTSZ 0x6ffffdf7
  492. #define DT_CHECKSUM 0x6ffffdf8
  493. #define DT_PLTPADSZ 0x6ffffdf9
  494. #define DT_MOVEENT 0x6ffffdfa
  495. #define DT_MOVESZ 0x6ffffdfb
  496. #define DT_FEATURE_1 0x6ffffdfc
  497. #define DT_POSFLAG_1 0x6ffffdfd
  498. #define DT_SYMINSZ 0x6ffffdfe
  499. #define DT_SYMINENT 0x6ffffdff
  500. #define DT_VALRNGHI 0x6ffffdff
  501. #define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag))
  502. #define DT_VALNUM 12
  503. #define DT_ADDRRNGLO 0x6ffffe00
  504. #define DT_GNU_HASH 0x6ffffef5
  505. #define DT_TLSDESC_PLT 0x6ffffef6
  506. #define DT_TLSDESC_GOT 0x6ffffef7
  507. #define DT_GNU_CONFLICT 0x6ffffef8
  508. #define DT_GNU_LIBLIST 0x6ffffef9
  509. #define DT_CONFIG 0x6ffffefa
  510. #define DT_DEPAUDIT 0x6ffffefb
  511. #define DT_AUDIT 0x6ffffefc
  512. #define DT_PLTPAD 0x6ffffefd
  513. #define DT_MOVETAB 0x6ffffefe
  514. #define DT_SYMINFO 0x6ffffeff
  515. #define DT_ADDRRNGHI 0x6ffffeff
  516. #define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag))
  517. #define DT_ADDRNUM 11
  518. #define DT_VERSYM 0x6ffffff0
  519. #define DT_RELACOUNT 0x6ffffff9
  520. #define DT_RELCOUNT 0x6ffffffa
  521. #define DT_FLAGS_1 0x6ffffffb
  522. #define DT_VERDEF 0x6ffffffc
  523. #define DT_VERDEFNUM 0x6ffffffd
  524. #define DT_VERNEED 0x6ffffffe
  525. #define DT_VERNEEDNUM 0x6fffffff
  526. #define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag))
  527. #define DT_VERSIONTAGNUM 16
  528. #define DT_AUXILIARY 0x7ffffffd
  529. #define DT_FILTER 0x7fffffff
  530. #define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
  531. #define DT_EXTRANUM 3
  532. #define DF_ORIGIN 0x00000001
  533. #define DF_SYMBOLIC 0x00000002
  534. #define DF_TEXTREL 0x00000004
  535. #define DF_BIND_NOW 0x00000008
  536. #define DF_STATIC_TLS 0x00000010
  537. #define DF_1_NOW 0x00000001
  538. #define DF_1_GLOBAL 0x00000002
  539. #define DF_1_GROUP 0x00000004
  540. #define DF_1_NODELETE 0x00000008
  541. #define DF_1_LOADFLTR 0x00000010
  542. #define DF_1_INITFIRST 0x00000020
  543. #define DF_1_NOOPEN 0x00000040
  544. #define DF_1_ORIGIN 0x00000080
  545. #define DF_1_DIRECT 0x00000100
  546. #define DF_1_TRANS 0x00000200
  547. #define DF_1_INTERPOSE 0x00000400
  548. #define DF_1_NODEFLIB 0x00000800
  549. #define DF_1_NODUMP 0x00001000
  550. #define DF_1_CONFALT 0x00002000
  551. #define DF_1_ENDFILTEE 0x00004000
  552. #define DF_1_DISPRELDNE 0x00008000
  553. #define DF_1_DISPRELPND 0x00010000
  554. #define DTF_1_PARINIT 0x00000001
  555. #define DTF_1_CONFEXP 0x00000002
  556. #define DF_P1_LAZYLOAD 0x00000001
  557. #define DF_P1_GROUPPERM 0x00000002
  558. typedef struct {
  559. Elf32_Half vd_version;
  560. Elf32_Half vd_flags;
  561. Elf32_Half vd_ndx;
  562. Elf32_Half vd_cnt;
  563. Elf32_Word vd_hash;
  564. Elf32_Word vd_aux;
  565. Elf32_Word vd_next;
  566. } Elf32_Verdef;
  567. typedef struct {
  568. Elf64_Half vd_version;
  569. Elf64_Half vd_flags;
  570. Elf64_Half vd_ndx;
  571. Elf64_Half vd_cnt;
  572. Elf64_Word vd_hash;
  573. Elf64_Word vd_aux;
  574. Elf64_Word vd_next;
  575. } Elf64_Verdef;
  576. #define VER_DEF_NONE 0
  577. #define VER_DEF_CURRENT 1
  578. #define VER_DEF_NUM 2
  579. #define VER_FLG_BASE 0x1
  580. #define VER_FLG_WEAK 0x2
  581. #define VER_NDX_LOCAL 0
  582. #define VER_NDX_GLOBAL 1
  583. #define VER_NDX_LORESERVE 0xff00
  584. #define VER_NDX_ELIMINATE 0xff01
  585. typedef struct {
  586. Elf32_Word vda_name;
  587. Elf32_Word vda_next;
  588. } Elf32_Verdaux;
  589. typedef struct {
  590. Elf64_Word vda_name;
  591. Elf64_Word vda_next;
  592. } Elf64_Verdaux;
  593. typedef struct {
  594. Elf32_Half vn_version;
  595. Elf32_Half vn_cnt;
  596. Elf32_Word vn_file;
  597. Elf32_Word vn_aux;
  598. Elf32_Word vn_next;
  599. } Elf32_Verneed;
  600. typedef struct {
  601. Elf64_Half vn_version;
  602. Elf64_Half vn_cnt;
  603. Elf64_Word vn_file;
  604. Elf64_Word vn_aux;
  605. Elf64_Word vn_next;
  606. } Elf64_Verneed;
  607. #define VER_NEED_NONE 0
  608. #define VER_NEED_CURRENT 1
  609. #define VER_NEED_NUM 2
  610. typedef struct {
  611. Elf32_Word vna_hash;
  612. Elf32_Half vna_flags;
  613. Elf32_Half vna_other;
  614. Elf32_Word vna_name;
  615. Elf32_Word vna_next;
  616. } Elf32_Vernaux;
  617. typedef struct {
  618. Elf64_Word vna_hash;
  619. Elf64_Half vna_flags;
  620. Elf64_Half vna_other;
  621. Elf64_Word vna_name;
  622. Elf64_Word vna_next;
  623. } Elf64_Vernaux;
  624. #define VER_FLG_WEAK 0x2
  625. typedef struct {
  626. uint32_t a_type;
  627. union {
  628. uint32_t a_val;
  629. } a_un;
  630. } Elf32_auxv_t;
  631. typedef struct {
  632. uint64_t a_type;
  633. union {
  634. uint64_t a_val;
  635. } a_un;
  636. } Elf64_auxv_t;
  637. #define AT_NULL 0
  638. #define AT_IGNORE 1
  639. #define AT_EXECFD 2
  640. #define AT_PHDR 3
  641. #define AT_PHENT 4
  642. #define AT_PHNUM 5
  643. #define AT_PAGESZ 6
  644. #define AT_BASE 7
  645. #define AT_FLAGS 8
  646. #define AT_ENTRY 9
  647. #define AT_NOTELF 10
  648. #define AT_UID 11
  649. #define AT_EUID 12
  650. #define AT_GID 13
  651. #define AT_EGID 14
  652. #define AT_CLKTCK 17
  653. #define AT_PLATFORM 15
  654. #define AT_HWCAP 16
  655. #define AT_FPUCW 18
  656. #define AT_DCACHEBSIZE 19
  657. #define AT_ICACHEBSIZE 20
  658. #define AT_UCACHEBSIZE 21
  659. #define AT_IGNOREPPC 22
  660. #define AT_SECURE 23
  661. #define AT_BASE_PLATFORM 24
  662. #define AT_RANDOM 25
  663. #define AT_EXECFN 31
  664. #define AT_SYSINFO 32
  665. #define AT_SYSINFO_EHDR 33
  666. #define AT_L1I_CACHESHAPE 34
  667. #define AT_L1D_CACHESHAPE 35
  668. #define AT_L2_CACHESHAPE 36
  669. #define AT_L3_CACHESHAPE 37
  670. typedef struct {
  671. Elf32_Word n_namesz;
  672. Elf32_Word n_descsz;
  673. Elf32_Word n_type;
  674. } Elf32_Nhdr;
  675. typedef struct {
  676. Elf64_Word n_namesz;
  677. Elf64_Word n_descsz;
  678. Elf64_Word n_type;
  679. } Elf64_Nhdr;
  680. #define ELF_NOTE_SOLARIS "SUNW Solaris"
  681. #define ELF_NOTE_GNU "GNU"
  682. #define ELF_NOTE_PAGESIZE_HINT 1
  683. #define NT_GNU_ABI_TAG 1
  684. #define ELF_NOTE_ABI NT_GNU_ABI_TAG
  685. #define ELF_NOTE_OS_LINUX 0
  686. #define ELF_NOTE_OS_GNU 1
  687. #define ELF_NOTE_OS_SOLARIS2 2
  688. #define ELF_NOTE_OS_FREEBSD 3
  689. #define NT_GNU_BUILD_ID 3
  690. #define NT_GNU_GOLD_VERSION 4
  691. typedef struct {
  692. Elf32_Xword m_value;
  693. Elf32_Word m_info;
  694. Elf32_Word m_poffset;
  695. Elf32_Half m_repeat;
  696. Elf32_Half m_stride;
  697. } Elf32_Move;
  698. typedef struct {
  699. Elf64_Xword m_value;
  700. Elf64_Xword m_info;
  701. Elf64_Xword m_poffset;
  702. Elf64_Half m_repeat;
  703. Elf64_Half m_stride;
  704. } Elf64_Move;
  705. #define ELF32_M_SYM(info) ((info) >> 8)
  706. #define ELF32_M_SIZE(info) ((unsigned char) (info))
  707. #define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size))
  708. #define ELF64_M_SYM(info) ELF32_M_SYM (info)
  709. #define ELF64_M_SIZE(info) ELF32_M_SIZE (info)
  710. #define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size)
  711. #define EF_CPU32 0x00810000
  712. #define R_68K_NONE 0
  713. #define R_68K_32 1
  714. #define R_68K_16 2
  715. #define R_68K_8 3
  716. #define R_68K_PC32 4
  717. #define R_68K_PC16 5
  718. #define R_68K_PC8 6
  719. #define R_68K_GOT32 7
  720. #define R_68K_GOT16 8
  721. #define R_68K_GOT8 9
  722. #define R_68K_GOT32O 10
  723. #define R_68K_GOT16O 11
  724. #define R_68K_GOT8O 12
  725. #define R_68K_PLT32 13
  726. #define R_68K_PLT16 14
  727. #define R_68K_PLT8 15
  728. #define R_68K_PLT32O 16
  729. #define R_68K_PLT16O 17
  730. #define R_68K_PLT8O 18
  731. #define R_68K_COPY 19
  732. #define R_68K_GLOB_DAT 20
  733. #define R_68K_JMP_SLOT 21
  734. #define R_68K_RELATIVE 22
  735. #define R_68K_NUM 23
  736. #define R_386_NONE 0
  737. #define R_386_32 1
  738. #define R_386_PC32 2
  739. #define R_386_GOT32 3
  740. #define R_386_PLT32 4
  741. #define R_386_COPY 5
  742. #define R_386_GLOB_DAT 6
  743. #define R_386_JMP_SLOT 7
  744. #define R_386_RELATIVE 8
  745. #define R_386_GOTOFF 9
  746. #define R_386_GOTPC 10
  747. #define R_386_32PLT 11
  748. #define R_386_TLS_TPOFF 14
  749. #define R_386_TLS_IE 15
  750. #define R_386_TLS_GOTIE 16
  751. #define R_386_TLS_LE 17
  752. #define R_386_TLS_GD 18
  753. #define R_386_TLS_LDM 19
  754. #define R_386_16 20
  755. #define R_386_PC16 21
  756. #define R_386_8 22
  757. #define R_386_PC8 23
  758. #define R_386_TLS_GD_32 24
  759. #define R_386_TLS_GD_PUSH 25
  760. #define R_386_TLS_GD_CALL 26
  761. #define R_386_TLS_GD_POP 27
  762. #define R_386_TLS_LDM_32 28
  763. #define R_386_TLS_LDM_PUSH 29
  764. #define R_386_TLS_LDM_CALL 30
  765. #define R_386_TLS_LDM_POP 31
  766. #define R_386_TLS_LDO_32 32
  767. #define R_386_TLS_IE_32 33
  768. #define R_386_TLS_LE_32 34
  769. #define R_386_TLS_DTPMOD32 35
  770. #define R_386_TLS_DTPOFF32 36
  771. #define R_386_TLS_TPOFF32 37
  772. #define R_386_TLS_GOTDESC 39
  773. #define R_386_TLS_DESC_CALL 40
  774. #define R_386_TLS_DESC 41
  775. #define R_386_IRELATIVE 42
  776. #define R_386_NUM 43
  777. #define STT_SPARC_REGISTER 13
  778. #define EF_SPARCV9_MM 3
  779. #define EF_SPARCV9_TSO 0
  780. #define EF_SPARCV9_PSO 1
  781. #define EF_SPARCV9_RMO 2
  782. #define EF_SPARC_LEDATA 0x800000
  783. #define EF_SPARC_EXT_MASK 0xFFFF00
  784. #define EF_SPARC_32PLUS 0x000100
  785. #define EF_SPARC_SUN_US1 0x000200
  786. #define EF_SPARC_HAL_R1 0x000400
  787. #define EF_SPARC_SUN_US3 0x000800
  788. #define R_SPARC_NONE 0
  789. #define R_SPARC_8 1
  790. #define R_SPARC_16 2
  791. #define R_SPARC_32 3
  792. #define R_SPARC_DISP8 4
  793. #define R_SPARC_DISP16 5
  794. #define R_SPARC_DISP32 6
  795. #define R_SPARC_WDISP30 7
  796. #define R_SPARC_WDISP22 8
  797. #define R_SPARC_HI22 9
  798. #define R_SPARC_22 10
  799. #define R_SPARC_13 11
  800. #define R_SPARC_LO10 12
  801. #define R_SPARC_GOT10 13
  802. #define R_SPARC_GOT13 14
  803. #define R_SPARC_GOT22 15
  804. #define R_SPARC_PC10 16
  805. #define R_SPARC_PC22 17
  806. #define R_SPARC_WPLT30 18
  807. #define R_SPARC_COPY 19
  808. #define R_SPARC_GLOB_DAT 20
  809. #define R_SPARC_JMP_SLOT 21
  810. #define R_SPARC_RELATIVE 22
  811. #define R_SPARC_UA32 23
  812. #define R_SPARC_PLT32 24
  813. #define R_SPARC_HIPLT22 25
  814. #define R_SPARC_LOPLT10 26
  815. #define R_SPARC_PCPLT32 27
  816. #define R_SPARC_PCPLT22 28
  817. #define R_SPARC_PCPLT10 29
  818. #define R_SPARC_10 30
  819. #define R_SPARC_11 31
  820. #define R_SPARC_64 32
  821. #define R_SPARC_OLO10 33
  822. #define R_SPARC_HH22 34
  823. #define R_SPARC_HM10 35
  824. #define R_SPARC_LM22 36
  825. #define R_SPARC_PC_HH22 37
  826. #define R_SPARC_PC_HM10 38
  827. #define R_SPARC_PC_LM22 39
  828. #define R_SPARC_WDISP16 40
  829. #define R_SPARC_WDISP19 41
  830. #define R_SPARC_GLOB_JMP 42
  831. #define R_SPARC_7 43
  832. #define R_SPARC_5 44
  833. #define R_SPARC_6 45
  834. #define R_SPARC_DISP64 46
  835. #define R_SPARC_PLT64 47
  836. #define R_SPARC_HIX22 48
  837. #define R_SPARC_LOX10 49
  838. #define R_SPARC_H44 50
  839. #define R_SPARC_M44 51
  840. #define R_SPARC_L44 52
  841. #define R_SPARC_REGISTER 53
  842. #define R_SPARC_UA64 54
  843. #define R_SPARC_UA16 55
  844. #define R_SPARC_TLS_GD_HI22 56
  845. #define R_SPARC_TLS_GD_LO10 57
  846. #define R_SPARC_TLS_GD_ADD 58
  847. #define R_SPARC_TLS_GD_CALL 59
  848. #define R_SPARC_TLS_LDM_HI22 60
  849. #define R_SPARC_TLS_LDM_LO10 61
  850. #define R_SPARC_TLS_LDM_ADD 62
  851. #define R_SPARC_TLS_LDM_CALL 63
  852. #define R_SPARC_TLS_LDO_HIX22 64
  853. #define R_SPARC_TLS_LDO_LOX10 65
  854. #define R_SPARC_TLS_LDO_ADD 66
  855. #define R_SPARC_TLS_IE_HI22 67
  856. #define R_SPARC_TLS_IE_LO10 68
  857. #define R_SPARC_TLS_IE_LD 69
  858. #define R_SPARC_TLS_IE_LDX 70
  859. #define R_SPARC_TLS_IE_ADD 71
  860. #define R_SPARC_TLS_LE_HIX22 72
  861. #define R_SPARC_TLS_LE_LOX10 73
  862. #define R_SPARC_TLS_DTPMOD32 74
  863. #define R_SPARC_TLS_DTPMOD64 75
  864. #define R_SPARC_TLS_DTPOFF32 76
  865. #define R_SPARC_TLS_DTPOFF64 77
  866. #define R_SPARC_TLS_TPOFF32 78
  867. #define R_SPARC_TLS_TPOFF64 79
  868. #define R_SPARC_GOTDATA_HIX22 80
  869. #define R_SPARC_GOTDATA_LOX10 81
  870. #define R_SPARC_GOTDATA_OP_HIX22 82
  871. #define R_SPARC_GOTDATA_OP_LOX10 83
  872. #define R_SPARC_GOTDATA_OP 84
  873. #define R_SPARC_H34 85
  874. #define R_SPARC_SIZE32 86
  875. #define R_SPARC_SIZE64 87
  876. #define R_SPARC_GNU_VTINHERIT 250
  877. #define R_SPARC_GNU_VTENTRY 251
  878. #define R_SPARC_REV32 252
  879. #define R_SPARC_NUM 253
  880. #define DT_SPARC_REGISTER 0x70000001
  881. #define DT_SPARC_NUM 2
  882. #define HWCAP_SPARC_FLUSH 1
  883. #define HWCAP_SPARC_STBAR 2
  884. #define HWCAP_SPARC_SWAP 4
  885. #define HWCAP_SPARC_MULDIV 8
  886. #define HWCAP_SPARC_V9 16
  887. #define HWCAP_SPARC_ULTRA3 32
  888. #define HWCAP_SPARC_BLKINIT 64
  889. #define HWCAP_SPARC_N2 128
  890. #define EF_MIPS_NOREORDER 1
  891. #define EF_MIPS_PIC 2
  892. #define EF_MIPS_CPIC 4
  893. #define EF_MIPS_XGOT 8
  894. #define EF_MIPS_64BIT_WHIRL 16
  895. #define EF_MIPS_ABI2 32
  896. #define EF_MIPS_ABI_ON32 64
  897. #define EF_MIPS_ARCH 0xf0000000
  898. #define EF_MIPS_ARCH_1 0x00000000
  899. #define EF_MIPS_ARCH_2 0x10000000
  900. #define EF_MIPS_ARCH_3 0x20000000
  901. #define EF_MIPS_ARCH_4 0x30000000
  902. #define EF_MIPS_ARCH_5 0x40000000
  903. #define EF_MIPS_ARCH_32 0x60000000
  904. #define EF_MIPS_ARCH_64 0x70000000
  905. #define E_MIPS_ARCH_1 0x00000000
  906. #define E_MIPS_ARCH_2 0x10000000
  907. #define E_MIPS_ARCH_3 0x20000000
  908. #define E_MIPS_ARCH_4 0x30000000
  909. #define E_MIPS_ARCH_5 0x40000000
  910. #define E_MIPS_ARCH_32 0x60000000
  911. #define E_MIPS_ARCH_64 0x70000000
  912. #define SHN_MIPS_ACOMMON 0xff00
  913. #define SHN_MIPS_TEXT 0xff01
  914. #define SHN_MIPS_DATA 0xff02
  915. #define SHN_MIPS_SCOMMON 0xff03
  916. #define SHN_MIPS_SUNDEFINED 0xff04
  917. #define SHT_MIPS_LIBLIST 0x70000000
  918. #define SHT_MIPS_MSYM 0x70000001
  919. #define SHT_MIPS_CONFLICT 0x70000002
  920. #define SHT_MIPS_GPTAB 0x70000003
  921. #define SHT_MIPS_UCODE 0x70000004
  922. #define SHT_MIPS_DEBUG 0x70000005
  923. #define SHT_MIPS_REGINFO 0x70000006
  924. #define SHT_MIPS_PACKAGE 0x70000007
  925. #define SHT_MIPS_PACKSYM 0x70000008
  926. #define SHT_MIPS_RELD 0x70000009
  927. #define SHT_MIPS_IFACE 0x7000000b
  928. #define SHT_MIPS_CONTENT 0x7000000c
  929. #define SHT_MIPS_OPTIONS 0x7000000d
  930. #define SHT_MIPS_SHDR 0x70000010
  931. #define SHT_MIPS_FDESC 0x70000011
  932. #define SHT_MIPS_EXTSYM 0x70000012
  933. #define SHT_MIPS_DENSE 0x70000013
  934. #define SHT_MIPS_PDESC 0x70000014
  935. #define SHT_MIPS_LOCSYM 0x70000015
  936. #define SHT_MIPS_AUXSYM 0x70000016
  937. #define SHT_MIPS_OPTSYM 0x70000017
  938. #define SHT_MIPS_LOCSTR 0x70000018
  939. #define SHT_MIPS_LINE 0x70000019
  940. #define SHT_MIPS_RFDESC 0x7000001a
  941. #define SHT_MIPS_DELTASYM 0x7000001b
  942. #define SHT_MIPS_DELTAINST 0x7000001c
  943. #define SHT_MIPS_DELTACLASS 0x7000001d
  944. #define SHT_MIPS_DWARF 0x7000001e
  945. #define SHT_MIPS_DELTADECL 0x7000001f
  946. #define SHT_MIPS_SYMBOL_LIB 0x70000020
  947. #define SHT_MIPS_EVENTS 0x70000021
  948. #define SHT_MIPS_TRANSLATE 0x70000022
  949. #define SHT_MIPS_PIXIE 0x70000023
  950. #define SHT_MIPS_XLATE 0x70000024
  951. #define SHT_MIPS_XLATE_DEBUG 0x70000025
  952. #define SHT_MIPS_WHIRL 0x70000026
  953. #define SHT_MIPS_EH_REGION 0x70000027
  954. #define SHT_MIPS_XLATE_OLD 0x70000028
  955. #define SHT_MIPS_PDR_EXCEPTION 0x70000029
  956. #define SHF_MIPS_GPREL 0x10000000
  957. #define SHF_MIPS_MERGE 0x20000000
  958. #define SHF_MIPS_ADDR 0x40000000
  959. #define SHF_MIPS_STRINGS 0x80000000
  960. #define SHF_MIPS_NOSTRIP 0x08000000
  961. #define SHF_MIPS_LOCAL 0x04000000
  962. #define SHF_MIPS_NAMES 0x02000000
  963. #define SHF_MIPS_NODUPE 0x01000000
  964. #define STO_MIPS_DEFAULT 0x0
  965. #define STO_MIPS_INTERNAL 0x1
  966. #define STO_MIPS_HIDDEN 0x2
  967. #define STO_MIPS_PROTECTED 0x3
  968. #define STO_MIPS_PLT 0x8
  969. #define STO_MIPS_SC_ALIGN_UNUSED 0xff
  970. #define STB_MIPS_SPLIT_COMMON 13
  971. typedef union {
  972. struct {
  973. Elf32_Word gt_current_g_value;
  974. Elf32_Word gt_unused;
  975. } gt_header;
  976. struct {
  977. Elf32_Word gt_g_value;
  978. Elf32_Word gt_bytes;
  979. } gt_entry;
  980. } Elf32_gptab;
  981. typedef struct {
  982. Elf32_Word ri_gprmask;
  983. Elf32_Word ri_cprmask[4];
  984. Elf32_Sword ri_gp_value;
  985. } Elf32_RegInfo;
  986. typedef struct {
  987. unsigned char kind;
  988. unsigned char size;
  989. Elf32_Section section;
  990. Elf32_Word info;
  991. } Elf_Options;
  992. #define ODK_NULL 0
  993. #define ODK_REGINFO 1
  994. #define ODK_EXCEPTIONS 2
  995. #define ODK_PAD 3
  996. #define ODK_HWPATCH 4
  997. #define ODK_FILL 5
  998. #define ODK_TAGS 6
  999. #define ODK_HWAND 7
  1000. #define ODK_HWOR 8
  1001. #define OEX_FPU_MIN 0x1f
  1002. #define OEX_FPU_MAX 0x1f00
  1003. #define OEX_PAGE0 0x10000
  1004. #define OEX_SMM 0x20000
  1005. #define OEX_FPDBUG 0x40000
  1006. #define OEX_PRECISEFP OEX_FPDBUG
  1007. #define OEX_DISMISS 0x80000
  1008. #define OEX_FPU_INVAL 0x10
  1009. #define OEX_FPU_DIV0 0x08
  1010. #define OEX_FPU_OFLO 0x04
  1011. #define OEX_FPU_UFLO 0x02
  1012. #define OEX_FPU_INEX 0x01
  1013. #define OHW_R4KEOP 0x1
  1014. #define OHW_R8KPFETCH 0x2
  1015. #define OHW_R5KEOP 0x4
  1016. #define OHW_R5KCVTL 0x8
  1017. #define OPAD_PREFIX 0x1
  1018. #define OPAD_POSTFIX 0x2
  1019. #define OPAD_SYMBOL 0x4
  1020. typedef struct {
  1021. Elf32_Word hwp_flags1;
  1022. Elf32_Word hwp_flags2;
  1023. } Elf_Options_Hw;
  1024. #define OHWA0_R4KEOP_CHECKED 0x00000001
  1025. #define OHWA1_R4KEOP_CLEAN 0x00000002
  1026. #define R_MIPS_NONE 0
  1027. #define R_MIPS_16 1
  1028. #define R_MIPS_32 2
  1029. #define R_MIPS_REL32 3
  1030. #define R_MIPS_26 4
  1031. #define R_MIPS_HI16 5
  1032. #define R_MIPS_LO16 6
  1033. #define R_MIPS_GPREL16 7
  1034. #define R_MIPS_LITERAL 8
  1035. #define R_MIPS_GOT16 9
  1036. #define R_MIPS_PC16 10
  1037. #define R_MIPS_CALL16 11
  1038. #define R_MIPS_GPREL32 12
  1039. #define R_MIPS_SHIFT5 16
  1040. #define R_MIPS_SHIFT6 17
  1041. #define R_MIPS_64 18
  1042. #define R_MIPS_GOT_DISP 19
  1043. #define R_MIPS_GOT_PAGE 20
  1044. #define R_MIPS_GOT_OFST 21
  1045. #define R_MIPS_GOT_HI16 22
  1046. #define R_MIPS_GOT_LO16 23
  1047. #define R_MIPS_SUB 24
  1048. #define R_MIPS_INSERT_A 25
  1049. #define R_MIPS_INSERT_B 26
  1050. #define R_MIPS_DELETE 27
  1051. #define R_MIPS_HIGHER 28
  1052. #define R_MIPS_HIGHEST 29
  1053. #define R_MIPS_CALL_HI16 30
  1054. #define R_MIPS_CALL_LO16 31
  1055. #define R_MIPS_SCN_DISP 32
  1056. #define R_MIPS_REL16 33
  1057. #define R_MIPS_ADD_IMMEDIATE 34
  1058. #define R_MIPS_PJUMP 35
  1059. #define R_MIPS_RELGOT 36
  1060. #define R_MIPS_JALR 37
  1061. #define R_MIPS_TLS_DTPMOD32 38
  1062. #define R_MIPS_TLS_DTPREL32 39
  1063. #define R_MIPS_TLS_DTPMOD64 40
  1064. #define R_MIPS_TLS_DTPREL64 41
  1065. #define R_MIPS_TLS_GD 42
  1066. #define R_MIPS_TLS_LDM 43
  1067. #define R_MIPS_TLS_DTPREL_HI16 44
  1068. #define R_MIPS_TLS_DTPREL_LO16 45
  1069. #define R_MIPS_TLS_GOTTPREL 46
  1070. #define R_MIPS_TLS_TPREL32 47
  1071. #define R_MIPS_TLS_TPREL64 48
  1072. #define R_MIPS_TLS_TPREL_HI16 49
  1073. #define R_MIPS_TLS_TPREL_LO16 50
  1074. #define R_MIPS_GLOB_DAT 51
  1075. #define R_MIPS_COPY 126
  1076. #define R_MIPS_JUMP_SLOT 127
  1077. #define R_MIPS_NUM 128
  1078. #define PT_MIPS_REGINFO 0x70000000
  1079. #define PT_MIPS_RTPROC 0x70000001
  1080. #define PT_MIPS_OPTIONS 0x70000002
  1081. #define PF_MIPS_LOCAL 0x10000000
  1082. #define DT_MIPS_RLD_VERSION 0x70000001
  1083. #define DT_MIPS_TIME_STAMP 0x70000002
  1084. #define DT_MIPS_ICHECKSUM 0x70000003
  1085. #define DT_MIPS_IVERSION 0x70000004
  1086. #define DT_MIPS_FLAGS 0x70000005
  1087. #define DT_MIPS_BASE_ADDRESS 0x70000006
  1088. #define DT_MIPS_MSYM 0x70000007
  1089. #define DT_MIPS_CONFLICT 0x70000008
  1090. #define DT_MIPS_LIBLIST 0x70000009
  1091. #define DT_MIPS_LOCAL_GOTNO 0x7000000a
  1092. #define DT_MIPS_CONFLICTNO 0x7000000b
  1093. #define DT_MIPS_LIBLISTNO 0x70000010
  1094. #define DT_MIPS_SYMTABNO 0x70000011
  1095. #define DT_MIPS_UNREFEXTNO 0x70000012
  1096. #define DT_MIPS_GOTSYM 0x70000013
  1097. #define DT_MIPS_HIPAGENO 0x70000014
  1098. #define DT_MIPS_RLD_MAP 0x70000016
  1099. #define DT_MIPS_DELTA_CLASS 0x70000017
  1100. #define DT_MIPS_DELTA_CLASS_NO 0x70000018
  1101. #define DT_MIPS_DELTA_INSTANCE 0x70000019
  1102. #define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a
  1103. #define DT_MIPS_DELTA_RELOC 0x7000001b
  1104. #define DT_MIPS_DELTA_RELOC_NO 0x7000001c
  1105. #define DT_MIPS_DELTA_SYM 0x7000001d
  1106. #define DT_MIPS_DELTA_SYM_NO 0x7000001e
  1107. #define DT_MIPS_DELTA_CLASSSYM 0x70000020
  1108. #define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021
  1109. #define DT_MIPS_CXX_FLAGS 0x70000022
  1110. #define DT_MIPS_PIXIE_INIT 0x70000023
  1111. #define DT_MIPS_SYMBOL_LIB 0x70000024
  1112. #define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
  1113. #define DT_MIPS_LOCAL_GOTIDX 0x70000026
  1114. #define DT_MIPS_HIDDEN_GOTIDX 0x70000027
  1115. #define DT_MIPS_PROTECTED_GOTIDX 0x70000028
  1116. #define DT_MIPS_OPTIONS 0x70000029
  1117. #define DT_MIPS_INTERFACE 0x7000002a
  1118. #define DT_MIPS_DYNSTR_ALIGN 0x7000002b
  1119. #define DT_MIPS_INTERFACE_SIZE 0x7000002c
  1120. #define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d
  1121. #define DT_MIPS_PERF_SUFFIX 0x7000002e
  1122. #define DT_MIPS_COMPACT_SIZE 0x7000002f
  1123. #define DT_MIPS_GP_VALUE 0x70000030
  1124. #define DT_MIPS_AUX_DYNAMIC 0x70000031
  1125. #define DT_MIPS_PLTGOT 0x70000032
  1126. #define DT_MIPS_RWPLT 0x70000034
  1127. #define DT_MIPS_NUM 0x35
  1128. #define RHF_NONE 0
  1129. #define RHF_QUICKSTART (1 << 0)
  1130. #define RHF_NOTPOT (1 << 1)
  1131. #define RHF_NO_LIBRARY_REPLACEMENT (1 << 2)
  1132. #define RHF_NO_MOVE (1 << 3)
  1133. #define RHF_SGI_ONLY (1 << 4)
  1134. #define RHF_GUARANTEE_INIT (1 << 5)
  1135. #define RHF_DELTA_C_PLUS_PLUS (1 << 6)
  1136. #define RHF_GUARANTEE_START_INIT (1 << 7)
  1137. #define RHF_PIXIE (1 << 8)
  1138. #define RHF_DEFAULT_DELAY_LOAD (1 << 9)
  1139. #define RHF_REQUICKSTART (1 << 10)
  1140. #define RHF_REQUICKSTARTED (1 << 11)
  1141. #define RHF_CORD (1 << 12)
  1142. #define RHF_NO_UNRES_UNDEF (1 << 13)
  1143. #define RHF_RLD_ORDER_SAFE (1 << 14)
  1144. typedef struct
  1145. {
  1146. Elf32_Word l_name;
  1147. Elf32_Word l_time_stamp;
  1148. Elf32_Word l_checksum;
  1149. Elf32_Word l_version;
  1150. Elf32_Word l_flags;
  1151. } Elf32_Lib;
  1152. typedef struct
  1153. {
  1154. Elf64_Word l_name;
  1155. Elf64_Word l_time_stamp;
  1156. Elf64_Word l_checksum;
  1157. Elf64_Word l_version;
  1158. Elf64_Word l_flags;
  1159. } Elf64_Lib;
  1160. #define LL_NONE 0
  1161. #define LL_EXACT_MATCH (1 << 0)
  1162. #define LL_IGNORE_INT_VER (1 << 1)
  1163. #define LL_REQUIRE_MINOR (1 << 2)
  1164. #define LL_EXPORTS (1 << 3)
  1165. #define LL_DELAY_LOAD (1 << 4)
  1166. #define LL_DELTA (1 << 5)
  1167. typedef Elf32_Addr Elf32_Conflict;
  1168. #define EF_PARISC_TRAPNIL 0x00010000
  1169. #define EF_PARISC_EXT 0x00020000
  1170. #define EF_PARISC_LSB 0x00040000
  1171. #define EF_PARISC_WIDE 0x00080000
  1172. #define EF_PARISC_NO_KABP 0x00100000
  1173. #define EF_PARISC_LAZYSWAP 0x00400000
  1174. #define EF_PARISC_ARCH 0x0000ffff
  1175. #define EFA_PARISC_1_0 0x020b
  1176. #define EFA_PARISC_1_1 0x0210
  1177. #define EFA_PARISC_2_0 0x0214
  1178. #define SHN_PARISC_ANSI_COMMON 0xff00
  1179. #define SHN_PARISC_HUGE_COMMON 0xff01
  1180. #define SHT_PARISC_EXT 0x70000000
  1181. #define SHT_PARISC_UNWIND 0x70000001
  1182. #define SHT_PARISC_DOC 0x70000002
  1183. #define SHF_PARISC_SHORT 0x20000000
  1184. #define SHF_PARISC_HUGE 0x40000000
  1185. #define SHF_PARISC_SBP 0x80000000
  1186. #define STT_PARISC_MILLICODE 13
  1187. #define STT_HP_OPAQUE (STT_LOOS + 0x1)
  1188. #define STT_HP_STUB (STT_LOOS + 0x2)
  1189. #define R_PARISC_NONE 0
  1190. #define R_PARISC_DIR32 1
  1191. #define R_PARISC_DIR21L 2
  1192. #define R_PARISC_DIR17R 3
  1193. #define R_PARISC_DIR17F 4
  1194. #define R_PARISC_DIR14R 6
  1195. #define R_PARISC_PCREL32 9
  1196. #define R_PARISC_PCREL21L 10
  1197. #define R_PARISC_PCREL17R 11
  1198. #define R_PARISC_PCREL17F 12
  1199. #define R_PARISC_PCREL14R 14
  1200. #define R_PARISC_DPREL21L 18
  1201. #define R_PARISC_DPREL14R 22
  1202. #define R_PARISC_GPREL21L 26
  1203. #define R_PARISC_GPREL14R 30
  1204. #define R_PARISC_LTOFF21L 34
  1205. #define R_PARISC_LTOFF14R 38
  1206. #define R_PARISC_SECREL32 41
  1207. #define R_PARISC_SEGBASE 48
  1208. #define R_PARISC_SEGREL32 49
  1209. #define R_PARISC_PLTOFF21L 50
  1210. #define R_PARISC_PLTOFF14R 54
  1211. #define R_PARISC_LTOFF_FPTR32 57
  1212. #define R_PARISC_LTOFF_FPTR21L 58
  1213. #define R_PARISC_LTOFF_FPTR14R 62
  1214. #define R_PARISC_FPTR64 64
  1215. #define R_PARISC_PLABEL32 65
  1216. #define R_PARISC_PLABEL21L 66
  1217. #define R_PARISC_PLABEL14R 70
  1218. #define R_PARISC_PCREL64 72
  1219. #define R_PARISC_PCREL22F 74
  1220. #define R_PARISC_PCREL14WR 75
  1221. #define R_PARISC_PCREL14DR 76
  1222. #define R_PARISC_PCREL16F 77
  1223. #define R_PARISC_PCREL16WF 78
  1224. #define R_PARISC_PCREL16DF 79
  1225. #define R_PARISC_DIR64 80
  1226. #define R_PARISC_DIR14WR 83
  1227. #define R_PARISC_DIR14DR 84
  1228. #define R_PARISC_DIR16F 85
  1229. #define R_PARISC_DIR16WF 86
  1230. #define R_PARISC_DIR16DF 87
  1231. #define R_PARISC_GPREL64 88
  1232. #define R_PARISC_GPREL14WR 91
  1233. #define R_PARISC_GPREL14DR 92
  1234. #define R_PARISC_GPREL16F 93
  1235. #define R_PARISC_GPREL16WF 94
  1236. #define R_PARISC_GPREL16DF 95
  1237. #define R_PARISC_LTOFF64 96
  1238. #define R_PARISC_LTOFF14WR 99
  1239. #define R_PARISC_LTOFF14DR 100
  1240. #define R_PARISC_LTOFF16F 101
  1241. #define R_PARISC_LTOFF16WF 102
  1242. #define R_PARISC_LTOFF16DF 103
  1243. #define R_PARISC_SECREL64 104
  1244. #define R_PARISC_SEGREL64 112
  1245. #define R_PARISC_PLTOFF14WR 115
  1246. #define R_PARISC_PLTOFF14DR 116
  1247. #define R_PARISC_PLTOFF16F 117
  1248. #define R_PARISC_PLTOFF16WF 118
  1249. #define R_PARISC_PLTOFF16DF 119
  1250. #define R_PARISC_LTOFF_FPTR64 120
  1251. #define R_PARISC_LTOFF_FPTR14WR 123
  1252. #define R_PARISC_LTOFF_FPTR14DR 124
  1253. #define R_PARISC_LTOFF_FPTR16F 125
  1254. #define R_PARISC_LTOFF_FPTR16WF 126
  1255. #define R_PARISC_LTOFF_FPTR16DF 127
  1256. #define R_PARISC_LORESERVE 128
  1257. #define R_PARISC_COPY 128
  1258. #define R_PARISC_IPLT 129
  1259. #define R_PARISC_EPLT 130
  1260. #define R_PARISC_TPREL32 153
  1261. #define R_PARISC_TPREL21L 154
  1262. #define R_PARISC_TPREL14R 158
  1263. #define R_PARISC_LTOFF_TP21L 162
  1264. #define R_PARISC_LTOFF_TP14R 166
  1265. #define R_PARISC_LTOFF_TP14F 167
  1266. #define R_PARISC_TPREL64 216
  1267. #define R_PARISC_TPREL14WR 219
  1268. #define R_PARISC_TPREL14DR 220
  1269. #define R_PARISC_TPREL16F 221
  1270. #define R_PARISC_TPREL16WF 222
  1271. #define R_PARISC_TPREL16DF 223
  1272. #define R_PARISC_LTOFF_TP64 224
  1273. #define R_PARISC_LTOFF_TP14WR 227
  1274. #define R_PARISC_LTOFF_TP14DR 228
  1275. #define R_PARISC_LTOFF_TP16F 229
  1276. #define R_PARISC_LTOFF_TP16WF 230
  1277. #define R_PARISC_LTOFF_TP16DF 231
  1278. #define R_PARISC_GNU_VTENTRY 232
  1279. #define R_PARISC_GNU_VTINHERIT 233
  1280. #define R_PARISC_TLS_GD21L 234
  1281. #define R_PARISC_TLS_GD14R 235
  1282. #define R_PARISC_TLS_GDCALL 236
  1283. #define R_PARISC_TLS_LDM21L 237
  1284. #define R_PARISC_TLS_LDM14R 238
  1285. #define R_PARISC_TLS_LDMCALL 239
  1286. #define R_PARISC_TLS_LDO21L 240
  1287. #define R_PARISC_TLS_LDO14R 241
  1288. #define R_PARISC_TLS_DTPMOD32 242
  1289. #define R_PARISC_TLS_DTPMOD64 243
  1290. #define R_PARISC_TLS_DTPOFF32 244
  1291. #define R_PARISC_TLS_DTPOFF64 245
  1292. #define R_PARISC_TLS_LE21L R_PARISC_TPREL21L
  1293. #define R_PARISC_TLS_LE14R R_PARISC_TPREL14R
  1294. #define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L
  1295. #define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R
  1296. #define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32
  1297. #define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64
  1298. #define R_PARISC_HIRESERVE 255
  1299. #define PT_HP_TLS (PT_LOOS + 0x0)
  1300. #define PT_HP_CORE_NONE (PT_LOOS + 0x1)
  1301. #define PT_HP_CORE_VERSION (PT_LOOS + 0x2)
  1302. #define PT_HP_CORE_KERNEL (PT_LOOS + 0x3)
  1303. #define PT_HP_CORE_COMM (PT_LOOS + 0x4)
  1304. #define PT_HP_CORE_PROC (PT_LOOS + 0x5)
  1305. #define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
  1306. #define PT_HP_CORE_STACK (PT_LOOS + 0x7)
  1307. #define PT_HP_CORE_SHM (PT_LOOS + 0x8)
  1308. #define PT_HP_CORE_MMF (PT_LOOS + 0x9)
  1309. #define PT_HP_PARALLEL (PT_LOOS + 0x10)
  1310. #define PT_HP_FASTBIND (PT_LOOS + 0x11)
  1311. #define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
  1312. #define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
  1313. #define PT_HP_STACK (PT_LOOS + 0x14)
  1314. #define PT_PARISC_ARCHEXT 0x70000000
  1315. #define PT_PARISC_UNWIND 0x70000001
  1316. #define PF_PARISC_SBP 0x08000000
  1317. #define PF_HP_PAGE_SIZE 0x00100000
  1318. #define PF_HP_FAR_SHARED 0x00200000
  1319. #define PF_HP_NEAR_SHARED 0x00400000
  1320. #define PF_HP_CODE 0x01000000
  1321. #define PF_HP_MODIFY 0x02000000
  1322. #define PF_HP_LAZYSWAP 0x04000000
  1323. #define PF_HP_SBP 0x08000000
  1324. #define EF_ALPHA_32BIT 1
  1325. #define EF_ALPHA_CANRELAX 2
  1326. #define SHT_ALPHA_DEBUG 0x70000001
  1327. #define SHT_ALPHA_REGINFO 0x70000002
  1328. #define SHF_ALPHA_GPREL 0x10000000
  1329. #define STO_ALPHA_NOPV 0x80
  1330. #define STO_ALPHA_STD_GPLOAD 0x88
  1331. #define R_ALPHA_NONE 0
  1332. #define R_ALPHA_REFLONG 1
  1333. #define R_ALPHA_REFQUAD 2
  1334. #define R_ALPHA_GPREL32 3
  1335. #define R_ALPHA_LITERAL 4
  1336. #define R_ALPHA_LITUSE 5
  1337. #define R_ALPHA_GPDISP 6
  1338. #define R_ALPHA_BRADDR 7
  1339. #define R_ALPHA_HINT 8
  1340. #define R_ALPHA_SREL16 9
  1341. #define R_ALPHA_SREL32 10
  1342. #define R_ALPHA_SREL64 11
  1343. #define R_ALPHA_GPRELHIGH 17
  1344. #define R_ALPHA_GPRELLOW 18
  1345. #define R_ALPHA_GPREL16 19
  1346. #define R_ALPHA_COPY 24
  1347. #define R_ALPHA_GLOB_DAT 25
  1348. #define R_ALPHA_JMP_SLOT 26
  1349. #define R_ALPHA_RELATIVE 27
  1350. #define R_ALPHA_TLS_GD_HI 28
  1351. #define R_ALPHA_TLSGD 29
  1352. #define R_ALPHA_TLS_LDM 30
  1353. #define R_ALPHA_DTPMOD64 31
  1354. #define R_ALPHA_GOTDTPREL 32
  1355. #define R_ALPHA_DTPREL64 33
  1356. #define R_ALPHA_DTPRELHI 34
  1357. #define R_ALPHA_DTPRELLO 35
  1358. #define R_ALPHA_DTPREL16 36
  1359. #define R_ALPHA_GOTTPREL 37
  1360. #define R_ALPHA_TPREL64 38
  1361. #define R_ALPHA_TPRELHI 39
  1362. #define R_ALPHA_TPRELLO 40
  1363. #define R_ALPHA_TPREL16 41
  1364. #define R_ALPHA_NUM 46
  1365. #define LITUSE_ALPHA_ADDR 0
  1366. #define LITUSE_ALPHA_BASE 1
  1367. #define LITUSE_ALPHA_BYTOFF 2
  1368. #define LITUSE_ALPHA_JSR 3
  1369. #define LITUSE_ALPHA_TLS_GD 4
  1370. #define LITUSE_ALPHA_TLS_LDM 5
  1371. #define DT_ALPHA_PLTRO (DT_LOPROC + 0)
  1372. #define DT_ALPHA_NUM 1
  1373. #define EF_PPC_EMB 0x80000000
  1374. #define EF_PPC_RELOCATABLE 0x00010000
  1375. #define EF_PPC_RELOCATABLE_LIB 0x00008000
  1376. #define R_PPC_NONE 0
  1377. #define R_PPC_ADDR32 1
  1378. #define R_PPC_ADDR24 2
  1379. #define R_PPC_ADDR16 3
  1380. #define R_PPC_ADDR16_LO 4
  1381. #define R_PPC_ADDR16_HI 5
  1382. #define R_PPC_ADDR16_HA 6
  1383. #define R_PPC_ADDR14 7
  1384. #define R_PPC_ADDR14_BRTAKEN 8
  1385. #define R_PPC_ADDR14_BRNTAKEN 9
  1386. #define R_PPC_REL24 10
  1387. #define R_PPC_REL14 11
  1388. #define R_PPC_REL14_BRTAKEN 12
  1389. #define R_PPC_REL14_BRNTAKEN 13
  1390. #define R_PPC_GOT16 14
  1391. #define R_PPC_GOT16_LO 15
  1392. #define R_PPC_GOT16_HI 16
  1393. #define R_PPC_GOT16_HA 17
  1394. #define R_PPC_PLTREL24 18
  1395. #define R_PPC_COPY 19
  1396. #define R_PPC_GLOB_DAT 20
  1397. #define R_PPC_JMP_SLOT 21
  1398. #define R_PPC_RELATIVE 22
  1399. #define R_PPC_LOCAL24PC 23
  1400. #define R_PPC_UADDR32 24
  1401. #define R_PPC_UADDR16 25
  1402. #define R_PPC_REL32 26
  1403. #define R_PPC_PLT32 27
  1404. #define R_PPC_PLTREL32 28
  1405. #define R_PPC_PLT16_LO 29
  1406. #define R_PPC_PLT16_HI 30
  1407. #define R_PPC_PLT16_HA 31
  1408. #define R_PPC_SDAREL16 32
  1409. #define R_PPC_SECTOFF 33
  1410. #define R_PPC_SECTOFF_LO 34
  1411. #define R_PPC_SECTOFF_HI 35
  1412. #define R_PPC_SECTOFF_HA 36
  1413. #define R_PPC_TLS 67
  1414. #define R_PPC_DTPMOD32 68
  1415. #define R_PPC_TPREL16 69
  1416. #define R_PPC_TPREL16_LO 70
  1417. #define R_PPC_TPREL16_HI 71
  1418. #define R_PPC_TPREL16_HA 72
  1419. #define R_PPC_TPREL32 73
  1420. #define R_PPC_DTPREL16 74
  1421. #define R_PPC_DTPREL16_LO 75
  1422. #define R_PPC_DTPREL16_HI 76
  1423. #define R_PPC_DTPREL16_HA 77
  1424. #define R_PPC_DTPREL32 78
  1425. #define R_PPC_GOT_TLSGD16 79
  1426. #define R_PPC_GOT_TLSGD16_LO 80
  1427. #define R_PPC_GOT_TLSGD16_HI 81
  1428. #define R_PPC_GOT_TLSGD16_HA 82
  1429. #define R_PPC_GOT_TLSLD16 83
  1430. #define R_PPC_GOT_TLSLD16_LO 84
  1431. #define R_PPC_GOT_TLSLD16_HI 85
  1432. #define R_PPC_GOT_TLSLD16_HA 86
  1433. #define R_PPC_GOT_TPREL16 87
  1434. #define R_PPC_GOT_TPREL16_LO 88
  1435. #define R_PPC_GOT_TPREL16_HI 89
  1436. #define R_PPC_GOT_TPREL16_HA 90
  1437. #define R_PPC_GOT_DTPREL16 91
  1438. #define R_PPC_GOT_DTPREL16_LO 92
  1439. #define R_PPC_GOT_DTPREL16_HI 93
  1440. #define R_PPC_GOT_DTPREL16_HA 94
  1441. #define R_PPC_EMB_NADDR32 101
  1442. #define R_PPC_EMB_NADDR16 102
  1443. #define R_PPC_EMB_NADDR16_LO 103
  1444. #define R_PPC_EMB_NADDR16_HI 104
  1445. #define R_PPC_EMB_NADDR16_HA 105
  1446. #define R_PPC_EMB_SDAI16 106
  1447. #define R_PPC_EMB_SDA2I16 107
  1448. #define R_PPC_EMB_SDA2REL 108
  1449. #define R_PPC_EMB_SDA21 109
  1450. #define R_PPC_EMB_MRKREF 110
  1451. #define R_PPC_EMB_RELSEC16 111
  1452. #define R_PPC_EMB_RELST_LO 112
  1453. #define R_PPC_EMB_RELST_HI 113
  1454. #define R_PPC_EMB_RELST_HA 114
  1455. #define R_PPC_EMB_BIT_FLD 115
  1456. #define R_PPC_EMB_RELSDA 116
  1457. #define R_PPC_DIAB_SDA21_LO 180
  1458. #define R_PPC_DIAB_SDA21_HI 181
  1459. #define R_PPC_DIAB_SDA21_HA 182
  1460. #define R_PPC_DIAB_RELSDA_LO 183
  1461. #define R_PPC_DIAB_RELSDA_HI 184
  1462. #define R_PPC_DIAB_RELSDA_HA 185
  1463. #define R_PPC_IRELATIVE 248
  1464. #define R_PPC_REL16 249
  1465. #define R_PPC_REL16_LO 250
  1466. #define R_PPC_REL16_HI 251
  1467. #define R_PPC_REL16_HA 252
  1468. #define R_PPC_TOC16 255
  1469. #define DT_PPC_GOT (DT_LOPROC + 0)
  1470. #define DT_PPC_NUM 1
  1471. #define R_PPC64_NONE R_PPC_NONE
  1472. #define R_PPC64_ADDR32 R_PPC_ADDR32
  1473. #define R_PPC64_ADDR24 R_PPC_ADDR24
  1474. #define R_PPC64_ADDR16 R_PPC_ADDR16
  1475. #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO
  1476. #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI
  1477. #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA
  1478. #define R_PPC64_ADDR14 R_PPC_ADDR14
  1479. #define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN
  1480. #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
  1481. #define R_PPC64_REL24 R_PPC_REL24
  1482. #define R_PPC64_REL14 R_PPC_REL14
  1483. #define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN
  1484. #define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN
  1485. #define R_PPC64_GOT16 R_PPC_GOT16
  1486. #define R_PPC64_GOT16_LO R_PPC_GOT16_LO
  1487. #define R_PPC64_GOT16_HI R_PPC_GOT16_HI
  1488. #define R_PPC64_GOT16_HA R_PPC_GOT16_HA
  1489. #define R_PPC64_COPY R_PPC_COPY
  1490. #define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT
  1491. #define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT
  1492. #define R_PPC64_RELATIVE R_PPC_RELATIVE
  1493. #define R_PPC64_UADDR32 R_PPC_UADDR32
  1494. #define R_PPC64_UADDR16 R_PPC_UADDR16
  1495. #define R_PPC64_REL32 R_PPC_REL32
  1496. #define R_PPC64_PLT32 R_PPC_PLT32
  1497. #define R_PPC64_PLTREL32 R_PPC_PLTREL32
  1498. #define R_PPC64_PLT16_LO R_PPC_PLT16_LO
  1499. #define R_PPC64_PLT16_HI R_PPC_PLT16_HI
  1500. #define R_PPC64_PLT16_HA R_PPC_PLT16_HA
  1501. #define R_PPC64_SECTOFF R_PPC_SECTOFF
  1502. #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO
  1503. #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI
  1504. #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA
  1505. #define R_PPC64_ADDR30 37
  1506. #define R_PPC64_ADDR64 38
  1507. #define R_PPC64_ADDR16_HIGHER 39
  1508. #define R_PPC64_ADDR16_HIGHERA 40
  1509. #define R_PPC64_ADDR16_HIGHEST 41
  1510. #define R_PPC64_ADDR16_HIGHESTA 42
  1511. #define R_PPC64_UADDR64 43
  1512. #define R_PPC64_REL64 44
  1513. #define R_PPC64_PLT64 45
  1514. #define R_PPC64_PLTREL64 46
  1515. #define R_PPC64_TOC16 47
  1516. #define R_PPC64_TOC16_LO 48
  1517. #define R_PPC64_TOC16_HI 49
  1518. #define R_PPC64_TOC16_HA 50
  1519. #define R_PPC64_TOC 51
  1520. #define R_PPC64_PLTGOT16 52
  1521. #define R_PPC64_PLTGOT16_LO 53
  1522. #define R_PPC64_PLTGOT16_HI 54
  1523. #define R_PPC64_PLTGOT16_HA 55
  1524. #define R_PPC64_ADDR16_DS 56
  1525. #define R_PPC64_ADDR16_LO_DS 57
  1526. #define R_PPC64_GOT16_DS 58
  1527. #define R_PPC64_GOT16_LO_DS 59
  1528. #define R_PPC64_PLT16_LO_DS 60
  1529. #define R_PPC64_SECTOFF_DS 61
  1530. #define R_PPC64_SECTOFF_LO_DS 62
  1531. #define R_PPC64_TOC16_DS 63
  1532. #define R_PPC64_TOC16_LO_DS 64
  1533. #define R_PPC64_PLTGOT16_DS 65
  1534. #define R_PPC64_PLTGOT16_LO_DS 66
  1535. #define R_PPC64_TLS 67
  1536. #define R_PPC64_DTPMOD64 68
  1537. #define R_PPC64_TPREL16 69
  1538. #define R_PPC64_TPREL16_LO 70
  1539. #define R_PPC64_TPREL16_HI 71
  1540. #define R_PPC64_TPREL16_HA 72
  1541. #define R_PPC64_TPREL64 73
  1542. #define R_PPC64_DTPREL16 74
  1543. #define R_PPC64_DTPREL16_LO 75
  1544. #define R_PPC64_DTPREL16_HI 76
  1545. #define R_PPC64_DTPREL16_HA 77
  1546. #define R_PPC64_DTPREL64 78
  1547. #define R_PPC64_GOT_TLSGD16 79
  1548. #define R_PPC64_GOT_TLSGD16_LO 80
  1549. #define R_PPC64_GOT_TLSGD16_HI 81
  1550. #define R_PPC64_GOT_TLSGD16_HA 82
  1551. #define R_PPC64_GOT_TLSLD16 83
  1552. #define R_PPC64_GOT_TLSLD16_LO 84
  1553. #define R_PPC64_GOT_TLSLD16_HI 85
  1554. #define R_PPC64_GOT_TLSLD16_HA 86
  1555. #define R_PPC64_GOT_TPREL16_DS 87
  1556. #define R_PPC64_GOT_TPREL16_LO_DS 88
  1557. #define R_PPC64_GOT_TPREL16_HI 89
  1558. #define R_PPC64_GOT_TPREL16_HA 90
  1559. #define R_PPC64_GOT_DTPREL16_DS 91
  1560. #define R_PPC64_GOT_DTPREL16_LO_DS 92
  1561. #define R_PPC64_GOT_DTPREL16_HI 93
  1562. #define R_PPC64_GOT_DTPREL16_HA 94
  1563. #define R_PPC64_TPREL16_DS 95
  1564. #define R_PPC64_TPREL16_LO_DS 96
  1565. #define R_PPC64_TPREL16_HIGHER 97
  1566. #define R_PPC64_TPREL16_HIGHERA 98
  1567. #define R_PPC64_TPREL16_HIGHEST 99
  1568. #define R_PPC64_TPREL16_HIGHESTA 100
  1569. #define R_PPC64_DTPREL16_DS 101
  1570. #define R_PPC64_DTPREL16_LO_DS 102
  1571. #define R_PPC64_DTPREL16_HIGHER 103
  1572. #define R_PPC64_DTPREL16_HIGHERA 104
  1573. #define R_PPC64_DTPREL16_HIGHEST 105
  1574. #define R_PPC64_DTPREL16_HIGHESTA 106
  1575. #define R_PPC64_JMP_IREL 247
  1576. #define R_PPC64_IRELATIVE 248
  1577. #define R_PPC64_REL16 249
  1578. #define R_PPC64_REL16_LO 250
  1579. #define R_PPC64_REL16_HI 251
  1580. #define R_PPC64_REL16_HA 252
  1581. #define DT_PPC64_GLINK (DT_LOPROC + 0)
  1582. #define DT_PPC64_OPD (DT_LOPROC + 1)
  1583. #define DT_PPC64_OPDSZ (DT_LOPROC + 2)
  1584. #define DT_PPC64_NUM 3
  1585. #define EF_ARM_RELEXEC 0x01
  1586. #define EF_ARM_HASENTRY 0x02
  1587. #define EF_ARM_INTERWORK 0x04
  1588. #define EF_ARM_APCS_26 0x08
  1589. #define EF_ARM_APCS_FLOAT 0x10
  1590. #define EF_ARM_PIC 0x20
  1591. #define EF_ARM_ALIGN8 0x40
  1592. #define EF_ARM_NEW_ABI 0x80
  1593. #define EF_ARM_OLD_ABI 0x100
  1594. #define EF_ARM_SOFT_FLOAT 0x200
  1595. #define EF_ARM_VFP_FLOAT 0x400
  1596. #define EF_ARM_MAVERICK_FLOAT 0x800
  1597. #define EF_ARM_SYMSARESORTED 0x04
  1598. #define EF_ARM_DYNSYMSUSESEGIDX 0x08
  1599. #define EF_ARM_MAPSYMSFIRST 0x10
  1600. #define EF_ARM_EABIMASK 0XFF000000
  1601. #define EF_ARM_BE8 0x00800000
  1602. #define EF_ARM_LE8 0x00400000
  1603. #define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
  1604. #define EF_ARM_EABI_UNKNOWN 0x00000000
  1605. #define EF_ARM_EABI_VER1 0x01000000
  1606. #define EF_ARM_EABI_VER2 0x02000000
  1607. #define EF_ARM_EABI_VER3 0x03000000
  1608. #define EF_ARM_EABI_VER4 0x04000000
  1609. #define EF_ARM_EABI_VER5 0x05000000
  1610. #define STT_ARM_TFUNC STT_LOPROC
  1611. #define STT_ARM_16BIT STT_HIPROC
  1612. #define SHF_ARM_ENTRYSECT 0x10000000
  1613. #define SHF_ARM_COMDEF 0x80000000
  1614. #define PF_ARM_SB 0x10000000
  1615. #define PF_ARM_PI 0x20000000
  1616. #define PF_ARM_ABS 0x40000000
  1617. #define PT_ARM_EXIDX (PT_LOPROC + 1)
  1618. #define SHT_ARM_EXIDX (SHT_LOPROC + 1)
  1619. #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2)
  1620. #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3)
  1621. #define R_ARM_NONE 0
  1622. #define R_ARM_PC24 1
  1623. #define R_ARM_ABS32 2
  1624. #define R_ARM_REL32 3
  1625. #define R_ARM_PC13 4
  1626. #define R_ARM_ABS16 5
  1627. #define R_ARM_ABS12 6
  1628. #define R_ARM_THM_ABS5 7
  1629. #define R_ARM_ABS8 8
  1630. #define R_ARM_SBREL32 9
  1631. #define R_ARM_THM_PC22 10
  1632. #define R_ARM_THM_PC8 11
  1633. #define R_ARM_AMP_VCALL9 12
  1634. #define R_ARM_SWI24 13
  1635. #define R_ARM_THM_SWI8 14
  1636. #define R_ARM_XPC25 15
  1637. #define R_ARM_THM_XPC22 16
  1638. #define R_ARM_TLS_DTPMOD32 17
  1639. #define R_ARM_TLS_DTPOFF32 18
  1640. #define R_ARM_TLS_TPOFF32 19
  1641. #define R_ARM_COPY 20
  1642. #define R_ARM_GLOB_DAT 21
  1643. #define R_ARM_JUMP_SLOT 22
  1644. #define R_ARM_RELATIVE 23
  1645. #define R_ARM_GOTOFF 24
  1646. #define R_ARM_GOTPC 25
  1647. #define R_ARM_GOT32 26
  1648. #define R_ARM_PLT32 27
  1649. #define R_ARM_ALU_PCREL_7_0 32
  1650. #define R_ARM_ALU_PCREL_15_8 33
  1651. #define R_ARM_ALU_PCREL_23_15 34
  1652. #define R_ARM_LDR_SBREL_11_0 35
  1653. #define R_ARM_ALU_SBREL_19_12 36
  1654. #define R_ARM_ALU_SBREL_27_20 37
  1655. #define R_ARM_GNU_VTENTRY 100
  1656. #define R_ARM_GNU_VTINHERIT 101
  1657. #define R_ARM_THM_PC11 102
  1658. #define R_ARM_THM_PC9 103
  1659. #define R_ARM_TLS_GD32 104
  1660. #define R_ARM_TLS_LDM32 105
  1661. #define R_ARM_TLS_LDO32 106
  1662. #define R_ARM_TLS_IE32 107
  1663. #define R_ARM_TLS_LE32 108
  1664. #define R_ARM_RXPC25 249
  1665. #define R_ARM_RSBREL32 250
  1666. #define R_ARM_THM_RPC22 251
  1667. #define R_ARM_RREL32 252
  1668. #define R_ARM_RABS22 253
  1669. #define R_ARM_RPC24 254
  1670. #define R_ARM_RBASE 255
  1671. #define R_ARM_NUM 256
  1672. #define EF_IA_64_MASKOS 0x0000000f
  1673. #define EF_IA_64_ABI64 0x00000010
  1674. #define EF_IA_64_ARCH 0xff000000
  1675. #define PT_IA_64_ARCHEXT (PT_LOPROC + 0)
  1676. #define PT_IA_64_UNWIND (PT_LOPROC + 1)
  1677. #define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12)
  1678. #define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13)
  1679. #define PT_IA_64_HP_STACK (PT_LOOS + 0x14)
  1680. #define PF_IA_64_NORECOV 0x80000000
  1681. #define SHT_IA_64_EXT (SHT_LOPROC + 0)
  1682. #define SHT_IA_64_UNWIND (SHT_LOPROC + 1)
  1683. #define SHF_IA_64_SHORT 0x10000000
  1684. #define SHF_IA_64_NORECOV 0x20000000
  1685. #define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0)
  1686. #define DT_IA_64_NUM 1
  1687. #define R_IA64_NONE 0x00
  1688. #define R_IA64_IMM14 0x21
  1689. #define R_IA64_IMM22 0x22
  1690. #define R_IA64_IMM64 0x23
  1691. #define R_IA64_DIR32MSB 0x24
  1692. #define R_IA64_DIR32LSB 0x25
  1693. #define R_IA64_DIR64MSB 0x26
  1694. #define R_IA64_DIR64LSB 0x27
  1695. #define R_IA64_GPREL22 0x2a
  1696. #define R_IA64_GPREL64I 0x2b
  1697. #define R_IA64_GPREL32MSB 0x2c
  1698. #define R_IA64_GPREL32LSB 0x2d
  1699. #define R_IA64_GPREL64MSB 0x2e
  1700. #define R_IA64_GPREL64LSB 0x2f
  1701. #define R_IA64_LTOFF22 0x32
  1702. #define R_IA64_LTOFF64I 0x33
  1703. #define R_IA64_PLTOFF22 0x3a
  1704. #define R_IA64_PLTOFF64I 0x3b
  1705. #define R_IA64_PLTOFF64MSB 0x3e
  1706. #define R_IA64_PLTOFF64LSB 0x3f
  1707. #define R_IA64_FPTR64I 0x43
  1708. #define R_IA64_FPTR32MSB 0x44
  1709. #define R_IA64_FPTR32LSB 0x45
  1710. #define R_IA64_FPTR64MSB 0x46
  1711. #define R_IA64_FPTR64LSB 0x47
  1712. #define R_IA64_PCREL60B 0x48
  1713. #define R_IA64_PCREL21B 0x49
  1714. #define R_IA64_PCREL21M 0x4a
  1715. #define R_IA64_PCREL21F 0x4b
  1716. #define R_IA64_PCREL32MSB 0x4c
  1717. #define R_IA64_PCREL32LSB 0x4d
  1718. #define R_IA64_PCREL64MSB 0x4e
  1719. #define R_IA64_PCREL64LSB 0x4f
  1720. #define R_IA64_LTOFF_FPTR22 0x52
  1721. #define R_IA64_LTOFF_FPTR64I 0x53
  1722. #define R_IA64_LTOFF_FPTR32MSB 0x54
  1723. #define R_IA64_LTOFF_FPTR32LSB 0x55
  1724. #define R_IA64_LTOFF_FPTR64MSB 0x56
  1725. #define R_IA64_LTOFF_FPTR64LSB 0x57
  1726. #define R_IA64_SEGREL32MSB 0x5c
  1727. #define R_IA64_SEGREL32LSB 0x5d
  1728. #define R_IA64_SEGREL64MSB 0x5e
  1729. #define R_IA64_SEGREL64LSB 0x5f
  1730. #define R_IA64_SECREL32MSB 0x64
  1731. #define R_IA64_SECREL32LSB 0x65
  1732. #define R_IA64_SECREL64MSB 0x66
  1733. #define R_IA64_SECREL64LSB 0x67
  1734. #define R_IA64_REL32MSB 0x6c
  1735. #define R_IA64_REL32LSB 0x6d
  1736. #define R_IA64_REL64MSB 0x6e
  1737. #define R_IA64_REL64LSB 0x6f
  1738. #define R_IA64_LTV32MSB 0x74
  1739. #define R_IA64_LTV32LSB 0x75
  1740. #define R_IA64_LTV64MSB 0x76
  1741. #define R_IA64_LTV64LSB 0x77
  1742. #define R_IA64_PCREL21BI 0x79
  1743. #define R_IA64_PCREL22 0x7a
  1744. #define R_IA64_PCREL64I 0x7b
  1745. #define R_IA64_IPLTMSB 0x80
  1746. #define R_IA64_IPLTLSB 0x81
  1747. #define R_IA64_COPY 0x84
  1748. #define R_IA64_SUB 0x85
  1749. #define R_IA64_LTOFF22X 0x86
  1750. #define R_IA64_LDXMOV 0x87
  1751. #define R_IA64_TPREL14 0x91
  1752. #define R_IA64_TPREL22 0x92
  1753. #define R_IA64_TPREL64I 0x93
  1754. #define R_IA64_TPREL64MSB 0x96
  1755. #define R_IA64_TPREL64LSB 0x97
  1756. #define R_IA64_LTOFF_TPREL22 0x9a
  1757. #define R_IA64_DTPMOD64MSB 0xa6
  1758. #define R_IA64_DTPMOD64LSB 0xa7
  1759. #define R_IA64_LTOFF_DTPMOD22 0xaa
  1760. #define R_IA64_DTPREL14 0xb1
  1761. #define R_IA64_DTPREL22 0xb2
  1762. #define R_IA64_DTPREL64I 0xb3
  1763. #define R_IA64_DTPREL32MSB 0xb4
  1764. #define R_IA64_DTPREL32LSB 0xb5
  1765. #define R_IA64_DTPREL64MSB 0xb6
  1766. #define R_IA64_DTPREL64LSB 0xb7
  1767. #define R_IA64_LTOFF_DTPREL22 0xba
  1768. #define R_SH_NONE 0
  1769. #define R_SH_DIR32 1
  1770. #define R_SH_REL32 2
  1771. #define R_SH_DIR8WPN 3
  1772. #define R_SH_IND12W 4
  1773. #define R_SH_DIR8WPL 5
  1774. #define R_SH_DIR8WPZ 6
  1775. #define R_SH_DIR8BP 7
  1776. #define R_SH_DIR8W 8
  1777. #define R_SH_DIR8L 9
  1778. #define R_SH_SWITCH16 25
  1779. #define R_SH_SWITCH32 26
  1780. #define R_SH_USES 27
  1781. #define R_SH_COUNT 28
  1782. #define R_SH_ALIGN 29
  1783. #define R_SH_CODE 30
  1784. #define R_SH_DATA 31
  1785. #define R_SH_LABEL 32
  1786. #define R_SH_SWITCH8 33
  1787. #define R_SH_GNU_VTINHERIT 34
  1788. #define R_SH_GNU_VTENTRY 35
  1789. #define R_SH_TLS_GD_32 144
  1790. #define R_SH_TLS_LD_32 145
  1791. #define R_SH_TLS_LDO_32 146
  1792. #define R_SH_TLS_IE_32 147
  1793. #define R_SH_TLS_LE_32 148
  1794. #define R_SH_TLS_DTPMOD32 149
  1795. #define R_SH_TLS_DTPOFF32 150
  1796. #define R_SH_TLS_TPOFF32 151
  1797. #define R_SH_GOT32 160
  1798. #define R_SH_PLT32 161
  1799. #define R_SH_COPY 162
  1800. #define R_SH_GLOB_DAT 163
  1801. #define R_SH_JMP_SLOT 164
  1802. #define R_SH_RELATIVE 165
  1803. #define R_SH_GOTOFF 166
  1804. #define R_SH_GOTPC 167
  1805. #define R_SH_NUM 256
  1806. #define R_390_NONE 0
  1807. #define R_390_8 1
  1808. #define R_390_12 2
  1809. #define R_390_16 3
  1810. #define R_390_32 4
  1811. #define R_390_PC32 5
  1812. #define R_390_GOT12 6
  1813. #define R_390_GOT32 7
  1814. #define R_390_PLT32 8
  1815. #define R_390_COPY 9
  1816. #define R_390_GLOB_DAT 10
  1817. #define R_390_JMP_SLOT 11
  1818. #define R_390_RELATIVE 12
  1819. #define R_390_GOTOFF32 13
  1820. #define R_390_GOTPC 14
  1821. #define R_390_GOT16 15
  1822. #define R_390_PC16 16
  1823. #define R_390_PC16DBL 17
  1824. #define R_390_PLT16DBL 18
  1825. #define R_390_PC32DBL 19
  1826. #define R_390_PLT32DBL 20
  1827. #define R_390_GOTPCDBL 21
  1828. #define R_390_64 22
  1829. #define R_390_PC64 23
  1830. #define R_390_GOT64 24
  1831. #define R_390_PLT64 25
  1832. #define R_390_GOTENT 26
  1833. #define R_390_GOTOFF16 27
  1834. #define R_390_GOTOFF64 28
  1835. #define R_390_GOTPLT12 29
  1836. #define R_390_GOTPLT16 30
  1837. #define R_390_GOTPLT32 31
  1838. #define R_390_GOTPLT64 32
  1839. #define R_390_GOTPLTENT 33
  1840. #define R_390_PLTOFF16 34
  1841. #define R_390_PLTOFF32 35
  1842. #define R_390_PLTOFF64 36
  1843. #define R_390_TLS_LOAD 37
  1844. #define R_390_TLS_GDCALL 38
  1845. #define R_390_TLS_LDCALL 39
  1846. #define R_390_TLS_GD32 40
  1847. #define R_390_TLS_GD64 41
  1848. #define R_390_TLS_GOTIE12 42
  1849. #define R_390_TLS_GOTIE32 43
  1850. #define R_390_TLS_GOTIE64 44
  1851. #define R_390_TLS_LDM32 45
  1852. #define R_390_TLS_LDM64 46
  1853. #define R_390_TLS_IE32 47
  1854. #define R_390_TLS_IE64 48
  1855. #define R_390_TLS_IEENT 49
  1856. #define R_390_TLS_LE32 50
  1857. #define R_390_TLS_LE64 51
  1858. #define R_390_TLS_LDO32 52
  1859. #define R_390_TLS_LDO64 53
  1860. #define R_390_TLS_DTPMOD 54
  1861. #define R_390_TLS_DTPOFF 55
  1862. #define R_390_TLS_TPOFF 56
  1863. #define R_390_20 57
  1864. #define R_390_GOT20 58
  1865. #define R_390_GOTPLT20 59
  1866. #define R_390_TLS_GOTIE20 60
  1867. #define R_390_NUM 61
  1868. #define R_CRIS_NONE 0
  1869. #define R_CRIS_8 1
  1870. #define R_CRIS_16 2
  1871. #define R_CRIS_32 3
  1872. #define R_CRIS_8_PCREL 4
  1873. #define R_CRIS_16_PCREL 5
  1874. #define R_CRIS_32_PCREL 6
  1875. #define R_CRIS_GNU_VTINHERIT 7
  1876. #define R_CRIS_GNU_VTENTRY 8
  1877. #define R_CRIS_COPY 9
  1878. #define R_CRIS_GLOB_DAT 10
  1879. #define R_CRIS_JUMP_SLOT 11
  1880. #define R_CRIS_RELATIVE 12
  1881. #define R_CRIS_16_GOT 13
  1882. #define R_CRIS_32_GOT 14
  1883. #define R_CRIS_16_GOTPLT 15
  1884. #define R_CRIS_32_GOTPLT 16
  1885. #define R_CRIS_32_GOTREL 17
  1886. #define R_CRIS_32_PLT_GOTREL 18
  1887. #define R_CRIS_32_PLT_PCREL 19
  1888. #define R_CRIS_NUM 20
  1889. #define R_X86_64_NONE 0
  1890. #define R_X86_64_64 1
  1891. #define R_X86_64_PC32 2
  1892. #define R_X86_64_GOT32 3
  1893. #define R_X86_64_PLT32 4
  1894. #define R_X86_64_COPY 5
  1895. #define R_X86_64_GLOB_DAT 6
  1896. #define R_X86_64_JUMP_SLOT 7
  1897. #define R_X86_64_RELATIVE 8
  1898. #define R_X86_64_GOTPCREL 9
  1899. #define R_X86_64_32 10
  1900. #define R_X86_64_32S 11
  1901. #define R_X86_64_16 12
  1902. #define R_X86_64_PC16 13
  1903. #define R_X86_64_8 14
  1904. #define R_X86_64_PC8 15
  1905. #define R_X86_64_DTPMOD64 16
  1906. #define R_X86_64_DTPOFF64 17
  1907. #define R_X86_64_TPOFF64 18
  1908. #define R_X86_64_TLSGD 19
  1909. #define R_X86_64_TLSLD 20
  1910. #define R_X86_64_DTPOFF32 21
  1911. #define R_X86_64_GOTTPOFF 22
  1912. #define R_X86_64_TPOFF32 23
  1913. #define R_X86_64_PC64 24
  1914. #define R_X86_64_GOTOFF64 25
  1915. #define R_X86_64_GOTPC32 26
  1916. #define R_X86_64_GOTPC32_TLSDESC 34
  1917. #define R_X86_64_TLSDESC_CALL 35
  1918. #define R_X86_64_TLSDESC 36
  1919. #define R_X86_64_IRELATIVE 37
  1920. #define R_X86_64_NUM 38
  1921. #define R_MN10300_NONE 0
  1922. #define R_MN10300_32 1
  1923. #define R_MN10300_16 2
  1924. #define R_MN10300_8 3
  1925. #define R_MN10300_PCREL32 4
  1926. #define R_MN10300_PCREL16 5
  1927. #define R_MN10300_PCREL8 6
  1928. #define R_MN10300_GNU_VTINHERIT 7
  1929. #define R_MN10300_GNU_VTENTRY 8
  1930. #define R_MN10300_24 9
  1931. #define R_MN10300_GOTPC32 10
  1932. #define R_MN10300_GOTPC16 11
  1933. #define R_MN10300_GOTOFF32 12
  1934. #define R_MN10300_GOTOFF24 13
  1935. #define R_MN10300_GOTOFF16 14
  1936. #define R_MN10300_PLT32 15
  1937. #define R_MN10300_PLT16 16
  1938. #define R_MN10300_GOT32 17
  1939. #define R_MN10300_GOT24 18
  1940. #define R_MN10300_GOT16 19
  1941. #define R_MN10300_COPY 20
  1942. #define R_MN10300_GLOB_DAT 21
  1943. #define R_MN10300_JMP_SLOT 22
  1944. #define R_MN10300_RELATIVE 23
  1945. #define R_MN10300_NUM 24
  1946. #define R_M32R_NONE 0
  1947. #define R_M32R_16 1
  1948. #define R_M32R_32 2
  1949. #define R_M32R_24 3
  1950. #define R_M32R_10_PCREL 4
  1951. #define R_M32R_18_PCREL 5
  1952. #define R_M32R_26_PCREL 6
  1953. #define R_M32R_HI16_ULO 7
  1954. #define R_M32R_HI16_SLO 8
  1955. #define R_M32R_LO16 9
  1956. #define R_M32R_SDA16 10
  1957. #define R_M32R_GNU_VTINHERIT 11
  1958. #define R_M32R_GNU_VTENTRY 12
  1959. #define R_M32R_16_RELA 33
  1960. #define R_M32R_32_RELA 34
  1961. #define R_M32R_24_RELA 35
  1962. #define R_M32R_10_PCREL_RELA 36
  1963. #define R_M32R_18_PCREL_RELA 37
  1964. #define R_M32R_26_PCREL_RELA 38
  1965. #define R_M32R_HI16_ULO_RELA 39
  1966. #define R_M32R_HI16_SLO_RELA 40
  1967. #define R_M32R_LO16_RELA 41
  1968. #define R_M32R_SDA16_RELA 42
  1969. #define R_M32R_RELA_GNU_VTINHERIT 43
  1970. #define R_M32R_RELA_GNU_VTENTRY 44
  1971. #define R_M32R_REL32 45
  1972. #define R_M32R_GOT24 48
  1973. #define R_M32R_26_PLTREL 49
  1974. #define R_M32R_COPY 50
  1975. #define R_M32R_GLOB_DAT 51
  1976. #define R_M32R_JMP_SLOT 52
  1977. #define R_M32R_RELATIVE 53
  1978. #define R_M32R_GOTOFF 54
  1979. #define R_M32R_GOTPC24 55
  1980. #define R_M32R_GOT16_HI_ULO 56
  1981. #define R_M32R_GOT16_HI_SLO 57
  1982. #define R_M32R_GOT16_LO 58
  1983. #define R_M32R_GOTPC_HI_ULO 59
  1984. #define R_M32R_GOTPC_HI_SLO 60
  1985. #define R_M32R_GOTPC_LO 61
  1986. #define R_M32R_GOTOFF_HI_ULO 62
  1987. #define R_M32R_GOTOFF_HI_SLO 63
  1988. #define R_M32R_GOTOFF_LO 64
  1989. #define R_M32R_NUM 256
  1990. #ifdef __cplusplus
  1991. }
  1992. #endif
  1993. #endif