elf.h 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147
  1. /*
  2. From musl include/elf.h
  3. Copyright © 2005-2014 Rich Felker, et al.
  4. Permission is hereby granted, free of charge, to any person obtaining
  5. a copy of this software and associated documentation files (the
  6. "Software"), to deal in the Software without restriction, including
  7. without limitation the rights to use, copy, modify, merge, publish,
  8. distribute, sublicense, and/or sell copies of the Software, and to
  9. permit persons to whom the Software is furnished to do so, subject to
  10. the following conditions:
  11. The above copyright notice and this permission notice shall be
  12. included in all copies or substantial portions of the Software.
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  14. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  15. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  16. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  17. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  18. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  19. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20. */
  21. #ifndef _ELF_H
  22. #define _ELF_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. #include <stdint.h>
  27. typedef uint16_t Elf32_Half;
  28. typedef uint16_t Elf64_Half;
  29. typedef uint32_t Elf32_Word;
  30. typedef int32_t Elf32_Sword;
  31. typedef uint32_t Elf64_Word;
  32. typedef int32_t Elf64_Sword;
  33. typedef uint64_t Elf32_Xword;
  34. typedef int64_t Elf32_Sxword;
  35. typedef uint64_t Elf64_Xword;
  36. typedef int64_t Elf64_Sxword;
  37. typedef uint32_t Elf32_Addr;
  38. typedef uint64_t Elf64_Addr;
  39. typedef uint32_t Elf32_Off;
  40. typedef uint64_t Elf64_Off;
  41. typedef uint16_t Elf32_Section;
  42. typedef uint16_t Elf64_Section;
  43. typedef Elf32_Half Elf32_Versym;
  44. typedef Elf64_Half Elf64_Versym;
  45. #define EI_NIDENT (16)
  46. typedef struct {
  47. unsigned char e_ident[EI_NIDENT];
  48. Elf32_Half e_type;
  49. Elf32_Half e_machine;
  50. Elf32_Word e_version;
  51. Elf32_Addr e_entry;
  52. Elf32_Off e_phoff;
  53. Elf32_Off e_shoff;
  54. Elf32_Word e_flags;
  55. Elf32_Half e_ehsize;
  56. Elf32_Half e_phentsize;
  57. Elf32_Half e_phnum;
  58. Elf32_Half e_shentsize;
  59. Elf32_Half e_shnum;
  60. Elf32_Half e_shstrndx;
  61. } Elf32_Ehdr;
  62. typedef struct {
  63. unsigned char e_ident[EI_NIDENT];
  64. Elf64_Half e_type;
  65. Elf64_Half e_machine;
  66. Elf64_Word e_version;
  67. Elf64_Addr e_entry;
  68. Elf64_Off e_phoff;
  69. Elf64_Off e_shoff;
  70. Elf64_Word e_flags;
  71. Elf64_Half e_ehsize;
  72. Elf64_Half e_phentsize;
  73. Elf64_Half e_phnum;
  74. Elf64_Half e_shentsize;
  75. Elf64_Half e_shnum;
  76. Elf64_Half e_shstrndx;
  77. } Elf64_Ehdr;
  78. #define EI_MAG0 0
  79. #define ELFMAG0 0x7f
  80. #define EI_MAG1 1
  81. #define ELFMAG1 'E'
  82. #define EI_MAG2 2
  83. #define ELFMAG2 'L'
  84. #define EI_MAG3 3
  85. #define ELFMAG3 'F'
  86. #define ELFMAG "\177ELF"
  87. #define SELFMAG 4
  88. #define EI_CLASS 4
  89. #define ELFCLASSNONE 0
  90. #define ELFCLASS32 1
  91. #define ELFCLASS64 2
  92. #define ELFCLASSNUM 3
  93. #define EI_DATA 5
  94. #define ELFDATANONE 0
  95. #define ELFDATA2LSB 1
  96. #define ELFDATA2MSB 2
  97. #define ELFDATANUM 3
  98. #define EI_VERSION 6
  99. #define EI_OSABI 7
  100. #define ELFOSABI_NONE 0
  101. #define ELFOSABI_SYSV 0
  102. #define ELFOSABI_HPUX 1
  103. #define ELFOSABI_NETBSD 2
  104. #define ELFOSABI_LINUX 3
  105. #define ELFOSABI_GNU 3
  106. #define ELFOSABI_SOLARIS 6
  107. #define ELFOSABI_AIX 7
  108. #define ELFOSABI_IRIX 8
  109. #define ELFOSABI_FREEBSD 9
  110. #define ELFOSABI_TRU64 10
  111. #define ELFOSABI_MODESTO 11
  112. #define ELFOSABI_OPENBSD 12
  113. #define ELFOSABI_ARM 97
  114. #define ELFOSABI_STANDALONE 255
  115. #define EI_ABIVERSION 8
  116. #define EI_PAD 9
  117. #define ET_NONE 0
  118. #define ET_REL 1
  119. #define ET_EXEC 2
  120. #define ET_DYN 3
  121. #define ET_CORE 4
  122. #define ET_NUM 5
  123. #define ET_LOOS 0xfe00
  124. #define ET_HIOS 0xfeff
  125. #define ET_LOPROC 0xff00
  126. #define ET_HIPROC 0xffff
  127. #define EM_NONE 0
  128. #define EM_M32 1
  129. #define EM_SPARC 2
  130. #define EM_386 3
  131. #define EM_68K 4
  132. #define EM_88K 5
  133. #define EM_860 7
  134. #define EM_MIPS 8
  135. #define EM_S370 9
  136. #define EM_MIPS_RS3_LE 10
  137. #define EM_PARISC 15
  138. #define EM_VPP500 17
  139. #define EM_SPARC32PLUS 18
  140. #define EM_960 19
  141. #define EM_PPC 20
  142. #define EM_PPC64 21
  143. #define EM_S390 22
  144. #define EM_V800 36
  145. #define EM_FR20 37
  146. #define EM_RH32 38
  147. #define EM_RCE 39
  148. #define EM_ARM 40
  149. #define EM_FAKE_ALPHA 41
  150. #define EM_SH 42
  151. #define EM_SPARCV9 43
  152. #define EM_TRICORE 44
  153. #define EM_ARC 45
  154. #define EM_H8_300 46
  155. #define EM_H8_300H 47
  156. #define EM_H8S 48
  157. #define EM_H8_500 49
  158. #define EM_IA_64 50
  159. #define EM_MIPS_X 51
  160. #define EM_COLDFIRE 52
  161. #define EM_68HC12 53
  162. #define EM_MMA 54
  163. #define EM_PCP 55
  164. #define EM_NCPU 56
  165. #define EM_NDR1 57
  166. #define EM_STARCORE 58
  167. #define EM_ME16 59
  168. #define EM_ST100 60
  169. #define EM_TINYJ 61
  170. #define EM_X86_64 62
  171. #define EM_PDSP 63
  172. #define EM_FX66 66
  173. #define EM_ST9PLUS 67
  174. #define EM_ST7 68
  175. #define EM_68HC16 69
  176. #define EM_68HC11 70
  177. #define EM_68HC08 71
  178. #define EM_68HC05 72
  179. #define EM_SVX 73
  180. #define EM_ST19 74
  181. #define EM_VAX 75
  182. #define EM_CRIS 76
  183. #define EM_JAVELIN 77
  184. #define EM_FIREPATH 78
  185. #define EM_ZSP 79
  186. #define EM_MMIX 80
  187. #define EM_HUANY 81
  188. #define EM_PRISM 82
  189. #define EM_AVR 83
  190. #define EM_FR30 84
  191. #define EM_D10V 85
  192. #define EM_D30V 86
  193. #define EM_V850 87
  194. #define EM_M32R 88
  195. #define EM_MN10300 89
  196. #define EM_MN10200 90
  197. #define EM_PJ 91
  198. #define EM_OR1K 92
  199. #define EM_OPENRISC 92
  200. #define EM_ARC_A5 93
  201. #define EM_ARC_COMPACT 93
  202. #define EM_XTENSA 94
  203. #define EM_VIDEOCORE 95
  204. #define EM_TMM_GPP 96
  205. #define EM_NS32K 97
  206. #define EM_TPC 98
  207. #define EM_SNP1K 99
  208. #define EM_ST200 100
  209. #define EM_IP2K 101
  210. #define EM_MAX 102
  211. #define EM_CR 103
  212. #define EM_F2MC16 104
  213. #define EM_MSP430 105
  214. #define EM_BLACKFIN 106
  215. #define EM_SE_C33 107
  216. #define EM_SEP 108
  217. #define EM_ARCA 109
  218. #define EM_UNICORE 110
  219. #define EM_EXCESS 111
  220. #define EM_DXP 112
  221. #define EM_ALTERA_NIOS2 113
  222. #define EM_CRX 114
  223. #define EM_XGATE 115
  224. #define EM_C166 116
  225. #define EM_M16C 117
  226. #define EM_DSPIC30F 118
  227. #define EM_CE 119
  228. #define EM_M32C 120
  229. #define EM_TSK3000 131
  230. #define EM_RS08 132
  231. #define EM_SHARC 133
  232. #define EM_ECOG2 134
  233. #define EM_SCORE7 135
  234. #define EM_DSP24 136
  235. #define EM_VIDEOCORE3 137
  236. #define EM_LATTICEMICO32 138
  237. #define EM_SE_C17 139
  238. #define EM_TI_C6000 140
  239. #define EM_TI_C2000 141
  240. #define EM_TI_C5500 142
  241. #define EM_TI_ARP32 143
  242. #define EM_TI_PRU 144
  243. #define EM_MMDSP_PLUS 160
  244. #define EM_CYPRESS_M8C 161
  245. #define EM_R32C 162
  246. #define EM_TRIMEDIA 163
  247. #define EM_QDSP6 164
  248. #define EM_8051 165
  249. #define EM_STXP7X 166
  250. #define EM_NDS32 167
  251. #define EM_ECOG1X 168
  252. #define EM_MAXQ30 169
  253. #define EM_XIMO16 170
  254. #define EM_MANIK 171
  255. #define EM_CRAYNV2 172
  256. #define EM_RX 173
  257. #define EM_METAG 174
  258. #define EM_MCST_ELBRUS 175
  259. #define EM_ECOG16 176
  260. #define EM_CR16 177
  261. #define EM_ETPU 178
  262. #define EM_SLE9X 179
  263. #define EM_L10M 180
  264. #define EM_K10M 181
  265. #define EM_AARCH64 183
  266. #define EM_AVR32 185
  267. #define EM_STM8 186
  268. #define EM_TILE64 187
  269. #define EM_TILEPRO 188
  270. #define EM_MICROBLAZE 189
  271. #define EM_CUDA 190
  272. #define EM_TILEGX 191
  273. #define EM_CLOUDSHIELD 192
  274. #define EM_COREA_1ST 193
  275. #define EM_COREA_2ND 194
  276. #define EM_ARC_COMPACT2 195
  277. #define EM_OPEN8 196
  278. #define EM_RL78 197
  279. #define EM_VIDEOCORE5 198
  280. #define EM_78KOR 199
  281. #define EM_56800EX 200
  282. #define EM_BA1 201
  283. #define EM_BA2 202
  284. #define EM_XCORE 203
  285. #define EM_MCHP_PIC 204
  286. #define EM_KM32 210
  287. #define EM_KMX32 211
  288. #define EM_EMX16 212
  289. #define EM_EMX8 213
  290. #define EM_KVARC 214
  291. #define EM_CDP 215
  292. #define EM_COGE 216
  293. #define EM_COOL 217
  294. #define EM_NORC 218
  295. #define EM_CSR_KALIMBA 219
  296. #define EM_Z80 220
  297. #define EM_VISIUM 221
  298. #define EM_FT32 222
  299. #define EM_MOXIE 223
  300. #define EM_AMDGPU 224
  301. #define EM_RISCV 243
  302. #define EM_BPF 247
  303. #define EM_NUM 248
  304. #define EM_ALPHA 0x9026
  305. #define EV_NONE 0
  306. #define EV_CURRENT 1
  307. #define EV_NUM 2
  308. typedef struct {
  309. Elf32_Word sh_name;
  310. Elf32_Word sh_type;
  311. Elf32_Word sh_flags;
  312. Elf32_Addr sh_addr;
  313. Elf32_Off sh_offset;
  314. Elf32_Word sh_size;
  315. Elf32_Word sh_link;
  316. Elf32_Word sh_info;
  317. Elf32_Word sh_addralign;
  318. Elf32_Word sh_entsize;
  319. } Elf32_Shdr;
  320. typedef struct {
  321. Elf64_Word sh_name;
  322. Elf64_Word sh_type;
  323. Elf64_Xword sh_flags;
  324. Elf64_Addr sh_addr;
  325. Elf64_Off sh_offset;
  326. Elf64_Xword sh_size;
  327. Elf64_Word sh_link;
  328. Elf64_Word sh_info;
  329. Elf64_Xword sh_addralign;
  330. Elf64_Xword sh_entsize;
  331. } Elf64_Shdr;
  332. #define SHN_UNDEF 0
  333. #define SHN_LORESERVE 0xff00
  334. #define SHN_LOPROC 0xff00
  335. #define SHN_BEFORE 0xff00
  336. #define SHN_AFTER 0xff01
  337. #define SHN_HIPROC 0xff1f
  338. #define SHN_LOOS 0xff20
  339. #define SHN_HIOS 0xff3f
  340. #define SHN_ABS 0xfff1
  341. #define SHN_COMMON 0xfff2
  342. #define SHN_XINDEX 0xffff
  343. #define SHN_HIRESERVE 0xffff
  344. #define SHT_NULL 0
  345. #define SHT_PROGBITS 1
  346. #define SHT_SYMTAB 2
  347. #define SHT_STRTAB 3
  348. #define SHT_RELA 4
  349. #define SHT_HASH 5
  350. #define SHT_DYNAMIC 6
  351. #define SHT_NOTE 7
  352. #define SHT_NOBITS 8
  353. #define SHT_REL 9
  354. #define SHT_SHLIB 10
  355. #define SHT_DYNSYM 11
  356. #define SHT_INIT_ARRAY 14
  357. #define SHT_FINI_ARRAY 15
  358. #define SHT_PREINIT_ARRAY 16
  359. #define SHT_GROUP 17
  360. #define SHT_SYMTAB_SHNDX 18
  361. #define SHT_NUM 19
  362. #define SHT_LOOS 0x60000000
  363. #define SHT_GNU_ATTRIBUTES 0x6ffffff5
  364. #define SHT_GNU_HASH 0x6ffffff6
  365. #define SHT_GNU_LIBLIST 0x6ffffff7
  366. #define SHT_CHECKSUM 0x6ffffff8
  367. #define SHT_LOSUNW 0x6ffffffa
  368. #define SHT_SUNW_move 0x6ffffffa
  369. #define SHT_SUNW_COMDAT 0x6ffffffb
  370. #define SHT_SUNW_syminfo 0x6ffffffc
  371. #define SHT_GNU_verdef 0x6ffffffd
  372. #define SHT_GNU_verneed 0x6ffffffe
  373. #define SHT_GNU_versym 0x6fffffff
  374. #define SHT_HISUNW 0x6fffffff
  375. #define SHT_HIOS 0x6fffffff
  376. #define SHT_LOPROC 0x70000000
  377. #define SHT_HIPROC 0x7fffffff
  378. #define SHT_LOUSER 0x80000000
  379. #define SHT_HIUSER 0x8fffffff
  380. #define SHF_WRITE (1 << 0)
  381. #define SHF_ALLOC (1 << 1)
  382. #define SHF_EXECINSTR (1 << 2)
  383. #define SHF_MERGE (1 << 4)
  384. #define SHF_STRINGS (1 << 5)
  385. #define SHF_INFO_LINK (1 << 6)
  386. #define SHF_LINK_ORDER (1 << 7)
  387. #define SHF_OS_NONCONFORMING (1 << 8)
  388. #define SHF_GROUP (1 << 9)
  389. #define SHF_TLS (1 << 10)
  390. #define SHF_COMPRESSED (1 << 11)
  391. #define SHF_MASKOS 0x0ff00000
  392. #define SHF_MASKPROC 0xf0000000
  393. #define SHF_ORDERED (1 << 30)
  394. #define SHF_EXCLUDE (1U << 31)
  395. typedef struct {
  396. Elf32_Word ch_type;
  397. Elf32_Word ch_size;
  398. Elf32_Word ch_addralign;
  399. } Elf32_Chdr;
  400. typedef struct {
  401. Elf64_Word ch_type;
  402. Elf64_Word ch_reserved;
  403. Elf64_Xword ch_size;
  404. Elf64_Xword ch_addralign;
  405. } Elf64_Chdr;
  406. #define ELFCOMPRESS_ZLIB 1
  407. #define ELFCOMPRESS_LOOS 0x60000000
  408. #define ELFCOMPRESS_HIOS 0x6fffffff
  409. #define ELFCOMPRESS_LOPROC 0x70000000
  410. #define ELFCOMPRESS_HIPROC 0x7fffffff
  411. #define GRP_COMDAT 0x1
  412. typedef struct {
  413. Elf32_Word st_name;
  414. Elf32_Addr st_value;
  415. Elf32_Word st_size;
  416. unsigned char st_info;
  417. unsigned char st_other;
  418. Elf32_Section st_shndx;
  419. } Elf32_Sym;
  420. typedef struct {
  421. Elf64_Word st_name;
  422. unsigned char st_info;
  423. unsigned char st_other;
  424. Elf64_Section st_shndx;
  425. Elf64_Addr st_value;
  426. Elf64_Xword st_size;
  427. } Elf64_Sym;
  428. typedef struct {
  429. Elf32_Half si_boundto;
  430. Elf32_Half si_flags;
  431. } Elf32_Syminfo;
  432. typedef struct {
  433. Elf64_Half si_boundto;
  434. Elf64_Half si_flags;
  435. } Elf64_Syminfo;
  436. #define SYMINFO_BT_SELF 0xffff
  437. #define SYMINFO_BT_PARENT 0xfffe
  438. #define SYMINFO_BT_LOWRESERVE 0xff00
  439. #define SYMINFO_FLG_DIRECT 0x0001
  440. #define SYMINFO_FLG_PASSTHRU 0x0002
  441. #define SYMINFO_FLG_COPY 0x0004
  442. #define SYMINFO_FLG_LAZYLOAD 0x0008
  443. #define SYMINFO_NONE 0
  444. #define SYMINFO_CURRENT 1
  445. #define SYMINFO_NUM 2
  446. #define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4)
  447. #define ELF32_ST_TYPE(val) ((val) & 0xf)
  448. #define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
  449. #define ELF64_ST_BIND(val) ELF32_ST_BIND (val)
  450. #define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val)
  451. #define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type))
  452. #define STB_LOCAL 0
  453. #define STB_GLOBAL 1
  454. #define STB_WEAK 2
  455. #define STB_NUM 3
  456. #define STB_LOOS 10
  457. #define STB_GNU_UNIQUE 10
  458. #define STB_HIOS 12
  459. #define STB_LOPROC 13
  460. #define STB_HIPROC 15
  461. #define STT_NOTYPE 0
  462. #define STT_OBJECT 1
  463. #define STT_FUNC 2
  464. #define STT_SECTION 3
  465. #define STT_FILE 4
  466. #define STT_COMMON 5
  467. #define STT_TLS 6
  468. #define STT_NUM 7
  469. #define STT_LOOS 10
  470. #define STT_GNU_IFUNC 10
  471. #define STT_HIOS 12
  472. #define STT_LOPROC 13
  473. #define STT_HIPROC 15
  474. #define STN_UNDEF 0
  475. #define ELF32_ST_VISIBILITY(o) ((o) & 0x03)
  476. #define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o)
  477. #define STV_DEFAULT 0
  478. #define STV_INTERNAL 1
  479. #define STV_HIDDEN 2
  480. #define STV_PROTECTED 3
  481. typedef struct {
  482. Elf32_Addr r_offset;
  483. Elf32_Word r_info;
  484. } Elf32_Rel;
  485. typedef struct {
  486. Elf64_Addr r_offset;
  487. Elf64_Xword r_info;
  488. } Elf64_Rel;
  489. typedef struct {
  490. Elf32_Addr r_offset;
  491. Elf32_Word r_info;
  492. Elf32_Sword r_addend;
  493. } Elf32_Rela;
  494. typedef struct {
  495. Elf64_Addr r_offset;
  496. Elf64_Xword r_info;
  497. Elf64_Sxword r_addend;
  498. } Elf64_Rela;
  499. #define ELF32_R_SYM(val) ((val) >> 8)
  500. #define ELF32_R_TYPE(val) ((val) & 0xff)
  501. #define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
  502. #define ELF64_R_SYM(i) ((i) >> 32)
  503. #define ELF64_R_TYPE(i) ((i) & 0xffffffff)
  504. #define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type))
  505. typedef struct {
  506. Elf32_Word p_type;
  507. Elf32_Off p_offset;
  508. Elf32_Addr p_vaddr;
  509. Elf32_Addr p_paddr;
  510. Elf32_Word p_filesz;
  511. Elf32_Word p_memsz;
  512. Elf32_Word p_flags;
  513. Elf32_Word p_align;
  514. } Elf32_Phdr;
  515. typedef struct {
  516. Elf64_Word p_type;
  517. Elf64_Word p_flags;
  518. Elf64_Off p_offset;
  519. Elf64_Addr p_vaddr;
  520. Elf64_Addr p_paddr;
  521. Elf64_Xword p_filesz;
  522. Elf64_Xword p_memsz;
  523. Elf64_Xword p_align;
  524. } Elf64_Phdr;
  525. #define PT_NULL 0
  526. #define PT_LOAD 1
  527. #define PT_DYNAMIC 2
  528. #define PT_INTERP 3
  529. #define PT_NOTE 4
  530. #define PT_SHLIB 5
  531. #define PT_PHDR 6
  532. #define PT_TLS 7
  533. #define PT_NUM 8
  534. #define PT_LOOS 0x60000000
  535. #define PT_GNU_EH_FRAME 0x6474e550
  536. #define PT_GNU_STACK 0x6474e551
  537. #define PT_GNU_RELRO 0x6474e552
  538. #define PT_LOSUNW 0x6ffffffa
  539. #define PT_SUNWBSS 0x6ffffffa
  540. #define PT_SUNWSTACK 0x6ffffffb
  541. #define PT_HISUNW 0x6fffffff
  542. #define PT_HIOS 0x6fffffff
  543. #define PT_LOPROC 0x70000000
  544. #define PT_HIPROC 0x7fffffff
  545. #define PN_XNUM 0xffff
  546. #define PF_X (1 << 0)
  547. #define PF_W (1 << 1)
  548. #define PF_R (1 << 2)
  549. #define PF_MASKOS 0x0ff00000
  550. #define PF_MASKPROC 0xf0000000
  551. #define NT_PRSTATUS 1
  552. #define NT_FPREGSET 2
  553. #define NT_PRPSINFO 3
  554. #define NT_PRXREG 4
  555. #define NT_TASKSTRUCT 4
  556. #define NT_PLATFORM 5
  557. #define NT_AUXV 6
  558. #define NT_GWINDOWS 7
  559. #define NT_ASRS 8
  560. #define NT_PSTATUS 10
  561. #define NT_PSINFO 13
  562. #define NT_PRCRED 14
  563. #define NT_UTSNAME 15
  564. #define NT_LWPSTATUS 16
  565. #define NT_LWPSINFO 17
  566. #define NT_PRFPXREG 20
  567. #define NT_SIGINFO 0x53494749
  568. #define NT_FILE 0x46494c45
  569. #define NT_PRXFPREG 0x46e62b7f
  570. #define NT_PPC_VMX 0x100
  571. #define NT_PPC_SPE 0x101
  572. #define NT_PPC_VSX 0x102
  573. #define NT_386_TLS 0x200
  574. #define NT_386_IOPERM 0x201
  575. #define NT_X86_XSTATE 0x202
  576. #define NT_S390_HIGH_GPRS 0x300
  577. #define NT_S390_TIMER 0x301
  578. #define NT_S390_TODCMP 0x302
  579. #define NT_S390_TODPREG 0x303
  580. #define NT_S390_CTRS 0x304
  581. #define NT_S390_PREFIX 0x305
  582. #define NT_S390_LAST_BREAK 0x306
  583. #define NT_S390_SYSTEM_CALL 0x307
  584. #define NT_S390_TDB 0x308
  585. #define NT_ARM_VFP 0x400
  586. #define NT_ARM_TLS 0x401
  587. #define NT_ARM_HW_BREAK 0x402
  588. #define NT_ARM_HW_WATCH 0x403
  589. #define NT_ARM_SYSTEM_CALL 0x404
  590. #define NT_ARM_SVE 0x405
  591. #define NT_METAG_CBUF 0x500
  592. #define NT_METAG_RPIPE 0x501
  593. #define NT_METAG_TLS 0x502
  594. #define NT_VERSION 1
  595. typedef struct {
  596. Elf32_Sword d_tag;
  597. union {
  598. Elf32_Word d_val;
  599. Elf32_Addr d_ptr;
  600. } d_un;
  601. } Elf32_Dyn;
  602. typedef struct {
  603. Elf64_Sxword d_tag;
  604. union {
  605. Elf64_Xword d_val;
  606. Elf64_Addr d_ptr;
  607. } d_un;
  608. } Elf64_Dyn;
  609. #define DT_NULL 0
  610. #define DT_NEEDED 1
  611. #define DT_PLTRELSZ 2
  612. #define DT_PLTGOT 3
  613. #define DT_HASH 4
  614. #define DT_STRTAB 5
  615. #define DT_SYMTAB 6
  616. #define DT_RELA 7
  617. #define DT_RELASZ 8
  618. #define DT_RELAENT 9
  619. #define DT_STRSZ 10
  620. #define DT_SYMENT 11
  621. #define DT_INIT 12
  622. #define DT_FINI 13
  623. #define DT_SONAME 14
  624. #define DT_RPATH 15
  625. #define DT_SYMBOLIC 16
  626. #define DT_REL 17
  627. #define DT_RELSZ 18
  628. #define DT_RELENT 19
  629. #define DT_PLTREL 20
  630. #define DT_DEBUG 21
  631. #define DT_TEXTREL 22
  632. #define DT_JMPREL 23
  633. #define DT_BIND_NOW 24
  634. #define DT_INIT_ARRAY 25
  635. #define DT_FINI_ARRAY 26
  636. #define DT_INIT_ARRAYSZ 27
  637. #define DT_FINI_ARRAYSZ 28
  638. #define DT_RUNPATH 29
  639. #define DT_FLAGS 30
  640. #define DT_ENCODING 32
  641. #define DT_PREINIT_ARRAY 32
  642. #define DT_PREINIT_ARRAYSZ 33
  643. #define DT_NUM 34
  644. #define DT_LOOS 0x6000000d
  645. #define DT_HIOS 0x6ffff000
  646. #define DT_LOPROC 0x70000000
  647. #define DT_HIPROC 0x7fffffff
  648. #define DT_PROCNUM DT_MIPS_NUM
  649. #define DT_VALRNGLO 0x6ffffd00
  650. #define DT_GNU_PRELINKED 0x6ffffdf5
  651. #define DT_GNU_CONFLICTSZ 0x6ffffdf6
  652. #define DT_GNU_LIBLISTSZ 0x6ffffdf7
  653. #define DT_CHECKSUM 0x6ffffdf8
  654. #define DT_PLTPADSZ 0x6ffffdf9
  655. #define DT_MOVEENT 0x6ffffdfa
  656. #define DT_MOVESZ 0x6ffffdfb
  657. #define DT_FEATURE_1 0x6ffffdfc
  658. #define DT_POSFLAG_1 0x6ffffdfd
  659. #define DT_SYMINSZ 0x6ffffdfe
  660. #define DT_SYMINENT 0x6ffffdff
  661. #define DT_VALRNGHI 0x6ffffdff
  662. #define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag))
  663. #define DT_VALNUM 12
  664. #define DT_ADDRRNGLO 0x6ffffe00
  665. #define DT_GNU_HASH 0x6ffffef5
  666. #define DT_TLSDESC_PLT 0x6ffffef6
  667. #define DT_TLSDESC_GOT 0x6ffffef7
  668. #define DT_GNU_CONFLICT 0x6ffffef8
  669. #define DT_GNU_LIBLIST 0x6ffffef9
  670. #define DT_CONFIG 0x6ffffefa
  671. #define DT_DEPAUDIT 0x6ffffefb
  672. #define DT_AUDIT 0x6ffffefc
  673. #define DT_PLTPAD 0x6ffffefd
  674. #define DT_MOVETAB 0x6ffffefe
  675. #define DT_SYMINFO 0x6ffffeff
  676. #define DT_ADDRRNGHI 0x6ffffeff
  677. #define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag))
  678. #define DT_ADDRNUM 11
  679. #define DT_VERSYM 0x6ffffff0
  680. #define DT_RELACOUNT 0x6ffffff9
  681. #define DT_RELCOUNT 0x6ffffffa
  682. #define DT_FLAGS_1 0x6ffffffb
  683. #define DT_VERDEF 0x6ffffffc
  684. #define DT_VERDEFNUM 0x6ffffffd
  685. #define DT_VERNEED 0x6ffffffe
  686. #define DT_VERNEEDNUM 0x6fffffff
  687. #define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag))
  688. #define DT_VERSIONTAGNUM 16
  689. #define DT_AUXILIARY 0x7ffffffd
  690. #define DT_FILTER 0x7fffffff
  691. #define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
  692. #define DT_EXTRANUM 3
  693. #define DF_ORIGIN 0x00000001
  694. #define DF_SYMBOLIC 0x00000002
  695. #define DF_TEXTREL 0x00000004
  696. #define DF_BIND_NOW 0x00000008
  697. #define DF_STATIC_TLS 0x00000010
  698. #define DF_1_NOW 0x00000001
  699. #define DF_1_GLOBAL 0x00000002
  700. #define DF_1_GROUP 0x00000004
  701. #define DF_1_NODELETE 0x00000008
  702. #define DF_1_LOADFLTR 0x00000010
  703. #define DF_1_INITFIRST 0x00000020
  704. #define DF_1_NOOPEN 0x00000040
  705. #define DF_1_ORIGIN 0x00000080
  706. #define DF_1_DIRECT 0x00000100
  707. #define DF_1_TRANS 0x00000200
  708. #define DF_1_INTERPOSE 0x00000400
  709. #define DF_1_NODEFLIB 0x00000800
  710. #define DF_1_NODUMP 0x00001000
  711. #define DF_1_CONFALT 0x00002000
  712. #define DF_1_ENDFILTEE 0x00004000
  713. #define DF_1_DISPRELDNE 0x00008000
  714. #define DF_1_DISPRELPND 0x00010000
  715. #define DF_1_NODIRECT 0x00020000
  716. #define DF_1_IGNMULDEF 0x00040000
  717. #define DF_1_NOKSYMS 0x00080000
  718. #define DF_1_NOHDR 0x00100000
  719. #define DF_1_EDITED 0x00200000
  720. #define DF_1_NORELOC 0x00400000
  721. #define DF_1_SYMINTPOSE 0x00800000
  722. #define DF_1_GLOBAUDIT 0x01000000
  723. #define DF_1_SINGLETON 0x02000000
  724. #define DTF_1_PARINIT 0x00000001
  725. #define DTF_1_CONFEXP 0x00000002
  726. #define DF_P1_LAZYLOAD 0x00000001
  727. #define DF_P1_GROUPPERM 0x00000002
  728. typedef struct {
  729. Elf32_Half vd_version;
  730. Elf32_Half vd_flags;
  731. Elf32_Half vd_ndx;
  732. Elf32_Half vd_cnt;
  733. Elf32_Word vd_hash;
  734. Elf32_Word vd_aux;
  735. Elf32_Word vd_next;
  736. } Elf32_Verdef;
  737. typedef struct {
  738. Elf64_Half vd_version;
  739. Elf64_Half vd_flags;
  740. Elf64_Half vd_ndx;
  741. Elf64_Half vd_cnt;
  742. Elf64_Word vd_hash;
  743. Elf64_Word vd_aux;
  744. Elf64_Word vd_next;
  745. } Elf64_Verdef;
  746. #define VER_DEF_NONE 0
  747. #define VER_DEF_CURRENT 1
  748. #define VER_DEF_NUM 2
  749. #define VER_FLG_BASE 0x1
  750. #define VER_FLG_WEAK 0x2
  751. #define VER_NDX_LOCAL 0
  752. #define VER_NDX_GLOBAL 1
  753. #define VER_NDX_LORESERVE 0xff00
  754. #define VER_NDX_ELIMINATE 0xff01
  755. typedef struct {
  756. Elf32_Word vda_name;
  757. Elf32_Word vda_next;
  758. } Elf32_Verdaux;
  759. typedef struct {
  760. Elf64_Word vda_name;
  761. Elf64_Word vda_next;
  762. } Elf64_Verdaux;
  763. typedef struct {
  764. Elf32_Half vn_version;
  765. Elf32_Half vn_cnt;
  766. Elf32_Word vn_file;
  767. Elf32_Word vn_aux;
  768. Elf32_Word vn_next;
  769. } Elf32_Verneed;
  770. typedef struct {
  771. Elf64_Half vn_version;
  772. Elf64_Half vn_cnt;
  773. Elf64_Word vn_file;
  774. Elf64_Word vn_aux;
  775. Elf64_Word vn_next;
  776. } Elf64_Verneed;
  777. #define VER_NEED_NONE 0
  778. #define VER_NEED_CURRENT 1
  779. #define VER_NEED_NUM 2
  780. typedef struct {
  781. Elf32_Word vna_hash;
  782. Elf32_Half vna_flags;
  783. Elf32_Half vna_other;
  784. Elf32_Word vna_name;
  785. Elf32_Word vna_next;
  786. } Elf32_Vernaux;
  787. typedef struct {
  788. Elf64_Word vna_hash;
  789. Elf64_Half vna_flags;
  790. Elf64_Half vna_other;
  791. Elf64_Word vna_name;
  792. Elf64_Word vna_next;
  793. } Elf64_Vernaux;
  794. #define VER_FLG_WEAK 0x2
  795. typedef struct {
  796. uint32_t a_type;
  797. union {
  798. uint32_t a_val;
  799. } a_un;
  800. } Elf32_auxv_t;
  801. typedef struct {
  802. uint64_t a_type;
  803. union {
  804. uint64_t a_val;
  805. } a_un;
  806. } Elf64_auxv_t;
  807. #define AT_NULL 0
  808. #define AT_IGNORE 1
  809. #define AT_EXECFD 2
  810. #define AT_PHDR 3
  811. #define AT_PHENT 4
  812. #define AT_PHNUM 5
  813. #define AT_PAGESZ 6
  814. #define AT_BASE 7
  815. #define AT_FLAGS 8
  816. #define AT_ENTRY 9
  817. #define AT_NOTELF 10
  818. #define AT_UID 11
  819. #define AT_EUID 12
  820. #define AT_GID 13
  821. #define AT_EGID 14
  822. #define AT_CLKTCK 17
  823. #define AT_PLATFORM 15
  824. #define AT_HWCAP 16
  825. #define AT_FPUCW 18
  826. #define AT_DCACHEBSIZE 19
  827. #define AT_ICACHEBSIZE 20
  828. #define AT_UCACHEBSIZE 21
  829. #define AT_IGNOREPPC 22
  830. #define AT_SECURE 23
  831. #define AT_BASE_PLATFORM 24
  832. #define AT_RANDOM 25
  833. #define AT_HWCAP2 26
  834. #define AT_EXECFN 31
  835. #define AT_SYSINFO 32
  836. #define AT_SYSINFO_EHDR 33
  837. #define AT_L1I_CACHESHAPE 34
  838. #define AT_L1D_CACHESHAPE 35
  839. #define AT_L2_CACHESHAPE 36
  840. #define AT_L3_CACHESHAPE 37
  841. typedef struct {
  842. Elf32_Word n_namesz;
  843. Elf32_Word n_descsz;
  844. Elf32_Word n_type;
  845. } Elf32_Nhdr;
  846. typedef struct {
  847. Elf64_Word n_namesz;
  848. Elf64_Word n_descsz;
  849. Elf64_Word n_type;
  850. } Elf64_Nhdr;
  851. #define ELF_NOTE_SOLARIS "SUNW Solaris"
  852. #define ELF_NOTE_GNU "GNU"
  853. #define ELF_NOTE_PAGESIZE_HINT 1
  854. #define NT_GNU_ABI_TAG 1
  855. #define ELF_NOTE_ABI NT_GNU_ABI_TAG
  856. #define ELF_NOTE_OS_LINUX 0
  857. #define ELF_NOTE_OS_GNU 1
  858. #define ELF_NOTE_OS_SOLARIS2 2
  859. #define ELF_NOTE_OS_FREEBSD 3
  860. #define NT_GNU_BUILD_ID 3
  861. #define NT_GNU_GOLD_VERSION 4
  862. typedef struct {
  863. Elf32_Xword m_value;
  864. Elf32_Word m_info;
  865. Elf32_Word m_poffset;
  866. Elf32_Half m_repeat;
  867. Elf32_Half m_stride;
  868. } Elf32_Move;
  869. typedef struct {
  870. Elf64_Xword m_value;
  871. Elf64_Xword m_info;
  872. Elf64_Xword m_poffset;
  873. Elf64_Half m_repeat;
  874. Elf64_Half m_stride;
  875. } Elf64_Move;
  876. #define ELF32_M_SYM(info) ((info) >> 8)
  877. #define ELF32_M_SIZE(info) ((unsigned char) (info))
  878. #define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size))
  879. #define ELF64_M_SYM(info) ELF32_M_SYM (info)
  880. #define ELF64_M_SIZE(info) ELF32_M_SIZE (info)
  881. #define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size)
  882. #define EF_CPU32 0x00810000
  883. #define R_68K_NONE 0
  884. #define R_68K_32 1
  885. #define R_68K_16 2
  886. #define R_68K_8 3
  887. #define R_68K_PC32 4
  888. #define R_68K_PC16 5
  889. #define R_68K_PC8 6
  890. #define R_68K_GOT32 7
  891. #define R_68K_GOT16 8
  892. #define R_68K_GOT8 9
  893. #define R_68K_GOT32O 10
  894. #define R_68K_GOT16O 11
  895. #define R_68K_GOT8O 12
  896. #define R_68K_PLT32 13
  897. #define R_68K_PLT16 14
  898. #define R_68K_PLT8 15
  899. #define R_68K_PLT32O 16
  900. #define R_68K_PLT16O 17
  901. #define R_68K_PLT8O 18
  902. #define R_68K_COPY 19
  903. #define R_68K_GLOB_DAT 20
  904. #define R_68K_JMP_SLOT 21
  905. #define R_68K_RELATIVE 22
  906. #define R_68K_NUM 23
  907. #define R_386_NONE 0
  908. #define R_386_32 1
  909. #define R_386_PC32 2
  910. #define R_386_GOT32 3
  911. #define R_386_PLT32 4
  912. #define R_386_COPY 5
  913. #define R_386_GLOB_DAT 6
  914. #define R_386_JMP_SLOT 7
  915. #define R_386_RELATIVE 8
  916. #define R_386_GOTOFF 9
  917. #define R_386_GOTPC 10
  918. #define R_386_32PLT 11
  919. #define R_386_TLS_TPOFF 14
  920. #define R_386_TLS_IE 15
  921. #define R_386_TLS_GOTIE 16
  922. #define R_386_TLS_LE 17
  923. #define R_386_TLS_GD 18
  924. #define R_386_TLS_LDM 19
  925. #define R_386_16 20
  926. #define R_386_PC16 21
  927. #define R_386_8 22
  928. #define R_386_PC8 23
  929. #define R_386_TLS_GD_32 24
  930. #define R_386_TLS_GD_PUSH 25
  931. #define R_386_TLS_GD_CALL 26
  932. #define R_386_TLS_GD_POP 27
  933. #define R_386_TLS_LDM_32 28
  934. #define R_386_TLS_LDM_PUSH 29
  935. #define R_386_TLS_LDM_CALL 30
  936. #define R_386_TLS_LDM_POP 31
  937. #define R_386_TLS_LDO_32 32
  938. #define R_386_TLS_IE_32 33
  939. #define R_386_TLS_LE_32 34
  940. #define R_386_TLS_DTPMOD32 35
  941. #define R_386_TLS_DTPOFF32 36
  942. #define R_386_TLS_TPOFF32 37
  943. #define R_386_SIZE32 38
  944. #define R_386_TLS_GOTDESC 39
  945. #define R_386_TLS_DESC_CALL 40
  946. #define R_386_TLS_DESC 41
  947. #define R_386_IRELATIVE 42
  948. #define R_386_GOT32X 43
  949. #define R_386_NUM 44
  950. #define STT_SPARC_REGISTER 13
  951. #define EF_SPARCV9_MM 3
  952. #define EF_SPARCV9_TSO 0
  953. #define EF_SPARCV9_PSO 1
  954. #define EF_SPARCV9_RMO 2
  955. #define EF_SPARC_LEDATA 0x800000
  956. #define EF_SPARC_EXT_MASK 0xFFFF00
  957. #define EF_SPARC_32PLUS 0x000100
  958. #define EF_SPARC_SUN_US1 0x000200
  959. #define EF_SPARC_HAL_R1 0x000400
  960. #define EF_SPARC_SUN_US3 0x000800
  961. #define R_SPARC_NONE 0
  962. #define R_SPARC_8 1
  963. #define R_SPARC_16 2
  964. #define R_SPARC_32 3
  965. #define R_SPARC_DISP8 4
  966. #define R_SPARC_DISP16 5
  967. #define R_SPARC_DISP32 6
  968. #define R_SPARC_WDISP30 7
  969. #define R_SPARC_WDISP22 8
  970. #define R_SPARC_HI22 9
  971. #define R_SPARC_22 10
  972. #define R_SPARC_13 11
  973. #define R_SPARC_LO10 12
  974. #define R_SPARC_GOT10 13
  975. #define R_SPARC_GOT13 14
  976. #define R_SPARC_GOT22 15
  977. #define R_SPARC_PC10 16
  978. #define R_SPARC_PC22 17
  979. #define R_SPARC_WPLT30 18
  980. #define R_SPARC_COPY 19
  981. #define R_SPARC_GLOB_DAT 20
  982. #define R_SPARC_JMP_SLOT 21
  983. #define R_SPARC_RELATIVE 22
  984. #define R_SPARC_UA32 23
  985. #define R_SPARC_PLT32 24
  986. #define R_SPARC_HIPLT22 25
  987. #define R_SPARC_LOPLT10 26
  988. #define R_SPARC_PCPLT32 27
  989. #define R_SPARC_PCPLT22 28
  990. #define R_SPARC_PCPLT10 29
  991. #define R_SPARC_10 30
  992. #define R_SPARC_11 31
  993. #define R_SPARC_64 32
  994. #define R_SPARC_OLO10 33
  995. #define R_SPARC_HH22 34
  996. #define R_SPARC_HM10 35
  997. #define R_SPARC_LM22 36
  998. #define R_SPARC_PC_HH22 37
  999. #define R_SPARC_PC_HM10 38
  1000. #define R_SPARC_PC_LM22 39
  1001. #define R_SPARC_WDISP16 40
  1002. #define R_SPARC_WDISP19 41
  1003. #define R_SPARC_GLOB_JMP 42
  1004. #define R_SPARC_7 43
  1005. #define R_SPARC_5 44
  1006. #define R_SPARC_6 45
  1007. #define R_SPARC_DISP64 46
  1008. #define R_SPARC_PLT64 47
  1009. #define R_SPARC_HIX22 48
  1010. #define R_SPARC_LOX10 49
  1011. #define R_SPARC_H44 50
  1012. #define R_SPARC_M44 51
  1013. #define R_SPARC_L44 52
  1014. #define R_SPARC_REGISTER 53
  1015. #define R_SPARC_UA64 54
  1016. #define R_SPARC_UA16 55
  1017. #define R_SPARC_TLS_GD_HI22 56
  1018. #define R_SPARC_TLS_GD_LO10 57
  1019. #define R_SPARC_TLS_GD_ADD 58
  1020. #define R_SPARC_TLS_GD_CALL 59
  1021. #define R_SPARC_TLS_LDM_HI22 60
  1022. #define R_SPARC_TLS_LDM_LO10 61
  1023. #define R_SPARC_TLS_LDM_ADD 62
  1024. #define R_SPARC_TLS_LDM_CALL 63
  1025. #define R_SPARC_TLS_LDO_HIX22 64
  1026. #define R_SPARC_TLS_LDO_LOX10 65
  1027. #define R_SPARC_TLS_LDO_ADD 66
  1028. #define R_SPARC_TLS_IE_HI22 67
  1029. #define R_SPARC_TLS_IE_LO10 68
  1030. #define R_SPARC_TLS_IE_LD 69
  1031. #define R_SPARC_TLS_IE_LDX 70
  1032. #define R_SPARC_TLS_IE_ADD 71
  1033. #define R_SPARC_TLS_LE_HIX22 72
  1034. #define R_SPARC_TLS_LE_LOX10 73
  1035. #define R_SPARC_TLS_DTPMOD32 74
  1036. #define R_SPARC_TLS_DTPMOD64 75
  1037. #define R_SPARC_TLS_DTPOFF32 76
  1038. #define R_SPARC_TLS_DTPOFF64 77
  1039. #define R_SPARC_TLS_TPOFF32 78
  1040. #define R_SPARC_TLS_TPOFF64 79
  1041. #define R_SPARC_GOTDATA_HIX22 80
  1042. #define R_SPARC_GOTDATA_LOX10 81
  1043. #define R_SPARC_GOTDATA_OP_HIX22 82
  1044. #define R_SPARC_GOTDATA_OP_LOX10 83
  1045. #define R_SPARC_GOTDATA_OP 84
  1046. #define R_SPARC_H34 85
  1047. #define R_SPARC_SIZE32 86
  1048. #define R_SPARC_SIZE64 87
  1049. #define R_SPARC_GNU_VTINHERIT 250
  1050. #define R_SPARC_GNU_VTENTRY 251
  1051. #define R_SPARC_REV32 252
  1052. #define R_SPARC_NUM 253
  1053. #define DT_SPARC_REGISTER 0x70000001
  1054. #define DT_SPARC_NUM 2
  1055. #define EF_MIPS_NOREORDER 1
  1056. #define EF_MIPS_PIC 2
  1057. #define EF_MIPS_CPIC 4
  1058. #define EF_MIPS_XGOT 8
  1059. #define EF_MIPS_64BIT_WHIRL 16
  1060. #define EF_MIPS_ABI2 32
  1061. #define EF_MIPS_ABI_ON32 64
  1062. #define EF_MIPS_FP64 512
  1063. #define EF_MIPS_NAN2008 1024
  1064. #define EF_MIPS_ARCH 0xf0000000
  1065. #define EF_MIPS_ARCH_1 0x00000000
  1066. #define EF_MIPS_ARCH_2 0x10000000
  1067. #define EF_MIPS_ARCH_3 0x20000000
  1068. #define EF_MIPS_ARCH_4 0x30000000
  1069. #define EF_MIPS_ARCH_5 0x40000000
  1070. #define EF_MIPS_ARCH_32 0x50000000
  1071. #define EF_MIPS_ARCH_64 0x60000000
  1072. #define EF_MIPS_ARCH_32R2 0x70000000
  1073. #define EF_MIPS_ARCH_64R2 0x80000000
  1074. #define E_MIPS_ARCH_1 0x00000000
  1075. #define E_MIPS_ARCH_2 0x10000000
  1076. #define E_MIPS_ARCH_3 0x20000000
  1077. #define E_MIPS_ARCH_4 0x30000000
  1078. #define E_MIPS_ARCH_5 0x40000000
  1079. #define E_MIPS_ARCH_32 0x50000000
  1080. #define E_MIPS_ARCH_64 0x60000000
  1081. #define SHN_MIPS_ACOMMON 0xff00
  1082. #define SHN_MIPS_TEXT 0xff01
  1083. #define SHN_MIPS_DATA 0xff02
  1084. #define SHN_MIPS_SCOMMON 0xff03
  1085. #define SHN_MIPS_SUNDEFINED 0xff04
  1086. #define SHT_MIPS_LIBLIST 0x70000000
  1087. #define SHT_MIPS_MSYM 0x70000001
  1088. #define SHT_MIPS_CONFLICT 0x70000002
  1089. #define SHT_MIPS_GPTAB 0x70000003
  1090. #define SHT_MIPS_UCODE 0x70000004
  1091. #define SHT_MIPS_DEBUG 0x70000005
  1092. #define SHT_MIPS_REGINFO 0x70000006
  1093. #define SHT_MIPS_PACKAGE 0x70000007
  1094. #define SHT_MIPS_PACKSYM 0x70000008
  1095. #define SHT_MIPS_RELD 0x70000009
  1096. #define SHT_MIPS_IFACE 0x7000000b
  1097. #define SHT_MIPS_CONTENT 0x7000000c
  1098. #define SHT_MIPS_OPTIONS 0x7000000d
  1099. #define SHT_MIPS_SHDR 0x70000010
  1100. #define SHT_MIPS_FDESC 0x70000011
  1101. #define SHT_MIPS_EXTSYM 0x70000012
  1102. #define SHT_MIPS_DENSE 0x70000013
  1103. #define SHT_MIPS_PDESC 0x70000014
  1104. #define SHT_MIPS_LOCSYM 0x70000015
  1105. #define SHT_MIPS_AUXSYM 0x70000016
  1106. #define SHT_MIPS_OPTSYM 0x70000017
  1107. #define SHT_MIPS_LOCSTR 0x70000018
  1108. #define SHT_MIPS_LINE 0x70000019
  1109. #define SHT_MIPS_RFDESC 0x7000001a
  1110. #define SHT_MIPS_DELTASYM 0x7000001b
  1111. #define SHT_MIPS_DELTAINST 0x7000001c
  1112. #define SHT_MIPS_DELTACLASS 0x7000001d
  1113. #define SHT_MIPS_DWARF 0x7000001e
  1114. #define SHT_MIPS_DELTADECL 0x7000001f
  1115. #define SHT_MIPS_SYMBOL_LIB 0x70000020
  1116. #define SHT_MIPS_EVENTS 0x70000021
  1117. #define SHT_MIPS_TRANSLATE 0x70000022
  1118. #define SHT_MIPS_PIXIE 0x70000023
  1119. #define SHT_MIPS_XLATE 0x70000024
  1120. #define SHT_MIPS_XLATE_DEBUG 0x70000025
  1121. #define SHT_MIPS_WHIRL 0x70000026
  1122. #define SHT_MIPS_EH_REGION 0x70000027
  1123. #define SHT_MIPS_XLATE_OLD 0x70000028
  1124. #define SHT_MIPS_PDR_EXCEPTION 0x70000029
  1125. #define SHF_MIPS_GPREL 0x10000000
  1126. #define SHF_MIPS_MERGE 0x20000000
  1127. #define SHF_MIPS_ADDR 0x40000000
  1128. #define SHF_MIPS_STRINGS 0x80000000
  1129. #define SHF_MIPS_NOSTRIP 0x08000000
  1130. #define SHF_MIPS_LOCAL 0x04000000
  1131. #define SHF_MIPS_NAMES 0x02000000
  1132. #define SHF_MIPS_NODUPE 0x01000000
  1133. #define STO_MIPS_DEFAULT 0x0
  1134. #define STO_MIPS_INTERNAL 0x1
  1135. #define STO_MIPS_HIDDEN 0x2
  1136. #define STO_MIPS_PROTECTED 0x3
  1137. #define STO_MIPS_PLT 0x8
  1138. #define STO_MIPS_SC_ALIGN_UNUSED 0xff
  1139. #define STB_MIPS_SPLIT_COMMON 13
  1140. typedef union {
  1141. struct {
  1142. Elf32_Word gt_current_g_value;
  1143. Elf32_Word gt_unused;
  1144. } gt_header;
  1145. struct {
  1146. Elf32_Word gt_g_value;
  1147. Elf32_Word gt_bytes;
  1148. } gt_entry;
  1149. } Elf32_gptab;
  1150. typedef struct {
  1151. Elf32_Word ri_gprmask;
  1152. Elf32_Word ri_cprmask[4];
  1153. Elf32_Sword ri_gp_value;
  1154. } Elf32_RegInfo;
  1155. typedef struct {
  1156. unsigned char kind;
  1157. unsigned char size;
  1158. Elf32_Section section;
  1159. Elf32_Word info;
  1160. } Elf_Options;
  1161. #define ODK_NULL 0
  1162. #define ODK_REGINFO 1
  1163. #define ODK_EXCEPTIONS 2
  1164. #define ODK_PAD 3
  1165. #define ODK_HWPATCH 4
  1166. #define ODK_FILL 5
  1167. #define ODK_TAGS 6
  1168. #define ODK_HWAND 7
  1169. #define ODK_HWOR 8
  1170. #define OEX_FPU_MIN 0x1f
  1171. #define OEX_FPU_MAX 0x1f00
  1172. #define OEX_PAGE0 0x10000
  1173. #define OEX_SMM 0x20000
  1174. #define OEX_FPDBUG 0x40000
  1175. #define OEX_PRECISEFP OEX_FPDBUG
  1176. #define OEX_DISMISS 0x80000
  1177. #define OEX_FPU_INVAL 0x10
  1178. #define OEX_FPU_DIV0 0x08
  1179. #define OEX_FPU_OFLO 0x04
  1180. #define OEX_FPU_UFLO 0x02
  1181. #define OEX_FPU_INEX 0x01
  1182. #define OHW_R4KEOP 0x1
  1183. #define OHW_R8KPFETCH 0x2
  1184. #define OHW_R5KEOP 0x4
  1185. #define OHW_R5KCVTL 0x8
  1186. #define OPAD_PREFIX 0x1
  1187. #define OPAD_POSTFIX 0x2
  1188. #define OPAD_SYMBOL 0x4
  1189. typedef struct {
  1190. Elf32_Word hwp_flags1;
  1191. Elf32_Word hwp_flags2;
  1192. } Elf_Options_Hw;
  1193. #define OHWA0_R4KEOP_CHECKED 0x00000001
  1194. #define OHWA1_R4KEOP_CLEAN 0x00000002
  1195. #define R_MIPS_NONE 0
  1196. #define R_MIPS_16 1
  1197. #define R_MIPS_32 2
  1198. #define R_MIPS_REL32 3
  1199. #define R_MIPS_26 4
  1200. #define R_MIPS_HI16 5
  1201. #define R_MIPS_LO16 6
  1202. #define R_MIPS_GPREL16 7
  1203. #define R_MIPS_LITERAL 8
  1204. #define R_MIPS_GOT16 9
  1205. #define R_MIPS_PC16 10
  1206. #define R_MIPS_CALL16 11
  1207. #define R_MIPS_GPREL32 12
  1208. #define R_MIPS_SHIFT5 16
  1209. #define R_MIPS_SHIFT6 17
  1210. #define R_MIPS_64 18
  1211. #define R_MIPS_GOT_DISP 19
  1212. #define R_MIPS_GOT_PAGE 20
  1213. #define R_MIPS_GOT_OFST 21
  1214. #define R_MIPS_GOT_HI16 22
  1215. #define R_MIPS_GOT_LO16 23
  1216. #define R_MIPS_SUB 24
  1217. #define R_MIPS_INSERT_A 25
  1218. #define R_MIPS_INSERT_B 26
  1219. #define R_MIPS_DELETE 27
  1220. #define R_MIPS_HIGHER 28
  1221. #define R_MIPS_HIGHEST 29
  1222. #define R_MIPS_CALL_HI16 30
  1223. #define R_MIPS_CALL_LO16 31
  1224. #define R_MIPS_SCN_DISP 32
  1225. #define R_MIPS_REL16 33
  1226. #define R_MIPS_ADD_IMMEDIATE 34
  1227. #define R_MIPS_PJUMP 35
  1228. #define R_MIPS_RELGOT 36
  1229. #define R_MIPS_JALR 37
  1230. #define R_MIPS_TLS_DTPMOD32 38
  1231. #define R_MIPS_TLS_DTPREL32 39
  1232. #define R_MIPS_TLS_DTPMOD64 40
  1233. #define R_MIPS_TLS_DTPREL64 41
  1234. #define R_MIPS_TLS_GD 42
  1235. #define R_MIPS_TLS_LDM 43
  1236. #define R_MIPS_TLS_DTPREL_HI16 44
  1237. #define R_MIPS_TLS_DTPREL_LO16 45
  1238. #define R_MIPS_TLS_GOTTPREL 46
  1239. #define R_MIPS_TLS_TPREL32 47
  1240. #define R_MIPS_TLS_TPREL64 48
  1241. #define R_MIPS_TLS_TPREL_HI16 49
  1242. #define R_MIPS_TLS_TPREL_LO16 50
  1243. #define R_MIPS_GLOB_DAT 51
  1244. #define R_MIPS_COPY 126
  1245. #define R_MIPS_JUMP_SLOT 127
  1246. #define R_MIPS_NUM 128
  1247. #define PT_MIPS_REGINFO 0x70000000
  1248. #define PT_MIPS_RTPROC 0x70000001
  1249. #define PT_MIPS_OPTIONS 0x70000002
  1250. #define PT_MIPS_ABIFLAGS 0x70000003
  1251. #define PF_MIPS_LOCAL 0x10000000
  1252. #define DT_MIPS_RLD_VERSION 0x70000001
  1253. #define DT_MIPS_TIME_STAMP 0x70000002
  1254. #define DT_MIPS_ICHECKSUM 0x70000003
  1255. #define DT_MIPS_IVERSION 0x70000004
  1256. #define DT_MIPS_FLAGS 0x70000005
  1257. #define DT_MIPS_BASE_ADDRESS 0x70000006
  1258. #define DT_MIPS_MSYM 0x70000007
  1259. #define DT_MIPS_CONFLICT 0x70000008
  1260. #define DT_MIPS_LIBLIST 0x70000009
  1261. #define DT_MIPS_LOCAL_GOTNO 0x7000000a
  1262. #define DT_MIPS_CONFLICTNO 0x7000000b
  1263. #define DT_MIPS_LIBLISTNO 0x70000010
  1264. #define DT_MIPS_SYMTABNO 0x70000011
  1265. #define DT_MIPS_UNREFEXTNO 0x70000012
  1266. #define DT_MIPS_GOTSYM 0x70000013
  1267. #define DT_MIPS_HIPAGENO 0x70000014
  1268. #define DT_MIPS_RLD_MAP 0x70000016
  1269. #define DT_MIPS_DELTA_CLASS 0x70000017
  1270. #define DT_MIPS_DELTA_CLASS_NO 0x70000018
  1271. #define DT_MIPS_DELTA_INSTANCE 0x70000019
  1272. #define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a
  1273. #define DT_MIPS_DELTA_RELOC 0x7000001b
  1274. #define DT_MIPS_DELTA_RELOC_NO 0x7000001c
  1275. #define DT_MIPS_DELTA_SYM 0x7000001d
  1276. #define DT_MIPS_DELTA_SYM_NO 0x7000001e
  1277. #define DT_MIPS_DELTA_CLASSSYM 0x70000020
  1278. #define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021
  1279. #define DT_MIPS_CXX_FLAGS 0x70000022
  1280. #define DT_MIPS_PIXIE_INIT 0x70000023
  1281. #define DT_MIPS_SYMBOL_LIB 0x70000024
  1282. #define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
  1283. #define DT_MIPS_LOCAL_GOTIDX 0x70000026
  1284. #define DT_MIPS_HIDDEN_GOTIDX 0x70000027
  1285. #define DT_MIPS_PROTECTED_GOTIDX 0x70000028
  1286. #define DT_MIPS_OPTIONS 0x70000029
  1287. #define DT_MIPS_INTERFACE 0x7000002a
  1288. #define DT_MIPS_DYNSTR_ALIGN 0x7000002b
  1289. #define DT_MIPS_INTERFACE_SIZE 0x7000002c
  1290. #define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d
  1291. #define DT_MIPS_PERF_SUFFIX 0x7000002e
  1292. #define DT_MIPS_COMPACT_SIZE 0x7000002f
  1293. #define DT_MIPS_GP_VALUE 0x70000030
  1294. #define DT_MIPS_AUX_DYNAMIC 0x70000031
  1295. #define DT_MIPS_PLTGOT 0x70000032
  1296. #define DT_MIPS_RWPLT 0x70000034
  1297. #define DT_MIPS_RLD_MAP_REL 0x70000035
  1298. #define DT_MIPS_NUM 0x36
  1299. #define RHF_NONE 0
  1300. #define RHF_QUICKSTART (1 << 0)
  1301. #define RHF_NOTPOT (1 << 1)
  1302. #define RHF_NO_LIBRARY_REPLACEMENT (1 << 2)
  1303. #define RHF_NO_MOVE (1 << 3)
  1304. #define RHF_SGI_ONLY (1 << 4)
  1305. #define RHF_GUARANTEE_INIT (1 << 5)
  1306. #define RHF_DELTA_C_PLUS_PLUS (1 << 6)
  1307. #define RHF_GUARANTEE_START_INIT (1 << 7)
  1308. #define RHF_PIXIE (1 << 8)
  1309. #define RHF_DEFAULT_DELAY_LOAD (1 << 9)
  1310. #define RHF_REQUICKSTART (1 << 10)
  1311. #define RHF_REQUICKSTARTED (1 << 11)
  1312. #define RHF_CORD (1 << 12)
  1313. #define RHF_NO_UNRES_UNDEF (1 << 13)
  1314. #define RHF_RLD_ORDER_SAFE (1 << 14)
  1315. typedef struct {
  1316. Elf32_Word l_name;
  1317. Elf32_Word l_time_stamp;
  1318. Elf32_Word l_checksum;
  1319. Elf32_Word l_version;
  1320. Elf32_Word l_flags;
  1321. } Elf32_Lib;
  1322. typedef struct {
  1323. Elf64_Word l_name;
  1324. Elf64_Word l_time_stamp;
  1325. Elf64_Word l_checksum;
  1326. Elf64_Word l_version;
  1327. Elf64_Word l_flags;
  1328. } Elf64_Lib;
  1329. #define LL_NONE 0
  1330. #define LL_EXACT_MATCH (1 << 0)
  1331. #define LL_IGNORE_INT_VER (1 << 1)
  1332. #define LL_REQUIRE_MINOR (1 << 2)
  1333. #define LL_EXPORTS (1 << 3)
  1334. #define LL_DELAY_LOAD (1 << 4)
  1335. #define LL_DELTA (1 << 5)
  1336. typedef Elf32_Addr Elf32_Conflict;
  1337. typedef struct {
  1338. Elf32_Half version;
  1339. unsigned char isa_level;
  1340. unsigned char isa_rev;
  1341. unsigned char gpr_size;
  1342. unsigned char cpr1_size;
  1343. unsigned char cpr2_size;
  1344. unsigned char fp_abi;
  1345. Elf32_Word isa_ext;
  1346. Elf32_Word ases;
  1347. Elf32_Word flags1;
  1348. Elf32_Word flags2;
  1349. } Elf_MIPS_ABIFlags_v0;
  1350. #define MIPS_AFL_REG_NONE 0x00
  1351. #define MIPS_AFL_REG_32 0x01
  1352. #define MIPS_AFL_REG_64 0x02
  1353. #define MIPS_AFL_REG_128 0x03
  1354. #define MIPS_AFL_ASE_DSP 0x00000001
  1355. #define MIPS_AFL_ASE_DSPR2 0x00000002
  1356. #define MIPS_AFL_ASE_EVA 0x00000004
  1357. #define MIPS_AFL_ASE_MCU 0x00000008
  1358. #define MIPS_AFL_ASE_MDMX 0x00000010
  1359. #define MIPS_AFL_ASE_MIPS3D 0x00000020
  1360. #define MIPS_AFL_ASE_MT 0x00000040
  1361. #define MIPS_AFL_ASE_SMARTMIPS 0x00000080
  1362. #define MIPS_AFL_ASE_VIRT 0x00000100
  1363. #define MIPS_AFL_ASE_MSA 0x00000200
  1364. #define MIPS_AFL_ASE_MIPS16 0x00000400
  1365. #define MIPS_AFL_ASE_MICROMIPS 0x00000800
  1366. #define MIPS_AFL_ASE_XPA 0x00001000
  1367. #define MIPS_AFL_ASE_MASK 0x00001fff
  1368. #define MIPS_AFL_EXT_XLR 1
  1369. #define MIPS_AFL_EXT_OCTEON2 2
  1370. #define MIPS_AFL_EXT_OCTEONP 3
  1371. #define MIPS_AFL_EXT_LOONGSON_3A 4
  1372. #define MIPS_AFL_EXT_OCTEON 5
  1373. #define MIPS_AFL_EXT_5900 6
  1374. #define MIPS_AFL_EXT_4650 7
  1375. #define MIPS_AFL_EXT_4010 8
  1376. #define MIPS_AFL_EXT_4100 9
  1377. #define MIPS_AFL_EXT_3900 10
  1378. #define MIPS_AFL_EXT_10000 11
  1379. #define MIPS_AFL_EXT_SB1 12
  1380. #define MIPS_AFL_EXT_4111 13
  1381. #define MIPS_AFL_EXT_4120 14
  1382. #define MIPS_AFL_EXT_5400 15
  1383. #define MIPS_AFL_EXT_5500 16
  1384. #define MIPS_AFL_EXT_LOONGSON_2E 17
  1385. #define MIPS_AFL_EXT_LOONGSON_2F 18
  1386. #define MIPS_AFL_FLAGS1_ODDSPREG 1
  1387. enum
  1388. {
  1389. Val_GNU_MIPS_ABI_FP_ANY = 0,
  1390. Val_GNU_MIPS_ABI_FP_DOUBLE = 1,
  1391. Val_GNU_MIPS_ABI_FP_SINGLE = 2,
  1392. Val_GNU_MIPS_ABI_FP_SOFT = 3,
  1393. Val_GNU_MIPS_ABI_FP_OLD_64 = 4,
  1394. Val_GNU_MIPS_ABI_FP_XX = 5,
  1395. Val_GNU_MIPS_ABI_FP_64 = 6,
  1396. Val_GNU_MIPS_ABI_FP_64A = 7,
  1397. Val_GNU_MIPS_ABI_FP_MAX = 7
  1398. };
  1399. #define EF_PARISC_TRAPNIL 0x00010000
  1400. #define EF_PARISC_EXT 0x00020000
  1401. #define EF_PARISC_LSB 0x00040000
  1402. #define EF_PARISC_WIDE 0x00080000
  1403. #define EF_PARISC_NO_KABP 0x00100000
  1404. #define EF_PARISC_LAZYSWAP 0x00400000
  1405. #define EF_PARISC_ARCH 0x0000ffff
  1406. #define EFA_PARISC_1_0 0x020b
  1407. #define EFA_PARISC_1_1 0x0210
  1408. #define EFA_PARISC_2_0 0x0214
  1409. #define SHN_PARISC_ANSI_COMMON 0xff00
  1410. #define SHN_PARISC_HUGE_COMMON 0xff01
  1411. #define SHT_PARISC_EXT 0x70000000
  1412. #define SHT_PARISC_UNWIND 0x70000001
  1413. #define SHT_PARISC_DOC 0x70000002
  1414. #define SHF_PARISC_SHORT 0x20000000
  1415. #define SHF_PARISC_HUGE 0x40000000
  1416. #define SHF_PARISC_SBP 0x80000000
  1417. #define STT_PARISC_MILLICODE 13
  1418. #define STT_HP_OPAQUE (STT_LOOS + 0x1)
  1419. #define STT_HP_STUB (STT_LOOS + 0x2)
  1420. #define R_PARISC_NONE 0
  1421. #define R_PARISC_DIR32 1
  1422. #define R_PARISC_DIR21L 2
  1423. #define R_PARISC_DIR17R 3
  1424. #define R_PARISC_DIR17F 4
  1425. #define R_PARISC_DIR14R 6
  1426. #define R_PARISC_PCREL32 9
  1427. #define R_PARISC_PCREL21L 10
  1428. #define R_PARISC_PCREL17R 11
  1429. #define R_PARISC_PCREL17F 12
  1430. #define R_PARISC_PCREL14R 14
  1431. #define R_PARISC_DPREL21L 18
  1432. #define R_PARISC_DPREL14R 22
  1433. #define R_PARISC_GPREL21L 26
  1434. #define R_PARISC_GPREL14R 30
  1435. #define R_PARISC_LTOFF21L 34
  1436. #define R_PARISC_LTOFF14R 38
  1437. #define R_PARISC_SECREL32 41
  1438. #define R_PARISC_SEGBASE 48
  1439. #define R_PARISC_SEGREL32 49
  1440. #define R_PARISC_PLTOFF21L 50
  1441. #define R_PARISC_PLTOFF14R 54
  1442. #define R_PARISC_LTOFF_FPTR32 57
  1443. #define R_PARISC_LTOFF_FPTR21L 58
  1444. #define R_PARISC_LTOFF_FPTR14R 62
  1445. #define R_PARISC_FPTR64 64
  1446. #define R_PARISC_PLABEL32 65
  1447. #define R_PARISC_PLABEL21L 66
  1448. #define R_PARISC_PLABEL14R 70
  1449. #define R_PARISC_PCREL64 72
  1450. #define R_PARISC_PCREL22F 74
  1451. #define R_PARISC_PCREL14WR 75
  1452. #define R_PARISC_PCREL14DR 76
  1453. #define R_PARISC_PCREL16F 77
  1454. #define R_PARISC_PCREL16WF 78
  1455. #define R_PARISC_PCREL16DF 79
  1456. #define R_PARISC_DIR64 80
  1457. #define R_PARISC_DIR14WR 83
  1458. #define R_PARISC_DIR14DR 84
  1459. #define R_PARISC_DIR16F 85
  1460. #define R_PARISC_DIR16WF 86
  1461. #define R_PARISC_DIR16DF 87
  1462. #define R_PARISC_GPREL64 88
  1463. #define R_PARISC_GPREL14WR 91
  1464. #define R_PARISC_GPREL14DR 92
  1465. #define R_PARISC_GPREL16F 93
  1466. #define R_PARISC_GPREL16WF 94
  1467. #define R_PARISC_GPREL16DF 95
  1468. #define R_PARISC_LTOFF64 96
  1469. #define R_PARISC_LTOFF14WR 99
  1470. #define R_PARISC_LTOFF14DR 100
  1471. #define R_PARISC_LTOFF16F 101
  1472. #define R_PARISC_LTOFF16WF 102
  1473. #define R_PARISC_LTOFF16DF 103
  1474. #define R_PARISC_SECREL64 104
  1475. #define R_PARISC_SEGREL64 112
  1476. #define R_PARISC_PLTOFF14WR 115
  1477. #define R_PARISC_PLTOFF14DR 116
  1478. #define R_PARISC_PLTOFF16F 117
  1479. #define R_PARISC_PLTOFF16WF 118
  1480. #define R_PARISC_PLTOFF16DF 119
  1481. #define R_PARISC_LTOFF_FPTR64 120
  1482. #define R_PARISC_LTOFF_FPTR14WR 123
  1483. #define R_PARISC_LTOFF_FPTR14DR 124
  1484. #define R_PARISC_LTOFF_FPTR16F 125
  1485. #define R_PARISC_LTOFF_FPTR16WF 126
  1486. #define R_PARISC_LTOFF_FPTR16DF 127
  1487. #define R_PARISC_LORESERVE 128
  1488. #define R_PARISC_COPY 128
  1489. #define R_PARISC_IPLT 129
  1490. #define R_PARISC_EPLT 130
  1491. #define R_PARISC_TPREL32 153
  1492. #define R_PARISC_TPREL21L 154
  1493. #define R_PARISC_TPREL14R 158
  1494. #define R_PARISC_LTOFF_TP21L 162
  1495. #define R_PARISC_LTOFF_TP14R 166
  1496. #define R_PARISC_LTOFF_TP14F 167
  1497. #define R_PARISC_TPREL64 216
  1498. #define R_PARISC_TPREL14WR 219
  1499. #define R_PARISC_TPREL14DR 220
  1500. #define R_PARISC_TPREL16F 221
  1501. #define R_PARISC_TPREL16WF 222
  1502. #define R_PARISC_TPREL16DF 223
  1503. #define R_PARISC_LTOFF_TP64 224
  1504. #define R_PARISC_LTOFF_TP14WR 227
  1505. #define R_PARISC_LTOFF_TP14DR 228
  1506. #define R_PARISC_LTOFF_TP16F 229
  1507. #define R_PARISC_LTOFF_TP16WF 230
  1508. #define R_PARISC_LTOFF_TP16DF 231
  1509. #define R_PARISC_GNU_VTENTRY 232
  1510. #define R_PARISC_GNU_VTINHERIT 233
  1511. #define R_PARISC_TLS_GD21L 234
  1512. #define R_PARISC_TLS_GD14R 235
  1513. #define R_PARISC_TLS_GDCALL 236
  1514. #define R_PARISC_TLS_LDM21L 237
  1515. #define R_PARISC_TLS_LDM14R 238
  1516. #define R_PARISC_TLS_LDMCALL 239
  1517. #define R_PARISC_TLS_LDO21L 240
  1518. #define R_PARISC_TLS_LDO14R 241
  1519. #define R_PARISC_TLS_DTPMOD32 242
  1520. #define R_PARISC_TLS_DTPMOD64 243
  1521. #define R_PARISC_TLS_DTPOFF32 244
  1522. #define R_PARISC_TLS_DTPOFF64 245
  1523. #define R_PARISC_TLS_LE21L R_PARISC_TPREL21L
  1524. #define R_PARISC_TLS_LE14R R_PARISC_TPREL14R
  1525. #define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L
  1526. #define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R
  1527. #define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32
  1528. #define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64
  1529. #define R_PARISC_HIRESERVE 255
  1530. #define PT_HP_TLS (PT_LOOS + 0x0)
  1531. #define PT_HP_CORE_NONE (PT_LOOS + 0x1)
  1532. #define PT_HP_CORE_VERSION (PT_LOOS + 0x2)
  1533. #define PT_HP_CORE_KERNEL (PT_LOOS + 0x3)
  1534. #define PT_HP_CORE_COMM (PT_LOOS + 0x4)
  1535. #define PT_HP_CORE_PROC (PT_LOOS + 0x5)
  1536. #define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
  1537. #define PT_HP_CORE_STACK (PT_LOOS + 0x7)
  1538. #define PT_HP_CORE_SHM (PT_LOOS + 0x8)
  1539. #define PT_HP_CORE_MMF (PT_LOOS + 0x9)
  1540. #define PT_HP_PARALLEL (PT_LOOS + 0x10)
  1541. #define PT_HP_FASTBIND (PT_LOOS + 0x11)
  1542. #define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
  1543. #define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
  1544. #define PT_HP_STACK (PT_LOOS + 0x14)
  1545. #define PT_PARISC_ARCHEXT 0x70000000
  1546. #define PT_PARISC_UNWIND 0x70000001
  1547. #define PF_PARISC_SBP 0x08000000
  1548. #define PF_HP_PAGE_SIZE 0x00100000
  1549. #define PF_HP_FAR_SHARED 0x00200000
  1550. #define PF_HP_NEAR_SHARED 0x00400000
  1551. #define PF_HP_CODE 0x01000000
  1552. #define PF_HP_MODIFY 0x02000000
  1553. #define PF_HP_LAZYSWAP 0x04000000
  1554. #define PF_HP_SBP 0x08000000
  1555. #define EF_ALPHA_32BIT 1
  1556. #define EF_ALPHA_CANRELAX 2
  1557. #define SHT_ALPHA_DEBUG 0x70000001
  1558. #define SHT_ALPHA_REGINFO 0x70000002
  1559. #define SHF_ALPHA_GPREL 0x10000000
  1560. #define STO_ALPHA_NOPV 0x80
  1561. #define STO_ALPHA_STD_GPLOAD 0x88
  1562. #define R_ALPHA_NONE 0
  1563. #define R_ALPHA_REFLONG 1
  1564. #define R_ALPHA_REFQUAD 2
  1565. #define R_ALPHA_GPREL32 3
  1566. #define R_ALPHA_LITERAL 4
  1567. #define R_ALPHA_LITUSE 5
  1568. #define R_ALPHA_GPDISP 6
  1569. #define R_ALPHA_BRADDR 7
  1570. #define R_ALPHA_HINT 8
  1571. #define R_ALPHA_SREL16 9
  1572. #define R_ALPHA_SREL32 10
  1573. #define R_ALPHA_SREL64 11
  1574. #define R_ALPHA_GPRELHIGH 17
  1575. #define R_ALPHA_GPRELLOW 18
  1576. #define R_ALPHA_GPREL16 19
  1577. #define R_ALPHA_COPY 24
  1578. #define R_ALPHA_GLOB_DAT 25
  1579. #define R_ALPHA_JMP_SLOT 26
  1580. #define R_ALPHA_RELATIVE 27
  1581. #define R_ALPHA_TLS_GD_HI 28
  1582. #define R_ALPHA_TLSGD 29
  1583. #define R_ALPHA_TLS_LDM 30
  1584. #define R_ALPHA_DTPMOD64 31
  1585. #define R_ALPHA_GOTDTPREL 32
  1586. #define R_ALPHA_DTPREL64 33
  1587. #define R_ALPHA_DTPRELHI 34
  1588. #define R_ALPHA_DTPRELLO 35
  1589. #define R_ALPHA_DTPREL16 36
  1590. #define R_ALPHA_GOTTPREL 37
  1591. #define R_ALPHA_TPREL64 38
  1592. #define R_ALPHA_TPRELHI 39
  1593. #define R_ALPHA_TPRELLO 40
  1594. #define R_ALPHA_TPREL16 41
  1595. #define R_ALPHA_NUM 46
  1596. #define LITUSE_ALPHA_ADDR 0
  1597. #define LITUSE_ALPHA_BASE 1
  1598. #define LITUSE_ALPHA_BYTOFF 2
  1599. #define LITUSE_ALPHA_JSR 3
  1600. #define LITUSE_ALPHA_TLS_GD 4
  1601. #define LITUSE_ALPHA_TLS_LDM 5
  1602. #define DT_ALPHA_PLTRO (DT_LOPROC + 0)
  1603. #define DT_ALPHA_NUM 1
  1604. #define EF_PPC_EMB 0x80000000
  1605. #define EF_PPC_RELOCATABLE 0x00010000
  1606. #define EF_PPC_RELOCATABLE_LIB 0x00008000
  1607. #define R_PPC_NONE 0
  1608. #define R_PPC_ADDR32 1
  1609. #define R_PPC_ADDR24 2
  1610. #define R_PPC_ADDR16 3
  1611. #define R_PPC_ADDR16_LO 4
  1612. #define R_PPC_ADDR16_HI 5
  1613. #define R_PPC_ADDR16_HA 6
  1614. #define R_PPC_ADDR14 7
  1615. #define R_PPC_ADDR14_BRTAKEN 8
  1616. #define R_PPC_ADDR14_BRNTAKEN 9
  1617. #define R_PPC_REL24 10
  1618. #define R_PPC_REL14 11
  1619. #define R_PPC_REL14_BRTAKEN 12
  1620. #define R_PPC_REL14_BRNTAKEN 13
  1621. #define R_PPC_GOT16 14
  1622. #define R_PPC_GOT16_LO 15
  1623. #define R_PPC_GOT16_HI 16
  1624. #define R_PPC_GOT16_HA 17
  1625. #define R_PPC_PLTREL24 18
  1626. #define R_PPC_COPY 19
  1627. #define R_PPC_GLOB_DAT 20
  1628. #define R_PPC_JMP_SLOT 21
  1629. #define R_PPC_RELATIVE 22
  1630. #define R_PPC_LOCAL24PC 23
  1631. #define R_PPC_UADDR32 24
  1632. #define R_PPC_UADDR16 25
  1633. #define R_PPC_REL32 26
  1634. #define R_PPC_PLT32 27
  1635. #define R_PPC_PLTREL32 28
  1636. #define R_PPC_PLT16_LO 29
  1637. #define R_PPC_PLT16_HI 30
  1638. #define R_PPC_PLT16_HA 31
  1639. #define R_PPC_SDAREL16 32
  1640. #define R_PPC_SECTOFF 33
  1641. #define R_PPC_SECTOFF_LO 34
  1642. #define R_PPC_SECTOFF_HI 35
  1643. #define R_PPC_SECTOFF_HA 36
  1644. #define R_PPC_TLS 67
  1645. #define R_PPC_DTPMOD32 68
  1646. #define R_PPC_TPREL16 69
  1647. #define R_PPC_TPREL16_LO 70
  1648. #define R_PPC_TPREL16_HI 71
  1649. #define R_PPC_TPREL16_HA 72
  1650. #define R_PPC_TPREL32 73
  1651. #define R_PPC_DTPREL16 74
  1652. #define R_PPC_DTPREL16_LO 75
  1653. #define R_PPC_DTPREL16_HI 76
  1654. #define R_PPC_DTPREL16_HA 77
  1655. #define R_PPC_DTPREL32 78
  1656. #define R_PPC_GOT_TLSGD16 79
  1657. #define R_PPC_GOT_TLSGD16_LO 80
  1658. #define R_PPC_GOT_TLSGD16_HI 81
  1659. #define R_PPC_GOT_TLSGD16_HA 82
  1660. #define R_PPC_GOT_TLSLD16 83
  1661. #define R_PPC_GOT_TLSLD16_LO 84
  1662. #define R_PPC_GOT_TLSLD16_HI 85
  1663. #define R_PPC_GOT_TLSLD16_HA 86
  1664. #define R_PPC_GOT_TPREL16 87
  1665. #define R_PPC_GOT_TPREL16_LO 88
  1666. #define R_PPC_GOT_TPREL16_HI 89
  1667. #define R_PPC_GOT_TPREL16_HA 90
  1668. #define R_PPC_GOT_DTPREL16 91
  1669. #define R_PPC_GOT_DTPREL16_LO 92
  1670. #define R_PPC_GOT_DTPREL16_HI 93
  1671. #define R_PPC_GOT_DTPREL16_HA 94
  1672. #define R_PPC_TLSGD 95
  1673. #define R_PPC_TLSLD 96
  1674. #define R_PPC_EMB_NADDR32 101
  1675. #define R_PPC_EMB_NADDR16 102
  1676. #define R_PPC_EMB_NADDR16_LO 103
  1677. #define R_PPC_EMB_NADDR16_HI 104
  1678. #define R_PPC_EMB_NADDR16_HA 105
  1679. #define R_PPC_EMB_SDAI16 106
  1680. #define R_PPC_EMB_SDA2I16 107
  1681. #define R_PPC_EMB_SDA2REL 108
  1682. #define R_PPC_EMB_SDA21 109
  1683. #define R_PPC_EMB_MRKREF 110
  1684. #define R_PPC_EMB_RELSEC16 111
  1685. #define R_PPC_EMB_RELST_LO 112
  1686. #define R_PPC_EMB_RELST_HI 113
  1687. #define R_PPC_EMB_RELST_HA 114
  1688. #define R_PPC_EMB_BIT_FLD 115
  1689. #define R_PPC_EMB_RELSDA 116
  1690. #define R_PPC_DIAB_SDA21_LO 180
  1691. #define R_PPC_DIAB_SDA21_HI 181
  1692. #define R_PPC_DIAB_SDA21_HA 182
  1693. #define R_PPC_DIAB_RELSDA_LO 183
  1694. #define R_PPC_DIAB_RELSDA_HI 184
  1695. #define R_PPC_DIAB_RELSDA_HA 185
  1696. #define R_PPC_IRELATIVE 248
  1697. #define R_PPC_REL16 249
  1698. #define R_PPC_REL16_LO 250
  1699. #define R_PPC_REL16_HI 251
  1700. #define R_PPC_REL16_HA 252
  1701. #define R_PPC_TOC16 255
  1702. #define DT_PPC_GOT (DT_LOPROC + 0)
  1703. #define DT_PPC_OPT (DT_LOPROC + 1)
  1704. #define DT_PPC_NUM 2
  1705. #define PPC_OPT_TLS 1
  1706. #define R_PPC64_NONE R_PPC_NONE
  1707. #define R_PPC64_ADDR32 R_PPC_ADDR32
  1708. #define R_PPC64_ADDR24 R_PPC_ADDR24
  1709. #define R_PPC64_ADDR16 R_PPC_ADDR16
  1710. #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO
  1711. #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI
  1712. #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA
  1713. #define R_PPC64_ADDR14 R_PPC_ADDR14
  1714. #define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN
  1715. #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
  1716. #define R_PPC64_REL24 R_PPC_REL24
  1717. #define R_PPC64_REL14 R_PPC_REL14
  1718. #define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN
  1719. #define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN
  1720. #define R_PPC64_GOT16 R_PPC_GOT16
  1721. #define R_PPC64_GOT16_LO R_PPC_GOT16_LO
  1722. #define R_PPC64_GOT16_HI R_PPC_GOT16_HI
  1723. #define R_PPC64_GOT16_HA R_PPC_GOT16_HA
  1724. #define R_PPC64_COPY R_PPC_COPY
  1725. #define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT
  1726. #define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT
  1727. #define R_PPC64_RELATIVE R_PPC_RELATIVE
  1728. #define R_PPC64_UADDR32 R_PPC_UADDR32
  1729. #define R_PPC64_UADDR16 R_PPC_UADDR16
  1730. #define R_PPC64_REL32 R_PPC_REL32
  1731. #define R_PPC64_PLT32 R_PPC_PLT32
  1732. #define R_PPC64_PLTREL32 R_PPC_PLTREL32
  1733. #define R_PPC64_PLT16_LO R_PPC_PLT16_LO
  1734. #define R_PPC64_PLT16_HI R_PPC_PLT16_HI
  1735. #define R_PPC64_PLT16_HA R_PPC_PLT16_HA
  1736. #define R_PPC64_SECTOFF R_PPC_SECTOFF
  1737. #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO
  1738. #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI
  1739. #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA
  1740. #define R_PPC64_ADDR30 37
  1741. #define R_PPC64_ADDR64 38
  1742. #define R_PPC64_ADDR16_HIGHER 39
  1743. #define R_PPC64_ADDR16_HIGHERA 40
  1744. #define R_PPC64_ADDR16_HIGHEST 41
  1745. #define R_PPC64_ADDR16_HIGHESTA 42
  1746. #define R_PPC64_UADDR64 43
  1747. #define R_PPC64_REL64 44
  1748. #define R_PPC64_PLT64 45
  1749. #define R_PPC64_PLTREL64 46
  1750. #define R_PPC64_TOC16 47
  1751. #define R_PPC64_TOC16_LO 48
  1752. #define R_PPC64_TOC16_HI 49
  1753. #define R_PPC64_TOC16_HA 50
  1754. #define R_PPC64_TOC 51
  1755. #define R_PPC64_PLTGOT16 52
  1756. #define R_PPC64_PLTGOT16_LO 53
  1757. #define R_PPC64_PLTGOT16_HI 54
  1758. #define R_PPC64_PLTGOT16_HA 55
  1759. #define R_PPC64_ADDR16_DS 56
  1760. #define R_PPC64_ADDR16_LO_DS 57
  1761. #define R_PPC64_GOT16_DS 58
  1762. #define R_PPC64_GOT16_LO_DS 59
  1763. #define R_PPC64_PLT16_LO_DS 60
  1764. #define R_PPC64_SECTOFF_DS 61
  1765. #define R_PPC64_SECTOFF_LO_DS 62
  1766. #define R_PPC64_TOC16_DS 63
  1767. #define R_PPC64_TOC16_LO_DS 64
  1768. #define R_PPC64_PLTGOT16_DS 65
  1769. #define R_PPC64_PLTGOT16_LO_DS 66
  1770. #define R_PPC64_TLS 67
  1771. #define R_PPC64_DTPMOD64 68
  1772. #define R_PPC64_TPREL16 69
  1773. #define R_PPC64_TPREL16_LO 70
  1774. #define R_PPC64_TPREL16_HI 71
  1775. #define R_PPC64_TPREL16_HA 72
  1776. #define R_PPC64_TPREL64 73
  1777. #define R_PPC64_DTPREL16 74
  1778. #define R_PPC64_DTPREL16_LO 75
  1779. #define R_PPC64_DTPREL16_HI 76
  1780. #define R_PPC64_DTPREL16_HA 77
  1781. #define R_PPC64_DTPREL64 78
  1782. #define R_PPC64_GOT_TLSGD16 79
  1783. #define R_PPC64_GOT_TLSGD16_LO 80
  1784. #define R_PPC64_GOT_TLSGD16_HI 81
  1785. #define R_PPC64_GOT_TLSGD16_HA 82
  1786. #define R_PPC64_GOT_TLSLD16 83
  1787. #define R_PPC64_GOT_TLSLD16_LO 84
  1788. #define R_PPC64_GOT_TLSLD16_HI 85
  1789. #define R_PPC64_GOT_TLSLD16_HA 86
  1790. #define R_PPC64_GOT_TPREL16_DS 87
  1791. #define R_PPC64_GOT_TPREL16_LO_DS 88
  1792. #define R_PPC64_GOT_TPREL16_HI 89
  1793. #define R_PPC64_GOT_TPREL16_HA 90
  1794. #define R_PPC64_GOT_DTPREL16_DS 91
  1795. #define R_PPC64_GOT_DTPREL16_LO_DS 92
  1796. #define R_PPC64_GOT_DTPREL16_HI 93
  1797. #define R_PPC64_GOT_DTPREL16_HA 94
  1798. #define R_PPC64_TPREL16_DS 95
  1799. #define R_PPC64_TPREL16_LO_DS 96
  1800. #define R_PPC64_TPREL16_HIGHER 97
  1801. #define R_PPC64_TPREL16_HIGHERA 98
  1802. #define R_PPC64_TPREL16_HIGHEST 99
  1803. #define R_PPC64_TPREL16_HIGHESTA 100
  1804. #define R_PPC64_DTPREL16_DS 101
  1805. #define R_PPC64_DTPREL16_LO_DS 102
  1806. #define R_PPC64_DTPREL16_HIGHER 103
  1807. #define R_PPC64_DTPREL16_HIGHERA 104
  1808. #define R_PPC64_DTPREL16_HIGHEST 105
  1809. #define R_PPC64_DTPREL16_HIGHESTA 106
  1810. #define R_PPC64_TLSGD 107
  1811. #define R_PPC64_TLSLD 108
  1812. #define R_PPC64_TOCSAVE 109
  1813. #define R_PPC64_ADDR16_HIGH 110
  1814. #define R_PPC64_ADDR16_HIGHA 111
  1815. #define R_PPC64_TPREL16_HIGH 112
  1816. #define R_PPC64_TPREL16_HIGHA 113
  1817. #define R_PPC64_DTPREL16_HIGH 114
  1818. #define R_PPC64_DTPREL16_HIGHA 115
  1819. #define R_PPC64_JMP_IREL 247
  1820. #define R_PPC64_IRELATIVE 248
  1821. #define R_PPC64_REL16 249
  1822. #define R_PPC64_REL16_LO 250
  1823. #define R_PPC64_REL16_HI 251
  1824. #define R_PPC64_REL16_HA 252
  1825. #define EF_PPC64_ABI 3
  1826. #define DT_PPC64_GLINK (DT_LOPROC + 0)
  1827. #define DT_PPC64_OPD (DT_LOPROC + 1)
  1828. #define DT_PPC64_OPDSZ (DT_LOPROC + 2)
  1829. #define DT_PPC64_OPT (DT_LOPROC + 3)
  1830. #define DT_PPC64_NUM 4
  1831. #define PPC64_OPT_TLS 1
  1832. #define PPC64_OPT_MULTI_TOC 2
  1833. #define STO_PPC64_LOCAL_BIT 5
  1834. #define STO_PPC64_LOCAL_MASK 0xe0
  1835. #define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc)
  1836. #define EF_ARM_RELEXEC 0x01
  1837. #define EF_ARM_HASENTRY 0x02
  1838. #define EF_ARM_INTERWORK 0x04
  1839. #define EF_ARM_APCS_26 0x08
  1840. #define EF_ARM_APCS_FLOAT 0x10
  1841. #define EF_ARM_PIC 0x20
  1842. #define EF_ARM_ALIGN8 0x40
  1843. #define EF_ARM_NEW_ABI 0x80
  1844. #define EF_ARM_OLD_ABI 0x100
  1845. #define EF_ARM_SOFT_FLOAT 0x200
  1846. #define EF_ARM_VFP_FLOAT 0x400
  1847. #define EF_ARM_MAVERICK_FLOAT 0x800
  1848. #define EF_ARM_ABI_FLOAT_SOFT 0x200
  1849. #define EF_ARM_ABI_FLOAT_HARD 0x400
  1850. #define EF_ARM_SYMSARESORTED 0x04
  1851. #define EF_ARM_DYNSYMSUSESEGIDX 0x08
  1852. #define EF_ARM_MAPSYMSFIRST 0x10
  1853. #define EF_ARM_EABIMASK 0XFF000000
  1854. #define EF_ARM_BE8 0x00800000
  1855. #define EF_ARM_LE8 0x00400000
  1856. #define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
  1857. #define EF_ARM_EABI_UNKNOWN 0x00000000
  1858. #define EF_ARM_EABI_VER1 0x01000000
  1859. #define EF_ARM_EABI_VER2 0x02000000
  1860. #define EF_ARM_EABI_VER3 0x03000000
  1861. #define EF_ARM_EABI_VER4 0x04000000
  1862. #define EF_ARM_EABI_VER5 0x05000000
  1863. #define STT_ARM_TFUNC STT_LOPROC
  1864. #define STT_ARM_16BIT STT_HIPROC
  1865. #define SHF_ARM_ENTRYSECT 0x10000000
  1866. #define SHF_ARM_COMDEF 0x80000000
  1867. #define PF_ARM_SB 0x10000000
  1868. #define PF_ARM_PI 0x20000000
  1869. #define PF_ARM_ABS 0x40000000
  1870. #define PT_ARM_EXIDX (PT_LOPROC + 1)
  1871. #define SHT_ARM_EXIDX (SHT_LOPROC + 1)
  1872. #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2)
  1873. #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3)
  1874. #define R_AARCH64_NONE 0
  1875. #define R_AARCH64_P32_ABS32 1
  1876. #define R_AARCH64_P32_COPY 180
  1877. #define R_AARCH64_P32_GLOB_DAT 181
  1878. #define R_AARCH64_P32_JUMP_SLOT 182
  1879. #define R_AARCH64_P32_RELATIVE 183
  1880. #define R_AARCH64_P32_TLS_DTPMOD 184
  1881. #define R_AARCH64_P32_TLS_DTPREL 185
  1882. #define R_AARCH64_P32_TLS_TPREL 186
  1883. #define R_AARCH64_P32_TLSDESC 187
  1884. #define R_AARCH64_P32_IRELATIVE 188
  1885. #define R_AARCH64_ABS64 257
  1886. #define R_AARCH64_ABS32 258
  1887. #define R_AARCH64_ABS16 259
  1888. #define R_AARCH64_PREL64 260
  1889. #define R_AARCH64_PREL32 261
  1890. #define R_AARCH64_PREL16 262
  1891. #define R_AARCH64_MOVW_UABS_G0 263
  1892. #define R_AARCH64_MOVW_UABS_G0_NC 264
  1893. #define R_AARCH64_MOVW_UABS_G1 265
  1894. #define R_AARCH64_MOVW_UABS_G1_NC 266
  1895. #define R_AARCH64_MOVW_UABS_G2 267
  1896. #define R_AARCH64_MOVW_UABS_G2_NC 268
  1897. #define R_AARCH64_MOVW_UABS_G3 269
  1898. #define R_AARCH64_MOVW_SABS_G0 270
  1899. #define R_AARCH64_MOVW_SABS_G1 271
  1900. #define R_AARCH64_MOVW_SABS_G2 272
  1901. #define R_AARCH64_LD_PREL_LO19 273
  1902. #define R_AARCH64_ADR_PREL_LO21 274
  1903. #define R_AARCH64_ADR_PREL_PG_HI21 275
  1904. #define R_AARCH64_ADR_PREL_PG_HI21_NC 276
  1905. #define R_AARCH64_ADD_ABS_LO12_NC 277
  1906. #define R_AARCH64_LDST8_ABS_LO12_NC 278
  1907. #define R_AARCH64_TSTBR14 279
  1908. #define R_AARCH64_CONDBR19 280
  1909. #define R_AARCH64_JUMP26 282
  1910. #define R_AARCH64_CALL26 283
  1911. #define R_AARCH64_LDST16_ABS_LO12_NC 284
  1912. #define R_AARCH64_LDST32_ABS_LO12_NC 285
  1913. #define R_AARCH64_LDST64_ABS_LO12_NC 286
  1914. #define R_AARCH64_MOVW_PREL_G0 287
  1915. #define R_AARCH64_MOVW_PREL_G0_NC 288
  1916. #define R_AARCH64_MOVW_PREL_G1 289
  1917. #define R_AARCH64_MOVW_PREL_G1_NC 290
  1918. #define R_AARCH64_MOVW_PREL_G2 291
  1919. #define R_AARCH64_MOVW_PREL_G2_NC 292
  1920. #define R_AARCH64_MOVW_PREL_G3 293
  1921. #define R_AARCH64_LDST128_ABS_LO12_NC 299
  1922. #define R_AARCH64_MOVW_GOTOFF_G0 300
  1923. #define R_AARCH64_MOVW_GOTOFF_G0_NC 301
  1924. #define R_AARCH64_MOVW_GOTOFF_G1 302
  1925. #define R_AARCH64_MOVW_GOTOFF_G1_NC 303
  1926. #define R_AARCH64_MOVW_GOTOFF_G2 304
  1927. #define R_AARCH64_MOVW_GOTOFF_G2_NC 305
  1928. #define R_AARCH64_MOVW_GOTOFF_G3 306
  1929. #define R_AARCH64_GOTREL64 307
  1930. #define R_AARCH64_GOTREL32 308
  1931. #define R_AARCH64_GOT_LD_PREL19 309
  1932. #define R_AARCH64_LD64_GOTOFF_LO15 310
  1933. #define R_AARCH64_ADR_GOT_PAGE 311
  1934. #define R_AARCH64_LD64_GOT_LO12_NC 312
  1935. #define R_AARCH64_LD64_GOTPAGE_LO15 313
  1936. #define R_AARCH64_TLSGD_ADR_PREL21 512
  1937. #define R_AARCH64_TLSGD_ADR_PAGE21 513
  1938. #define R_AARCH64_TLSGD_ADD_LO12_NC 514
  1939. #define R_AARCH64_TLSGD_MOVW_G1 515
  1940. #define R_AARCH64_TLSGD_MOVW_G0_NC 516
  1941. #define R_AARCH64_TLSLD_ADR_PREL21 517
  1942. #define R_AARCH64_TLSLD_ADR_PAGE21 518
  1943. #define R_AARCH64_TLSLD_ADD_LO12_NC 519
  1944. #define R_AARCH64_TLSLD_MOVW_G1 520
  1945. #define R_AARCH64_TLSLD_MOVW_G0_NC 521
  1946. #define R_AARCH64_TLSLD_LD_PREL19 522
  1947. #define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523
  1948. #define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524
  1949. #define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525
  1950. #define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526
  1951. #define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527
  1952. #define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528
  1953. #define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529
  1954. #define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530
  1955. #define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531
  1956. #define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532
  1957. #define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533
  1958. #define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534
  1959. #define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535
  1960. #define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536
  1961. #define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537
  1962. #define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538
  1963. #define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539
  1964. #define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540
  1965. #define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541
  1966. #define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542
  1967. #define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543
  1968. #define R_AARCH64_TLSLE_MOVW_TPREL_G2 544
  1969. #define R_AARCH64_TLSLE_MOVW_TPREL_G1 545
  1970. #define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546
  1971. #define R_AARCH64_TLSLE_MOVW_TPREL_G0 547
  1972. #define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548
  1973. #define R_AARCH64_TLSLE_ADD_TPREL_HI12 549
  1974. #define R_AARCH64_TLSLE_ADD_TPREL_LO12 550
  1975. #define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551
  1976. #define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552
  1977. #define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553
  1978. #define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554
  1979. #define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555
  1980. #define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556
  1981. #define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557
  1982. #define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558
  1983. #define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559
  1984. #define R_AARCH64_TLSDESC_LD_PREL19 560
  1985. #define R_AARCH64_TLSDESC_ADR_PREL21 561
  1986. #define R_AARCH64_TLSDESC_ADR_PAGE21 562
  1987. #define R_AARCH64_TLSDESC_LD64_LO12 563
  1988. #define R_AARCH64_TLSDESC_ADD_LO12 564
  1989. #define R_AARCH64_TLSDESC_OFF_G1 565
  1990. #define R_AARCH64_TLSDESC_OFF_G0_NC 566
  1991. #define R_AARCH64_TLSDESC_LDR 567
  1992. #define R_AARCH64_TLSDESC_ADD 568
  1993. #define R_AARCH64_TLSDESC_CALL 569
  1994. #define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570
  1995. #define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571
  1996. #define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572
  1997. #define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573
  1998. #define R_AARCH64_COPY 1024
  1999. #define R_AARCH64_GLOB_DAT 1025
  2000. #define R_AARCH64_JUMP_SLOT 1026
  2001. #define R_AARCH64_RELATIVE 1027
  2002. #define R_AARCH64_TLS_DTPMOD 1028
  2003. #define R_AARCH64_TLS_DTPMOD64 1028
  2004. #define R_AARCH64_TLS_DTPREL 1029
  2005. #define R_AARCH64_TLS_DTPREL64 1029
  2006. #define R_AARCH64_TLS_TPREL 1030
  2007. #define R_AARCH64_TLS_TPREL64 1030
  2008. #define R_AARCH64_TLSDESC 1031
  2009. #define R_ARM_NONE 0
  2010. #define R_ARM_PC24 1
  2011. #define R_ARM_ABS32 2
  2012. #define R_ARM_REL32 3
  2013. #define R_ARM_PC13 4
  2014. #define R_ARM_ABS16 5
  2015. #define R_ARM_ABS12 6
  2016. #define R_ARM_THM_ABS5 7
  2017. #define R_ARM_ABS8 8
  2018. #define R_ARM_SBREL32 9
  2019. #define R_ARM_THM_PC22 10
  2020. #define R_ARM_THM_PC8 11
  2021. #define R_ARM_AMP_VCALL9 12
  2022. #define R_ARM_TLS_DESC 13
  2023. #define R_ARM_THM_SWI8 14
  2024. #define R_ARM_XPC25 15
  2025. #define R_ARM_THM_XPC22 16
  2026. #define R_ARM_TLS_DTPMOD32 17
  2027. #define R_ARM_TLS_DTPOFF32 18
  2028. #define R_ARM_TLS_TPOFF32 19
  2029. #define R_ARM_COPY 20
  2030. #define R_ARM_GLOB_DAT 21
  2031. #define R_ARM_JUMP_SLOT 22
  2032. #define R_ARM_RELATIVE 23
  2033. #define R_ARM_GOTOFF 24
  2034. #define R_ARM_GOTPC 25
  2035. #define R_ARM_GOT32 26
  2036. #define R_ARM_PLT32 27
  2037. #define R_ARM_CALL 28
  2038. #define R_ARM_JUMP24 29
  2039. #define R_ARM_THM_JUMP24 30
  2040. #define R_ARM_BASE_ABS 31
  2041. #define R_ARM_ALU_PCREL_7_0 32
  2042. #define R_ARM_ALU_PCREL_15_8 33
  2043. #define R_ARM_ALU_PCREL_23_15 34
  2044. #define R_ARM_LDR_SBREL_11_0 35
  2045. #define R_ARM_ALU_SBREL_19_12 36
  2046. #define R_ARM_ALU_SBREL_27_20 37
  2047. #define R_ARM_TARGET1 38
  2048. #define R_ARM_SBREL31 39
  2049. #define R_ARM_V4BX 40
  2050. #define R_ARM_TARGET2 41
  2051. #define R_ARM_PREL31 42
  2052. #define R_ARM_MOVW_ABS_NC 43
  2053. #define R_ARM_MOVT_ABS 44
  2054. #define R_ARM_MOVW_PREL_NC 45
  2055. #define R_ARM_MOVT_PREL 46
  2056. #define R_ARM_THM_MOVW_ABS_NC 47
  2057. #define R_ARM_THM_MOVT_ABS 48
  2058. #define R_ARM_THM_MOVW_PREL_NC 49
  2059. #define R_ARM_THM_MOVT_PREL 50
  2060. #define R_ARM_THM_JUMP19 51
  2061. #define R_ARM_THM_JUMP6 52
  2062. #define R_ARM_THM_ALU_PREL_11_0 53
  2063. #define R_ARM_THM_PC12 54
  2064. #define R_ARM_ABS32_NOI 55
  2065. #define R_ARM_REL32_NOI 56
  2066. #define R_ARM_ALU_PC_G0_NC 57
  2067. #define R_ARM_ALU_PC_G0 58
  2068. #define R_ARM_ALU_PC_G1_NC 59
  2069. #define R_ARM_ALU_PC_G1 60
  2070. #define R_ARM_ALU_PC_G2 61
  2071. #define R_ARM_LDR_PC_G1 62
  2072. #define R_ARM_LDR_PC_G2 63
  2073. #define R_ARM_LDRS_PC_G0 64
  2074. #define R_ARM_LDRS_PC_G1 65
  2075. #define R_ARM_LDRS_PC_G2 66
  2076. #define R_ARM_LDC_PC_G0 67
  2077. #define R_ARM_LDC_PC_G1 68
  2078. #define R_ARM_LDC_PC_G2 69
  2079. #define R_ARM_ALU_SB_G0_NC 70
  2080. #define R_ARM_ALU_SB_G0 71
  2081. #define R_ARM_ALU_SB_G1_NC 72
  2082. #define R_ARM_ALU_SB_G1 73
  2083. #define R_ARM_ALU_SB_G2 74
  2084. #define R_ARM_LDR_SB_G0 75
  2085. #define R_ARM_LDR_SB_G1 76
  2086. #define R_ARM_LDR_SB_G2 77
  2087. #define R_ARM_LDRS_SB_G0 78
  2088. #define R_ARM_LDRS_SB_G1 79
  2089. #define R_ARM_LDRS_SB_G2 80
  2090. #define R_ARM_LDC_SB_G0 81
  2091. #define R_ARM_LDC_SB_G1 82
  2092. #define R_ARM_LDC_SB_G2 83
  2093. #define R_ARM_MOVW_BREL_NC 84
  2094. #define R_ARM_MOVT_BREL 85
  2095. #define R_ARM_MOVW_BREL 86
  2096. #define R_ARM_THM_MOVW_BREL_NC 87
  2097. #define R_ARM_THM_MOVT_BREL 88
  2098. #define R_ARM_THM_MOVW_BREL 89
  2099. #define R_ARM_TLS_GOTDESC 90
  2100. #define R_ARM_TLS_CALL 91
  2101. #define R_ARM_TLS_DESCSEQ 92
  2102. #define R_ARM_THM_TLS_CALL 93
  2103. #define R_ARM_PLT32_ABS 94
  2104. #define R_ARM_GOT_ABS 95
  2105. #define R_ARM_GOT_PREL 96
  2106. #define R_ARM_GOT_BREL12 97
  2107. #define R_ARM_GOTOFF12 98
  2108. #define R_ARM_GOTRELAX 99
  2109. #define R_ARM_GNU_VTENTRY 100
  2110. #define R_ARM_GNU_VTINHERIT 101
  2111. #define R_ARM_THM_PC11 102
  2112. #define R_ARM_THM_PC9 103
  2113. #define R_ARM_TLS_GD32 104
  2114. #define R_ARM_TLS_LDM32 105
  2115. #define R_ARM_TLS_LDO32 106
  2116. #define R_ARM_TLS_IE32 107
  2117. #define R_ARM_TLS_LE32 108
  2118. #define R_ARM_TLS_LDO12 109
  2119. #define R_ARM_TLS_LE12 110
  2120. #define R_ARM_TLS_IE12GP 111
  2121. #define R_ARM_ME_TOO 128
  2122. #define R_ARM_THM_TLS_DESCSEQ 129
  2123. #define R_ARM_THM_TLS_DESCSEQ16 129
  2124. #define R_ARM_THM_TLS_DESCSEQ32 130
  2125. #define R_ARM_THM_GOT_BREL12 131
  2126. #define R_ARM_IRELATIVE 160
  2127. #define R_ARM_RXPC25 249
  2128. #define R_ARM_RSBREL32 250
  2129. #define R_ARM_THM_RPC22 251
  2130. #define R_ARM_RREL32 252
  2131. #define R_ARM_RABS22 253
  2132. #define R_ARM_RPC24 254
  2133. #define R_ARM_RBASE 255
  2134. #define R_ARM_NUM 256
  2135. #define EF_IA_64_MASKOS 0x0000000f
  2136. #define EF_IA_64_ABI64 0x00000010
  2137. #define EF_IA_64_ARCH 0xff000000
  2138. #define PT_IA_64_ARCHEXT (PT_LOPROC + 0)
  2139. #define PT_IA_64_UNWIND (PT_LOPROC + 1)
  2140. #define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12)
  2141. #define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13)
  2142. #define PT_IA_64_HP_STACK (PT_LOOS + 0x14)
  2143. #define PF_IA_64_NORECOV 0x80000000
  2144. #define SHT_IA_64_EXT (SHT_LOPROC + 0)
  2145. #define SHT_IA_64_UNWIND (SHT_LOPROC + 1)
  2146. #define SHF_IA_64_SHORT 0x10000000
  2147. #define SHF_IA_64_NORECOV 0x20000000
  2148. #define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0)
  2149. #define DT_IA_64_NUM 1
  2150. #define R_IA64_NONE 0x00
  2151. #define R_IA64_IMM14 0x21
  2152. #define R_IA64_IMM22 0x22
  2153. #define R_IA64_IMM64 0x23
  2154. #define R_IA64_DIR32MSB 0x24
  2155. #define R_IA64_DIR32LSB 0x25
  2156. #define R_IA64_DIR64MSB 0x26
  2157. #define R_IA64_DIR64LSB 0x27
  2158. #define R_IA64_GPREL22 0x2a
  2159. #define R_IA64_GPREL64I 0x2b
  2160. #define R_IA64_GPREL32MSB 0x2c
  2161. #define R_IA64_GPREL32LSB 0x2d
  2162. #define R_IA64_GPREL64MSB 0x2e
  2163. #define R_IA64_GPREL64LSB 0x2f
  2164. #define R_IA64_LTOFF22 0x32
  2165. #define R_IA64_LTOFF64I 0x33
  2166. #define R_IA64_PLTOFF22 0x3a
  2167. #define R_IA64_PLTOFF64I 0x3b
  2168. #define R_IA64_PLTOFF64MSB 0x3e
  2169. #define R_IA64_PLTOFF64LSB 0x3f
  2170. #define R_IA64_FPTR64I 0x43
  2171. #define R_IA64_FPTR32MSB 0x44
  2172. #define R_IA64_FPTR32LSB 0x45
  2173. #define R_IA64_FPTR64MSB 0x46
  2174. #define R_IA64_FPTR64LSB 0x47
  2175. #define R_IA64_PCREL60B 0x48
  2176. #define R_IA64_PCREL21B 0x49
  2177. #define R_IA64_PCREL21M 0x4a
  2178. #define R_IA64_PCREL21F 0x4b
  2179. #define R_IA64_PCREL32MSB 0x4c
  2180. #define R_IA64_PCREL32LSB 0x4d
  2181. #define R_IA64_PCREL64MSB 0x4e
  2182. #define R_IA64_PCREL64LSB 0x4f
  2183. #define R_IA64_LTOFF_FPTR22 0x52
  2184. #define R_IA64_LTOFF_FPTR64I 0x53
  2185. #define R_IA64_LTOFF_FPTR32MSB 0x54
  2186. #define R_IA64_LTOFF_FPTR32LSB 0x55
  2187. #define R_IA64_LTOFF_FPTR64MSB 0x56
  2188. #define R_IA64_LTOFF_FPTR64LSB 0x57
  2189. #define R_IA64_SEGREL32MSB 0x5c
  2190. #define R_IA64_SEGREL32LSB 0x5d
  2191. #define R_IA64_SEGREL64MSB 0x5e
  2192. #define R_IA64_SEGREL64LSB 0x5f
  2193. #define R_IA64_SECREL32MSB 0x64
  2194. #define R_IA64_SECREL32LSB 0x65
  2195. #define R_IA64_SECREL64MSB 0x66
  2196. #define R_IA64_SECREL64LSB 0x67
  2197. #define R_IA64_REL32MSB 0x6c
  2198. #define R_IA64_REL32LSB 0x6d
  2199. #define R_IA64_REL64MSB 0x6e
  2200. #define R_IA64_REL64LSB 0x6f
  2201. #define R_IA64_LTV32MSB 0x74
  2202. #define R_IA64_LTV32LSB 0x75
  2203. #define R_IA64_LTV64MSB 0x76
  2204. #define R_IA64_LTV64LSB 0x77
  2205. #define R_IA64_PCREL21BI 0x79
  2206. #define R_IA64_PCREL22 0x7a
  2207. #define R_IA64_PCREL64I 0x7b
  2208. #define R_IA64_IPLTMSB 0x80
  2209. #define R_IA64_IPLTLSB 0x81
  2210. #define R_IA64_COPY 0x84
  2211. #define R_IA64_SUB 0x85
  2212. #define R_IA64_LTOFF22X 0x86
  2213. #define R_IA64_LDXMOV 0x87
  2214. #define R_IA64_TPREL14 0x91
  2215. #define R_IA64_TPREL22 0x92
  2216. #define R_IA64_TPREL64I 0x93
  2217. #define R_IA64_TPREL64MSB 0x96
  2218. #define R_IA64_TPREL64LSB 0x97
  2219. #define R_IA64_LTOFF_TPREL22 0x9a
  2220. #define R_IA64_DTPMOD64MSB 0xa6
  2221. #define R_IA64_DTPMOD64LSB 0xa7
  2222. #define R_IA64_LTOFF_DTPMOD22 0xaa
  2223. #define R_IA64_DTPREL14 0xb1
  2224. #define R_IA64_DTPREL22 0xb2
  2225. #define R_IA64_DTPREL64I 0xb3
  2226. #define R_IA64_DTPREL32MSB 0xb4
  2227. #define R_IA64_DTPREL32LSB 0xb5
  2228. #define R_IA64_DTPREL64MSB 0xb6
  2229. #define R_IA64_DTPREL64LSB 0xb7
  2230. #define R_IA64_LTOFF_DTPREL22 0xba
  2231. #define EF_SH_MACH_MASK 0x1f
  2232. #define EF_SH_UNKNOWN 0x0
  2233. #define EF_SH1 0x1
  2234. #define EF_SH2 0x2
  2235. #define EF_SH3 0x3
  2236. #define EF_SH_DSP 0x4
  2237. #define EF_SH3_DSP 0x5
  2238. #define EF_SH4AL_DSP 0x6
  2239. #define EF_SH3E 0x8
  2240. #define EF_SH4 0x9
  2241. #define EF_SH2E 0xb
  2242. #define EF_SH4A 0xc
  2243. #define EF_SH2A 0xd
  2244. #define EF_SH4_NOFPU 0x10
  2245. #define EF_SH4A_NOFPU 0x11
  2246. #define EF_SH4_NOMMU_NOFPU 0x12
  2247. #define EF_SH2A_NOFPU 0x13
  2248. #define EF_SH3_NOMMU 0x14
  2249. #define EF_SH2A_SH4_NOFPU 0x15
  2250. #define EF_SH2A_SH3_NOFPU 0x16
  2251. #define EF_SH2A_SH4 0x17
  2252. #define EF_SH2A_SH3E 0x18
  2253. #define R_SH_NONE 0
  2254. #define R_SH_DIR32 1
  2255. #define R_SH_REL32 2
  2256. #define R_SH_DIR8WPN 3
  2257. #define R_SH_IND12W 4
  2258. #define R_SH_DIR8WPL 5
  2259. #define R_SH_DIR8WPZ 6
  2260. #define R_SH_DIR8BP 7
  2261. #define R_SH_DIR8W 8
  2262. #define R_SH_DIR8L 9
  2263. #define R_SH_SWITCH16 25
  2264. #define R_SH_SWITCH32 26
  2265. #define R_SH_USES 27
  2266. #define R_SH_COUNT 28
  2267. #define R_SH_ALIGN 29
  2268. #define R_SH_CODE 30
  2269. #define R_SH_DATA 31
  2270. #define R_SH_LABEL 32
  2271. #define R_SH_SWITCH8 33
  2272. #define R_SH_GNU_VTINHERIT 34
  2273. #define R_SH_GNU_VTENTRY 35
  2274. #define R_SH_TLS_GD_32 144
  2275. #define R_SH_TLS_LD_32 145
  2276. #define R_SH_TLS_LDO_32 146
  2277. #define R_SH_TLS_IE_32 147
  2278. #define R_SH_TLS_LE_32 148
  2279. #define R_SH_TLS_DTPMOD32 149
  2280. #define R_SH_TLS_DTPOFF32 150
  2281. #define R_SH_TLS_TPOFF32 151
  2282. #define R_SH_GOT32 160
  2283. #define R_SH_PLT32 161
  2284. #define R_SH_COPY 162
  2285. #define R_SH_GLOB_DAT 163
  2286. #define R_SH_JMP_SLOT 164
  2287. #define R_SH_RELATIVE 165
  2288. #define R_SH_GOTOFF 166
  2289. #define R_SH_GOTPC 167
  2290. #define R_SH_GOT20 201
  2291. #define R_SH_GOTOFF20 202
  2292. #define R_SH_GOTFUNCDESC 203
  2293. #define R_SH_GOTFUNCDEST20 204
  2294. #define R_SH_GOTOFFFUNCDESC 205
  2295. #define R_SH_GOTOFFFUNCDEST20 206
  2296. #define R_SH_FUNCDESC 207
  2297. #define R_SH_FUNCDESC_VALUE 208
  2298. #define R_SH_NUM 256
  2299. #define R_390_NONE 0
  2300. #define R_390_8 1
  2301. #define R_390_12 2
  2302. #define R_390_16 3
  2303. #define R_390_32 4
  2304. #define R_390_PC32 5
  2305. #define R_390_GOT12 6
  2306. #define R_390_GOT32 7
  2307. #define R_390_PLT32 8
  2308. #define R_390_COPY 9
  2309. #define R_390_GLOB_DAT 10
  2310. #define R_390_JMP_SLOT 11
  2311. #define R_390_RELATIVE 12
  2312. #define R_390_GOTOFF32 13
  2313. #define R_390_GOTPC 14
  2314. #define R_390_GOT16 15
  2315. #define R_390_PC16 16
  2316. #define R_390_PC16DBL 17
  2317. #define R_390_PLT16DBL 18
  2318. #define R_390_PC32DBL 19
  2319. #define R_390_PLT32DBL 20
  2320. #define R_390_GOTPCDBL 21
  2321. #define R_390_64 22
  2322. #define R_390_PC64 23
  2323. #define R_390_GOT64 24
  2324. #define R_390_PLT64 25
  2325. #define R_390_GOTENT 26
  2326. #define R_390_GOTOFF16 27
  2327. #define R_390_GOTOFF64 28
  2328. #define R_390_GOTPLT12 29
  2329. #define R_390_GOTPLT16 30
  2330. #define R_390_GOTPLT32 31
  2331. #define R_390_GOTPLT64 32
  2332. #define R_390_GOTPLTENT 33
  2333. #define R_390_PLTOFF16 34
  2334. #define R_390_PLTOFF32 35
  2335. #define R_390_PLTOFF64 36
  2336. #define R_390_TLS_LOAD 37
  2337. #define R_390_TLS_GDCALL 38
  2338. #define R_390_TLS_LDCALL 39
  2339. #define R_390_TLS_GD32 40
  2340. #define R_390_TLS_GD64 41
  2341. #define R_390_TLS_GOTIE12 42
  2342. #define R_390_TLS_GOTIE32 43
  2343. #define R_390_TLS_GOTIE64 44
  2344. #define R_390_TLS_LDM32 45
  2345. #define R_390_TLS_LDM64 46
  2346. #define R_390_TLS_IE32 47
  2347. #define R_390_TLS_IE64 48
  2348. #define R_390_TLS_IEENT 49
  2349. #define R_390_TLS_LE32 50
  2350. #define R_390_TLS_LE64 51
  2351. #define R_390_TLS_LDO32 52
  2352. #define R_390_TLS_LDO64 53
  2353. #define R_390_TLS_DTPMOD 54
  2354. #define R_390_TLS_DTPOFF 55
  2355. #define R_390_TLS_TPOFF 56
  2356. #define R_390_20 57
  2357. #define R_390_GOT20 58
  2358. #define R_390_GOTPLT20 59
  2359. #define R_390_TLS_GOTIE20 60
  2360. #define R_390_NUM 61
  2361. #define R_CRIS_NONE 0
  2362. #define R_CRIS_8 1
  2363. #define R_CRIS_16 2
  2364. #define R_CRIS_32 3
  2365. #define R_CRIS_8_PCREL 4
  2366. #define R_CRIS_16_PCREL 5
  2367. #define R_CRIS_32_PCREL 6
  2368. #define R_CRIS_GNU_VTINHERIT 7
  2369. #define R_CRIS_GNU_VTENTRY 8
  2370. #define R_CRIS_COPY 9
  2371. #define R_CRIS_GLOB_DAT 10
  2372. #define R_CRIS_JUMP_SLOT 11
  2373. #define R_CRIS_RELATIVE 12
  2374. #define R_CRIS_16_GOT 13
  2375. #define R_CRIS_32_GOT 14
  2376. #define R_CRIS_16_GOTPLT 15
  2377. #define R_CRIS_32_GOTPLT 16
  2378. #define R_CRIS_32_GOTREL 17
  2379. #define R_CRIS_32_PLT_GOTREL 18
  2380. #define R_CRIS_32_PLT_PCREL 19
  2381. #define R_CRIS_NUM 20
  2382. #define R_X86_64_NONE 0
  2383. #define R_X86_64_64 1
  2384. #define R_X86_64_PC32 2
  2385. #define R_X86_64_GOT32 3
  2386. #define R_X86_64_PLT32 4
  2387. #define R_X86_64_COPY 5
  2388. #define R_X86_64_GLOB_DAT 6
  2389. #define R_X86_64_JUMP_SLOT 7
  2390. #define R_X86_64_RELATIVE 8
  2391. #define R_X86_64_GOTPCREL 9
  2392. #define R_X86_64_32 10
  2393. #define R_X86_64_32S 11
  2394. #define R_X86_64_16 12
  2395. #define R_X86_64_PC16 13
  2396. #define R_X86_64_8 14
  2397. #define R_X86_64_PC8 15
  2398. #define R_X86_64_DTPMOD64 16
  2399. #define R_X86_64_DTPOFF64 17
  2400. #define R_X86_64_TPOFF64 18
  2401. #define R_X86_64_TLSGD 19
  2402. #define R_X86_64_TLSLD 20
  2403. #define R_X86_64_DTPOFF32 21
  2404. #define R_X86_64_GOTTPOFF 22
  2405. #define R_X86_64_TPOFF32 23
  2406. #define R_X86_64_PC64 24
  2407. #define R_X86_64_GOTOFF64 25
  2408. #define R_X86_64_GOTPC32 26
  2409. #define R_X86_64_GOT64 27
  2410. #define R_X86_64_GOTPCREL64 28
  2411. #define R_X86_64_GOTPC64 29
  2412. #define R_X86_64_GOTPLT64 30
  2413. #define R_X86_64_PLTOFF64 31
  2414. #define R_X86_64_SIZE32 32
  2415. #define R_X86_64_SIZE64 33
  2416. #define R_X86_64_GOTPC32_TLSDESC 34
  2417. #define R_X86_64_TLSDESC_CALL 35
  2418. #define R_X86_64_TLSDESC 36
  2419. #define R_X86_64_IRELATIVE 37
  2420. #define R_X86_64_RELATIVE64 38
  2421. #define R_X86_64_GOTPCRELX 41
  2422. #define R_X86_64_REX_GOTPCRELX 42
  2423. #define R_X86_64_NUM 43
  2424. #define R_MN10300_NONE 0
  2425. #define R_MN10300_32 1
  2426. #define R_MN10300_16 2
  2427. #define R_MN10300_8 3
  2428. #define R_MN10300_PCREL32 4
  2429. #define R_MN10300_PCREL16 5
  2430. #define R_MN10300_PCREL8 6
  2431. #define R_MN10300_GNU_VTINHERIT 7
  2432. #define R_MN10300_GNU_VTENTRY 8
  2433. #define R_MN10300_24 9
  2434. #define R_MN10300_GOTPC32 10
  2435. #define R_MN10300_GOTPC16 11
  2436. #define R_MN10300_GOTOFF32 12
  2437. #define R_MN10300_GOTOFF24 13
  2438. #define R_MN10300_GOTOFF16 14
  2439. #define R_MN10300_PLT32 15
  2440. #define R_MN10300_PLT16 16
  2441. #define R_MN10300_GOT32 17
  2442. #define R_MN10300_GOT24 18
  2443. #define R_MN10300_GOT16 19
  2444. #define R_MN10300_COPY 20
  2445. #define R_MN10300_GLOB_DAT 21
  2446. #define R_MN10300_JMP_SLOT 22
  2447. #define R_MN10300_RELATIVE 23
  2448. #define R_MN10300_NUM 24
  2449. #define R_M32R_NONE 0
  2450. #define R_M32R_16 1
  2451. #define R_M32R_32 2
  2452. #define R_M32R_24 3
  2453. #define R_M32R_10_PCREL 4
  2454. #define R_M32R_18_PCREL 5
  2455. #define R_M32R_26_PCREL 6
  2456. #define R_M32R_HI16_ULO 7
  2457. #define R_M32R_HI16_SLO 8
  2458. #define R_M32R_LO16 9
  2459. #define R_M32R_SDA16 10
  2460. #define R_M32R_GNU_VTINHERIT 11
  2461. #define R_M32R_GNU_VTENTRY 12
  2462. #define R_M32R_16_RELA 33
  2463. #define R_M32R_32_RELA 34
  2464. #define R_M32R_24_RELA 35
  2465. #define R_M32R_10_PCREL_RELA 36
  2466. #define R_M32R_18_PCREL_RELA 37
  2467. #define R_M32R_26_PCREL_RELA 38
  2468. #define R_M32R_HI16_ULO_RELA 39
  2469. #define R_M32R_HI16_SLO_RELA 40
  2470. #define R_M32R_LO16_RELA 41
  2471. #define R_M32R_SDA16_RELA 42
  2472. #define R_M32R_RELA_GNU_VTINHERIT 43
  2473. #define R_M32R_RELA_GNU_VTENTRY 44
  2474. #define R_M32R_REL32 45
  2475. #define R_M32R_GOT24 48
  2476. #define R_M32R_26_PLTREL 49
  2477. #define R_M32R_COPY 50
  2478. #define R_M32R_GLOB_DAT 51
  2479. #define R_M32R_JMP_SLOT 52
  2480. #define R_M32R_RELATIVE 53
  2481. #define R_M32R_GOTOFF 54
  2482. #define R_M32R_GOTPC24 55
  2483. #define R_M32R_GOT16_HI_ULO 56
  2484. #define R_M32R_GOT16_HI_SLO 57
  2485. #define R_M32R_GOT16_LO 58
  2486. #define R_M32R_GOTPC_HI_ULO 59
  2487. #define R_M32R_GOTPC_HI_SLO 60
  2488. #define R_M32R_GOTPC_LO 61
  2489. #define R_M32R_GOTOFF_HI_ULO 62
  2490. #define R_M32R_GOTOFF_HI_SLO 63
  2491. #define R_M32R_GOTOFF_LO 64
  2492. #define R_M32R_NUM 256
  2493. #define R_MICROBLAZE_NONE 0
  2494. #define R_MICROBLAZE_32 1
  2495. #define R_MICROBLAZE_32_PCREL 2
  2496. #define R_MICROBLAZE_64_PCREL 3
  2497. #define R_MICROBLAZE_32_PCREL_LO 4
  2498. #define R_MICROBLAZE_64 5
  2499. #define R_MICROBLAZE_32_LO 6
  2500. #define R_MICROBLAZE_SRO32 7
  2501. #define R_MICROBLAZE_SRW32 8
  2502. #define R_MICROBLAZE_64_NONE 9
  2503. #define R_MICROBLAZE_32_SYM_OP_SYM 10
  2504. #define R_MICROBLAZE_GNU_VTINHERIT 11
  2505. #define R_MICROBLAZE_GNU_VTENTRY 12
  2506. #define R_MICROBLAZE_GOTPC_64 13
  2507. #define R_MICROBLAZE_GOT_64 14
  2508. #define R_MICROBLAZE_PLT_64 15
  2509. #define R_MICROBLAZE_REL 16
  2510. #define R_MICROBLAZE_JUMP_SLOT 17
  2511. #define R_MICROBLAZE_GLOB_DAT 18
  2512. #define R_MICROBLAZE_GOTOFF_64 19
  2513. #define R_MICROBLAZE_GOTOFF_32 20
  2514. #define R_MICROBLAZE_COPY 21
  2515. #define R_MICROBLAZE_TLS 22
  2516. #define R_MICROBLAZE_TLSGD 23
  2517. #define R_MICROBLAZE_TLSLD 24
  2518. #define R_MICROBLAZE_TLSDTPMOD32 25
  2519. #define R_MICROBLAZE_TLSDTPREL32 26
  2520. #define R_MICROBLAZE_TLSDTPREL64 27
  2521. #define R_MICROBLAZE_TLSGOTTPREL32 28
  2522. #define R_MICROBLAZE_TLSTPREL32 29
  2523. #define DT_NIOS2_GP 0x70000002
  2524. #define R_NIOS2_NONE 0
  2525. #define R_NIOS2_S16 1
  2526. #define R_NIOS2_U16 2
  2527. #define R_NIOS2_PCREL16 3
  2528. #define R_NIOS2_CALL26 4
  2529. #define R_NIOS2_IMM5 5
  2530. #define R_NIOS2_CACHE_OPX 6
  2531. #define R_NIOS2_IMM6 7
  2532. #define R_NIOS2_IMM8 8
  2533. #define R_NIOS2_HI16 9
  2534. #define R_NIOS2_LO16 10
  2535. #define R_NIOS2_HIADJ16 11
  2536. #define R_NIOS2_BFD_RELOC_32 12
  2537. #define R_NIOS2_BFD_RELOC_16 13
  2538. #define R_NIOS2_BFD_RELOC_8 14
  2539. #define R_NIOS2_GPREL 15
  2540. #define R_NIOS2_GNU_VTINHERIT 16
  2541. #define R_NIOS2_GNU_VTENTRY 17
  2542. #define R_NIOS2_UJMP 18
  2543. #define R_NIOS2_CJMP 19
  2544. #define R_NIOS2_CALLR 20
  2545. #define R_NIOS2_ALIGN 21
  2546. #define R_NIOS2_GOT16 22
  2547. #define R_NIOS2_CALL16 23
  2548. #define R_NIOS2_GOTOFF_LO 24
  2549. #define R_NIOS2_GOTOFF_HA 25
  2550. #define R_NIOS2_PCREL_LO 26
  2551. #define R_NIOS2_PCREL_HA 27
  2552. #define R_NIOS2_TLS_GD16 28
  2553. #define R_NIOS2_TLS_LDM16 29
  2554. #define R_NIOS2_TLS_LDO16 30
  2555. #define R_NIOS2_TLS_IE16 31
  2556. #define R_NIOS2_TLS_LE16 32
  2557. #define R_NIOS2_TLS_DTPMOD 33
  2558. #define R_NIOS2_TLS_DTPREL 34
  2559. #define R_NIOS2_TLS_TPREL 35
  2560. #define R_NIOS2_COPY 36
  2561. #define R_NIOS2_GLOB_DAT 37
  2562. #define R_NIOS2_JUMP_SLOT 38
  2563. #define R_NIOS2_RELATIVE 39
  2564. #define R_NIOS2_GOTOFF 40
  2565. #define R_NIOS2_CALL26_NOAT 41
  2566. #define R_NIOS2_GOT_LO 42
  2567. #define R_NIOS2_GOT_HA 43
  2568. #define R_NIOS2_CALL_LO 44
  2569. #define R_NIOS2_CALL_HA 45
  2570. #define R_OR1K_NONE 0
  2571. #define R_OR1K_32 1
  2572. #define R_OR1K_16 2
  2573. #define R_OR1K_8 3
  2574. #define R_OR1K_LO_16_IN_INSN 4
  2575. #define R_OR1K_HI_16_IN_INSN 5
  2576. #define R_OR1K_INSN_REL_26 6
  2577. #define R_OR1K_GNU_VTENTRY 7
  2578. #define R_OR1K_GNU_VTINHERIT 8
  2579. #define R_OR1K_32_PCREL 9
  2580. #define R_OR1K_16_PCREL 10
  2581. #define R_OR1K_8_PCREL 11
  2582. #define R_OR1K_GOTPC_HI16 12
  2583. #define R_OR1K_GOTPC_LO16 13
  2584. #define R_OR1K_GOT16 14
  2585. #define R_OR1K_PLT26 15
  2586. #define R_OR1K_GOTOFF_HI16 16
  2587. #define R_OR1K_GOTOFF_LO16 17
  2588. #define R_OR1K_COPY 18
  2589. #define R_OR1K_GLOB_DAT 19
  2590. #define R_OR1K_JMP_SLOT 20
  2591. #define R_OR1K_RELATIVE 21
  2592. #define R_OR1K_TLS_GD_HI16 22
  2593. #define R_OR1K_TLS_GD_LO16 23
  2594. #define R_OR1K_TLS_LDM_HI16 24
  2595. #define R_OR1K_TLS_LDM_LO16 25
  2596. #define R_OR1K_TLS_LDO_HI16 26
  2597. #define R_OR1K_TLS_LDO_LO16 27
  2598. #define R_OR1K_TLS_IE_HI16 28
  2599. #define R_OR1K_TLS_IE_LO16 29
  2600. #define R_OR1K_TLS_LE_HI16 30
  2601. #define R_OR1K_TLS_LE_LO16 31
  2602. #define R_OR1K_TLS_TPOFF 32
  2603. #define R_OR1K_TLS_DTPOFF 33
  2604. #define R_OR1K_TLS_DTPMOD 34
  2605. #define R_BPF_NONE 0
  2606. #define R_BPF_MAP_FD 1
  2607. #ifdef __cplusplus
  2608. }
  2609. #endif
  2610. #endif