bfd-in2.h 251 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972
  1. /* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
  2. generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
  3. "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
  4. "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
  5. "linker.c", "simple.c" and "compress.c".
  6. Run "make headers" in your build bfd/ to regenerate. */
  7. /* Main header file for the bfd library -- portable access to object files.
  8. Copyright (C) 1990-2022 Free Software Foundation, Inc.
  9. Contributed by Cygnus Support.
  10. This file is part of BFD, the Binary File Descriptor library.
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation; either version 3 of the License, or
  14. (at your option) any later version.
  15. This program is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. GNU General Public License for more details.
  19. You should have received a copy of the GNU General Public License
  20. along with this program; if not, write to the Free Software
  21. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
  22. #ifndef __BFD_H_SEEN__
  23. #define __BFD_H_SEEN__
  24. /* PR 14072: Ensure that config.h is included first. */
  25. #if !defined PACKAGE && !defined PACKAGE_VERSION
  26. #error config.h must be included before this header
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #include "ansidecl.h"
  32. #include "symcat.h"
  33. #include <stdint.h>
  34. #include <stdbool.h>
  35. #include "diagnostics.h"
  36. #include <stdarg.h>
  37. #include <string.h>
  38. #include <sys/stat.h>
  39. #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
  40. #ifndef SABER
  41. /* This hack is to avoid a problem with some strict ANSI C preprocessors.
  42. The problem is, "32_" is not a valid preprocessing token, and we don't
  43. want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
  44. cause the inner CONCAT2 macros to be evaluated first, producing
  45. still-valid pp-tokens. Then the final concatenation can be done. */
  46. #undef CONCAT4
  47. #define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
  48. #endif
  49. #endif
  50. /* This is a utility macro to handle the situation where the code
  51. wants to place a constant string into the code, followed by a
  52. comma and then the length of the string. Doing this by hand
  53. is error prone, so using this macro is safer. */
  54. #define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
  55. #define BFD_SUPPORTS_PLUGINS @supports_plugins@
  56. /* The word size used by BFD on the host. This may be 64 with a 32
  57. bit target if the host is 64 bit, or if other 64 bit targets have
  58. been selected with --enable-targets, or if --enable-64-bit-bfd. */
  59. #define BFD_ARCH_SIZE @wordsize@
  60. /* The word size of the default bfd target. */
  61. #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
  62. #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
  63. #define BFD_HOST_64BIT_LONG_LONG @BFD_HOST_64BIT_LONG_LONG@
  64. #if @BFD_HOST_64_BIT_DEFINED@
  65. #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
  66. #define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
  67. typedef BFD_HOST_64_BIT bfd_int64_t;
  68. typedef BFD_HOST_U_64_BIT bfd_uint64_t;
  69. #endif
  70. #include <inttypes.h>
  71. #if BFD_ARCH_SIZE >= 64
  72. #define BFD64
  73. #endif
  74. /* Declaring a type wide enough to hold a host long and a host pointer. */
  75. #define BFD_HOSTPTR_T @BFD_HOSTPTR_T@
  76. typedef BFD_HOSTPTR_T bfd_hostptr_t;
  77. /* Forward declaration. */
  78. typedef struct bfd bfd;
  79. /* Boolean type used in bfd.
  80. General rule: Functions which are bfd_boolean return TRUE on
  81. success and FALSE on failure (unless they're a predicate). */
  82. #ifdef POISON_BFD_BOOLEAN
  83. # pragma GCC poison bfd_boolean
  84. #else
  85. # define bfd_boolean bool
  86. # undef FALSE
  87. # undef TRUE
  88. # define FALSE 0
  89. # define TRUE 1
  90. #endif
  91. /* Silence "applying zero offset to null pointer" UBSAN warnings. */
  92. #define PTR_ADD(P,A) ((A) != 0 ? (P) + (A) : (P))
  93. /* Also prevent non-zero offsets from being applied to a null pointer. */
  94. #define NPTR_ADD(P,A) ((P) != NULL ? (P) + (A) : (P))
  95. #ifdef BFD64
  96. #ifndef BFD_HOST_64_BIT
  97. #error No 64 bit integer type available
  98. #endif /* ! defined (BFD_HOST_64_BIT) */
  99. typedef BFD_HOST_U_64_BIT bfd_vma;
  100. typedef BFD_HOST_64_BIT bfd_signed_vma;
  101. typedef BFD_HOST_U_64_BIT bfd_size_type;
  102. typedef BFD_HOST_U_64_BIT symvalue;
  103. #if BFD_HOST_64BIT_LONG
  104. #define BFD_VMA_FMT "l"
  105. #elif defined (__MSVCRT__)
  106. #define BFD_VMA_FMT "I64"
  107. #else
  108. #define BFD_VMA_FMT "ll"
  109. #endif
  110. #ifndef fprintf_vma
  111. #define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
  112. #define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
  113. #endif
  114. #else /* not BFD64 */
  115. /* Represent a target address. Also used as a generic unsigned type
  116. which is guaranteed to be big enough to hold any arithmetic types
  117. we need to deal with. */
  118. typedef unsigned long bfd_vma;
  119. /* A generic signed type which is guaranteed to be big enough to hold any
  120. arithmetic types we need to deal with. Can be assumed to be compatible
  121. with bfd_vma in the same way that signed and unsigned ints are compatible
  122. (as parameters, in assignment, etc). */
  123. typedef long bfd_signed_vma;
  124. typedef unsigned long symvalue;
  125. typedef unsigned long bfd_size_type;
  126. /* Print a bfd_vma x on stream s. */
  127. #define BFD_VMA_FMT "l"
  128. #define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
  129. #define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
  130. #endif /* not BFD64 */
  131. #define HALF_BFD_SIZE_TYPE \
  132. (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
  133. #ifndef BFD_HOST_64_BIT
  134. /* Fall back on a 32 bit type. The idea is to make these types always
  135. available for function return types, but in the case that
  136. BFD_HOST_64_BIT is undefined such a function should abort or
  137. otherwise signal an error. */
  138. typedef bfd_signed_vma bfd_int64_t;
  139. typedef bfd_vma bfd_uint64_t;
  140. #endif
  141. /* An offset into a file. BFD always uses the largest possible offset
  142. based on the build time availability of fseek, fseeko, or fseeko64. */
  143. typedef @bfd_file_ptr@ file_ptr;
  144. typedef unsigned @bfd_file_ptr@ ufile_ptr;
  145. extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
  146. extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
  147. #define printf_vma(x) fprintf_vma(stdout,x)
  148. #define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
  149. typedef unsigned int flagword; /* 32 bits of flags */
  150. typedef unsigned char bfd_byte;
  151. /* File formats. */
  152. typedef enum bfd_format
  153. {
  154. bfd_unknown = 0, /* File format is unknown. */
  155. bfd_object, /* Linker/assembler/compiler output. */
  156. bfd_archive, /* Object archive file. */
  157. bfd_core, /* Core dump. */
  158. bfd_type_end /* Marks the end; don't use it! */
  159. }
  160. bfd_format;
  161. /* Symbols and relocation. */
  162. /* A count of carsyms (canonical archive symbols). */
  163. typedef unsigned long symindex;
  164. #define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
  165. /* A canonical archive symbol. */
  166. /* This is a type pun with struct ranlib on purpose! */
  167. typedef struct carsym
  168. {
  169. const char *name;
  170. file_ptr file_offset; /* Look here to find the file. */
  171. }
  172. carsym; /* To make these you call a carsymogen. */
  173. /* Used in generating armaps (archive tables of contents).
  174. Perhaps just a forward definition would do? */
  175. struct orl /* Output ranlib. */
  176. {
  177. char **name; /* Symbol name. */
  178. union
  179. {
  180. file_ptr pos;
  181. bfd *abfd;
  182. } u; /* bfd* or file position. */
  183. int namidx; /* Index into string table. */
  184. };
  185. /* Linenumber stuff. */
  186. typedef struct lineno_cache_entry
  187. {
  188. unsigned int line_number; /* Linenumber from start of function. */
  189. union
  190. {
  191. struct bfd_symbol *sym; /* Function name. */
  192. bfd_vma offset; /* Offset into section. */
  193. } u;
  194. }
  195. alent;
  196. /* Object and core file sections. */
  197. typedef struct bfd_section *sec_ptr;
  198. #define align_power(addr, align) \
  199. (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
  200. /* Align an address upward to a boundary, expressed as a number of bytes.
  201. E.g. align to an 8-byte boundary with argument of 8. Take care never
  202. to wrap around if the address is within boundary-1 of the end of the
  203. address space. */
  204. #define BFD_ALIGN(this, boundary) \
  205. ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
  206. ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
  207. : ~ (bfd_vma) 0)
  208. typedef enum bfd_print_symbol
  209. {
  210. bfd_print_symbol_name,
  211. bfd_print_symbol_more,
  212. bfd_print_symbol_all
  213. } bfd_print_symbol_type;
  214. /* Information about a symbol that nm needs. */
  215. typedef struct _symbol_info
  216. {
  217. symvalue value;
  218. char type;
  219. const char *name; /* Symbol name. */
  220. unsigned char stab_type; /* Stab type. */
  221. char stab_other; /* Stab other. */
  222. short stab_desc; /* Stab desc. */
  223. const char *stab_name; /* String for stab type. */
  224. } symbol_info;
  225. /* Get the name of a stabs type code. */
  226. extern const char *bfd_get_stab_name (int);
  227. /* Hash table routines. There is no way to free up a hash table. */
  228. /* An element in the hash table. Most uses will actually use a larger
  229. structure, and an instance of this will be the first field. */
  230. struct bfd_hash_entry
  231. {
  232. /* Next entry for this hash code. */
  233. struct bfd_hash_entry *next;
  234. /* String being hashed. */
  235. const char *string;
  236. /* Hash code. This is the full hash code, not the index into the
  237. table. */
  238. unsigned long hash;
  239. };
  240. /* A hash table. */
  241. struct bfd_hash_table
  242. {
  243. /* The hash array. */
  244. struct bfd_hash_entry **table;
  245. /* A function used to create new elements in the hash table. The
  246. first entry is itself a pointer to an element. When this
  247. function is first invoked, this pointer will be NULL. However,
  248. having the pointer permits a hierarchy of method functions to be
  249. built each of which calls the function in the superclass. Thus
  250. each function should be written to allocate a new block of memory
  251. only if the argument is NULL. */
  252. struct bfd_hash_entry *(*newfunc)
  253. (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
  254. /* An objalloc for this hash table. This is a struct objalloc *,
  255. but we use void * to avoid requiring the inclusion of objalloc.h. */
  256. void *memory;
  257. /* The number of slots in the hash table. */
  258. unsigned int size;
  259. /* The number of entries in the hash table. */
  260. unsigned int count;
  261. /* The size of elements. */
  262. unsigned int entsize;
  263. /* If non-zero, don't grow the hash table. */
  264. unsigned int frozen:1;
  265. };
  266. /* Initialize a hash table. */
  267. extern bool bfd_hash_table_init
  268. (struct bfd_hash_table *,
  269. struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
  270. struct bfd_hash_table *,
  271. const char *),
  272. unsigned int);
  273. /* Initialize a hash table specifying a size. */
  274. extern bool bfd_hash_table_init_n
  275. (struct bfd_hash_table *,
  276. struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
  277. struct bfd_hash_table *,
  278. const char *),
  279. unsigned int, unsigned int);
  280. /* Free up a hash table. */
  281. extern void bfd_hash_table_free
  282. (struct bfd_hash_table *);
  283. /* Look up a string in a hash table. If CREATE is TRUE, a new entry
  284. will be created for this string if one does not already exist. The
  285. COPY argument must be TRUE if this routine should copy the string
  286. into newly allocated memory when adding an entry. */
  287. extern struct bfd_hash_entry *bfd_hash_lookup
  288. (struct bfd_hash_table *, const char *, bool create, bool copy);
  289. /* Insert an entry in a hash table. */
  290. extern struct bfd_hash_entry *bfd_hash_insert
  291. (struct bfd_hash_table *, const char *, unsigned long);
  292. /* Rename an entry in a hash table. */
  293. extern void bfd_hash_rename
  294. (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
  295. /* Replace an entry in a hash table. */
  296. extern void bfd_hash_replace
  297. (struct bfd_hash_table *, struct bfd_hash_entry *old,
  298. struct bfd_hash_entry *nw);
  299. /* Base method for creating a hash table entry. */
  300. extern struct bfd_hash_entry *bfd_hash_newfunc
  301. (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
  302. /* Grab some space for a hash table entry. */
  303. extern void *bfd_hash_allocate
  304. (struct bfd_hash_table *, unsigned int);
  305. /* Traverse a hash table in a random order, calling a function on each
  306. element. If the function returns FALSE, the traversal stops. The
  307. INFO argument is passed to the function. */
  308. extern void bfd_hash_traverse
  309. (struct bfd_hash_table *,
  310. bool (*) (struct bfd_hash_entry *, void *),
  311. void *info);
  312. /* Allows the default size of a hash table to be configured. New hash
  313. tables allocated using bfd_hash_table_init will be created with
  314. this size. */
  315. extern unsigned long bfd_hash_set_default_size (unsigned long);
  316. /* Types of compressed DWARF debug sections. We currently support
  317. zlib. */
  318. enum compressed_debug_section_type
  319. {
  320. COMPRESS_DEBUG_NONE = 0,
  321. COMPRESS_DEBUG = 1 << 0,
  322. COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1,
  323. COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2
  324. };
  325. /* This structure is used to keep track of stabs in sections
  326. information while linking. */
  327. struct stab_info
  328. {
  329. /* A hash table used to hold stabs strings. */
  330. struct bfd_strtab_hash *strings;
  331. /* The header file hash table. */
  332. struct bfd_hash_table includes;
  333. /* The first .stabstr section. */
  334. struct bfd_section *stabstr;
  335. };
  336. #define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
  337. /* User program access to BFD facilities. */
  338. /* Direct I/O routines, for programs which know more about the object
  339. file than BFD does. Use higher level routines if possible. */
  340. extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
  341. extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
  342. extern int bfd_seek (bfd *, file_ptr, int);
  343. extern file_ptr bfd_tell (bfd *);
  344. extern int bfd_flush (bfd *);
  345. extern int bfd_stat (bfd *, struct stat *);
  346. /* Deprecated old routines. */
  347. #if __GNUC__
  348. #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
  349. (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
  350. bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
  351. #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
  352. (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
  353. bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
  354. #else
  355. #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
  356. (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
  357. bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
  358. #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
  359. (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
  360. bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
  361. #endif
  362. extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
  363. extern bool bfd_cache_close
  364. (bfd *abfd);
  365. /* NB: This declaration should match the autogenerated one in libbfd.h. */
  366. extern bool bfd_cache_close_all (void);
  367. extern bool bfd_record_phdr
  368. (bfd *, unsigned long, bool, flagword, bool, bfd_vma,
  369. bool, bool, unsigned int, struct bfd_section **);
  370. /* Byte swapping routines. */
  371. bfd_uint64_t bfd_getb64 (const void *);
  372. bfd_uint64_t bfd_getl64 (const void *);
  373. bfd_int64_t bfd_getb_signed_64 (const void *);
  374. bfd_int64_t bfd_getl_signed_64 (const void *);
  375. bfd_vma bfd_getb32 (const void *);
  376. bfd_vma bfd_getl32 (const void *);
  377. bfd_signed_vma bfd_getb_signed_32 (const void *);
  378. bfd_signed_vma bfd_getl_signed_32 (const void *);
  379. bfd_vma bfd_getb16 (const void *);
  380. bfd_vma bfd_getl16 (const void *);
  381. bfd_signed_vma bfd_getb_signed_16 (const void *);
  382. bfd_signed_vma bfd_getl_signed_16 (const void *);
  383. void bfd_putb64 (bfd_uint64_t, void *);
  384. void bfd_putl64 (bfd_uint64_t, void *);
  385. void bfd_putb32 (bfd_vma, void *);
  386. void bfd_putl32 (bfd_vma, void *);
  387. void bfd_putb24 (bfd_vma, void *);
  388. void bfd_putl24 (bfd_vma, void *);
  389. void bfd_putb16 (bfd_vma, void *);
  390. void bfd_putl16 (bfd_vma, void *);
  391. /* Byte swapping routines which take size and endiannes as arguments. */
  392. bfd_uint64_t bfd_get_bits (const void *, int, bool);
  393. void bfd_put_bits (bfd_uint64_t, void *, int, bool);
  394. /* mmap hacks */
  395. struct _bfd_window_internal;
  396. typedef struct _bfd_window_internal bfd_window_internal;
  397. typedef struct _bfd_window
  398. {
  399. /* What the user asked for. */
  400. void *data;
  401. bfd_size_type size;
  402. /* The actual window used by BFD. Small user-requested read-only
  403. regions sharing a page may share a single window into the object
  404. file. Read-write versions shouldn't until I've fixed things to
  405. keep track of which portions have been claimed by the
  406. application; don't want to give the same region back when the
  407. application wants two writable copies! */
  408. struct _bfd_window_internal *i;
  409. }
  410. bfd_window;
  411. extern void bfd_init_window
  412. (bfd_window *);
  413. extern void bfd_free_window
  414. (bfd_window *);
  415. extern bool bfd_get_file_window
  416. (bfd *, file_ptr, bfd_size_type, bfd_window *, bool);
  417. /* Externally visible ELF routines. */
  418. /* Create a new BFD as if by bfd_openr. Rather than opening a file,
  419. reconstruct an ELF file by reading the segments out of remote
  420. memory based on the ELF file header at EHDR_VMA and the ELF program
  421. headers it points to. If non-zero, SIZE is the known extent of the
  422. object. If not null, *LOADBASEP is filled in with the difference
  423. between the VMAs from which the segments were read, and the VMAs
  424. the file headers (and hence BFD's idea of each section's VMA) put
  425. them at.
  426. The function TARGET_READ_MEMORY is called to copy LEN bytes from
  427. the remote memory at target address VMA into the local buffer at
  428. MYADDR; it should return zero on success or an `errno' code on
  429. failure. TEMPL must be a BFD for a target with the word size and
  430. byte order found in the remote memory. */
  431. extern bfd *bfd_elf_bfd_from_remote_memory
  432. (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
  433. int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
  434. bfd_size_type len));
  435. /* Forward declarations. */
  436. struct ecoff_debug_info;
  437. struct ecoff_debug_swap;
  438. struct ecoff_extr;
  439. struct bfd_link_info;
  440. struct bfd_link_hash_entry;
  441. /* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */
  442. static inline bool
  443. startswith (const char *str, const char *prefix)
  444. {
  445. return strncmp (str, prefix, strlen (prefix)) == 0;
  446. }
  447. /* Extracted from init.c. */
  448. unsigned int bfd_init (void);
  449. /* Value returned by bfd_init. */
  450. #define BFD_INIT_MAGIC (sizeof (struct bfd_section))
  451. /* Extracted from opncls.c. */
  452. /* Set to N to open the next N BFDs using an alternate id space. */
  453. extern unsigned int bfd_use_reserved_id;
  454. bfd *bfd_fopen (const char *filename, const char *target,
  455. const char *mode, int fd);
  456. bfd *bfd_openr (const char *filename, const char *target);
  457. bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
  458. bfd *bfd_fdopenw (const char *filename, const char *target, int fd);
  459. bfd *bfd_openstreamr (const char * filename, const char * target,
  460. void * stream);
  461. bfd *bfd_openr_iovec (const char *filename, const char *target,
  462. void *(*open_func) (struct bfd *nbfd,
  463. void *open_closure),
  464. void *open_closure,
  465. file_ptr (*pread_func) (struct bfd *nbfd,
  466. void *stream,
  467. void *buf,
  468. file_ptr nbytes,
  469. file_ptr offset),
  470. int (*close_func) (struct bfd *nbfd,
  471. void *stream),
  472. int (*stat_func) (struct bfd *abfd,
  473. void *stream,
  474. struct stat *sb));
  475. bfd *bfd_openw (const char *filename, const char *target);
  476. bool bfd_close (bfd *abfd);
  477. bool bfd_close_all_done (bfd *);
  478. bfd *bfd_create (const char *filename, bfd *templ);
  479. bool bfd_make_writable (bfd *abfd);
  480. bool bfd_make_readable (bfd *abfd);
  481. void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
  482. void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
  483. unsigned long bfd_calc_gnu_debuglink_crc32
  484. (unsigned long crc, const unsigned char *buf, bfd_size_type len);
  485. char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
  486. char *bfd_get_alt_debug_link_info (bfd * abfd,
  487. bfd_size_type *buildid_len,
  488. bfd_byte **buildid_out);
  489. char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
  490. char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
  491. struct bfd_section *bfd_create_gnu_debuglink_section
  492. (bfd *abfd, const char *filename);
  493. bool bfd_fill_in_gnu_debuglink_section
  494. (bfd *abfd, struct bfd_section *sect, const char *filename);
  495. char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
  496. const char *bfd_set_filename (bfd *abfd, const char *filename);
  497. /* Extracted from libbfd.c. */
  498. /* Byte swapping macros for user section data. */
  499. #define bfd_put_8(abfd, val, ptr) \
  500. ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
  501. #define bfd_put_signed_8 \
  502. bfd_put_8
  503. #define bfd_get_8(abfd, ptr) \
  504. ((bfd_vma) *(const unsigned char *) (ptr) & 0xff)
  505. #define bfd_get_signed_8(abfd, ptr) \
  506. ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
  507. #define bfd_put_16(abfd, val, ptr) \
  508. BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
  509. #define bfd_put_signed_16 \
  510. bfd_put_16
  511. #define bfd_get_16(abfd, ptr) \
  512. BFD_SEND (abfd, bfd_getx16, (ptr))
  513. #define bfd_get_signed_16(abfd, ptr) \
  514. BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
  515. #define bfd_put_24(abfd, val, ptr) \
  516. do \
  517. if (bfd_big_endian (abfd)) \
  518. bfd_putb24 ((val), (ptr)); \
  519. else \
  520. bfd_putl24 ((val), (ptr)); \
  521. while (0)
  522. bfd_vma bfd_getb24 (const void *p);
  523. bfd_vma bfd_getl24 (const void *p);
  524. #define bfd_get_24(abfd, ptr) \
  525. (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr))
  526. #define bfd_put_32(abfd, val, ptr) \
  527. BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
  528. #define bfd_put_signed_32 \
  529. bfd_put_32
  530. #define bfd_get_32(abfd, ptr) \
  531. BFD_SEND (abfd, bfd_getx32, (ptr))
  532. #define bfd_get_signed_32(abfd, ptr) \
  533. BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
  534. #define bfd_put_64(abfd, val, ptr) \
  535. BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
  536. #define bfd_put_signed_64 \
  537. bfd_put_64
  538. #define bfd_get_64(abfd, ptr) \
  539. BFD_SEND (abfd, bfd_getx64, (ptr))
  540. #define bfd_get_signed_64(abfd, ptr) \
  541. BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
  542. #define bfd_get(bits, abfd, ptr) \
  543. ((bits) == 8 ? bfd_get_8 (abfd, ptr) \
  544. : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
  545. : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
  546. : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
  547. : (abort (), (bfd_vma) - 1))
  548. #define bfd_put(bits, abfd, val, ptr) \
  549. ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
  550. : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
  551. : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
  552. : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
  553. : (abort (), (void) 0))
  554. /* Byte swapping macros for file header data. */
  555. #define bfd_h_put_8(abfd, val, ptr) \
  556. bfd_put_8 (abfd, val, ptr)
  557. #define bfd_h_put_signed_8(abfd, val, ptr) \
  558. bfd_put_8 (abfd, val, ptr)
  559. #define bfd_h_get_8(abfd, ptr) \
  560. bfd_get_8 (abfd, ptr)
  561. #define bfd_h_get_signed_8(abfd, ptr) \
  562. bfd_get_signed_8 (abfd, ptr)
  563. #define bfd_h_put_16(abfd, val, ptr) \
  564. BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
  565. #define bfd_h_put_signed_16 \
  566. bfd_h_put_16
  567. #define bfd_h_get_16(abfd, ptr) \
  568. BFD_SEND (abfd, bfd_h_getx16, (ptr))
  569. #define bfd_h_get_signed_16(abfd, ptr) \
  570. BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
  571. #define bfd_h_put_32(abfd, val, ptr) \
  572. BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
  573. #define bfd_h_put_signed_32 \
  574. bfd_h_put_32
  575. #define bfd_h_get_32(abfd, ptr) \
  576. BFD_SEND (abfd, bfd_h_getx32, (ptr))
  577. #define bfd_h_get_signed_32(abfd, ptr) \
  578. BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
  579. #define bfd_h_put_64(abfd, val, ptr) \
  580. BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
  581. #define bfd_h_put_signed_64 \
  582. bfd_h_put_64
  583. #define bfd_h_get_64(abfd, ptr) \
  584. BFD_SEND (abfd, bfd_h_getx64, (ptr))
  585. #define bfd_h_get_signed_64(abfd, ptr) \
  586. BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
  587. /* Aliases for the above, which should eventually go away. */
  588. #define H_PUT_64 bfd_h_put_64
  589. #define H_PUT_32 bfd_h_put_32
  590. #define H_PUT_16 bfd_h_put_16
  591. #define H_PUT_8 bfd_h_put_8
  592. #define H_PUT_S64 bfd_h_put_signed_64
  593. #define H_PUT_S32 bfd_h_put_signed_32
  594. #define H_PUT_S16 bfd_h_put_signed_16
  595. #define H_PUT_S8 bfd_h_put_signed_8
  596. #define H_GET_64 bfd_h_get_64
  597. #define H_GET_32 bfd_h_get_32
  598. #define H_GET_16 bfd_h_get_16
  599. #define H_GET_8 bfd_h_get_8
  600. #define H_GET_S64 bfd_h_get_signed_64
  601. #define H_GET_S32 bfd_h_get_signed_32
  602. #define H_GET_S16 bfd_h_get_signed_16
  603. #define H_GET_S8 bfd_h_get_signed_8
  604. /* Extracted from bfdio.c. */
  605. long bfd_get_mtime (bfd *abfd);
  606. ufile_ptr bfd_get_size (bfd *abfd);
  607. ufile_ptr bfd_get_file_size (bfd *abfd);
  608. void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
  609. int prot, int flags, file_ptr offset,
  610. void **map_addr, bfd_size_type *map_len);
  611. /* Extracted from bfdwin.c. */
  612. /* Extracted from section.c. */
  613. typedef struct bfd_section
  614. {
  615. /* The name of the section; the name isn't a copy, the pointer is
  616. the same as that passed to bfd_make_section. */
  617. const char *name;
  618. /* The next section in the list belonging to the BFD, or NULL. */
  619. struct bfd_section *next;
  620. /* The previous section in the list belonging to the BFD, or NULL. */
  621. struct bfd_section *prev;
  622. /* A unique sequence number. */
  623. unsigned int id;
  624. /* A unique section number which can be used by assembler to
  625. distinguish different sections with the same section name. */
  626. unsigned int section_id;
  627. /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
  628. unsigned int index;
  629. /* The field flags contains attributes of the section. Some
  630. flags are read in from the object file, and some are
  631. synthesized from other information. */
  632. flagword flags;
  633. #define SEC_NO_FLAGS 0x0
  634. /* Tells the OS to allocate space for this section when loading.
  635. This is clear for a section containing debug information only. */
  636. #define SEC_ALLOC 0x1
  637. /* Tells the OS to load the section from the file when loading.
  638. This is clear for a .bss section. */
  639. #define SEC_LOAD 0x2
  640. /* The section contains data still to be relocated, so there is
  641. some relocation information too. */
  642. #define SEC_RELOC 0x4
  643. /* A signal to the OS that the section contains read only data. */
  644. #define SEC_READONLY 0x8
  645. /* The section contains code only. */
  646. #define SEC_CODE 0x10
  647. /* The section contains data only. */
  648. #define SEC_DATA 0x20
  649. /* The section will reside in ROM. */
  650. #define SEC_ROM 0x40
  651. /* The section contains constructor information. This section
  652. type is used by the linker to create lists of constructors and
  653. destructors used by <<g++>>. When a back end sees a symbol
  654. which should be used in a constructor list, it creates a new
  655. section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
  656. the symbol to it, and builds a relocation. To build the lists
  657. of constructors, all the linker has to do is catenate all the
  658. sections called <<__CTOR_LIST__>> and relocate the data
  659. contained within - exactly the operations it would peform on
  660. standard data. */
  661. #define SEC_CONSTRUCTOR 0x80
  662. /* The section has contents - a data section could be
  663. <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
  664. <<SEC_HAS_CONTENTS>> */
  665. #define SEC_HAS_CONTENTS 0x100
  666. /* An instruction to the linker to not output the section
  667. even if it has information which would normally be written. */
  668. #define SEC_NEVER_LOAD 0x200
  669. /* The section contains thread local data. */
  670. #define SEC_THREAD_LOCAL 0x400
  671. /* The section's size is fixed. Generic linker code will not
  672. recalculate it and it is up to whoever has set this flag to
  673. get the size right. */
  674. #define SEC_FIXED_SIZE 0x800
  675. /* The section contains common symbols (symbols may be defined
  676. multiple times, the value of a symbol is the amount of
  677. space it requires, and the largest symbol value is the one
  678. used). Most targets have exactly one of these (which we
  679. translate to bfd_com_section_ptr), but ECOFF has two. */
  680. #define SEC_IS_COMMON 0x1000
  681. /* The section contains only debugging information. For
  682. example, this is set for ELF .debug and .stab sections.
  683. strip tests this flag to see if a section can be
  684. discarded. */
  685. #define SEC_DEBUGGING 0x2000
  686. /* The contents of this section are held in memory pointed to
  687. by the contents field. This is checked by bfd_get_section_contents,
  688. and the data is retrieved from memory if appropriate. */
  689. #define SEC_IN_MEMORY 0x4000
  690. /* The contents of this section are to be excluded by the
  691. linker for executable and shared objects unless those
  692. objects are to be further relocated. */
  693. #define SEC_EXCLUDE 0x8000
  694. /* The contents of this section are to be sorted based on the sum of
  695. the symbol and addend values specified by the associated relocation
  696. entries. Entries without associated relocation entries will be
  697. appended to the end of the section in an unspecified order. */
  698. #define SEC_SORT_ENTRIES 0x10000
  699. /* When linking, duplicate sections of the same name should be
  700. discarded, rather than being combined into a single section as
  701. is usually done. This is similar to how common symbols are
  702. handled. See SEC_LINK_DUPLICATES below. */
  703. #define SEC_LINK_ONCE 0x20000
  704. /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
  705. should handle duplicate sections. */
  706. #define SEC_LINK_DUPLICATES 0xc0000
  707. /* This value for SEC_LINK_DUPLICATES means that duplicate
  708. sections with the same name should simply be discarded. */
  709. #define SEC_LINK_DUPLICATES_DISCARD 0x0
  710. /* This value for SEC_LINK_DUPLICATES means that the linker
  711. should warn if there are any duplicate sections, although
  712. it should still only link one copy. */
  713. #define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000
  714. /* This value for SEC_LINK_DUPLICATES means that the linker
  715. should warn if any duplicate sections are a different size. */
  716. #define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000
  717. /* This value for SEC_LINK_DUPLICATES means that the linker
  718. should warn if any duplicate sections contain different
  719. contents. */
  720. #define SEC_LINK_DUPLICATES_SAME_CONTENTS \
  721. (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
  722. /* This section was created by the linker as part of dynamic
  723. relocation or other arcane processing. It is skipped when
  724. going through the first-pass output, trusting that someone
  725. else up the line will take care of it later. */
  726. #define SEC_LINKER_CREATED 0x100000
  727. /* This section contains a section ID to distinguish different
  728. sections with the same section name. */
  729. #define SEC_ASSEMBLER_SECTION_ID 0x100000
  730. /* This section should not be subject to garbage collection.
  731. Also set to inform the linker that this section should not be
  732. listed in the link map as discarded. */
  733. #define SEC_KEEP 0x200000
  734. /* This section contains "short" data, and should be placed
  735. "near" the GP. */
  736. #define SEC_SMALL_DATA 0x400000
  737. /* Attempt to merge identical entities in the section.
  738. Entity size is given in the entsize field. */
  739. #define SEC_MERGE 0x800000
  740. /* If given with SEC_MERGE, entities to merge are zero terminated
  741. strings where entsize specifies character size instead of fixed
  742. size entries. */
  743. #define SEC_STRINGS 0x1000000
  744. /* This section contains data about section groups. */
  745. #define SEC_GROUP 0x2000000
  746. /* The section is a COFF shared library section. This flag is
  747. only for the linker. If this type of section appears in
  748. the input file, the linker must copy it to the output file
  749. without changing the vma or size. FIXME: Although this
  750. was originally intended to be general, it really is COFF
  751. specific (and the flag was renamed to indicate this). It
  752. might be cleaner to have some more general mechanism to
  753. allow the back end to control what the linker does with
  754. sections. */
  755. #define SEC_COFF_SHARED_LIBRARY 0x4000000
  756. /* This input section should be copied to output in reverse order
  757. as an array of pointers. This is for ELF linker internal use
  758. only. */
  759. #define SEC_ELF_REVERSE_COPY 0x4000000
  760. /* This section contains data which may be shared with other
  761. executables or shared objects. This is for COFF only. */
  762. #define SEC_COFF_SHARED 0x8000000
  763. /* This section should be compressed. This is for ELF linker
  764. internal use only. */
  765. #define SEC_ELF_COMPRESS 0x8000000
  766. /* When a section with this flag is being linked, then if the size of
  767. the input section is less than a page, it should not cross a page
  768. boundary. If the size of the input section is one page or more,
  769. it should be aligned on a page boundary. This is for TI
  770. TMS320C54X only. */
  771. #define SEC_TIC54X_BLOCK 0x10000000
  772. /* This section should be renamed. This is for ELF linker
  773. internal use only. */
  774. #define SEC_ELF_RENAME 0x10000000
  775. /* Conditionally link this section; do not link if there are no
  776. references found to any symbol in the section. This is for TI
  777. TMS320C54X only. */
  778. #define SEC_TIC54X_CLINK 0x20000000
  779. /* This section contains vliw code. This is for Toshiba MeP only. */
  780. #define SEC_MEP_VLIW 0x20000000
  781. /* All symbols, sizes and relocations in this section are octets
  782. instead of bytes. Required for DWARF debug sections as DWARF
  783. information is organized in octets, not bytes. */
  784. #define SEC_ELF_OCTETS 0x40000000
  785. /* Indicate that section has the no read flag set. This happens
  786. when memory read flag isn't set. */
  787. #define SEC_COFF_NOREAD 0x40000000
  788. /* Indicate that section has the purecode flag set. */
  789. #define SEC_ELF_PURECODE 0x80000000
  790. /* End of section flags. */
  791. /* Some internal packed boolean fields. */
  792. /* See the vma field. */
  793. unsigned int user_set_vma : 1;
  794. /* A mark flag used by some of the linker backends. */
  795. unsigned int linker_mark : 1;
  796. /* Another mark flag used by some of the linker backends. Set for
  797. output sections that have an input section. */
  798. unsigned int linker_has_input : 1;
  799. /* Mark flag used by some linker backends for garbage collection. */
  800. unsigned int gc_mark : 1;
  801. /* Section compression status. */
  802. unsigned int compress_status : 2;
  803. #define COMPRESS_SECTION_NONE 0
  804. #define COMPRESS_SECTION_DONE 1
  805. #define DECOMPRESS_SECTION_SIZED 2
  806. /* The following flags are used by the ELF linker. */
  807. /* Mark sections which have been allocated to segments. */
  808. unsigned int segment_mark : 1;
  809. /* Type of sec_info information. */
  810. unsigned int sec_info_type:3;
  811. #define SEC_INFO_TYPE_NONE 0
  812. #define SEC_INFO_TYPE_STABS 1
  813. #define SEC_INFO_TYPE_MERGE 2
  814. #define SEC_INFO_TYPE_EH_FRAME 3
  815. #define SEC_INFO_TYPE_JUST_SYMS 4
  816. #define SEC_INFO_TYPE_TARGET 5
  817. #define SEC_INFO_TYPE_EH_FRAME_ENTRY 6
  818. /* Nonzero if this section uses RELA relocations, rather than REL. */
  819. unsigned int use_rela_p:1;
  820. /* Bits used by various backends. The generic code doesn't touch
  821. these fields. */
  822. unsigned int sec_flg0:1;
  823. unsigned int sec_flg1:1;
  824. unsigned int sec_flg2:1;
  825. unsigned int sec_flg3:1;
  826. unsigned int sec_flg4:1;
  827. unsigned int sec_flg5:1;
  828. /* End of internal packed boolean fields. */
  829. /* The virtual memory address of the section - where it will be
  830. at run time. The symbols are relocated against this. The
  831. user_set_vma flag is maintained by bfd; if it's not set, the
  832. backend can assign addresses (for example, in <<a.out>>, where
  833. the default address for <<.data>> is dependent on the specific
  834. target and various flags). */
  835. bfd_vma vma;
  836. /* The load address of the section - where it would be in a
  837. rom image; really only used for writing section header
  838. information. */
  839. bfd_vma lma;
  840. /* The size of the section in *octets*, as it will be output.
  841. Contains a value even if the section has no contents (e.g., the
  842. size of <<.bss>>). */
  843. bfd_size_type size;
  844. /* For input sections, the original size on disk of the section, in
  845. octets. This field should be set for any section whose size is
  846. changed by linker relaxation. It is required for sections where
  847. the linker relaxation scheme doesn't cache altered section and
  848. reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing
  849. targets), and thus the original size needs to be kept to read the
  850. section multiple times. For output sections, rawsize holds the
  851. section size calculated on a previous linker relaxation pass. */
  852. bfd_size_type rawsize;
  853. /* The compressed size of the section in octets. */
  854. bfd_size_type compressed_size;
  855. /* If this section is going to be output, then this value is the
  856. offset in *bytes* into the output section of the first byte in the
  857. input section (byte ==> smallest addressable unit on the
  858. target). In most cases, if this was going to start at the
  859. 100th octet (8-bit quantity) in the output section, this value
  860. would be 100. However, if the target byte size is 16 bits
  861. (bfd_octets_per_byte is "2"), this value would be 50. */
  862. bfd_vma output_offset;
  863. /* The output section through which to map on output. */
  864. struct bfd_section *output_section;
  865. /* If an input section, a pointer to a vector of relocation
  866. records for the data in this section. */
  867. struct reloc_cache_entry *relocation;
  868. /* If an output section, a pointer to a vector of pointers to
  869. relocation records for the data in this section. */
  870. struct reloc_cache_entry **orelocation;
  871. /* The number of relocation records in one of the above. */
  872. unsigned reloc_count;
  873. /* The alignment requirement of the section, as an exponent of 2 -
  874. e.g., 3 aligns to 2^3 (or 8). */
  875. unsigned int alignment_power;
  876. /* Information below is back end specific - and not always used
  877. or updated. */
  878. /* File position of section data. */
  879. file_ptr filepos;
  880. /* File position of relocation info. */
  881. file_ptr rel_filepos;
  882. /* File position of line data. */
  883. file_ptr line_filepos;
  884. /* Pointer to data for applications. */
  885. void *userdata;
  886. /* If the SEC_IN_MEMORY flag is set, this points to the actual
  887. contents. */
  888. unsigned char *contents;
  889. /* Attached line number information. */
  890. alent *lineno;
  891. /* Number of line number records. */
  892. unsigned int lineno_count;
  893. /* Entity size for merging purposes. */
  894. unsigned int entsize;
  895. /* Points to the kept section if this section is a link-once section,
  896. and is discarded. */
  897. struct bfd_section *kept_section;
  898. /* When a section is being output, this value changes as more
  899. linenumbers are written out. */
  900. file_ptr moving_line_filepos;
  901. /* What the section number is in the target world. */
  902. int target_index;
  903. void *used_by_bfd;
  904. /* If this is a constructor section then here is a list of the
  905. relocations created to relocate items within it. */
  906. struct relent_chain *constructor_chain;
  907. /* The BFD which owns the section. */
  908. bfd *owner;
  909. /* A symbol which points at this section only. */
  910. struct bfd_symbol *symbol;
  911. struct bfd_symbol **symbol_ptr_ptr;
  912. /* Early in the link process, map_head and map_tail are used to build
  913. a list of input sections attached to an output section. Later,
  914. output sections use these fields for a list of bfd_link_order
  915. structs. The linked_to_symbol_name field is for ELF assembler
  916. internal use. */
  917. union {
  918. struct bfd_link_order *link_order;
  919. struct bfd_section *s;
  920. const char *linked_to_symbol_name;
  921. } map_head, map_tail;
  922. /* Points to the output section this section is already assigned to,
  923. if any. This is used when support for non-contiguous memory
  924. regions is enabled. */
  925. struct bfd_section *already_assigned;
  926. /* Explicitly specified section type, if non-zero. */
  927. unsigned int type;
  928. } asection;
  929. static inline const char *
  930. bfd_section_name (const asection *sec)
  931. {
  932. return sec->name;
  933. }
  934. static inline bfd_size_type
  935. bfd_section_size (const asection *sec)
  936. {
  937. return sec->size;
  938. }
  939. static inline bfd_vma
  940. bfd_section_vma (const asection *sec)
  941. {
  942. return sec->vma;
  943. }
  944. static inline bfd_vma
  945. bfd_section_lma (const asection *sec)
  946. {
  947. return sec->lma;
  948. }
  949. static inline unsigned int
  950. bfd_section_alignment (const asection *sec)
  951. {
  952. return sec->alignment_power;
  953. }
  954. static inline flagword
  955. bfd_section_flags (const asection *sec)
  956. {
  957. return sec->flags;
  958. }
  959. static inline void *
  960. bfd_section_userdata (const asection *sec)
  961. {
  962. return sec->userdata;
  963. }
  964. static inline bool
  965. bfd_is_com_section (const asection *sec)
  966. {
  967. return (sec->flags & SEC_IS_COMMON) != 0;
  968. }
  969. /* Note: the following are provided as inline functions rather than macros
  970. because not all callers use the return value. A macro implementation
  971. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
  972. compilers will complain about comma expressions that have no effect. */
  973. static inline bool
  974. bfd_set_section_userdata (asection *sec, void *val)
  975. {
  976. sec->userdata = val;
  977. return true;
  978. }
  979. static inline bool
  980. bfd_set_section_vma (asection *sec, bfd_vma val)
  981. {
  982. sec->vma = sec->lma = val;
  983. sec->user_set_vma = true;
  984. return true;
  985. }
  986. static inline bool
  987. bfd_set_section_lma (asection *sec, bfd_vma val)
  988. {
  989. sec->lma = val;
  990. return true;
  991. }
  992. static inline bool
  993. bfd_set_section_alignment (asection *sec, unsigned int val)
  994. {
  995. sec->alignment_power = val;
  996. return true;
  997. }
  998. /* These sections are global, and are managed by BFD. The application
  999. and target back end are not permitted to change the values in
  1000. these sections. */
  1001. extern asection _bfd_std_section[4];
  1002. #define BFD_ABS_SECTION_NAME "*ABS*"
  1003. #define BFD_UND_SECTION_NAME "*UND*"
  1004. #define BFD_COM_SECTION_NAME "*COM*"
  1005. #define BFD_IND_SECTION_NAME "*IND*"
  1006. /* Pointer to the common section. */
  1007. #define bfd_com_section_ptr (&_bfd_std_section[0])
  1008. /* Pointer to the undefined section. */
  1009. #define bfd_und_section_ptr (&_bfd_std_section[1])
  1010. /* Pointer to the absolute section. */
  1011. #define bfd_abs_section_ptr (&_bfd_std_section[2])
  1012. /* Pointer to the indirect section. */
  1013. #define bfd_ind_section_ptr (&_bfd_std_section[3])
  1014. static inline bool
  1015. bfd_is_und_section (const asection *sec)
  1016. {
  1017. return sec == bfd_und_section_ptr;
  1018. }
  1019. static inline bool
  1020. bfd_is_abs_section (const asection *sec)
  1021. {
  1022. return sec == bfd_abs_section_ptr;
  1023. }
  1024. static inline bool
  1025. bfd_is_ind_section (const asection *sec)
  1026. {
  1027. return sec == bfd_ind_section_ptr;
  1028. }
  1029. static inline bool
  1030. bfd_is_const_section (const asection *sec)
  1031. {
  1032. return (sec >= _bfd_std_section
  1033. && sec < _bfd_std_section + (sizeof (_bfd_std_section)
  1034. / sizeof (_bfd_std_section[0])));
  1035. }
  1036. /* Return TRUE if input section SEC has been discarded. */
  1037. static inline bool
  1038. discarded_section (const asection *sec)
  1039. {
  1040. return (!bfd_is_abs_section (sec)
  1041. && bfd_is_abs_section (sec->output_section)
  1042. && sec->sec_info_type != SEC_INFO_TYPE_MERGE
  1043. && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS);
  1044. }
  1045. #define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \
  1046. /* name, next, prev, id, section_id, index, flags, user_set_vma, */ \
  1047. { NAME, NULL, NULL, IDX, 0, 0, FLAGS, 0, \
  1048. \
  1049. /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
  1050. 0, 0, 1, 0, \
  1051. \
  1052. /* segment_mark, sec_info_type, use_rela_p, */ \
  1053. 0, 0, 0, \
  1054. \
  1055. /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
  1056. 0, 0, 0, 0, 0, 0, \
  1057. \
  1058. /* vma, lma, size, rawsize, compressed_size, */ \
  1059. 0, 0, 0, 0, 0, \
  1060. \
  1061. /* output_offset, output_section, relocation, orelocation, */ \
  1062. 0, &SEC, NULL, NULL, \
  1063. \
  1064. /* reloc_count, alignment_power, filepos, rel_filepos, */ \
  1065. 0, 0, 0, 0, \
  1066. \
  1067. /* line_filepos, userdata, contents, lineno, lineno_count, */ \
  1068. 0, NULL, NULL, NULL, 0, \
  1069. \
  1070. /* entsize, kept_section, moving_line_filepos, */ \
  1071. 0, NULL, 0, \
  1072. \
  1073. /* target_index, used_by_bfd, constructor_chain, owner, */ \
  1074. 0, NULL, NULL, NULL, \
  1075. \
  1076. /* symbol, symbol_ptr_ptr, */ \
  1077. (struct bfd_symbol *) SYM, &SEC.symbol, \
  1078. \
  1079. /* map_head, map_tail, already_assigned, type */ \
  1080. { NULL }, { NULL }, NULL, 0 \
  1081. \
  1082. }
  1083. /* We use a macro to initialize the static asymbol structures because
  1084. traditional C does not permit us to initialize a union member while
  1085. gcc warns if we don't initialize it.
  1086. the_bfd, name, value, attr, section [, udata] */
  1087. #ifdef __STDC__
  1088. #define GLOBAL_SYM_INIT(NAME, SECTION) \
  1089. { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
  1090. #else
  1091. #define GLOBAL_SYM_INIT(NAME, SECTION) \
  1092. { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
  1093. #endif
  1094. void bfd_section_list_clear (bfd *);
  1095. asection *bfd_get_section_by_name (bfd *abfd, const char *name);
  1096. asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
  1097. asection *bfd_get_linker_section (bfd *abfd, const char *name);
  1098. asection *bfd_get_section_by_name_if
  1099. (bfd *abfd,
  1100. const char *name,
  1101. bool (*func) (bfd *abfd, asection *sect, void *obj),
  1102. void *obj);
  1103. char *bfd_get_unique_section_name
  1104. (bfd *abfd, const char *templat, int *count);
  1105. asection *bfd_make_section_old_way (bfd *abfd, const char *name);
  1106. asection *bfd_make_section_anyway_with_flags
  1107. (bfd *abfd, const char *name, flagword flags);
  1108. asection *bfd_make_section_anyway (bfd *abfd, const char *name);
  1109. asection *bfd_make_section_with_flags
  1110. (bfd *, const char *name, flagword flags);
  1111. asection *bfd_make_section (bfd *, const char *name);
  1112. bool bfd_set_section_flags (asection *sec, flagword flags);
  1113. void bfd_rename_section
  1114. (asection *sec, const char *newname);
  1115. void bfd_map_over_sections
  1116. (bfd *abfd,
  1117. void (*func) (bfd *abfd, asection *sect, void *obj),
  1118. void *obj);
  1119. asection *bfd_sections_find_if
  1120. (bfd *abfd,
  1121. bool (*operation) (bfd *abfd, asection *sect, void *obj),
  1122. void *obj);
  1123. bool bfd_set_section_size (asection *sec, bfd_size_type val);
  1124. bool bfd_set_section_contents
  1125. (bfd *abfd, asection *section, const void *data,
  1126. file_ptr offset, bfd_size_type count);
  1127. bool bfd_get_section_contents
  1128. (bfd *abfd, asection *section, void *location, file_ptr offset,
  1129. bfd_size_type count);
  1130. bool bfd_malloc_and_get_section
  1131. (bfd *abfd, asection *section, bfd_byte **buf);
  1132. bool bfd_copy_private_section_data
  1133. (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
  1134. #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
  1135. BFD_SEND (obfd, _bfd_copy_private_section_data, \
  1136. (ibfd, isection, obfd, osection))
  1137. bool bfd_generic_is_group_section (bfd *, const asection *sec);
  1138. const char *bfd_generic_group_name (bfd *, const asection *sec);
  1139. bool bfd_generic_discard_group (bfd *abfd, asection *group);
  1140. /* Extracted from archures.c. */
  1141. enum bfd_architecture
  1142. {
  1143. bfd_arch_unknown, /* File arch not known. */
  1144. bfd_arch_obscure, /* Arch known, not one of these. */
  1145. bfd_arch_m68k, /* Motorola 68xxx. */
  1146. #define bfd_mach_m68000 1
  1147. #define bfd_mach_m68008 2
  1148. #define bfd_mach_m68010 3
  1149. #define bfd_mach_m68020 4
  1150. #define bfd_mach_m68030 5
  1151. #define bfd_mach_m68040 6
  1152. #define bfd_mach_m68060 7
  1153. #define bfd_mach_cpu32 8
  1154. #define bfd_mach_fido 9
  1155. #define bfd_mach_mcf_isa_a_nodiv 10
  1156. #define bfd_mach_mcf_isa_a 11
  1157. #define bfd_mach_mcf_isa_a_mac 12
  1158. #define bfd_mach_mcf_isa_a_emac 13
  1159. #define bfd_mach_mcf_isa_aplus 14
  1160. #define bfd_mach_mcf_isa_aplus_mac 15
  1161. #define bfd_mach_mcf_isa_aplus_emac 16
  1162. #define bfd_mach_mcf_isa_b_nousp 17
  1163. #define bfd_mach_mcf_isa_b_nousp_mac 18
  1164. #define bfd_mach_mcf_isa_b_nousp_emac 19
  1165. #define bfd_mach_mcf_isa_b 20
  1166. #define bfd_mach_mcf_isa_b_mac 21
  1167. #define bfd_mach_mcf_isa_b_emac 22
  1168. #define bfd_mach_mcf_isa_b_float 23
  1169. #define bfd_mach_mcf_isa_b_float_mac 24
  1170. #define bfd_mach_mcf_isa_b_float_emac 25
  1171. #define bfd_mach_mcf_isa_c 26
  1172. #define bfd_mach_mcf_isa_c_mac 27
  1173. #define bfd_mach_mcf_isa_c_emac 28
  1174. #define bfd_mach_mcf_isa_c_nodiv 29
  1175. #define bfd_mach_mcf_isa_c_nodiv_mac 30
  1176. #define bfd_mach_mcf_isa_c_nodiv_emac 31
  1177. bfd_arch_vax, /* DEC Vax. */
  1178. bfd_arch_or1k, /* OpenRISC 1000. */
  1179. #define bfd_mach_or1k 1
  1180. #define bfd_mach_or1knd 2
  1181. bfd_arch_sparc, /* SPARC. */
  1182. #define bfd_mach_sparc 1
  1183. /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
  1184. #define bfd_mach_sparc_sparclet 2
  1185. #define bfd_mach_sparc_sparclite 3
  1186. #define bfd_mach_sparc_v8plus 4
  1187. #define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
  1188. #define bfd_mach_sparc_sparclite_le 6
  1189. #define bfd_mach_sparc_v9 7
  1190. #define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
  1191. #define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
  1192. #define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
  1193. #define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */
  1194. #define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */
  1195. #define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */
  1196. #define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */
  1197. #define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */
  1198. #define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */
  1199. #define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
  1200. #define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
  1201. #define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */
  1202. #define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */
  1203. #define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */
  1204. #define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */
  1205. /* Nonzero if MACH has the v9 instruction set. */
  1206. #define bfd_mach_sparc_v9_p(mach) \
  1207. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \
  1208. && (mach) != bfd_mach_sparc_sparclite_le)
  1209. /* Nonzero if MACH is a 64 bit sparc architecture. */
  1210. #define bfd_mach_sparc_64bit_p(mach) \
  1211. ((mach) >= bfd_mach_sparc_v9 \
  1212. && (mach) != bfd_mach_sparc_v8plusb \
  1213. && (mach) != bfd_mach_sparc_v8plusc \
  1214. && (mach) != bfd_mach_sparc_v8plusd \
  1215. && (mach) != bfd_mach_sparc_v8pluse \
  1216. && (mach) != bfd_mach_sparc_v8plusv \
  1217. && (mach) != bfd_mach_sparc_v8plusm \
  1218. && (mach) != bfd_mach_sparc_v8plusm8)
  1219. bfd_arch_spu, /* PowerPC SPU. */
  1220. #define bfd_mach_spu 256
  1221. bfd_arch_mips, /* MIPS Rxxxx. */
  1222. #define bfd_mach_mips3000 3000
  1223. #define bfd_mach_mips3900 3900
  1224. #define bfd_mach_mips4000 4000
  1225. #define bfd_mach_mips4010 4010
  1226. #define bfd_mach_mips4100 4100
  1227. #define bfd_mach_mips4111 4111
  1228. #define bfd_mach_mips4120 4120
  1229. #define bfd_mach_mips4300 4300
  1230. #define bfd_mach_mips4400 4400
  1231. #define bfd_mach_mips4600 4600
  1232. #define bfd_mach_mips4650 4650
  1233. #define bfd_mach_mips5000 5000
  1234. #define bfd_mach_mips5400 5400
  1235. #define bfd_mach_mips5500 5500
  1236. #define bfd_mach_mips5900 5900
  1237. #define bfd_mach_mips6000 6000
  1238. #define bfd_mach_mips7000 7000
  1239. #define bfd_mach_mips8000 8000
  1240. #define bfd_mach_mips9000 9000
  1241. #define bfd_mach_mips10000 10000
  1242. #define bfd_mach_mips12000 12000
  1243. #define bfd_mach_mips14000 14000
  1244. #define bfd_mach_mips16000 16000
  1245. #define bfd_mach_mips16 16
  1246. #define bfd_mach_mips5 5
  1247. #define bfd_mach_mips_loongson_2e 3001
  1248. #define bfd_mach_mips_loongson_2f 3002
  1249. #define bfd_mach_mips_gs464 3003
  1250. #define bfd_mach_mips_gs464e 3004
  1251. #define bfd_mach_mips_gs264e 3005
  1252. #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */
  1253. #define bfd_mach_mips_octeon 6501
  1254. #define bfd_mach_mips_octeonp 6601
  1255. #define bfd_mach_mips_octeon2 6502
  1256. #define bfd_mach_mips_octeon3 6503
  1257. #define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
  1258. #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
  1259. #define bfd_mach_mipsisa32 32
  1260. #define bfd_mach_mipsisa32r2 33
  1261. #define bfd_mach_mipsisa32r3 34
  1262. #define bfd_mach_mipsisa32r5 36
  1263. #define bfd_mach_mipsisa32r6 37
  1264. #define bfd_mach_mipsisa64 64
  1265. #define bfd_mach_mipsisa64r2 65
  1266. #define bfd_mach_mipsisa64r3 66
  1267. #define bfd_mach_mipsisa64r5 68
  1268. #define bfd_mach_mipsisa64r6 69
  1269. #define bfd_mach_mips_micromips 96
  1270. bfd_arch_i386, /* Intel 386. */
  1271. #define bfd_mach_i386_intel_syntax (1 << 0)
  1272. #define bfd_mach_i386_i8086 (1 << 1)
  1273. #define bfd_mach_i386_i386 (1 << 2)
  1274. #define bfd_mach_x86_64 (1 << 3)
  1275. #define bfd_mach_x64_32 (1 << 4)
  1276. #define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
  1277. #define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
  1278. #define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
  1279. bfd_arch_iamcu, /* Intel MCU. */
  1280. #define bfd_mach_iamcu (1 << 8)
  1281. #define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
  1282. #define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
  1283. bfd_arch_romp, /* IBM ROMP PC/RT. */
  1284. bfd_arch_convex, /* Convex. */
  1285. bfd_arch_m98k, /* Motorola 98xxx. */
  1286. bfd_arch_pyramid, /* Pyramid Technology. */
  1287. bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */
  1288. #define bfd_mach_h8300 1
  1289. #define bfd_mach_h8300h 2
  1290. #define bfd_mach_h8300s 3
  1291. #define bfd_mach_h8300hn 4
  1292. #define bfd_mach_h8300sn 5
  1293. #define bfd_mach_h8300sx 6
  1294. #define bfd_mach_h8300sxn 7
  1295. bfd_arch_pdp11, /* DEC PDP-11. */
  1296. bfd_arch_powerpc, /* PowerPC. */
  1297. #define bfd_mach_ppc 32
  1298. #define bfd_mach_ppc64 64
  1299. #define bfd_mach_ppc_403 403
  1300. #define bfd_mach_ppc_403gc 4030
  1301. #define bfd_mach_ppc_405 405
  1302. #define bfd_mach_ppc_505 505
  1303. #define bfd_mach_ppc_601 601
  1304. #define bfd_mach_ppc_602 602
  1305. #define bfd_mach_ppc_603 603
  1306. #define bfd_mach_ppc_ec603e 6031
  1307. #define bfd_mach_ppc_604 604
  1308. #define bfd_mach_ppc_620 620
  1309. #define bfd_mach_ppc_630 630
  1310. #define bfd_mach_ppc_750 750
  1311. #define bfd_mach_ppc_860 860
  1312. #define bfd_mach_ppc_a35 35
  1313. #define bfd_mach_ppc_rs64ii 642
  1314. #define bfd_mach_ppc_rs64iii 643
  1315. #define bfd_mach_ppc_7400 7400
  1316. #define bfd_mach_ppc_e500 500
  1317. #define bfd_mach_ppc_e500mc 5001
  1318. #define bfd_mach_ppc_e500mc64 5005
  1319. #define bfd_mach_ppc_e5500 5006
  1320. #define bfd_mach_ppc_e6500 5007
  1321. #define bfd_mach_ppc_titan 83
  1322. #define bfd_mach_ppc_vle 84
  1323. bfd_arch_rs6000, /* IBM RS/6000. */
  1324. #define bfd_mach_rs6k 6000
  1325. #define bfd_mach_rs6k_rs1 6001
  1326. #define bfd_mach_rs6k_rsc 6003
  1327. #define bfd_mach_rs6k_rs2 6002
  1328. bfd_arch_hppa, /* HP PA RISC. */
  1329. #define bfd_mach_hppa10 10
  1330. #define bfd_mach_hppa11 11
  1331. #define bfd_mach_hppa20 20
  1332. #define bfd_mach_hppa20w 25
  1333. bfd_arch_d10v, /* Mitsubishi D10V. */
  1334. #define bfd_mach_d10v 1
  1335. #define bfd_mach_d10v_ts2 2
  1336. #define bfd_mach_d10v_ts3 3
  1337. bfd_arch_d30v, /* Mitsubishi D30V. */
  1338. bfd_arch_dlx, /* DLX. */
  1339. bfd_arch_m68hc11, /* Motorola 68HC11. */
  1340. bfd_arch_m68hc12, /* Motorola 68HC12. */
  1341. #define bfd_mach_m6812_default 0
  1342. #define bfd_mach_m6812 1
  1343. #define bfd_mach_m6812s 2
  1344. bfd_arch_m9s12x, /* Freescale S12X. */
  1345. bfd_arch_m9s12xg, /* Freescale XGATE. */
  1346. bfd_arch_s12z, /* Freescale S12Z. */
  1347. #define bfd_mach_s12z_default 0
  1348. bfd_arch_z8k, /* Zilog Z8000. */
  1349. #define bfd_mach_z8001 1
  1350. #define bfd_mach_z8002 2
  1351. bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */
  1352. #define bfd_mach_sh 1
  1353. #define bfd_mach_sh2 0x20
  1354. #define bfd_mach_sh_dsp 0x2d
  1355. #define bfd_mach_sh2a 0x2a
  1356. #define bfd_mach_sh2a_nofpu 0x2b
  1357. #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
  1358. #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
  1359. #define bfd_mach_sh2a_or_sh4 0x2a3
  1360. #define bfd_mach_sh2a_or_sh3e 0x2a4
  1361. #define bfd_mach_sh2e 0x2e
  1362. #define bfd_mach_sh3 0x30
  1363. #define bfd_mach_sh3_nommu 0x31
  1364. #define bfd_mach_sh3_dsp 0x3d
  1365. #define bfd_mach_sh3e 0x3e
  1366. #define bfd_mach_sh4 0x40
  1367. #define bfd_mach_sh4_nofpu 0x41
  1368. #define bfd_mach_sh4_nommu_nofpu 0x42
  1369. #define bfd_mach_sh4a 0x4a
  1370. #define bfd_mach_sh4a_nofpu 0x4b
  1371. #define bfd_mach_sh4al_dsp 0x4d
  1372. bfd_arch_alpha, /* Dec Alpha. */
  1373. #define bfd_mach_alpha_ev4 0x10
  1374. #define bfd_mach_alpha_ev5 0x20
  1375. #define bfd_mach_alpha_ev6 0x30
  1376. bfd_arch_arm, /* Advanced Risc Machines ARM. */
  1377. #define bfd_mach_arm_unknown 0
  1378. #define bfd_mach_arm_2 1
  1379. #define bfd_mach_arm_2a 2
  1380. #define bfd_mach_arm_3 3
  1381. #define bfd_mach_arm_3M 4
  1382. #define bfd_mach_arm_4 5
  1383. #define bfd_mach_arm_4T 6
  1384. #define bfd_mach_arm_5 7
  1385. #define bfd_mach_arm_5T 8
  1386. #define bfd_mach_arm_5TE 9
  1387. #define bfd_mach_arm_XScale 10
  1388. #define bfd_mach_arm_ep9312 11
  1389. #define bfd_mach_arm_iWMMXt 12
  1390. #define bfd_mach_arm_iWMMXt2 13
  1391. #define bfd_mach_arm_5TEJ 14
  1392. #define bfd_mach_arm_6 15
  1393. #define bfd_mach_arm_6KZ 16
  1394. #define bfd_mach_arm_6T2 17
  1395. #define bfd_mach_arm_6K 18
  1396. #define bfd_mach_arm_7 19
  1397. #define bfd_mach_arm_6M 20
  1398. #define bfd_mach_arm_6SM 21
  1399. #define bfd_mach_arm_7EM 22
  1400. #define bfd_mach_arm_8 23
  1401. #define bfd_mach_arm_8R 24
  1402. #define bfd_mach_arm_8M_BASE 25
  1403. #define bfd_mach_arm_8M_MAIN 26
  1404. #define bfd_mach_arm_8_1M_MAIN 27
  1405. #define bfd_mach_arm_9 28
  1406. bfd_arch_nds32, /* Andes NDS32. */
  1407. #define bfd_mach_n1 1
  1408. #define bfd_mach_n1h 2
  1409. #define bfd_mach_n1h_v2 3
  1410. #define bfd_mach_n1h_v3 4
  1411. #define bfd_mach_n1h_v3m 5
  1412. bfd_arch_ns32k, /* National Semiconductors ns32000. */
  1413. bfd_arch_tic30, /* Texas Instruments TMS320C30. */
  1414. bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */
  1415. #define bfd_mach_tic3x 30
  1416. #define bfd_mach_tic4x 40
  1417. bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
  1418. bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
  1419. bfd_arch_v850, /* NEC V850. */
  1420. bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
  1421. #define bfd_mach_v850 1
  1422. #define bfd_mach_v850e 'E'
  1423. #define bfd_mach_v850e1 '1'
  1424. #define bfd_mach_v850e2 0x4532
  1425. #define bfd_mach_v850e2v3 0x45325633
  1426. #define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */
  1427. bfd_arch_arc, /* ARC Cores. */
  1428. #define bfd_mach_arc_a4 0
  1429. #define bfd_mach_arc_a5 1
  1430. #define bfd_mach_arc_arc600 2
  1431. #define bfd_mach_arc_arc601 4
  1432. #define bfd_mach_arc_arc700 3
  1433. #define bfd_mach_arc_arcv2 5
  1434. bfd_arch_m32c, /* Renesas M16C/M32C. */
  1435. #define bfd_mach_m16c 0x75
  1436. #define bfd_mach_m32c 0x78
  1437. bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */
  1438. #define bfd_mach_m32r 1 /* For backwards compatibility. */
  1439. #define bfd_mach_m32rx 'x'
  1440. #define bfd_mach_m32r2 '2'
  1441. bfd_arch_mn10200, /* Matsushita MN10200. */
  1442. bfd_arch_mn10300, /* Matsushita MN10300. */
  1443. #define bfd_mach_mn10300 300
  1444. #define bfd_mach_am33 330
  1445. #define bfd_mach_am33_2 332
  1446. bfd_arch_fr30,
  1447. #define bfd_mach_fr30 0x46523330
  1448. bfd_arch_frv,
  1449. #define bfd_mach_frv 1
  1450. #define bfd_mach_frvsimple 2
  1451. #define bfd_mach_fr300 300
  1452. #define bfd_mach_fr400 400
  1453. #define bfd_mach_fr450 450
  1454. #define bfd_mach_frvtomcat 499 /* fr500 prototype. */
  1455. #define bfd_mach_fr500 500
  1456. #define bfd_mach_fr550 550
  1457. bfd_arch_moxie, /* The moxie processor. */
  1458. #define bfd_mach_moxie 1
  1459. bfd_arch_ft32, /* The ft32 processor. */
  1460. #define bfd_mach_ft32 1
  1461. #define bfd_mach_ft32b 2
  1462. bfd_arch_mcore,
  1463. bfd_arch_mep,
  1464. #define bfd_mach_mep 1
  1465. #define bfd_mach_mep_h1 0x6831
  1466. #define bfd_mach_mep_c5 0x6335
  1467. bfd_arch_metag,
  1468. #define bfd_mach_metag 1
  1469. bfd_arch_ia64, /* HP/Intel ia64. */
  1470. #define bfd_mach_ia64_elf64 64
  1471. #define bfd_mach_ia64_elf32 32
  1472. bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
  1473. #define bfd_mach_ip2022 1
  1474. #define bfd_mach_ip2022ext 2
  1475. bfd_arch_iq2000, /* Vitesse IQ2000. */
  1476. #define bfd_mach_iq2000 1
  1477. #define bfd_mach_iq10 2
  1478. bfd_arch_bpf, /* Linux eBPF. */
  1479. #define bfd_mach_bpf 1
  1480. #define bfd_mach_xbpf 2
  1481. bfd_arch_epiphany, /* Adapteva EPIPHANY. */
  1482. #define bfd_mach_epiphany16 1
  1483. #define bfd_mach_epiphany32 2
  1484. bfd_arch_mt,
  1485. #define bfd_mach_ms1 1
  1486. #define bfd_mach_mrisc2 2
  1487. #define bfd_mach_ms2 3
  1488. bfd_arch_pj,
  1489. bfd_arch_avr, /* Atmel AVR microcontrollers. */
  1490. #define bfd_mach_avr1 1
  1491. #define bfd_mach_avr2 2
  1492. #define bfd_mach_avr25 25
  1493. #define bfd_mach_avr3 3
  1494. #define bfd_mach_avr31 31
  1495. #define bfd_mach_avr35 35
  1496. #define bfd_mach_avr4 4
  1497. #define bfd_mach_avr5 5
  1498. #define bfd_mach_avr51 51
  1499. #define bfd_mach_avr6 6
  1500. #define bfd_mach_avrtiny 100
  1501. #define bfd_mach_avrxmega1 101
  1502. #define bfd_mach_avrxmega2 102
  1503. #define bfd_mach_avrxmega3 103
  1504. #define bfd_mach_avrxmega4 104
  1505. #define bfd_mach_avrxmega5 105
  1506. #define bfd_mach_avrxmega6 106
  1507. #define bfd_mach_avrxmega7 107
  1508. bfd_arch_bfin, /* ADI Blackfin. */
  1509. #define bfd_mach_bfin 1
  1510. bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
  1511. #define bfd_mach_cr16 1
  1512. bfd_arch_crx, /* National Semiconductor CRX. */
  1513. #define bfd_mach_crx 1
  1514. bfd_arch_cris, /* Axis CRIS. */
  1515. #define bfd_mach_cris_v0_v10 255
  1516. #define bfd_mach_cris_v32 32
  1517. #define bfd_mach_cris_v10_v32 1032
  1518. bfd_arch_riscv,
  1519. #define bfd_mach_riscv32 132
  1520. #define bfd_mach_riscv64 164
  1521. bfd_arch_rl78,
  1522. #define bfd_mach_rl78 0x75
  1523. bfd_arch_rx, /* Renesas RX. */
  1524. #define bfd_mach_rx 0x75
  1525. #define bfd_mach_rx_v2 0x76
  1526. #define bfd_mach_rx_v3 0x77
  1527. bfd_arch_s390, /* IBM s390. */
  1528. #define bfd_mach_s390_31 31
  1529. #define bfd_mach_s390_64 64
  1530. bfd_arch_score, /* Sunplus score. */
  1531. #define bfd_mach_score3 3
  1532. #define bfd_mach_score7 7
  1533. bfd_arch_mmix, /* Donald Knuth's educational processor. */
  1534. bfd_arch_xstormy16,
  1535. #define bfd_mach_xstormy16 1
  1536. bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
  1537. #define bfd_mach_msp11 11
  1538. #define bfd_mach_msp110 110
  1539. #define bfd_mach_msp12 12
  1540. #define bfd_mach_msp13 13
  1541. #define bfd_mach_msp14 14
  1542. #define bfd_mach_msp15 15
  1543. #define bfd_mach_msp16 16
  1544. #define bfd_mach_msp20 20
  1545. #define bfd_mach_msp21 21
  1546. #define bfd_mach_msp22 22
  1547. #define bfd_mach_msp23 23
  1548. #define bfd_mach_msp24 24
  1549. #define bfd_mach_msp26 26
  1550. #define bfd_mach_msp31 31
  1551. #define bfd_mach_msp32 32
  1552. #define bfd_mach_msp33 33
  1553. #define bfd_mach_msp41 41
  1554. #define bfd_mach_msp42 42
  1555. #define bfd_mach_msp43 43
  1556. #define bfd_mach_msp44 44
  1557. #define bfd_mach_msp430x 45
  1558. #define bfd_mach_msp46 46
  1559. #define bfd_mach_msp47 47
  1560. #define bfd_mach_msp54 54
  1561. bfd_arch_xc16x, /* Infineon's XC16X Series. */
  1562. #define bfd_mach_xc16x 1
  1563. #define bfd_mach_xc16xl 2
  1564. #define bfd_mach_xc16xs 3
  1565. bfd_arch_xgate, /* Freescale XGATE. */
  1566. #define bfd_mach_xgate 1
  1567. bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
  1568. #define bfd_mach_xtensa 1
  1569. bfd_arch_z80,
  1570. /* Zilog Z80 without undocumented opcodes. */
  1571. #define bfd_mach_z80strict 1
  1572. /* Zilog Z180: successor with additional instructions, but without
  1573. halves of ix and iy. */
  1574. #define bfd_mach_z180 2
  1575. /* Zilog Z80 with ixl, ixh, iyl, and iyh. */
  1576. #define bfd_mach_z80 3
  1577. /* Zilog eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode. */
  1578. #define bfd_mach_ez80_z80 4
  1579. /* Zilog eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode. */
  1580. #define bfd_mach_ez80_adl 5
  1581. /* Z80N */
  1582. #define bfd_mach_z80n 6
  1583. /* Zilog Z80 with all undocumented instructions. */
  1584. #define bfd_mach_z80full 7
  1585. /* GameBoy Z80 (reduced instruction set). */
  1586. #define bfd_mach_gbz80 8
  1587. /* ASCII R800: successor with multiplication. */
  1588. #define bfd_mach_r800 11
  1589. bfd_arch_lm32, /* Lattice Mico32. */
  1590. #define bfd_mach_lm32 1
  1591. bfd_arch_microblaze,/* Xilinx MicroBlaze. */
  1592. bfd_arch_tilepro, /* Tilera TILEPro. */
  1593. bfd_arch_tilegx, /* Tilera TILE-Gx. */
  1594. #define bfd_mach_tilepro 1
  1595. #define bfd_mach_tilegx 1
  1596. #define bfd_mach_tilegx32 2
  1597. bfd_arch_aarch64, /* AArch64. */
  1598. #define bfd_mach_aarch64 0
  1599. #define bfd_mach_aarch64_8R 1
  1600. #define bfd_mach_aarch64_ilp32 32
  1601. bfd_arch_nios2, /* Nios II. */
  1602. #define bfd_mach_nios2 0
  1603. #define bfd_mach_nios2r1 1
  1604. #define bfd_mach_nios2r2 2
  1605. bfd_arch_visium, /* Visium. */
  1606. #define bfd_mach_visium 1
  1607. bfd_arch_wasm32, /* WebAssembly. */
  1608. #define bfd_mach_wasm32 1
  1609. bfd_arch_pru, /* PRU. */
  1610. #define bfd_mach_pru 0
  1611. bfd_arch_nfp, /* Netronome Flow Processor */
  1612. #define bfd_mach_nfp3200 0x3200
  1613. #define bfd_mach_nfp6000 0x6000
  1614. bfd_arch_csky, /* C-SKY. */
  1615. #define bfd_mach_ck_unknown 0
  1616. #define bfd_mach_ck510 1
  1617. #define bfd_mach_ck610 2
  1618. #define bfd_mach_ck801 3
  1619. #define bfd_mach_ck802 4
  1620. #define bfd_mach_ck803 5
  1621. #define bfd_mach_ck807 6
  1622. #define bfd_mach_ck810 7
  1623. #define bfd_mach_ck860 8
  1624. bfd_arch_loongarch, /* LoongArch */
  1625. #define bfd_mach_loongarch32 1
  1626. #define bfd_mach_loongarch64 2
  1627. bfd_arch_amdgcn, /* AMDGCN */
  1628. #define bfd_mach_amdgcn_unknown 0x000
  1629. #define bfd_mach_amdgcn_gfx900 0x02c
  1630. #define bfd_mach_amdgcn_gfx904 0x02e
  1631. #define bfd_mach_amdgcn_gfx906 0x02f
  1632. #define bfd_mach_amdgcn_gfx908 0x030
  1633. #define bfd_mach_amdgcn_gfx90a 0x03f
  1634. #define bfd_mach_amdgcn_gfx1010 0x033
  1635. #define bfd_mach_amdgcn_gfx1011 0x034
  1636. #define bfd_mach_amdgcn_gfx1012 0x035
  1637. #define bfd_mach_amdgcn_gfx1030 0x036
  1638. #define bfd_mach_amdgcn_gfx1031 0x037
  1639. #define bfd_mach_amdgcn_gfx1032 0x038
  1640. bfd_arch_last
  1641. };
  1642. typedef struct bfd_arch_info
  1643. {
  1644. int bits_per_word;
  1645. int bits_per_address;
  1646. int bits_per_byte;
  1647. enum bfd_architecture arch;
  1648. unsigned long mach;
  1649. const char *arch_name;
  1650. const char *printable_name;
  1651. unsigned int section_align_power;
  1652. /* TRUE if this is the default machine for the architecture.
  1653. The default arch should be the first entry for an arch so that
  1654. all the entries for that arch can be accessed via <<next>>. */
  1655. bool the_default;
  1656. const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
  1657. const struct bfd_arch_info *);
  1658. bool (*scan) (const struct bfd_arch_info *, const char *);
  1659. /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
  1660. IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
  1661. TRUE, the buffer contains code. */
  1662. void *(*fill) (bfd_size_type count, bool is_bigendian, bool code);
  1663. const struct bfd_arch_info *next;
  1664. /* On some architectures the offset for a relocation can point into
  1665. the middle of an instruction. This field specifies the maximum
  1666. offset such a relocation can have (in octets). This affects the
  1667. behaviour of the disassembler, since a value greater than zero
  1668. means that it may need to disassemble an instruction twice, once
  1669. to get its length and then a second time to display it. If the
  1670. value is negative then this has to be done for every single
  1671. instruction, regardless of the offset of the reloc. */
  1672. signed int max_reloc_offset_into_insn;
  1673. }
  1674. bfd_arch_info_type;
  1675. const char *bfd_printable_name (bfd *abfd);
  1676. const bfd_arch_info_type *bfd_scan_arch (const char *string);
  1677. const char **bfd_arch_list (void);
  1678. const bfd_arch_info_type *bfd_arch_get_compatible
  1679. (const bfd *abfd, const bfd *bbfd, bool accept_unknowns);
  1680. void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
  1681. bool bfd_default_set_arch_mach
  1682. (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
  1683. enum bfd_architecture bfd_get_arch (const bfd *abfd);
  1684. unsigned long bfd_get_mach (const bfd *abfd);
  1685. unsigned int bfd_arch_bits_per_byte (const bfd *abfd);
  1686. unsigned int bfd_arch_bits_per_address (const bfd *abfd);
  1687. const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
  1688. const bfd_arch_info_type *bfd_lookup_arch
  1689. (enum bfd_architecture arch, unsigned long machine);
  1690. const char *bfd_printable_arch_mach
  1691. (enum bfd_architecture arch, unsigned long machine);
  1692. unsigned int bfd_octets_per_byte (const bfd *abfd,
  1693. const asection *sec);
  1694. unsigned int bfd_arch_mach_octets_per_byte
  1695. (enum bfd_architecture arch, unsigned long machine);
  1696. /* Extracted from reloc.c. */
  1697. typedef enum bfd_reloc_status
  1698. {
  1699. /* No errors detected. Note - the value 2 is used so that it
  1700. will not be mistaken for the boolean TRUE or FALSE values. */
  1701. bfd_reloc_ok = 2,
  1702. /* The relocation was performed, but there was an overflow. */
  1703. bfd_reloc_overflow,
  1704. /* The address to relocate was not within the section supplied. */
  1705. bfd_reloc_outofrange,
  1706. /* Used by special functions. */
  1707. bfd_reloc_continue,
  1708. /* Unsupported relocation size requested. */
  1709. bfd_reloc_notsupported,
  1710. /* Unused. */
  1711. bfd_reloc_other,
  1712. /* The symbol to relocate against was undefined. */
  1713. bfd_reloc_undefined,
  1714. /* The relocation was performed, but may not be ok. If this type is
  1715. returned, the error_message argument to bfd_perform_relocation
  1716. will be set. */
  1717. bfd_reloc_dangerous
  1718. }
  1719. bfd_reloc_status_type;
  1720. typedef const struct reloc_howto_struct reloc_howto_type;
  1721. typedef struct reloc_cache_entry
  1722. {
  1723. /* A pointer into the canonical table of pointers. */
  1724. struct bfd_symbol **sym_ptr_ptr;
  1725. /* offset in section. */
  1726. bfd_size_type address;
  1727. /* addend for relocation value. */
  1728. bfd_vma addend;
  1729. /* Pointer to how to perform the required relocation. */
  1730. reloc_howto_type *howto;
  1731. }
  1732. arelent;
  1733. enum complain_overflow
  1734. {
  1735. /* Do not complain on overflow. */
  1736. complain_overflow_dont,
  1737. /* Complain if the value overflows when considered as a signed
  1738. number one bit larger than the field. ie. A bitfield of N bits
  1739. is allowed to represent -2**n to 2**n-1. */
  1740. complain_overflow_bitfield,
  1741. /* Complain if the value overflows when considered as a signed
  1742. number. */
  1743. complain_overflow_signed,
  1744. /* Complain if the value overflows when considered as an
  1745. unsigned number. */
  1746. complain_overflow_unsigned
  1747. };
  1748. struct reloc_howto_struct
  1749. {
  1750. /* The type field has mainly a documentary use - the back end can
  1751. do what it wants with it, though normally the back end's idea of
  1752. an external reloc number is stored in this field. */
  1753. unsigned int type;
  1754. /* The encoded size of the item to be relocated. This is *not* a
  1755. power-of-two measure. Use bfd_get_reloc_size to find the size
  1756. of the item in bytes. */
  1757. unsigned int size:3;
  1758. /* The number of bits in the field to be relocated. This is used
  1759. when doing overflow checking. */
  1760. unsigned int bitsize:7;
  1761. /* The value the final relocation is shifted right by. This drops
  1762. unwanted data from the relocation. */
  1763. unsigned int rightshift:6;
  1764. /* The bit position of the reloc value in the destination.
  1765. The relocated value is left shifted by this amount. */
  1766. unsigned int bitpos:6;
  1767. /* What type of overflow error should be checked for when
  1768. relocating. */
  1769. ENUM_BITFIELD (complain_overflow) complain_on_overflow:2;
  1770. /* The relocation value should be negated before applying. */
  1771. unsigned int negate:1;
  1772. /* The relocation is relative to the item being relocated. */
  1773. unsigned int pc_relative:1;
  1774. /* Some formats record a relocation addend in the section contents
  1775. rather than with the relocation. For ELF formats this is the
  1776. distinction between USE_REL and USE_RELA (though the code checks
  1777. for USE_REL == 1/0). The value of this field is TRUE if the
  1778. addend is recorded with the section contents; when performing a
  1779. partial link (ld -r) the section contents (the data) will be
  1780. modified. The value of this field is FALSE if addends are
  1781. recorded with the relocation (in arelent.addend); when performing
  1782. a partial link the relocation will be modified.
  1783. All relocations for all ELF USE_RELA targets should set this field
  1784. to FALSE (values of TRUE should be looked on with suspicion).
  1785. However, the converse is not true: not all relocations of all ELF
  1786. USE_REL targets set this field to TRUE. Why this is so is peculiar
  1787. to each particular target. For relocs that aren't used in partial
  1788. links (e.g. GOT stuff) it doesn't matter what this is set to. */
  1789. unsigned int partial_inplace:1;
  1790. /* When some formats create PC relative instructions, they leave
  1791. the value of the pc of the place being relocated in the offset
  1792. slot of the instruction, so that a PC relative relocation can
  1793. be made just by adding in an ordinary offset (e.g., sun3 a.out).
  1794. Some formats leave the displacement part of an instruction
  1795. empty (e.g., ELF); this flag signals the fact. */
  1796. unsigned int pcrel_offset:1;
  1797. /* src_mask selects the part of the instruction (or data) to be used
  1798. in the relocation sum. If the target relocations don't have an
  1799. addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
  1800. dst_mask to extract the addend from the section contents. If
  1801. relocations do have an addend in the reloc, eg. ELF USE_RELA, this
  1802. field should normally be zero. Non-zero values for ELF USE_RELA
  1803. targets should be viewed with suspicion as normally the value in
  1804. the dst_mask part of the section contents should be ignored. */
  1805. bfd_vma src_mask;
  1806. /* dst_mask selects which parts of the instruction (or data) are
  1807. replaced with a relocated value. */
  1808. bfd_vma dst_mask;
  1809. /* If this field is non null, then the supplied function is
  1810. called rather than the normal function. This allows really
  1811. strange relocation methods to be accommodated. */
  1812. bfd_reloc_status_type (*special_function)
  1813. (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
  1814. bfd *, char **);
  1815. /* The textual name of the relocation type. */
  1816. const char *name;
  1817. };
  1818. #define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \
  1819. inplace, src_mask, dst_mask, pcrel_off) \
  1820. { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \
  1821. size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name }
  1822. #define EMPTY_HOWTO(C) \
  1823. HOWTO ((C), 0, 0, 0, false, 0, complain_overflow_dont, NULL, \
  1824. NULL, false, 0, 0, false)
  1825. unsigned int bfd_get_reloc_size (reloc_howto_type *);
  1826. typedef struct relent_chain
  1827. {
  1828. arelent relent;
  1829. struct relent_chain *next;
  1830. }
  1831. arelent_chain;
  1832. bfd_reloc_status_type bfd_check_overflow
  1833. (enum complain_overflow how,
  1834. unsigned int bitsize,
  1835. unsigned int rightshift,
  1836. unsigned int addrsize,
  1837. bfd_vma relocation);
  1838. bool bfd_reloc_offset_in_range
  1839. (reloc_howto_type *howto,
  1840. bfd *abfd,
  1841. asection *section,
  1842. bfd_size_type offset);
  1843. bfd_reloc_status_type bfd_perform_relocation
  1844. (bfd *abfd,
  1845. arelent *reloc_entry,
  1846. void *data,
  1847. asection *input_section,
  1848. bfd *output_bfd,
  1849. char **error_message);
  1850. bfd_reloc_status_type bfd_install_relocation
  1851. (bfd *abfd,
  1852. arelent *reloc_entry,
  1853. void *data, bfd_vma data_start,
  1854. asection *input_section,
  1855. char **error_message);
  1856. enum bfd_reloc_code_real {
  1857. _dummy_first_bfd_reloc_code_real,
  1858. /* Basic absolute relocations of N bits. */
  1859. BFD_RELOC_64,
  1860. BFD_RELOC_32,
  1861. BFD_RELOC_26,
  1862. BFD_RELOC_24,
  1863. BFD_RELOC_16,
  1864. BFD_RELOC_14,
  1865. BFD_RELOC_8,
  1866. /* PC-relative relocations. Sometimes these are relative to the address
  1867. of the relocation itself; sometimes they are relative to the start of
  1868. the section containing the relocation. It depends on the specific target. */
  1869. BFD_RELOC_64_PCREL,
  1870. BFD_RELOC_32_PCREL,
  1871. BFD_RELOC_24_PCREL,
  1872. BFD_RELOC_16_PCREL,
  1873. BFD_RELOC_12_PCREL,
  1874. BFD_RELOC_8_PCREL,
  1875. /* Section relative relocations. Some targets need this for DWARF2. */
  1876. BFD_RELOC_32_SECREL,
  1877. BFD_RELOC_16_SECIDX,
  1878. /* For ELF. */
  1879. BFD_RELOC_32_GOT_PCREL,
  1880. BFD_RELOC_16_GOT_PCREL,
  1881. BFD_RELOC_8_GOT_PCREL,
  1882. BFD_RELOC_32_GOTOFF,
  1883. BFD_RELOC_16_GOTOFF,
  1884. BFD_RELOC_LO16_GOTOFF,
  1885. BFD_RELOC_HI16_GOTOFF,
  1886. BFD_RELOC_HI16_S_GOTOFF,
  1887. BFD_RELOC_8_GOTOFF,
  1888. BFD_RELOC_64_PLT_PCREL,
  1889. BFD_RELOC_32_PLT_PCREL,
  1890. BFD_RELOC_24_PLT_PCREL,
  1891. BFD_RELOC_16_PLT_PCREL,
  1892. BFD_RELOC_8_PLT_PCREL,
  1893. BFD_RELOC_64_PLTOFF,
  1894. BFD_RELOC_32_PLTOFF,
  1895. BFD_RELOC_16_PLTOFF,
  1896. BFD_RELOC_LO16_PLTOFF,
  1897. BFD_RELOC_HI16_PLTOFF,
  1898. BFD_RELOC_HI16_S_PLTOFF,
  1899. BFD_RELOC_8_PLTOFF,
  1900. /* Size relocations. */
  1901. BFD_RELOC_SIZE32,
  1902. BFD_RELOC_SIZE64,
  1903. /* Relocations used by 68K ELF. */
  1904. BFD_RELOC_68K_GLOB_DAT,
  1905. BFD_RELOC_68K_JMP_SLOT,
  1906. BFD_RELOC_68K_RELATIVE,
  1907. BFD_RELOC_68K_TLS_GD32,
  1908. BFD_RELOC_68K_TLS_GD16,
  1909. BFD_RELOC_68K_TLS_GD8,
  1910. BFD_RELOC_68K_TLS_LDM32,
  1911. BFD_RELOC_68K_TLS_LDM16,
  1912. BFD_RELOC_68K_TLS_LDM8,
  1913. BFD_RELOC_68K_TLS_LDO32,
  1914. BFD_RELOC_68K_TLS_LDO16,
  1915. BFD_RELOC_68K_TLS_LDO8,
  1916. BFD_RELOC_68K_TLS_IE32,
  1917. BFD_RELOC_68K_TLS_IE16,
  1918. BFD_RELOC_68K_TLS_IE8,
  1919. BFD_RELOC_68K_TLS_LE32,
  1920. BFD_RELOC_68K_TLS_LE16,
  1921. BFD_RELOC_68K_TLS_LE8,
  1922. /* Linkage-table relative. */
  1923. BFD_RELOC_32_BASEREL,
  1924. BFD_RELOC_16_BASEREL,
  1925. BFD_RELOC_LO16_BASEREL,
  1926. BFD_RELOC_HI16_BASEREL,
  1927. BFD_RELOC_HI16_S_BASEREL,
  1928. BFD_RELOC_8_BASEREL,
  1929. BFD_RELOC_RVA,
  1930. /* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
  1931. BFD_RELOC_8_FFnn,
  1932. /* These PC-relative relocations are stored as word displacements --
  1933. i.e., byte displacements shifted right two bits. The 30-bit word
  1934. displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
  1935. SPARC. (SPARC tools generally refer to this as <<WDISP30>>.) The
  1936. signed 16-bit displacement is used on the MIPS, and the 23-bit
  1937. displacement is used on the Alpha. */
  1938. BFD_RELOC_32_PCREL_S2,
  1939. BFD_RELOC_16_PCREL_S2,
  1940. BFD_RELOC_23_PCREL_S2,
  1941. /* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
  1942. the target word. These are used on the SPARC. */
  1943. BFD_RELOC_HI22,
  1944. BFD_RELOC_LO10,
  1945. /* For systems that allocate a Global Pointer register, these are
  1946. displacements off that register. These relocation types are
  1947. handled specially, because the value the register will have is
  1948. decided relatively late. */
  1949. BFD_RELOC_GPREL16,
  1950. BFD_RELOC_GPREL32,
  1951. /* SPARC ELF relocations. There is probably some overlap with other
  1952. relocation types already defined. */
  1953. BFD_RELOC_NONE,
  1954. BFD_RELOC_SPARC_WDISP22,
  1955. BFD_RELOC_SPARC22,
  1956. BFD_RELOC_SPARC13,
  1957. BFD_RELOC_SPARC_GOT10,
  1958. BFD_RELOC_SPARC_GOT13,
  1959. BFD_RELOC_SPARC_GOT22,
  1960. BFD_RELOC_SPARC_PC10,
  1961. BFD_RELOC_SPARC_PC22,
  1962. BFD_RELOC_SPARC_WPLT30,
  1963. BFD_RELOC_SPARC_COPY,
  1964. BFD_RELOC_SPARC_GLOB_DAT,
  1965. BFD_RELOC_SPARC_JMP_SLOT,
  1966. BFD_RELOC_SPARC_RELATIVE,
  1967. BFD_RELOC_SPARC_UA16,
  1968. BFD_RELOC_SPARC_UA32,
  1969. BFD_RELOC_SPARC_UA64,
  1970. BFD_RELOC_SPARC_GOTDATA_HIX22,
  1971. BFD_RELOC_SPARC_GOTDATA_LOX10,
  1972. BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
  1973. BFD_RELOC_SPARC_GOTDATA_OP_LOX10,
  1974. BFD_RELOC_SPARC_GOTDATA_OP,
  1975. BFD_RELOC_SPARC_JMP_IREL,
  1976. BFD_RELOC_SPARC_IRELATIVE,
  1977. /* I think these are specific to SPARC a.out (e.g., Sun 4). */
  1978. BFD_RELOC_SPARC_BASE13,
  1979. BFD_RELOC_SPARC_BASE22,
  1980. /* SPARC64 relocations */
  1981. #define BFD_RELOC_SPARC_64 BFD_RELOC_64
  1982. BFD_RELOC_SPARC_10,
  1983. BFD_RELOC_SPARC_11,
  1984. BFD_RELOC_SPARC_OLO10,
  1985. BFD_RELOC_SPARC_HH22,
  1986. BFD_RELOC_SPARC_HM10,
  1987. BFD_RELOC_SPARC_LM22,
  1988. BFD_RELOC_SPARC_PC_HH22,
  1989. BFD_RELOC_SPARC_PC_HM10,
  1990. BFD_RELOC_SPARC_PC_LM22,
  1991. BFD_RELOC_SPARC_WDISP16,
  1992. BFD_RELOC_SPARC_WDISP19,
  1993. BFD_RELOC_SPARC_7,
  1994. BFD_RELOC_SPARC_6,
  1995. BFD_RELOC_SPARC_5,
  1996. #define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
  1997. BFD_RELOC_SPARC_PLT32,
  1998. BFD_RELOC_SPARC_PLT64,
  1999. BFD_RELOC_SPARC_HIX22,
  2000. BFD_RELOC_SPARC_LOX10,
  2001. BFD_RELOC_SPARC_H44,
  2002. BFD_RELOC_SPARC_M44,
  2003. BFD_RELOC_SPARC_L44,
  2004. BFD_RELOC_SPARC_REGISTER,
  2005. BFD_RELOC_SPARC_H34,
  2006. BFD_RELOC_SPARC_SIZE32,
  2007. BFD_RELOC_SPARC_SIZE64,
  2008. BFD_RELOC_SPARC_WDISP10,
  2009. /* SPARC little endian relocation */
  2010. BFD_RELOC_SPARC_REV32,
  2011. /* SPARC TLS relocations */
  2012. BFD_RELOC_SPARC_TLS_GD_HI22,
  2013. BFD_RELOC_SPARC_TLS_GD_LO10,
  2014. BFD_RELOC_SPARC_TLS_GD_ADD,
  2015. BFD_RELOC_SPARC_TLS_GD_CALL,
  2016. BFD_RELOC_SPARC_TLS_LDM_HI22,
  2017. BFD_RELOC_SPARC_TLS_LDM_LO10,
  2018. BFD_RELOC_SPARC_TLS_LDM_ADD,
  2019. BFD_RELOC_SPARC_TLS_LDM_CALL,
  2020. BFD_RELOC_SPARC_TLS_LDO_HIX22,
  2021. BFD_RELOC_SPARC_TLS_LDO_LOX10,
  2022. BFD_RELOC_SPARC_TLS_LDO_ADD,
  2023. BFD_RELOC_SPARC_TLS_IE_HI22,
  2024. BFD_RELOC_SPARC_TLS_IE_LO10,
  2025. BFD_RELOC_SPARC_TLS_IE_LD,
  2026. BFD_RELOC_SPARC_TLS_IE_LDX,
  2027. BFD_RELOC_SPARC_TLS_IE_ADD,
  2028. BFD_RELOC_SPARC_TLS_LE_HIX22,
  2029. BFD_RELOC_SPARC_TLS_LE_LOX10,
  2030. BFD_RELOC_SPARC_TLS_DTPMOD32,
  2031. BFD_RELOC_SPARC_TLS_DTPMOD64,
  2032. BFD_RELOC_SPARC_TLS_DTPOFF32,
  2033. BFD_RELOC_SPARC_TLS_DTPOFF64,
  2034. BFD_RELOC_SPARC_TLS_TPOFF32,
  2035. BFD_RELOC_SPARC_TLS_TPOFF64,
  2036. /* SPU Relocations. */
  2037. BFD_RELOC_SPU_IMM7,
  2038. BFD_RELOC_SPU_IMM8,
  2039. BFD_RELOC_SPU_IMM10,
  2040. BFD_RELOC_SPU_IMM10W,
  2041. BFD_RELOC_SPU_IMM16,
  2042. BFD_RELOC_SPU_IMM16W,
  2043. BFD_RELOC_SPU_IMM18,
  2044. BFD_RELOC_SPU_PCREL9a,
  2045. BFD_RELOC_SPU_PCREL9b,
  2046. BFD_RELOC_SPU_PCREL16,
  2047. BFD_RELOC_SPU_LO16,
  2048. BFD_RELOC_SPU_HI16,
  2049. BFD_RELOC_SPU_PPU32,
  2050. BFD_RELOC_SPU_PPU64,
  2051. BFD_RELOC_SPU_ADD_PIC,
  2052. /* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
  2053. "addend" in some special way.
  2054. For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
  2055. writing; when reading, it will be the absolute section symbol. The
  2056. addend is the displacement in bytes of the "lda" instruction from
  2057. the "ldah" instruction (which is at the address of this reloc). */
  2058. BFD_RELOC_ALPHA_GPDISP_HI16,
  2059. /* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
  2060. with GPDISP_HI16 relocs. The addend is ignored when writing the
  2061. relocations out, and is filled in with the file's GP value on
  2062. reading, for convenience. */
  2063. BFD_RELOC_ALPHA_GPDISP_LO16,
  2064. /* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
  2065. relocation except that there is no accompanying GPDISP_LO16
  2066. relocation. */
  2067. BFD_RELOC_ALPHA_GPDISP,
  2068. /* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
  2069. the assembler turns it into a LDQ instruction to load the address of
  2070. the symbol, and then fills in a register in the real instruction.
  2071. The LITERAL reloc, at the LDQ instruction, refers to the .lita
  2072. section symbol. The addend is ignored when writing, but is filled
  2073. in with the file's GP value on reading, for convenience, as with the
  2074. GPDISP_LO16 reloc.
  2075. The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
  2076. It should refer to the symbol to be referenced, as with 16_GOTOFF,
  2077. but it generates output not based on the position within the .got
  2078. section, but relative to the GP value chosen for the file during the
  2079. final link stage.
  2080. The LITUSE reloc, on the instruction using the loaded address, gives
  2081. information to the linker that it might be able to use to optimize
  2082. away some literal section references. The symbol is ignored (read
  2083. as the absolute section symbol), and the "addend" indicates the type
  2084. of instruction using the register:
  2085. 1 - "memory" fmt insn
  2086. 2 - byte-manipulation (byte offset reg)
  2087. 3 - jsr (target of branch) */
  2088. BFD_RELOC_ALPHA_LITERAL,
  2089. BFD_RELOC_ALPHA_ELF_LITERAL,
  2090. BFD_RELOC_ALPHA_LITUSE,
  2091. /* The HINT relocation indicates a value that should be filled into the
  2092. "hint" field of a jmp/jsr/ret instruction, for possible branch-
  2093. prediction logic which may be provided on some processors. */
  2094. BFD_RELOC_ALPHA_HINT,
  2095. /* The LINKAGE relocation outputs a linkage pair in the object file,
  2096. which is filled by the linker. */
  2097. BFD_RELOC_ALPHA_LINKAGE,
  2098. /* The CODEADDR relocation outputs a STO_CA in the object file,
  2099. which is filled by the linker. */
  2100. BFD_RELOC_ALPHA_CODEADDR,
  2101. /* The GPREL_HI/LO relocations together form a 32-bit offset from the
  2102. GP register. */
  2103. BFD_RELOC_ALPHA_GPREL_HI16,
  2104. BFD_RELOC_ALPHA_GPREL_LO16,
  2105. /* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
  2106. share a common GP, and the target address is adjusted for
  2107. STO_ALPHA_STD_GPLOAD. */
  2108. BFD_RELOC_ALPHA_BRSGP,
  2109. /* The NOP relocation outputs a NOP if the longword displacement
  2110. between two procedure entry points is < 2^21. */
  2111. BFD_RELOC_ALPHA_NOP,
  2112. /* The BSR relocation outputs a BSR if the longword displacement
  2113. between two procedure entry points is < 2^21. */
  2114. BFD_RELOC_ALPHA_BSR,
  2115. /* The LDA relocation outputs a LDA if the longword displacement
  2116. between two procedure entry points is < 2^16. */
  2117. BFD_RELOC_ALPHA_LDA,
  2118. /* The BOH relocation outputs a BSR if the longword displacement
  2119. between two procedure entry points is < 2^21, or else a hint. */
  2120. BFD_RELOC_ALPHA_BOH,
  2121. /* Alpha thread-local storage relocations. */
  2122. BFD_RELOC_ALPHA_TLSGD,
  2123. BFD_RELOC_ALPHA_TLSLDM,
  2124. BFD_RELOC_ALPHA_DTPMOD64,
  2125. BFD_RELOC_ALPHA_GOTDTPREL16,
  2126. BFD_RELOC_ALPHA_DTPREL64,
  2127. BFD_RELOC_ALPHA_DTPREL_HI16,
  2128. BFD_RELOC_ALPHA_DTPREL_LO16,
  2129. BFD_RELOC_ALPHA_DTPREL16,
  2130. BFD_RELOC_ALPHA_GOTTPREL16,
  2131. BFD_RELOC_ALPHA_TPREL64,
  2132. BFD_RELOC_ALPHA_TPREL_HI16,
  2133. BFD_RELOC_ALPHA_TPREL_LO16,
  2134. BFD_RELOC_ALPHA_TPREL16,
  2135. /* The MIPS jump instruction. */
  2136. BFD_RELOC_MIPS_JMP,
  2137. BFD_RELOC_MICROMIPS_JMP,
  2138. /* The MIPS16 jump instruction. */
  2139. BFD_RELOC_MIPS16_JMP,
  2140. /* MIPS16 GP relative reloc. */
  2141. BFD_RELOC_MIPS16_GPREL,
  2142. /* High 16 bits of 32-bit value; simple reloc. */
  2143. BFD_RELOC_HI16,
  2144. /* High 16 bits of 32-bit value but the low 16 bits will be sign
  2145. extended and added to form the final result. If the low 16
  2146. bits form a negative number, we need to add one to the high value
  2147. to compensate for the borrow when the low bits are added. */
  2148. BFD_RELOC_HI16_S,
  2149. /* Low 16 bits. */
  2150. BFD_RELOC_LO16,
  2151. /* High 16 bits of 32-bit pc-relative value */
  2152. BFD_RELOC_HI16_PCREL,
  2153. /* High 16 bits of 32-bit pc-relative value, adjusted */
  2154. BFD_RELOC_HI16_S_PCREL,
  2155. /* Low 16 bits of pc-relative value */
  2156. BFD_RELOC_LO16_PCREL,
  2157. /* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
  2158. 16-bit immediate fields */
  2159. BFD_RELOC_MIPS16_GOT16,
  2160. BFD_RELOC_MIPS16_CALL16,
  2161. /* MIPS16 high 16 bits of 32-bit value. */
  2162. BFD_RELOC_MIPS16_HI16,
  2163. /* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
  2164. extended and added to form the final result. If the low 16
  2165. bits form a negative number, we need to add one to the high value
  2166. to compensate for the borrow when the low bits are added. */
  2167. BFD_RELOC_MIPS16_HI16_S,
  2168. /* MIPS16 low 16 bits. */
  2169. BFD_RELOC_MIPS16_LO16,
  2170. /* MIPS16 TLS relocations */
  2171. BFD_RELOC_MIPS16_TLS_GD,
  2172. BFD_RELOC_MIPS16_TLS_LDM,
  2173. BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
  2174. BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
  2175. BFD_RELOC_MIPS16_TLS_GOTTPREL,
  2176. BFD_RELOC_MIPS16_TLS_TPREL_HI16,
  2177. BFD_RELOC_MIPS16_TLS_TPREL_LO16,
  2178. /* Relocation against a MIPS literal section. */
  2179. BFD_RELOC_MIPS_LITERAL,
  2180. BFD_RELOC_MICROMIPS_LITERAL,
  2181. /* microMIPS PC-relative relocations. */
  2182. BFD_RELOC_MICROMIPS_7_PCREL_S1,
  2183. BFD_RELOC_MICROMIPS_10_PCREL_S1,
  2184. BFD_RELOC_MICROMIPS_16_PCREL_S1,
  2185. /* MIPS16 PC-relative relocation. */
  2186. BFD_RELOC_MIPS16_16_PCREL_S1,
  2187. /* MIPS PC-relative relocations. */
  2188. BFD_RELOC_MIPS_21_PCREL_S2,
  2189. BFD_RELOC_MIPS_26_PCREL_S2,
  2190. BFD_RELOC_MIPS_18_PCREL_S3,
  2191. BFD_RELOC_MIPS_19_PCREL_S2,
  2192. /* microMIPS versions of generic BFD relocs. */
  2193. BFD_RELOC_MICROMIPS_GPREL16,
  2194. BFD_RELOC_MICROMIPS_HI16,
  2195. BFD_RELOC_MICROMIPS_HI16_S,
  2196. BFD_RELOC_MICROMIPS_LO16,
  2197. /* MIPS ELF relocations. */
  2198. BFD_RELOC_MIPS_GOT16,
  2199. BFD_RELOC_MICROMIPS_GOT16,
  2200. BFD_RELOC_MIPS_CALL16,
  2201. BFD_RELOC_MICROMIPS_CALL16,
  2202. BFD_RELOC_MIPS_GOT_HI16,
  2203. BFD_RELOC_MICROMIPS_GOT_HI16,
  2204. BFD_RELOC_MIPS_GOT_LO16,
  2205. BFD_RELOC_MICROMIPS_GOT_LO16,
  2206. BFD_RELOC_MIPS_CALL_HI16,
  2207. BFD_RELOC_MICROMIPS_CALL_HI16,
  2208. BFD_RELOC_MIPS_CALL_LO16,
  2209. BFD_RELOC_MICROMIPS_CALL_LO16,
  2210. BFD_RELOC_MIPS_SUB,
  2211. BFD_RELOC_MICROMIPS_SUB,
  2212. BFD_RELOC_MIPS_GOT_PAGE,
  2213. BFD_RELOC_MICROMIPS_GOT_PAGE,
  2214. BFD_RELOC_MIPS_GOT_OFST,
  2215. BFD_RELOC_MICROMIPS_GOT_OFST,
  2216. BFD_RELOC_MIPS_GOT_DISP,
  2217. BFD_RELOC_MICROMIPS_GOT_DISP,
  2218. BFD_RELOC_MIPS_SHIFT5,
  2219. BFD_RELOC_MIPS_SHIFT6,
  2220. BFD_RELOC_MIPS_INSERT_A,
  2221. BFD_RELOC_MIPS_INSERT_B,
  2222. BFD_RELOC_MIPS_DELETE,
  2223. BFD_RELOC_MIPS_HIGHEST,
  2224. BFD_RELOC_MICROMIPS_HIGHEST,
  2225. BFD_RELOC_MIPS_HIGHER,
  2226. BFD_RELOC_MICROMIPS_HIGHER,
  2227. BFD_RELOC_MIPS_SCN_DISP,
  2228. BFD_RELOC_MICROMIPS_SCN_DISP,
  2229. BFD_RELOC_MIPS_REL16,
  2230. BFD_RELOC_MIPS_RELGOT,
  2231. BFD_RELOC_MIPS_JALR,
  2232. BFD_RELOC_MICROMIPS_JALR,
  2233. BFD_RELOC_MIPS_TLS_DTPMOD32,
  2234. BFD_RELOC_MIPS_TLS_DTPREL32,
  2235. BFD_RELOC_MIPS_TLS_DTPMOD64,
  2236. BFD_RELOC_MIPS_TLS_DTPREL64,
  2237. BFD_RELOC_MIPS_TLS_GD,
  2238. BFD_RELOC_MICROMIPS_TLS_GD,
  2239. BFD_RELOC_MIPS_TLS_LDM,
  2240. BFD_RELOC_MICROMIPS_TLS_LDM,
  2241. BFD_RELOC_MIPS_TLS_DTPREL_HI16,
  2242. BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
  2243. BFD_RELOC_MIPS_TLS_DTPREL_LO16,
  2244. BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
  2245. BFD_RELOC_MIPS_TLS_GOTTPREL,
  2246. BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
  2247. BFD_RELOC_MIPS_TLS_TPREL32,
  2248. BFD_RELOC_MIPS_TLS_TPREL64,
  2249. BFD_RELOC_MIPS_TLS_TPREL_HI16,
  2250. BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
  2251. BFD_RELOC_MIPS_TLS_TPREL_LO16,
  2252. BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
  2253. BFD_RELOC_MIPS_EH,
  2254. /* MIPS ELF relocations (VxWorks and PLT extensions). */
  2255. BFD_RELOC_MIPS_COPY,
  2256. BFD_RELOC_MIPS_JUMP_SLOT,
  2257. /* Moxie ELF relocations. */
  2258. BFD_RELOC_MOXIE_10_PCREL,
  2259. /* FT32 ELF relocations. */
  2260. BFD_RELOC_FT32_10,
  2261. BFD_RELOC_FT32_20,
  2262. BFD_RELOC_FT32_17,
  2263. BFD_RELOC_FT32_18,
  2264. BFD_RELOC_FT32_RELAX,
  2265. BFD_RELOC_FT32_SC0,
  2266. BFD_RELOC_FT32_SC1,
  2267. BFD_RELOC_FT32_15,
  2268. BFD_RELOC_FT32_DIFF32,
  2269. /* Fujitsu Frv Relocations. */
  2270. BFD_RELOC_FRV_LABEL16,
  2271. BFD_RELOC_FRV_LABEL24,
  2272. BFD_RELOC_FRV_LO16,
  2273. BFD_RELOC_FRV_HI16,
  2274. BFD_RELOC_FRV_GPREL12,
  2275. BFD_RELOC_FRV_GPRELU12,
  2276. BFD_RELOC_FRV_GPREL32,
  2277. BFD_RELOC_FRV_GPRELHI,
  2278. BFD_RELOC_FRV_GPRELLO,
  2279. BFD_RELOC_FRV_GOT12,
  2280. BFD_RELOC_FRV_GOTHI,
  2281. BFD_RELOC_FRV_GOTLO,
  2282. BFD_RELOC_FRV_FUNCDESC,
  2283. BFD_RELOC_FRV_FUNCDESC_GOT12,
  2284. BFD_RELOC_FRV_FUNCDESC_GOTHI,
  2285. BFD_RELOC_FRV_FUNCDESC_GOTLO,
  2286. BFD_RELOC_FRV_FUNCDESC_VALUE,
  2287. BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
  2288. BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
  2289. BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
  2290. BFD_RELOC_FRV_GOTOFF12,
  2291. BFD_RELOC_FRV_GOTOFFHI,
  2292. BFD_RELOC_FRV_GOTOFFLO,
  2293. BFD_RELOC_FRV_GETTLSOFF,
  2294. BFD_RELOC_FRV_TLSDESC_VALUE,
  2295. BFD_RELOC_FRV_GOTTLSDESC12,
  2296. BFD_RELOC_FRV_GOTTLSDESCHI,
  2297. BFD_RELOC_FRV_GOTTLSDESCLO,
  2298. BFD_RELOC_FRV_TLSMOFF12,
  2299. BFD_RELOC_FRV_TLSMOFFHI,
  2300. BFD_RELOC_FRV_TLSMOFFLO,
  2301. BFD_RELOC_FRV_GOTTLSOFF12,
  2302. BFD_RELOC_FRV_GOTTLSOFFHI,
  2303. BFD_RELOC_FRV_GOTTLSOFFLO,
  2304. BFD_RELOC_FRV_TLSOFF,
  2305. BFD_RELOC_FRV_TLSDESC_RELAX,
  2306. BFD_RELOC_FRV_GETTLSOFF_RELAX,
  2307. BFD_RELOC_FRV_TLSOFF_RELAX,
  2308. BFD_RELOC_FRV_TLSMOFF,
  2309. /* This is a 24bit GOT-relative reloc for the mn10300. */
  2310. BFD_RELOC_MN10300_GOTOFF24,
  2311. /* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
  2312. in the instruction. */
  2313. BFD_RELOC_MN10300_GOT32,
  2314. /* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
  2315. in the instruction. */
  2316. BFD_RELOC_MN10300_GOT24,
  2317. /* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
  2318. in the instruction. */
  2319. BFD_RELOC_MN10300_GOT16,
  2320. /* Copy symbol at runtime. */
  2321. BFD_RELOC_MN10300_COPY,
  2322. /* Create GOT entry. */
  2323. BFD_RELOC_MN10300_GLOB_DAT,
  2324. /* Create PLT entry. */
  2325. BFD_RELOC_MN10300_JMP_SLOT,
  2326. /* Adjust by program base. */
  2327. BFD_RELOC_MN10300_RELATIVE,
  2328. /* Together with another reloc targeted at the same location,
  2329. allows for a value that is the difference of two symbols
  2330. in the same section. */
  2331. BFD_RELOC_MN10300_SYM_DIFF,
  2332. /* The addend of this reloc is an alignment power that must
  2333. be honoured at the offset's location, regardless of linker
  2334. relaxation. */
  2335. BFD_RELOC_MN10300_ALIGN,
  2336. /* Various TLS-related relocations. */
  2337. BFD_RELOC_MN10300_TLS_GD,
  2338. BFD_RELOC_MN10300_TLS_LD,
  2339. BFD_RELOC_MN10300_TLS_LDO,
  2340. BFD_RELOC_MN10300_TLS_GOTIE,
  2341. BFD_RELOC_MN10300_TLS_IE,
  2342. BFD_RELOC_MN10300_TLS_LE,
  2343. BFD_RELOC_MN10300_TLS_DTPMOD,
  2344. BFD_RELOC_MN10300_TLS_DTPOFF,
  2345. BFD_RELOC_MN10300_TLS_TPOFF,
  2346. /* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
  2347. instruction. */
  2348. BFD_RELOC_MN10300_32_PCREL,
  2349. /* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
  2350. instruction. */
  2351. BFD_RELOC_MN10300_16_PCREL,
  2352. /* i386/elf relocations */
  2353. BFD_RELOC_386_GOT32,
  2354. BFD_RELOC_386_PLT32,
  2355. BFD_RELOC_386_COPY,
  2356. BFD_RELOC_386_GLOB_DAT,
  2357. BFD_RELOC_386_JUMP_SLOT,
  2358. BFD_RELOC_386_RELATIVE,
  2359. BFD_RELOC_386_GOTOFF,
  2360. BFD_RELOC_386_GOTPC,
  2361. BFD_RELOC_386_TLS_TPOFF,
  2362. BFD_RELOC_386_TLS_IE,
  2363. BFD_RELOC_386_TLS_GOTIE,
  2364. BFD_RELOC_386_TLS_LE,
  2365. BFD_RELOC_386_TLS_GD,
  2366. BFD_RELOC_386_TLS_LDM,
  2367. BFD_RELOC_386_TLS_LDO_32,
  2368. BFD_RELOC_386_TLS_IE_32,
  2369. BFD_RELOC_386_TLS_LE_32,
  2370. BFD_RELOC_386_TLS_DTPMOD32,
  2371. BFD_RELOC_386_TLS_DTPOFF32,
  2372. BFD_RELOC_386_TLS_TPOFF32,
  2373. BFD_RELOC_386_TLS_GOTDESC,
  2374. BFD_RELOC_386_TLS_DESC_CALL,
  2375. BFD_RELOC_386_TLS_DESC,
  2376. BFD_RELOC_386_IRELATIVE,
  2377. BFD_RELOC_386_GOT32X,
  2378. /* x86-64/elf relocations */
  2379. BFD_RELOC_X86_64_GOT32,
  2380. BFD_RELOC_X86_64_PLT32,
  2381. BFD_RELOC_X86_64_COPY,
  2382. BFD_RELOC_X86_64_GLOB_DAT,
  2383. BFD_RELOC_X86_64_JUMP_SLOT,
  2384. BFD_RELOC_X86_64_RELATIVE,
  2385. BFD_RELOC_X86_64_GOTPCREL,
  2386. BFD_RELOC_X86_64_32S,
  2387. BFD_RELOC_X86_64_DTPMOD64,
  2388. BFD_RELOC_X86_64_DTPOFF64,
  2389. BFD_RELOC_X86_64_TPOFF64,
  2390. BFD_RELOC_X86_64_TLSGD,
  2391. BFD_RELOC_X86_64_TLSLD,
  2392. BFD_RELOC_X86_64_DTPOFF32,
  2393. BFD_RELOC_X86_64_GOTTPOFF,
  2394. BFD_RELOC_X86_64_TPOFF32,
  2395. BFD_RELOC_X86_64_GOTOFF64,
  2396. BFD_RELOC_X86_64_GOTPC32,
  2397. BFD_RELOC_X86_64_GOT64,
  2398. BFD_RELOC_X86_64_GOTPCREL64,
  2399. BFD_RELOC_X86_64_GOTPC64,
  2400. BFD_RELOC_X86_64_GOTPLT64,
  2401. BFD_RELOC_X86_64_PLTOFF64,
  2402. BFD_RELOC_X86_64_GOTPC32_TLSDESC,
  2403. BFD_RELOC_X86_64_TLSDESC_CALL,
  2404. BFD_RELOC_X86_64_TLSDESC,
  2405. BFD_RELOC_X86_64_IRELATIVE,
  2406. BFD_RELOC_X86_64_PC32_BND,
  2407. BFD_RELOC_X86_64_PLT32_BND,
  2408. BFD_RELOC_X86_64_GOTPCRELX,
  2409. BFD_RELOC_X86_64_REX_GOTPCRELX,
  2410. /* ns32k relocations */
  2411. BFD_RELOC_NS32K_IMM_8,
  2412. BFD_RELOC_NS32K_IMM_16,
  2413. BFD_RELOC_NS32K_IMM_32,
  2414. BFD_RELOC_NS32K_IMM_8_PCREL,
  2415. BFD_RELOC_NS32K_IMM_16_PCREL,
  2416. BFD_RELOC_NS32K_IMM_32_PCREL,
  2417. BFD_RELOC_NS32K_DISP_8,
  2418. BFD_RELOC_NS32K_DISP_16,
  2419. BFD_RELOC_NS32K_DISP_32,
  2420. BFD_RELOC_NS32K_DISP_8_PCREL,
  2421. BFD_RELOC_NS32K_DISP_16_PCREL,
  2422. BFD_RELOC_NS32K_DISP_32_PCREL,
  2423. /* PDP11 relocations */
  2424. BFD_RELOC_PDP11_DISP_8_PCREL,
  2425. BFD_RELOC_PDP11_DISP_6_PCREL,
  2426. /* Picojava relocs. Not all of these appear in object files. */
  2427. BFD_RELOC_PJ_CODE_HI16,
  2428. BFD_RELOC_PJ_CODE_LO16,
  2429. BFD_RELOC_PJ_CODE_DIR16,
  2430. BFD_RELOC_PJ_CODE_DIR32,
  2431. BFD_RELOC_PJ_CODE_REL16,
  2432. BFD_RELOC_PJ_CODE_REL32,
  2433. /* Power(rs6000) and PowerPC relocations. */
  2434. BFD_RELOC_PPC_B26,
  2435. BFD_RELOC_PPC_BA26,
  2436. BFD_RELOC_PPC_TOC16,
  2437. BFD_RELOC_PPC_TOC16_LO,
  2438. BFD_RELOC_PPC_TOC16_HI,
  2439. BFD_RELOC_PPC_B16,
  2440. BFD_RELOC_PPC_B16_BRTAKEN,
  2441. BFD_RELOC_PPC_B16_BRNTAKEN,
  2442. BFD_RELOC_PPC_BA16,
  2443. BFD_RELOC_PPC_BA16_BRTAKEN,
  2444. BFD_RELOC_PPC_BA16_BRNTAKEN,
  2445. BFD_RELOC_PPC_COPY,
  2446. BFD_RELOC_PPC_GLOB_DAT,
  2447. BFD_RELOC_PPC_JMP_SLOT,
  2448. BFD_RELOC_PPC_RELATIVE,
  2449. BFD_RELOC_PPC_LOCAL24PC,
  2450. BFD_RELOC_PPC_EMB_NADDR32,
  2451. BFD_RELOC_PPC_EMB_NADDR16,
  2452. BFD_RELOC_PPC_EMB_NADDR16_LO,
  2453. BFD_RELOC_PPC_EMB_NADDR16_HI,
  2454. BFD_RELOC_PPC_EMB_NADDR16_HA,
  2455. BFD_RELOC_PPC_EMB_SDAI16,
  2456. BFD_RELOC_PPC_EMB_SDA2I16,
  2457. BFD_RELOC_PPC_EMB_SDA2REL,
  2458. BFD_RELOC_PPC_EMB_SDA21,
  2459. BFD_RELOC_PPC_EMB_MRKREF,
  2460. BFD_RELOC_PPC_EMB_RELSEC16,
  2461. BFD_RELOC_PPC_EMB_RELST_LO,
  2462. BFD_RELOC_PPC_EMB_RELST_HI,
  2463. BFD_RELOC_PPC_EMB_RELST_HA,
  2464. BFD_RELOC_PPC_EMB_BIT_FLD,
  2465. BFD_RELOC_PPC_EMB_RELSDA,
  2466. BFD_RELOC_PPC_VLE_REL8,
  2467. BFD_RELOC_PPC_VLE_REL15,
  2468. BFD_RELOC_PPC_VLE_REL24,
  2469. BFD_RELOC_PPC_VLE_LO16A,
  2470. BFD_RELOC_PPC_VLE_LO16D,
  2471. BFD_RELOC_PPC_VLE_HI16A,
  2472. BFD_RELOC_PPC_VLE_HI16D,
  2473. BFD_RELOC_PPC_VLE_HA16A,
  2474. BFD_RELOC_PPC_VLE_HA16D,
  2475. BFD_RELOC_PPC_VLE_SDA21,
  2476. BFD_RELOC_PPC_VLE_SDA21_LO,
  2477. BFD_RELOC_PPC_VLE_SDAREL_LO16A,
  2478. BFD_RELOC_PPC_VLE_SDAREL_LO16D,
  2479. BFD_RELOC_PPC_VLE_SDAREL_HI16A,
  2480. BFD_RELOC_PPC_VLE_SDAREL_HI16D,
  2481. BFD_RELOC_PPC_VLE_SDAREL_HA16A,
  2482. BFD_RELOC_PPC_VLE_SDAREL_HA16D,
  2483. BFD_RELOC_PPC_16DX_HA,
  2484. BFD_RELOC_PPC_REL16DX_HA,
  2485. BFD_RELOC_PPC_NEG,
  2486. BFD_RELOC_PPC64_HIGHER,
  2487. BFD_RELOC_PPC64_HIGHER_S,
  2488. BFD_RELOC_PPC64_HIGHEST,
  2489. BFD_RELOC_PPC64_HIGHEST_S,
  2490. BFD_RELOC_PPC64_TOC16_LO,
  2491. BFD_RELOC_PPC64_TOC16_HI,
  2492. BFD_RELOC_PPC64_TOC16_HA,
  2493. BFD_RELOC_PPC64_TOC,
  2494. BFD_RELOC_PPC64_PLTGOT16,
  2495. BFD_RELOC_PPC64_PLTGOT16_LO,
  2496. BFD_RELOC_PPC64_PLTGOT16_HI,
  2497. BFD_RELOC_PPC64_PLTGOT16_HA,
  2498. BFD_RELOC_PPC64_ADDR16_DS,
  2499. BFD_RELOC_PPC64_ADDR16_LO_DS,
  2500. BFD_RELOC_PPC64_GOT16_DS,
  2501. BFD_RELOC_PPC64_GOT16_LO_DS,
  2502. BFD_RELOC_PPC64_PLT16_LO_DS,
  2503. BFD_RELOC_PPC64_SECTOFF_DS,
  2504. BFD_RELOC_PPC64_SECTOFF_LO_DS,
  2505. BFD_RELOC_PPC64_TOC16_DS,
  2506. BFD_RELOC_PPC64_TOC16_LO_DS,
  2507. BFD_RELOC_PPC64_PLTGOT16_DS,
  2508. BFD_RELOC_PPC64_PLTGOT16_LO_DS,
  2509. BFD_RELOC_PPC64_ADDR16_HIGH,
  2510. BFD_RELOC_PPC64_ADDR16_HIGHA,
  2511. BFD_RELOC_PPC64_REL16_HIGH,
  2512. BFD_RELOC_PPC64_REL16_HIGHA,
  2513. BFD_RELOC_PPC64_REL16_HIGHER,
  2514. BFD_RELOC_PPC64_REL16_HIGHERA,
  2515. BFD_RELOC_PPC64_REL16_HIGHEST,
  2516. BFD_RELOC_PPC64_REL16_HIGHESTA,
  2517. BFD_RELOC_PPC64_ADDR64_LOCAL,
  2518. BFD_RELOC_PPC64_ENTRY,
  2519. BFD_RELOC_PPC64_REL24_NOTOC,
  2520. BFD_RELOC_PPC64_REL24_P9NOTOC,
  2521. BFD_RELOC_PPC64_D34,
  2522. BFD_RELOC_PPC64_D34_LO,
  2523. BFD_RELOC_PPC64_D34_HI30,
  2524. BFD_RELOC_PPC64_D34_HA30,
  2525. BFD_RELOC_PPC64_PCREL34,
  2526. BFD_RELOC_PPC64_GOT_PCREL34,
  2527. BFD_RELOC_PPC64_PLT_PCREL34,
  2528. BFD_RELOC_PPC64_ADDR16_HIGHER34,
  2529. BFD_RELOC_PPC64_ADDR16_HIGHERA34,
  2530. BFD_RELOC_PPC64_ADDR16_HIGHEST34,
  2531. BFD_RELOC_PPC64_ADDR16_HIGHESTA34,
  2532. BFD_RELOC_PPC64_REL16_HIGHER34,
  2533. BFD_RELOC_PPC64_REL16_HIGHERA34,
  2534. BFD_RELOC_PPC64_REL16_HIGHEST34,
  2535. BFD_RELOC_PPC64_REL16_HIGHESTA34,
  2536. BFD_RELOC_PPC64_D28,
  2537. BFD_RELOC_PPC64_PCREL28,
  2538. /* PowerPC and PowerPC64 thread-local storage relocations. */
  2539. BFD_RELOC_PPC_TLS,
  2540. BFD_RELOC_PPC_TLSGD,
  2541. BFD_RELOC_PPC_TLSLD,
  2542. BFD_RELOC_PPC_TLSLE,
  2543. BFD_RELOC_PPC_TLSIE,
  2544. BFD_RELOC_PPC_TLSM,
  2545. BFD_RELOC_PPC_TLSML,
  2546. BFD_RELOC_PPC_DTPMOD,
  2547. BFD_RELOC_PPC_TPREL16,
  2548. BFD_RELOC_PPC_TPREL16_LO,
  2549. BFD_RELOC_PPC_TPREL16_HI,
  2550. BFD_RELOC_PPC_TPREL16_HA,
  2551. BFD_RELOC_PPC_TPREL,
  2552. BFD_RELOC_PPC_DTPREL16,
  2553. BFD_RELOC_PPC_DTPREL16_LO,
  2554. BFD_RELOC_PPC_DTPREL16_HI,
  2555. BFD_RELOC_PPC_DTPREL16_HA,
  2556. BFD_RELOC_PPC_DTPREL,
  2557. BFD_RELOC_PPC_GOT_TLSGD16,
  2558. BFD_RELOC_PPC_GOT_TLSGD16_LO,
  2559. BFD_RELOC_PPC_GOT_TLSGD16_HI,
  2560. BFD_RELOC_PPC_GOT_TLSGD16_HA,
  2561. BFD_RELOC_PPC_GOT_TLSLD16,
  2562. BFD_RELOC_PPC_GOT_TLSLD16_LO,
  2563. BFD_RELOC_PPC_GOT_TLSLD16_HI,
  2564. BFD_RELOC_PPC_GOT_TLSLD16_HA,
  2565. BFD_RELOC_PPC_GOT_TPREL16,
  2566. BFD_RELOC_PPC_GOT_TPREL16_LO,
  2567. BFD_RELOC_PPC_GOT_TPREL16_HI,
  2568. BFD_RELOC_PPC_GOT_TPREL16_HA,
  2569. BFD_RELOC_PPC_GOT_DTPREL16,
  2570. BFD_RELOC_PPC_GOT_DTPREL16_LO,
  2571. BFD_RELOC_PPC_GOT_DTPREL16_HI,
  2572. BFD_RELOC_PPC_GOT_DTPREL16_HA,
  2573. BFD_RELOC_PPC64_TLSGD,
  2574. BFD_RELOC_PPC64_TLSLD,
  2575. BFD_RELOC_PPC64_TLSLE,
  2576. BFD_RELOC_PPC64_TLSIE,
  2577. BFD_RELOC_PPC64_TLSM,
  2578. BFD_RELOC_PPC64_TLSML,
  2579. BFD_RELOC_PPC64_TPREL16_DS,
  2580. BFD_RELOC_PPC64_TPREL16_LO_DS,
  2581. BFD_RELOC_PPC64_TPREL16_HIGH,
  2582. BFD_RELOC_PPC64_TPREL16_HIGHA,
  2583. BFD_RELOC_PPC64_TPREL16_HIGHER,
  2584. BFD_RELOC_PPC64_TPREL16_HIGHERA,
  2585. BFD_RELOC_PPC64_TPREL16_HIGHEST,
  2586. BFD_RELOC_PPC64_TPREL16_HIGHESTA,
  2587. BFD_RELOC_PPC64_DTPREL16_DS,
  2588. BFD_RELOC_PPC64_DTPREL16_LO_DS,
  2589. BFD_RELOC_PPC64_DTPREL16_HIGH,
  2590. BFD_RELOC_PPC64_DTPREL16_HIGHA,
  2591. BFD_RELOC_PPC64_DTPREL16_HIGHER,
  2592. BFD_RELOC_PPC64_DTPREL16_HIGHERA,
  2593. BFD_RELOC_PPC64_DTPREL16_HIGHEST,
  2594. BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
  2595. BFD_RELOC_PPC64_TPREL34,
  2596. BFD_RELOC_PPC64_DTPREL34,
  2597. BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
  2598. BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
  2599. BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
  2600. BFD_RELOC_PPC64_GOT_DTPREL_PCREL34,
  2601. BFD_RELOC_PPC64_TLS_PCREL,
  2602. /* IBM 370/390 relocations */
  2603. BFD_RELOC_I370_D12,
  2604. /* The type of reloc used to build a constructor table - at the moment
  2605. probably a 32 bit wide absolute relocation, but the target can choose.
  2606. It generally does map to one of the other relocation types. */
  2607. BFD_RELOC_CTOR,
  2608. /* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
  2609. not stored in the instruction. */
  2610. BFD_RELOC_ARM_PCREL_BRANCH,
  2611. /* ARM 26 bit pc-relative branch. The lowest bit must be zero and is
  2612. not stored in the instruction. The 2nd lowest bit comes from a 1 bit
  2613. field in the instruction. */
  2614. BFD_RELOC_ARM_PCREL_BLX,
  2615. /* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
  2616. not stored in the instruction. The 2nd lowest bit comes from a 1 bit
  2617. field in the instruction. */
  2618. BFD_RELOC_THUMB_PCREL_BLX,
  2619. /* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
  2620. BFD_RELOC_ARM_PCREL_CALL,
  2621. /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
  2622. BFD_RELOC_ARM_PCREL_JUMP,
  2623. /* ARM 5-bit pc-relative branch for Branch Future instructions. */
  2624. BFD_RELOC_THUMB_PCREL_BRANCH5,
  2625. /* ARM 6-bit pc-relative branch for BFCSEL instruction. */
  2626. BFD_RELOC_THUMB_PCREL_BFCSEL,
  2627. /* ARM 17-bit pc-relative branch for Branch Future instructions. */
  2628. BFD_RELOC_ARM_THUMB_BF17,
  2629. /* ARM 13-bit pc-relative branch for BFCSEL instruction. */
  2630. BFD_RELOC_ARM_THUMB_BF13,
  2631. /* ARM 19-bit pc-relative branch for Branch Future Link instruction. */
  2632. BFD_RELOC_ARM_THUMB_BF19,
  2633. /* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */
  2634. BFD_RELOC_ARM_THUMB_LOOP12,
  2635. /* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
  2636. The lowest bit must be zero and is not stored in the instruction.
  2637. Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
  2638. "nn" one smaller in all cases. Note further that BRANCH23
  2639. corresponds to R_ARM_THM_CALL. */
  2640. BFD_RELOC_THUMB_PCREL_BRANCH7,
  2641. BFD_RELOC_THUMB_PCREL_BRANCH9,
  2642. BFD_RELOC_THUMB_PCREL_BRANCH12,
  2643. BFD_RELOC_THUMB_PCREL_BRANCH20,
  2644. BFD_RELOC_THUMB_PCREL_BRANCH23,
  2645. BFD_RELOC_THUMB_PCREL_BRANCH25,
  2646. /* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
  2647. BFD_RELOC_ARM_OFFSET_IMM,
  2648. /* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
  2649. BFD_RELOC_ARM_THUMB_OFFSET,
  2650. /* Pc-relative or absolute relocation depending on target. Used for
  2651. entries in .init_array sections. */
  2652. BFD_RELOC_ARM_TARGET1,
  2653. /* Read-only segment base relative address. */
  2654. BFD_RELOC_ARM_ROSEGREL32,
  2655. /* Data segment base relative address. */
  2656. BFD_RELOC_ARM_SBREL32,
  2657. /* This reloc is used for references to RTTI data from exception handling
  2658. tables. The actual definition depends on the target. It may be a
  2659. pc-relative or some form of GOT-indirect relocation. */
  2660. BFD_RELOC_ARM_TARGET2,
  2661. /* 31-bit PC relative address. */
  2662. BFD_RELOC_ARM_PREL31,
  2663. /* Low and High halfword relocations for MOVW and MOVT instructions. */
  2664. BFD_RELOC_ARM_MOVW,
  2665. BFD_RELOC_ARM_MOVT,
  2666. BFD_RELOC_ARM_MOVW_PCREL,
  2667. BFD_RELOC_ARM_MOVT_PCREL,
  2668. BFD_RELOC_ARM_THUMB_MOVW,
  2669. BFD_RELOC_ARM_THUMB_MOVT,
  2670. BFD_RELOC_ARM_THUMB_MOVW_PCREL,
  2671. BFD_RELOC_ARM_THUMB_MOVT_PCREL,
  2672. /* ARM FDPIC specific relocations. */
  2673. BFD_RELOC_ARM_GOTFUNCDESC,
  2674. BFD_RELOC_ARM_GOTOFFFUNCDESC,
  2675. BFD_RELOC_ARM_FUNCDESC,
  2676. BFD_RELOC_ARM_FUNCDESC_VALUE,
  2677. BFD_RELOC_ARM_TLS_GD32_FDPIC,
  2678. BFD_RELOC_ARM_TLS_LDM32_FDPIC,
  2679. BFD_RELOC_ARM_TLS_IE32_FDPIC,
  2680. /* Relocations for setting up GOTs and PLTs for shared libraries. */
  2681. BFD_RELOC_ARM_JUMP_SLOT,
  2682. BFD_RELOC_ARM_GLOB_DAT,
  2683. BFD_RELOC_ARM_GOT32,
  2684. BFD_RELOC_ARM_PLT32,
  2685. BFD_RELOC_ARM_RELATIVE,
  2686. BFD_RELOC_ARM_GOTOFF,
  2687. BFD_RELOC_ARM_GOTPC,
  2688. BFD_RELOC_ARM_GOT_PREL,
  2689. /* ARM thread-local storage relocations. */
  2690. BFD_RELOC_ARM_TLS_GD32,
  2691. BFD_RELOC_ARM_TLS_LDO32,
  2692. BFD_RELOC_ARM_TLS_LDM32,
  2693. BFD_RELOC_ARM_TLS_DTPOFF32,
  2694. BFD_RELOC_ARM_TLS_DTPMOD32,
  2695. BFD_RELOC_ARM_TLS_TPOFF32,
  2696. BFD_RELOC_ARM_TLS_IE32,
  2697. BFD_RELOC_ARM_TLS_LE32,
  2698. BFD_RELOC_ARM_TLS_GOTDESC,
  2699. BFD_RELOC_ARM_TLS_CALL,
  2700. BFD_RELOC_ARM_THM_TLS_CALL,
  2701. BFD_RELOC_ARM_TLS_DESCSEQ,
  2702. BFD_RELOC_ARM_THM_TLS_DESCSEQ,
  2703. BFD_RELOC_ARM_TLS_DESC,
  2704. /* ARM group relocations. */
  2705. BFD_RELOC_ARM_ALU_PC_G0_NC,
  2706. BFD_RELOC_ARM_ALU_PC_G0,
  2707. BFD_RELOC_ARM_ALU_PC_G1_NC,
  2708. BFD_RELOC_ARM_ALU_PC_G1,
  2709. BFD_RELOC_ARM_ALU_PC_G2,
  2710. BFD_RELOC_ARM_LDR_PC_G0,
  2711. BFD_RELOC_ARM_LDR_PC_G1,
  2712. BFD_RELOC_ARM_LDR_PC_G2,
  2713. BFD_RELOC_ARM_LDRS_PC_G0,
  2714. BFD_RELOC_ARM_LDRS_PC_G1,
  2715. BFD_RELOC_ARM_LDRS_PC_G2,
  2716. BFD_RELOC_ARM_LDC_PC_G0,
  2717. BFD_RELOC_ARM_LDC_PC_G1,
  2718. BFD_RELOC_ARM_LDC_PC_G2,
  2719. BFD_RELOC_ARM_ALU_SB_G0_NC,
  2720. BFD_RELOC_ARM_ALU_SB_G0,
  2721. BFD_RELOC_ARM_ALU_SB_G1_NC,
  2722. BFD_RELOC_ARM_ALU_SB_G1,
  2723. BFD_RELOC_ARM_ALU_SB_G2,
  2724. BFD_RELOC_ARM_LDR_SB_G0,
  2725. BFD_RELOC_ARM_LDR_SB_G1,
  2726. BFD_RELOC_ARM_LDR_SB_G2,
  2727. BFD_RELOC_ARM_LDRS_SB_G0,
  2728. BFD_RELOC_ARM_LDRS_SB_G1,
  2729. BFD_RELOC_ARM_LDRS_SB_G2,
  2730. BFD_RELOC_ARM_LDC_SB_G0,
  2731. BFD_RELOC_ARM_LDC_SB_G1,
  2732. BFD_RELOC_ARM_LDC_SB_G2,
  2733. /* Annotation of BX instructions. */
  2734. BFD_RELOC_ARM_V4BX,
  2735. /* ARM support for STT_GNU_IFUNC. */
  2736. BFD_RELOC_ARM_IRELATIVE,
  2737. /* Thumb1 relocations to support execute-only code. */
  2738. BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC,
  2739. BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC,
  2740. BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC,
  2741. BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC,
  2742. /* These relocs are only used within the ARM assembler. They are not
  2743. (at present) written to any object files. */
  2744. BFD_RELOC_ARM_IMMEDIATE,
  2745. BFD_RELOC_ARM_ADRL_IMMEDIATE,
  2746. BFD_RELOC_ARM_T32_IMMEDIATE,
  2747. BFD_RELOC_ARM_T32_ADD_IMM,
  2748. BFD_RELOC_ARM_T32_IMM12,
  2749. BFD_RELOC_ARM_T32_ADD_PC12,
  2750. BFD_RELOC_ARM_SHIFT_IMM,
  2751. BFD_RELOC_ARM_SMC,
  2752. BFD_RELOC_ARM_HVC,
  2753. BFD_RELOC_ARM_SWI,
  2754. BFD_RELOC_ARM_MULTI,
  2755. BFD_RELOC_ARM_CP_OFF_IMM,
  2756. BFD_RELOC_ARM_CP_OFF_IMM_S2,
  2757. BFD_RELOC_ARM_T32_CP_OFF_IMM,
  2758. BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
  2759. BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM,
  2760. BFD_RELOC_ARM_ADR_IMM,
  2761. BFD_RELOC_ARM_LDR_IMM,
  2762. BFD_RELOC_ARM_LITERAL,
  2763. BFD_RELOC_ARM_IN_POOL,
  2764. BFD_RELOC_ARM_OFFSET_IMM8,
  2765. BFD_RELOC_ARM_T32_OFFSET_U8,
  2766. BFD_RELOC_ARM_T32_OFFSET_IMM,
  2767. BFD_RELOC_ARM_HWLITERAL,
  2768. BFD_RELOC_ARM_THUMB_ADD,
  2769. BFD_RELOC_ARM_THUMB_IMM,
  2770. BFD_RELOC_ARM_THUMB_SHIFT,
  2771. /* Renesas / SuperH SH relocs. Not all of these appear in object files. */
  2772. BFD_RELOC_SH_PCDISP8BY2,
  2773. BFD_RELOC_SH_PCDISP12BY2,
  2774. BFD_RELOC_SH_IMM3,
  2775. BFD_RELOC_SH_IMM3U,
  2776. BFD_RELOC_SH_DISP12,
  2777. BFD_RELOC_SH_DISP12BY2,
  2778. BFD_RELOC_SH_DISP12BY4,
  2779. BFD_RELOC_SH_DISP12BY8,
  2780. BFD_RELOC_SH_DISP20,
  2781. BFD_RELOC_SH_DISP20BY8,
  2782. BFD_RELOC_SH_IMM4,
  2783. BFD_RELOC_SH_IMM4BY2,
  2784. BFD_RELOC_SH_IMM4BY4,
  2785. BFD_RELOC_SH_IMM8,
  2786. BFD_RELOC_SH_IMM8BY2,
  2787. BFD_RELOC_SH_IMM8BY4,
  2788. BFD_RELOC_SH_PCRELIMM8BY2,
  2789. BFD_RELOC_SH_PCRELIMM8BY4,
  2790. BFD_RELOC_SH_SWITCH16,
  2791. BFD_RELOC_SH_SWITCH32,
  2792. BFD_RELOC_SH_USES,
  2793. BFD_RELOC_SH_COUNT,
  2794. BFD_RELOC_SH_ALIGN,
  2795. BFD_RELOC_SH_CODE,
  2796. BFD_RELOC_SH_DATA,
  2797. BFD_RELOC_SH_LABEL,
  2798. BFD_RELOC_SH_LOOP_START,
  2799. BFD_RELOC_SH_LOOP_END,
  2800. BFD_RELOC_SH_COPY,
  2801. BFD_RELOC_SH_GLOB_DAT,
  2802. BFD_RELOC_SH_JMP_SLOT,
  2803. BFD_RELOC_SH_RELATIVE,
  2804. BFD_RELOC_SH_GOTPC,
  2805. BFD_RELOC_SH_GOT_LOW16,
  2806. BFD_RELOC_SH_GOT_MEDLOW16,
  2807. BFD_RELOC_SH_GOT_MEDHI16,
  2808. BFD_RELOC_SH_GOT_HI16,
  2809. BFD_RELOC_SH_GOTPLT_LOW16,
  2810. BFD_RELOC_SH_GOTPLT_MEDLOW16,
  2811. BFD_RELOC_SH_GOTPLT_MEDHI16,
  2812. BFD_RELOC_SH_GOTPLT_HI16,
  2813. BFD_RELOC_SH_PLT_LOW16,
  2814. BFD_RELOC_SH_PLT_MEDLOW16,
  2815. BFD_RELOC_SH_PLT_MEDHI16,
  2816. BFD_RELOC_SH_PLT_HI16,
  2817. BFD_RELOC_SH_GOTOFF_LOW16,
  2818. BFD_RELOC_SH_GOTOFF_MEDLOW16,
  2819. BFD_RELOC_SH_GOTOFF_MEDHI16,
  2820. BFD_RELOC_SH_GOTOFF_HI16,
  2821. BFD_RELOC_SH_GOTPC_LOW16,
  2822. BFD_RELOC_SH_GOTPC_MEDLOW16,
  2823. BFD_RELOC_SH_GOTPC_MEDHI16,
  2824. BFD_RELOC_SH_GOTPC_HI16,
  2825. BFD_RELOC_SH_COPY64,
  2826. BFD_RELOC_SH_GLOB_DAT64,
  2827. BFD_RELOC_SH_JMP_SLOT64,
  2828. BFD_RELOC_SH_RELATIVE64,
  2829. BFD_RELOC_SH_GOT10BY4,
  2830. BFD_RELOC_SH_GOT10BY8,
  2831. BFD_RELOC_SH_GOTPLT10BY4,
  2832. BFD_RELOC_SH_GOTPLT10BY8,
  2833. BFD_RELOC_SH_GOTPLT32,
  2834. BFD_RELOC_SH_SHMEDIA_CODE,
  2835. BFD_RELOC_SH_IMMU5,
  2836. BFD_RELOC_SH_IMMS6,
  2837. BFD_RELOC_SH_IMMS6BY32,
  2838. BFD_RELOC_SH_IMMU6,
  2839. BFD_RELOC_SH_IMMS10,
  2840. BFD_RELOC_SH_IMMS10BY2,
  2841. BFD_RELOC_SH_IMMS10BY4,
  2842. BFD_RELOC_SH_IMMS10BY8,
  2843. BFD_RELOC_SH_IMMS16,
  2844. BFD_RELOC_SH_IMMU16,
  2845. BFD_RELOC_SH_IMM_LOW16,
  2846. BFD_RELOC_SH_IMM_LOW16_PCREL,
  2847. BFD_RELOC_SH_IMM_MEDLOW16,
  2848. BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
  2849. BFD_RELOC_SH_IMM_MEDHI16,
  2850. BFD_RELOC_SH_IMM_MEDHI16_PCREL,
  2851. BFD_RELOC_SH_IMM_HI16,
  2852. BFD_RELOC_SH_IMM_HI16_PCREL,
  2853. BFD_RELOC_SH_PT_16,
  2854. BFD_RELOC_SH_TLS_GD_32,
  2855. BFD_RELOC_SH_TLS_LD_32,
  2856. BFD_RELOC_SH_TLS_LDO_32,
  2857. BFD_RELOC_SH_TLS_IE_32,
  2858. BFD_RELOC_SH_TLS_LE_32,
  2859. BFD_RELOC_SH_TLS_DTPMOD32,
  2860. BFD_RELOC_SH_TLS_DTPOFF32,
  2861. BFD_RELOC_SH_TLS_TPOFF32,
  2862. BFD_RELOC_SH_GOT20,
  2863. BFD_RELOC_SH_GOTOFF20,
  2864. BFD_RELOC_SH_GOTFUNCDESC,
  2865. BFD_RELOC_SH_GOTFUNCDESC20,
  2866. BFD_RELOC_SH_GOTOFFFUNCDESC,
  2867. BFD_RELOC_SH_GOTOFFFUNCDESC20,
  2868. BFD_RELOC_SH_FUNCDESC,
  2869. /* ARC relocs. */
  2870. BFD_RELOC_ARC_NONE,
  2871. BFD_RELOC_ARC_8,
  2872. BFD_RELOC_ARC_16,
  2873. BFD_RELOC_ARC_24,
  2874. BFD_RELOC_ARC_32,
  2875. BFD_RELOC_ARC_N8,
  2876. BFD_RELOC_ARC_N16,
  2877. BFD_RELOC_ARC_N24,
  2878. BFD_RELOC_ARC_N32,
  2879. BFD_RELOC_ARC_SDA,
  2880. BFD_RELOC_ARC_SECTOFF,
  2881. BFD_RELOC_ARC_S21H_PCREL,
  2882. BFD_RELOC_ARC_S21W_PCREL,
  2883. BFD_RELOC_ARC_S25H_PCREL,
  2884. BFD_RELOC_ARC_S25W_PCREL,
  2885. BFD_RELOC_ARC_SDA32,
  2886. BFD_RELOC_ARC_SDA_LDST,
  2887. BFD_RELOC_ARC_SDA_LDST1,
  2888. BFD_RELOC_ARC_SDA_LDST2,
  2889. BFD_RELOC_ARC_SDA16_LD,
  2890. BFD_RELOC_ARC_SDA16_LD1,
  2891. BFD_RELOC_ARC_SDA16_LD2,
  2892. BFD_RELOC_ARC_S13_PCREL,
  2893. BFD_RELOC_ARC_W,
  2894. BFD_RELOC_ARC_32_ME,
  2895. BFD_RELOC_ARC_32_ME_S,
  2896. BFD_RELOC_ARC_N32_ME,
  2897. BFD_RELOC_ARC_SECTOFF_ME,
  2898. BFD_RELOC_ARC_SDA32_ME,
  2899. BFD_RELOC_ARC_W_ME,
  2900. BFD_RELOC_AC_SECTOFF_U8,
  2901. BFD_RELOC_AC_SECTOFF_U8_1,
  2902. BFD_RELOC_AC_SECTOFF_U8_2,
  2903. BFD_RELOC_AC_SECTOFF_S9,
  2904. BFD_RELOC_AC_SECTOFF_S9_1,
  2905. BFD_RELOC_AC_SECTOFF_S9_2,
  2906. BFD_RELOC_ARC_SECTOFF_ME_1,
  2907. BFD_RELOC_ARC_SECTOFF_ME_2,
  2908. BFD_RELOC_ARC_SECTOFF_1,
  2909. BFD_RELOC_ARC_SECTOFF_2,
  2910. BFD_RELOC_ARC_SDA_12,
  2911. BFD_RELOC_ARC_SDA16_ST2,
  2912. BFD_RELOC_ARC_32_PCREL,
  2913. BFD_RELOC_ARC_PC32,
  2914. BFD_RELOC_ARC_GOT32,
  2915. BFD_RELOC_ARC_GOTPC32,
  2916. BFD_RELOC_ARC_PLT32,
  2917. BFD_RELOC_ARC_COPY,
  2918. BFD_RELOC_ARC_GLOB_DAT,
  2919. BFD_RELOC_ARC_JMP_SLOT,
  2920. BFD_RELOC_ARC_RELATIVE,
  2921. BFD_RELOC_ARC_GOTOFF,
  2922. BFD_RELOC_ARC_GOTPC,
  2923. BFD_RELOC_ARC_S21W_PCREL_PLT,
  2924. BFD_RELOC_ARC_S25H_PCREL_PLT,
  2925. BFD_RELOC_ARC_TLS_DTPMOD,
  2926. BFD_RELOC_ARC_TLS_TPOFF,
  2927. BFD_RELOC_ARC_TLS_GD_GOT,
  2928. BFD_RELOC_ARC_TLS_GD_LD,
  2929. BFD_RELOC_ARC_TLS_GD_CALL,
  2930. BFD_RELOC_ARC_TLS_IE_GOT,
  2931. BFD_RELOC_ARC_TLS_DTPOFF,
  2932. BFD_RELOC_ARC_TLS_DTPOFF_S9,
  2933. BFD_RELOC_ARC_TLS_LE_S9,
  2934. BFD_RELOC_ARC_TLS_LE_32,
  2935. BFD_RELOC_ARC_S25W_PCREL_PLT,
  2936. BFD_RELOC_ARC_S21H_PCREL_PLT,
  2937. BFD_RELOC_ARC_NPS_CMEM16,
  2938. BFD_RELOC_ARC_JLI_SECTOFF,
  2939. /* ADI Blackfin 16 bit immediate absolute reloc. */
  2940. BFD_RELOC_BFIN_16_IMM,
  2941. /* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
  2942. BFD_RELOC_BFIN_16_HIGH,
  2943. /* ADI Blackfin 'a' part of LSETUP. */
  2944. BFD_RELOC_BFIN_4_PCREL,
  2945. /* ADI Blackfin. */
  2946. BFD_RELOC_BFIN_5_PCREL,
  2947. /* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
  2948. BFD_RELOC_BFIN_16_LOW,
  2949. /* ADI Blackfin. */
  2950. BFD_RELOC_BFIN_10_PCREL,
  2951. /* ADI Blackfin 'b' part of LSETUP. */
  2952. BFD_RELOC_BFIN_11_PCREL,
  2953. /* ADI Blackfin. */
  2954. BFD_RELOC_BFIN_12_PCREL_JUMP,
  2955. /* ADI Blackfin Short jump, pcrel. */
  2956. BFD_RELOC_BFIN_12_PCREL_JUMP_S,
  2957. /* ADI Blackfin Call.x not implemented. */
  2958. BFD_RELOC_BFIN_24_PCREL_CALL_X,
  2959. /* ADI Blackfin Long Jump pcrel. */
  2960. BFD_RELOC_BFIN_24_PCREL_JUMP_L,
  2961. /* ADI Blackfin FD-PIC relocations. */
  2962. BFD_RELOC_BFIN_GOT17M4,
  2963. BFD_RELOC_BFIN_GOTHI,
  2964. BFD_RELOC_BFIN_GOTLO,
  2965. BFD_RELOC_BFIN_FUNCDESC,
  2966. BFD_RELOC_BFIN_FUNCDESC_GOT17M4,
  2967. BFD_RELOC_BFIN_FUNCDESC_GOTHI,
  2968. BFD_RELOC_BFIN_FUNCDESC_GOTLO,
  2969. BFD_RELOC_BFIN_FUNCDESC_VALUE,
  2970. BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4,
  2971. BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
  2972. BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
  2973. BFD_RELOC_BFIN_GOTOFF17M4,
  2974. BFD_RELOC_BFIN_GOTOFFHI,
  2975. BFD_RELOC_BFIN_GOTOFFLO,
  2976. /* ADI Blackfin GOT relocation. */
  2977. BFD_RELOC_BFIN_GOT,
  2978. /* ADI Blackfin PLTPC relocation. */
  2979. BFD_RELOC_BFIN_PLTPC,
  2980. /* ADI Blackfin arithmetic relocation. */
  2981. BFD_ARELOC_BFIN_PUSH,
  2982. /* ADI Blackfin arithmetic relocation. */
  2983. BFD_ARELOC_BFIN_CONST,
  2984. /* ADI Blackfin arithmetic relocation. */
  2985. BFD_ARELOC_BFIN_ADD,
  2986. /* ADI Blackfin arithmetic relocation. */
  2987. BFD_ARELOC_BFIN_SUB,
  2988. /* ADI Blackfin arithmetic relocation. */
  2989. BFD_ARELOC_BFIN_MULT,
  2990. /* ADI Blackfin arithmetic relocation. */
  2991. BFD_ARELOC_BFIN_DIV,
  2992. /* ADI Blackfin arithmetic relocation. */
  2993. BFD_ARELOC_BFIN_MOD,
  2994. /* ADI Blackfin arithmetic relocation. */
  2995. BFD_ARELOC_BFIN_LSHIFT,
  2996. /* ADI Blackfin arithmetic relocation. */
  2997. BFD_ARELOC_BFIN_RSHIFT,
  2998. /* ADI Blackfin arithmetic relocation. */
  2999. BFD_ARELOC_BFIN_AND,
  3000. /* ADI Blackfin arithmetic relocation. */
  3001. BFD_ARELOC_BFIN_OR,
  3002. /* ADI Blackfin arithmetic relocation. */
  3003. BFD_ARELOC_BFIN_XOR,
  3004. /* ADI Blackfin arithmetic relocation. */
  3005. BFD_ARELOC_BFIN_LAND,
  3006. /* ADI Blackfin arithmetic relocation. */
  3007. BFD_ARELOC_BFIN_LOR,
  3008. /* ADI Blackfin arithmetic relocation. */
  3009. BFD_ARELOC_BFIN_LEN,
  3010. /* ADI Blackfin arithmetic relocation. */
  3011. BFD_ARELOC_BFIN_NEG,
  3012. /* ADI Blackfin arithmetic relocation. */
  3013. BFD_ARELOC_BFIN_COMP,
  3014. /* ADI Blackfin arithmetic relocation. */
  3015. BFD_ARELOC_BFIN_PAGE,
  3016. /* ADI Blackfin arithmetic relocation. */
  3017. BFD_ARELOC_BFIN_HWPAGE,
  3018. /* ADI Blackfin arithmetic relocation. */
  3019. BFD_ARELOC_BFIN_ADDR,
  3020. /* Mitsubishi D10V relocs.
  3021. This is a 10-bit reloc with the right 2 bits
  3022. assumed to be 0. */
  3023. BFD_RELOC_D10V_10_PCREL_R,
  3024. /* Mitsubishi D10V relocs.
  3025. This is a 10-bit reloc with the right 2 bits
  3026. assumed to be 0. This is the same as the previous reloc
  3027. except it is in the left container, i.e.,
  3028. shifted left 15 bits. */
  3029. BFD_RELOC_D10V_10_PCREL_L,
  3030. /* This is an 18-bit reloc with the right 2 bits
  3031. assumed to be 0. */
  3032. BFD_RELOC_D10V_18,
  3033. /* This is an 18-bit reloc with the right 2 bits
  3034. assumed to be 0. */
  3035. BFD_RELOC_D10V_18_PCREL,
  3036. /* Mitsubishi D30V relocs.
  3037. This is a 6-bit absolute reloc. */
  3038. BFD_RELOC_D30V_6,
  3039. /* This is a 6-bit pc-relative reloc with
  3040. the right 3 bits assumed to be 0. */
  3041. BFD_RELOC_D30V_9_PCREL,
  3042. /* This is a 6-bit pc-relative reloc with
  3043. the right 3 bits assumed to be 0. Same
  3044. as the previous reloc but on the right side
  3045. of the container. */
  3046. BFD_RELOC_D30V_9_PCREL_R,
  3047. /* This is a 12-bit absolute reloc with the
  3048. right 3 bitsassumed to be 0. */
  3049. BFD_RELOC_D30V_15,
  3050. /* This is a 12-bit pc-relative reloc with
  3051. the right 3 bits assumed to be 0. */
  3052. BFD_RELOC_D30V_15_PCREL,
  3053. /* This is a 12-bit pc-relative reloc with
  3054. the right 3 bits assumed to be 0. Same
  3055. as the previous reloc but on the right side
  3056. of the container. */
  3057. BFD_RELOC_D30V_15_PCREL_R,
  3058. /* This is an 18-bit absolute reloc with
  3059. the right 3 bits assumed to be 0. */
  3060. BFD_RELOC_D30V_21,
  3061. /* This is an 18-bit pc-relative reloc with
  3062. the right 3 bits assumed to be 0. */
  3063. BFD_RELOC_D30V_21_PCREL,
  3064. /* This is an 18-bit pc-relative reloc with
  3065. the right 3 bits assumed to be 0. Same
  3066. as the previous reloc but on the right side
  3067. of the container. */
  3068. BFD_RELOC_D30V_21_PCREL_R,
  3069. /* This is a 32-bit absolute reloc. */
  3070. BFD_RELOC_D30V_32,
  3071. /* This is a 32-bit pc-relative reloc. */
  3072. BFD_RELOC_D30V_32_PCREL,
  3073. /* DLX relocs */
  3074. BFD_RELOC_DLX_HI16_S,
  3075. /* DLX relocs */
  3076. BFD_RELOC_DLX_LO16,
  3077. /* DLX relocs */
  3078. BFD_RELOC_DLX_JMP26,
  3079. /* Renesas M16C/M32C Relocations. */
  3080. BFD_RELOC_M32C_HI8,
  3081. BFD_RELOC_M32C_RL_JUMP,
  3082. BFD_RELOC_M32C_RL_1ADDR,
  3083. BFD_RELOC_M32C_RL_2ADDR,
  3084. /* Renesas M32R (formerly Mitsubishi M32R) relocs.
  3085. This is a 24 bit absolute address. */
  3086. BFD_RELOC_M32R_24,
  3087. /* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
  3088. BFD_RELOC_M32R_10_PCREL,
  3089. /* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
  3090. BFD_RELOC_M32R_18_PCREL,
  3091. /* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
  3092. BFD_RELOC_M32R_26_PCREL,
  3093. /* This is a 16-bit reloc containing the high 16 bits of an address
  3094. used when the lower 16 bits are treated as unsigned. */
  3095. BFD_RELOC_M32R_HI16_ULO,
  3096. /* This is a 16-bit reloc containing the high 16 bits of an address
  3097. used when the lower 16 bits are treated as signed. */
  3098. BFD_RELOC_M32R_HI16_SLO,
  3099. /* This is a 16-bit reloc containing the lower 16 bits of an address. */
  3100. BFD_RELOC_M32R_LO16,
  3101. /* This is a 16-bit reloc containing the small data area offset for use in
  3102. add3, load, and store instructions. */
  3103. BFD_RELOC_M32R_SDA16,
  3104. /* For PIC. */
  3105. BFD_RELOC_M32R_GOT24,
  3106. BFD_RELOC_M32R_26_PLTREL,
  3107. BFD_RELOC_M32R_COPY,
  3108. BFD_RELOC_M32R_GLOB_DAT,
  3109. BFD_RELOC_M32R_JMP_SLOT,
  3110. BFD_RELOC_M32R_RELATIVE,
  3111. BFD_RELOC_M32R_GOTOFF,
  3112. BFD_RELOC_M32R_GOTOFF_HI_ULO,
  3113. BFD_RELOC_M32R_GOTOFF_HI_SLO,
  3114. BFD_RELOC_M32R_GOTOFF_LO,
  3115. BFD_RELOC_M32R_GOTPC24,
  3116. BFD_RELOC_M32R_GOT16_HI_ULO,
  3117. BFD_RELOC_M32R_GOT16_HI_SLO,
  3118. BFD_RELOC_M32R_GOT16_LO,
  3119. BFD_RELOC_M32R_GOTPC_HI_ULO,
  3120. BFD_RELOC_M32R_GOTPC_HI_SLO,
  3121. BFD_RELOC_M32R_GOTPC_LO,
  3122. /* NDS32 relocs.
  3123. This is a 20 bit absolute address. */
  3124. BFD_RELOC_NDS32_20,
  3125. /* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
  3126. BFD_RELOC_NDS32_9_PCREL,
  3127. /* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
  3128. BFD_RELOC_NDS32_WORD_9_PCREL,
  3129. /* This is an 15-bit reloc with the right 1 bit assumed to be 0. */
  3130. BFD_RELOC_NDS32_15_PCREL,
  3131. /* This is an 17-bit reloc with the right 1 bit assumed to be 0. */
  3132. BFD_RELOC_NDS32_17_PCREL,
  3133. /* This is a 25-bit reloc with the right 1 bit assumed to be 0. */
  3134. BFD_RELOC_NDS32_25_PCREL,
  3135. /* This is a 20-bit reloc containing the high 20 bits of an address
  3136. used with the lower 12 bits */
  3137. BFD_RELOC_NDS32_HI20,
  3138. /* This is a 12-bit reloc containing the lower 12 bits of an address
  3139. then shift right by 3. This is used with ldi,sdi... */
  3140. BFD_RELOC_NDS32_LO12S3,
  3141. /* This is a 12-bit reloc containing the lower 12 bits of an address
  3142. then shift left by 2. This is used with lwi,swi... */
  3143. BFD_RELOC_NDS32_LO12S2,
  3144. /* This is a 12-bit reloc containing the lower 12 bits of an address
  3145. then shift left by 1. This is used with lhi,shi... */
  3146. BFD_RELOC_NDS32_LO12S1,
  3147. /* This is a 12-bit reloc containing the lower 12 bits of an address
  3148. then shift left by 0. This is used with lbisbi... */
  3149. BFD_RELOC_NDS32_LO12S0,
  3150. /* This is a 12-bit reloc containing the lower 12 bits of an address
  3151. then shift left by 0. This is only used with branch relaxations */
  3152. BFD_RELOC_NDS32_LO12S0_ORI,
  3153. /* This is a 15-bit reloc containing the small data area 18-bit signed offset
  3154. and shift left by 3 for use in ldi, sdi... */
  3155. BFD_RELOC_NDS32_SDA15S3,
  3156. /* This is a 15-bit reloc containing the small data area 17-bit signed offset
  3157. and shift left by 2 for use in lwi, swi... */
  3158. BFD_RELOC_NDS32_SDA15S2,
  3159. /* This is a 15-bit reloc containing the small data area 16-bit signed offset
  3160. and shift left by 1 for use in lhi, shi... */
  3161. BFD_RELOC_NDS32_SDA15S1,
  3162. /* This is a 15-bit reloc containing the small data area 15-bit signed offset
  3163. and shift left by 0 for use in lbi, sbi... */
  3164. BFD_RELOC_NDS32_SDA15S0,
  3165. /* This is a 16-bit reloc containing the small data area 16-bit signed offset
  3166. and shift left by 3 */
  3167. BFD_RELOC_NDS32_SDA16S3,
  3168. /* This is a 17-bit reloc containing the small data area 17-bit signed offset
  3169. and shift left by 2 for use in lwi.gp, swi.gp... */
  3170. BFD_RELOC_NDS32_SDA17S2,
  3171. /* This is a 18-bit reloc containing the small data area 18-bit signed offset
  3172. and shift left by 1 for use in lhi.gp, shi.gp... */
  3173. BFD_RELOC_NDS32_SDA18S1,
  3174. /* This is a 19-bit reloc containing the small data area 19-bit signed offset
  3175. and shift left by 0 for use in lbi.gp, sbi.gp... */
  3176. BFD_RELOC_NDS32_SDA19S0,
  3177. /* for PIC */
  3178. BFD_RELOC_NDS32_GOT20,
  3179. BFD_RELOC_NDS32_9_PLTREL,
  3180. BFD_RELOC_NDS32_25_PLTREL,
  3181. BFD_RELOC_NDS32_COPY,
  3182. BFD_RELOC_NDS32_GLOB_DAT,
  3183. BFD_RELOC_NDS32_JMP_SLOT,
  3184. BFD_RELOC_NDS32_RELATIVE,
  3185. BFD_RELOC_NDS32_GOTOFF,
  3186. BFD_RELOC_NDS32_GOTOFF_HI20,
  3187. BFD_RELOC_NDS32_GOTOFF_LO12,
  3188. BFD_RELOC_NDS32_GOTPC20,
  3189. BFD_RELOC_NDS32_GOT_HI20,
  3190. BFD_RELOC_NDS32_GOT_LO12,
  3191. BFD_RELOC_NDS32_GOTPC_HI20,
  3192. BFD_RELOC_NDS32_GOTPC_LO12,
  3193. /* for relax */
  3194. BFD_RELOC_NDS32_INSN16,
  3195. BFD_RELOC_NDS32_LABEL,
  3196. BFD_RELOC_NDS32_LONGCALL1,
  3197. BFD_RELOC_NDS32_LONGCALL2,
  3198. BFD_RELOC_NDS32_LONGCALL3,
  3199. BFD_RELOC_NDS32_LONGJUMP1,
  3200. BFD_RELOC_NDS32_LONGJUMP2,
  3201. BFD_RELOC_NDS32_LONGJUMP3,
  3202. BFD_RELOC_NDS32_LOADSTORE,
  3203. BFD_RELOC_NDS32_9_FIXED,
  3204. BFD_RELOC_NDS32_15_FIXED,
  3205. BFD_RELOC_NDS32_17_FIXED,
  3206. BFD_RELOC_NDS32_25_FIXED,
  3207. BFD_RELOC_NDS32_LONGCALL4,
  3208. BFD_RELOC_NDS32_LONGCALL5,
  3209. BFD_RELOC_NDS32_LONGCALL6,
  3210. BFD_RELOC_NDS32_LONGJUMP4,
  3211. BFD_RELOC_NDS32_LONGJUMP5,
  3212. BFD_RELOC_NDS32_LONGJUMP6,
  3213. BFD_RELOC_NDS32_LONGJUMP7,
  3214. /* for PIC */
  3215. BFD_RELOC_NDS32_PLTREL_HI20,
  3216. BFD_RELOC_NDS32_PLTREL_LO12,
  3217. BFD_RELOC_NDS32_PLT_GOTREL_HI20,
  3218. BFD_RELOC_NDS32_PLT_GOTREL_LO12,
  3219. /* for floating point */
  3220. BFD_RELOC_NDS32_SDA12S2_DP,
  3221. BFD_RELOC_NDS32_SDA12S2_SP,
  3222. BFD_RELOC_NDS32_LO12S2_DP,
  3223. BFD_RELOC_NDS32_LO12S2_SP,
  3224. /* for dwarf2 debug_line. */
  3225. BFD_RELOC_NDS32_DWARF2_OP1,
  3226. BFD_RELOC_NDS32_DWARF2_OP2,
  3227. BFD_RELOC_NDS32_DWARF2_LEB,
  3228. /* for eliminate 16-bit instructions */
  3229. BFD_RELOC_NDS32_UPDATE_TA,
  3230. /* for PIC object relaxation */
  3231. BFD_RELOC_NDS32_PLT_GOTREL_LO20,
  3232. BFD_RELOC_NDS32_PLT_GOTREL_LO15,
  3233. BFD_RELOC_NDS32_PLT_GOTREL_LO19,
  3234. BFD_RELOC_NDS32_GOT_LO15,
  3235. BFD_RELOC_NDS32_GOT_LO19,
  3236. BFD_RELOC_NDS32_GOTOFF_LO15,
  3237. BFD_RELOC_NDS32_GOTOFF_LO19,
  3238. BFD_RELOC_NDS32_GOT15S2,
  3239. BFD_RELOC_NDS32_GOT17S2,
  3240. /* NDS32 relocs.
  3241. This is a 5 bit absolute address. */
  3242. BFD_RELOC_NDS32_5,
  3243. /* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */
  3244. BFD_RELOC_NDS32_10_UPCREL,
  3245. /* If fp were omitted, fp can used as another gp. */
  3246. BFD_RELOC_NDS32_SDA_FP7U2_RELA,
  3247. /* relaxation relative relocation types */
  3248. BFD_RELOC_NDS32_RELAX_ENTRY,
  3249. BFD_RELOC_NDS32_GOT_SUFF,
  3250. BFD_RELOC_NDS32_GOTOFF_SUFF,
  3251. BFD_RELOC_NDS32_PLT_GOT_SUFF,
  3252. BFD_RELOC_NDS32_MULCALL_SUFF,
  3253. BFD_RELOC_NDS32_PTR,
  3254. BFD_RELOC_NDS32_PTR_COUNT,
  3255. BFD_RELOC_NDS32_PTR_RESOLVED,
  3256. BFD_RELOC_NDS32_PLTBLOCK,
  3257. BFD_RELOC_NDS32_RELAX_REGION_BEGIN,
  3258. BFD_RELOC_NDS32_RELAX_REGION_END,
  3259. BFD_RELOC_NDS32_MINUEND,
  3260. BFD_RELOC_NDS32_SUBTRAHEND,
  3261. BFD_RELOC_NDS32_DIFF8,
  3262. BFD_RELOC_NDS32_DIFF16,
  3263. BFD_RELOC_NDS32_DIFF32,
  3264. BFD_RELOC_NDS32_DIFF_ULEB128,
  3265. BFD_RELOC_NDS32_EMPTY,
  3266. /* This is a 25 bit absolute address. */
  3267. BFD_RELOC_NDS32_25_ABS,
  3268. /* For ex9 and ifc using. */
  3269. BFD_RELOC_NDS32_DATA,
  3270. BFD_RELOC_NDS32_TRAN,
  3271. BFD_RELOC_NDS32_17IFC_PCREL,
  3272. BFD_RELOC_NDS32_10IFCU_PCREL,
  3273. /* For TLS. */
  3274. BFD_RELOC_NDS32_TPOFF,
  3275. BFD_RELOC_NDS32_GOTTPOFF,
  3276. BFD_RELOC_NDS32_TLS_LE_HI20,
  3277. BFD_RELOC_NDS32_TLS_LE_LO12,
  3278. BFD_RELOC_NDS32_TLS_LE_20,
  3279. BFD_RELOC_NDS32_TLS_LE_15S0,
  3280. BFD_RELOC_NDS32_TLS_LE_15S1,
  3281. BFD_RELOC_NDS32_TLS_LE_15S2,
  3282. BFD_RELOC_NDS32_TLS_LE_ADD,
  3283. BFD_RELOC_NDS32_TLS_LE_LS,
  3284. BFD_RELOC_NDS32_TLS_IE_HI20,
  3285. BFD_RELOC_NDS32_TLS_IE_LO12,
  3286. BFD_RELOC_NDS32_TLS_IE_LO12S2,
  3287. BFD_RELOC_NDS32_TLS_IEGP_HI20,
  3288. BFD_RELOC_NDS32_TLS_IEGP_LO12,
  3289. BFD_RELOC_NDS32_TLS_IEGP_LO12S2,
  3290. BFD_RELOC_NDS32_TLS_IEGP_LW,
  3291. BFD_RELOC_NDS32_TLS_DESC,
  3292. BFD_RELOC_NDS32_TLS_DESC_HI20,
  3293. BFD_RELOC_NDS32_TLS_DESC_LO12,
  3294. BFD_RELOC_NDS32_TLS_DESC_20,
  3295. BFD_RELOC_NDS32_TLS_DESC_SDA17S2,
  3296. BFD_RELOC_NDS32_TLS_DESC_ADD,
  3297. BFD_RELOC_NDS32_TLS_DESC_FUNC,
  3298. BFD_RELOC_NDS32_TLS_DESC_CALL,
  3299. BFD_RELOC_NDS32_TLS_DESC_MEM,
  3300. BFD_RELOC_NDS32_REMOVE,
  3301. BFD_RELOC_NDS32_GROUP,
  3302. /* For floating load store relaxation. */
  3303. BFD_RELOC_NDS32_LSI,
  3304. /* This is a 9-bit reloc */
  3305. BFD_RELOC_V850_9_PCREL,
  3306. /* This is a 22-bit reloc */
  3307. BFD_RELOC_V850_22_PCREL,
  3308. /* This is a 16 bit offset from the short data area pointer. */
  3309. BFD_RELOC_V850_SDA_16_16_OFFSET,
  3310. /* This is a 16 bit offset (of which only 15 bits are used) from the
  3311. short data area pointer. */
  3312. BFD_RELOC_V850_SDA_15_16_OFFSET,
  3313. /* This is a 16 bit offset from the zero data area pointer. */
  3314. BFD_RELOC_V850_ZDA_16_16_OFFSET,
  3315. /* This is a 16 bit offset (of which only 15 bits are used) from the
  3316. zero data area pointer. */
  3317. BFD_RELOC_V850_ZDA_15_16_OFFSET,
  3318. /* This is an 8 bit offset (of which only 6 bits are used) from the
  3319. tiny data area pointer. */
  3320. BFD_RELOC_V850_TDA_6_8_OFFSET,
  3321. /* This is an 8bit offset (of which only 7 bits are used) from the tiny
  3322. data area pointer. */
  3323. BFD_RELOC_V850_TDA_7_8_OFFSET,
  3324. /* This is a 7 bit offset from the tiny data area pointer. */
  3325. BFD_RELOC_V850_TDA_7_7_OFFSET,
  3326. /* This is a 16 bit offset from the tiny data area pointer. */
  3327. BFD_RELOC_V850_TDA_16_16_OFFSET,
  3328. /* This is a 5 bit offset (of which only 4 bits are used) from the tiny
  3329. data area pointer. */
  3330. BFD_RELOC_V850_TDA_4_5_OFFSET,
  3331. /* This is a 4 bit offset from the tiny data area pointer. */
  3332. BFD_RELOC_V850_TDA_4_4_OFFSET,
  3333. /* This is a 16 bit offset from the short data area pointer, with the
  3334. bits placed non-contiguously in the instruction. */
  3335. BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
  3336. /* This is a 16 bit offset from the zero data area pointer, with the
  3337. bits placed non-contiguously in the instruction. */
  3338. BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
  3339. /* This is a 6 bit offset from the call table base pointer. */
  3340. BFD_RELOC_V850_CALLT_6_7_OFFSET,
  3341. /* This is a 16 bit offset from the call table base pointer. */
  3342. BFD_RELOC_V850_CALLT_16_16_OFFSET,
  3343. /* Used for relaxing indirect function calls. */
  3344. BFD_RELOC_V850_LONGCALL,
  3345. /* Used for relaxing indirect jumps. */
  3346. BFD_RELOC_V850_LONGJUMP,
  3347. /* Used to maintain alignment whilst relaxing. */
  3348. BFD_RELOC_V850_ALIGN,
  3349. /* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
  3350. instructions. */
  3351. BFD_RELOC_V850_LO16_SPLIT_OFFSET,
  3352. /* This is a 16-bit reloc. */
  3353. BFD_RELOC_V850_16_PCREL,
  3354. /* This is a 17-bit reloc. */
  3355. BFD_RELOC_V850_17_PCREL,
  3356. /* This is a 23-bit reloc. */
  3357. BFD_RELOC_V850_23,
  3358. /* This is a 32-bit reloc. */
  3359. BFD_RELOC_V850_32_PCREL,
  3360. /* This is a 32-bit reloc. */
  3361. BFD_RELOC_V850_32_ABS,
  3362. /* This is a 16-bit reloc. */
  3363. BFD_RELOC_V850_16_SPLIT_OFFSET,
  3364. /* This is a 16-bit reloc. */
  3365. BFD_RELOC_V850_16_S1,
  3366. /* Low 16 bits. 16 bit shifted by 1. */
  3367. BFD_RELOC_V850_LO16_S1,
  3368. /* This is a 16 bit offset from the call table base pointer. */
  3369. BFD_RELOC_V850_CALLT_15_16_OFFSET,
  3370. /* DSO relocations. */
  3371. BFD_RELOC_V850_32_GOTPCREL,
  3372. /* DSO relocations. */
  3373. BFD_RELOC_V850_16_GOT,
  3374. /* DSO relocations. */
  3375. BFD_RELOC_V850_32_GOT,
  3376. /* DSO relocations. */
  3377. BFD_RELOC_V850_22_PLT_PCREL,
  3378. /* DSO relocations. */
  3379. BFD_RELOC_V850_32_PLT_PCREL,
  3380. /* DSO relocations. */
  3381. BFD_RELOC_V850_COPY,
  3382. /* DSO relocations. */
  3383. BFD_RELOC_V850_GLOB_DAT,
  3384. /* DSO relocations. */
  3385. BFD_RELOC_V850_JMP_SLOT,
  3386. /* DSO relocations. */
  3387. BFD_RELOC_V850_RELATIVE,
  3388. /* DSO relocations. */
  3389. BFD_RELOC_V850_16_GOTOFF,
  3390. /* DSO relocations. */
  3391. BFD_RELOC_V850_32_GOTOFF,
  3392. /* start code. */
  3393. BFD_RELOC_V850_CODE,
  3394. /* start data in text. */
  3395. BFD_RELOC_V850_DATA,
  3396. /* This is a 8bit DP reloc for the tms320c30, where the most
  3397. significant 8 bits of a 24 bit word are placed into the least
  3398. significant 8 bits of the opcode. */
  3399. BFD_RELOC_TIC30_LDP,
  3400. /* This is a 7bit reloc for the tms320c54x, where the least
  3401. significant 7 bits of a 16 bit word are placed into the least
  3402. significant 7 bits of the opcode. */
  3403. BFD_RELOC_TIC54X_PARTLS7,
  3404. /* This is a 9bit DP reloc for the tms320c54x, where the most
  3405. significant 9 bits of a 16 bit word are placed into the least
  3406. significant 9 bits of the opcode. */
  3407. BFD_RELOC_TIC54X_PARTMS9,
  3408. /* This is an extended address 23-bit reloc for the tms320c54x. */
  3409. BFD_RELOC_TIC54X_23,
  3410. /* This is a 16-bit reloc for the tms320c54x, where the least
  3411. significant 16 bits of a 23-bit extended address are placed into
  3412. the opcode. */
  3413. BFD_RELOC_TIC54X_16_OF_23,
  3414. /* This is a reloc for the tms320c54x, where the most
  3415. significant 7 bits of a 23-bit extended address are placed into
  3416. the opcode. */
  3417. BFD_RELOC_TIC54X_MS7_OF_23,
  3418. /* TMS320C6000 relocations. */
  3419. BFD_RELOC_C6000_PCR_S21,
  3420. BFD_RELOC_C6000_PCR_S12,
  3421. BFD_RELOC_C6000_PCR_S10,
  3422. BFD_RELOC_C6000_PCR_S7,
  3423. BFD_RELOC_C6000_ABS_S16,
  3424. BFD_RELOC_C6000_ABS_L16,
  3425. BFD_RELOC_C6000_ABS_H16,
  3426. BFD_RELOC_C6000_SBR_U15_B,
  3427. BFD_RELOC_C6000_SBR_U15_H,
  3428. BFD_RELOC_C6000_SBR_U15_W,
  3429. BFD_RELOC_C6000_SBR_S16,
  3430. BFD_RELOC_C6000_SBR_L16_B,
  3431. BFD_RELOC_C6000_SBR_L16_H,
  3432. BFD_RELOC_C6000_SBR_L16_W,
  3433. BFD_RELOC_C6000_SBR_H16_B,
  3434. BFD_RELOC_C6000_SBR_H16_H,
  3435. BFD_RELOC_C6000_SBR_H16_W,
  3436. BFD_RELOC_C6000_SBR_GOT_U15_W,
  3437. BFD_RELOC_C6000_SBR_GOT_L16_W,
  3438. BFD_RELOC_C6000_SBR_GOT_H16_W,
  3439. BFD_RELOC_C6000_DSBT_INDEX,
  3440. BFD_RELOC_C6000_PREL31,
  3441. BFD_RELOC_C6000_COPY,
  3442. BFD_RELOC_C6000_JUMP_SLOT,
  3443. BFD_RELOC_C6000_EHTYPE,
  3444. BFD_RELOC_C6000_PCR_H16,
  3445. BFD_RELOC_C6000_PCR_L16,
  3446. BFD_RELOC_C6000_ALIGN,
  3447. BFD_RELOC_C6000_FPHEAD,
  3448. BFD_RELOC_C6000_NOCMP,
  3449. /* This is a 48 bit reloc for the FR30 that stores 32 bits. */
  3450. BFD_RELOC_FR30_48,
  3451. /* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
  3452. two sections. */
  3453. BFD_RELOC_FR30_20,
  3454. /* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
  3455. 4 bits. */
  3456. BFD_RELOC_FR30_6_IN_4,
  3457. /* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
  3458. into 8 bits. */
  3459. BFD_RELOC_FR30_8_IN_8,
  3460. /* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
  3461. into 8 bits. */
  3462. BFD_RELOC_FR30_9_IN_8,
  3463. /* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
  3464. into 8 bits. */
  3465. BFD_RELOC_FR30_10_IN_8,
  3466. /* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
  3467. short offset into 8 bits. */
  3468. BFD_RELOC_FR30_9_PCREL,
  3469. /* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
  3470. short offset into 11 bits. */
  3471. BFD_RELOC_FR30_12_PCREL,
  3472. /* Motorola Mcore relocations. */
  3473. BFD_RELOC_MCORE_PCREL_IMM8BY4,
  3474. BFD_RELOC_MCORE_PCREL_IMM11BY2,
  3475. BFD_RELOC_MCORE_PCREL_IMM4BY2,
  3476. BFD_RELOC_MCORE_PCREL_32,
  3477. BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
  3478. BFD_RELOC_MCORE_RVA,
  3479. /* Toshiba Media Processor Relocations. */
  3480. BFD_RELOC_MEP_8,
  3481. BFD_RELOC_MEP_16,
  3482. BFD_RELOC_MEP_32,
  3483. BFD_RELOC_MEP_PCREL8A2,
  3484. BFD_RELOC_MEP_PCREL12A2,
  3485. BFD_RELOC_MEP_PCREL17A2,
  3486. BFD_RELOC_MEP_PCREL24A2,
  3487. BFD_RELOC_MEP_PCABS24A2,
  3488. BFD_RELOC_MEP_LOW16,
  3489. BFD_RELOC_MEP_HI16U,
  3490. BFD_RELOC_MEP_HI16S,
  3491. BFD_RELOC_MEP_GPREL,
  3492. BFD_RELOC_MEP_TPREL,
  3493. BFD_RELOC_MEP_TPREL7,
  3494. BFD_RELOC_MEP_TPREL7A2,
  3495. BFD_RELOC_MEP_TPREL7A4,
  3496. BFD_RELOC_MEP_UIMM24,
  3497. BFD_RELOC_MEP_ADDR24A4,
  3498. BFD_RELOC_MEP_GNU_VTINHERIT,
  3499. BFD_RELOC_MEP_GNU_VTENTRY,
  3500. /* Imagination Technologies Meta relocations. */
  3501. BFD_RELOC_METAG_HIADDR16,
  3502. BFD_RELOC_METAG_LOADDR16,
  3503. BFD_RELOC_METAG_RELBRANCH,
  3504. BFD_RELOC_METAG_GETSETOFF,
  3505. BFD_RELOC_METAG_HIOG,
  3506. BFD_RELOC_METAG_LOOG,
  3507. BFD_RELOC_METAG_REL8,
  3508. BFD_RELOC_METAG_REL16,
  3509. BFD_RELOC_METAG_HI16_GOTOFF,
  3510. BFD_RELOC_METAG_LO16_GOTOFF,
  3511. BFD_RELOC_METAG_GETSET_GOTOFF,
  3512. BFD_RELOC_METAG_GETSET_GOT,
  3513. BFD_RELOC_METAG_HI16_GOTPC,
  3514. BFD_RELOC_METAG_LO16_GOTPC,
  3515. BFD_RELOC_METAG_HI16_PLT,
  3516. BFD_RELOC_METAG_LO16_PLT,
  3517. BFD_RELOC_METAG_RELBRANCH_PLT,
  3518. BFD_RELOC_METAG_GOTOFF,
  3519. BFD_RELOC_METAG_PLT,
  3520. BFD_RELOC_METAG_COPY,
  3521. BFD_RELOC_METAG_JMP_SLOT,
  3522. BFD_RELOC_METAG_RELATIVE,
  3523. BFD_RELOC_METAG_GLOB_DAT,
  3524. BFD_RELOC_METAG_TLS_GD,
  3525. BFD_RELOC_METAG_TLS_LDM,
  3526. BFD_RELOC_METAG_TLS_LDO_HI16,
  3527. BFD_RELOC_METAG_TLS_LDO_LO16,
  3528. BFD_RELOC_METAG_TLS_LDO,
  3529. BFD_RELOC_METAG_TLS_IE,
  3530. BFD_RELOC_METAG_TLS_IENONPIC,
  3531. BFD_RELOC_METAG_TLS_IENONPIC_HI16,
  3532. BFD_RELOC_METAG_TLS_IENONPIC_LO16,
  3533. BFD_RELOC_METAG_TLS_TPOFF,
  3534. BFD_RELOC_METAG_TLS_DTPMOD,
  3535. BFD_RELOC_METAG_TLS_DTPOFF,
  3536. BFD_RELOC_METAG_TLS_LE,
  3537. BFD_RELOC_METAG_TLS_LE_HI16,
  3538. BFD_RELOC_METAG_TLS_LE_LO16,
  3539. /* These are relocations for the GETA instruction. */
  3540. BFD_RELOC_MMIX_GETA,
  3541. BFD_RELOC_MMIX_GETA_1,
  3542. BFD_RELOC_MMIX_GETA_2,
  3543. BFD_RELOC_MMIX_GETA_3,
  3544. /* These are relocations for a conditional branch instruction. */
  3545. BFD_RELOC_MMIX_CBRANCH,
  3546. BFD_RELOC_MMIX_CBRANCH_J,
  3547. BFD_RELOC_MMIX_CBRANCH_1,
  3548. BFD_RELOC_MMIX_CBRANCH_2,
  3549. BFD_RELOC_MMIX_CBRANCH_3,
  3550. /* These are relocations for the PUSHJ instruction. */
  3551. BFD_RELOC_MMIX_PUSHJ,
  3552. BFD_RELOC_MMIX_PUSHJ_1,
  3553. BFD_RELOC_MMIX_PUSHJ_2,
  3554. BFD_RELOC_MMIX_PUSHJ_3,
  3555. BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
  3556. /* These are relocations for the JMP instruction. */
  3557. BFD_RELOC_MMIX_JMP,
  3558. BFD_RELOC_MMIX_JMP_1,
  3559. BFD_RELOC_MMIX_JMP_2,
  3560. BFD_RELOC_MMIX_JMP_3,
  3561. /* This is a relocation for a relative address as in a GETA instruction or
  3562. a branch. */
  3563. BFD_RELOC_MMIX_ADDR19,
  3564. /* This is a relocation for a relative address as in a JMP instruction. */
  3565. BFD_RELOC_MMIX_ADDR27,
  3566. /* This is a relocation for an instruction field that may be a general
  3567. register or a value 0..255. */
  3568. BFD_RELOC_MMIX_REG_OR_BYTE,
  3569. /* This is a relocation for an instruction field that may be a general
  3570. register. */
  3571. BFD_RELOC_MMIX_REG,
  3572. /* This is a relocation for two instruction fields holding a register and
  3573. an offset, the equivalent of the relocation. */
  3574. BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
  3575. /* This relocation is an assertion that the expression is not allocated as
  3576. a global register. It does not modify contents. */
  3577. BFD_RELOC_MMIX_LOCAL,
  3578. /* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
  3579. short offset into 7 bits. */
  3580. BFD_RELOC_AVR_7_PCREL,
  3581. /* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
  3582. short offset into 12 bits. */
  3583. BFD_RELOC_AVR_13_PCREL,
  3584. /* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
  3585. program memory address) into 16 bits. */
  3586. BFD_RELOC_AVR_16_PM,
  3587. /* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
  3588. data memory address) into 8 bit immediate value of LDI insn. */
  3589. BFD_RELOC_AVR_LO8_LDI,
  3590. /* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
  3591. of data memory address) into 8 bit immediate value of LDI insn. */
  3592. BFD_RELOC_AVR_HI8_LDI,
  3593. /* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
  3594. of program memory address) into 8 bit immediate value of LDI insn. */
  3595. BFD_RELOC_AVR_HH8_LDI,
  3596. /* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
  3597. of 32 bit value) into 8 bit immediate value of LDI insn. */
  3598. BFD_RELOC_AVR_MS8_LDI,
  3599. /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
  3600. (usually data memory address) into 8 bit immediate value of SUBI insn. */
  3601. BFD_RELOC_AVR_LO8_LDI_NEG,
  3602. /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
  3603. (high 8 bit of data memory address) into 8 bit immediate value of
  3604. SUBI insn. */
  3605. BFD_RELOC_AVR_HI8_LDI_NEG,
  3606. /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
  3607. (most high 8 bit of program memory address) into 8 bit immediate value
  3608. of LDI or SUBI insn. */
  3609. BFD_RELOC_AVR_HH8_LDI_NEG,
  3610. /* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
  3611. of 32 bit value) into 8 bit immediate value of LDI insn. */
  3612. BFD_RELOC_AVR_MS8_LDI_NEG,
  3613. /* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
  3614. command address) into 8 bit immediate value of LDI insn. */
  3615. BFD_RELOC_AVR_LO8_LDI_PM,
  3616. /* This is a 16 bit reloc for the AVR that stores 8 bit value
  3617. (command address) into 8 bit immediate value of LDI insn. If the address
  3618. is beyond the 128k boundary, the linker inserts a jump stub for this reloc
  3619. in the lower 128k. */
  3620. BFD_RELOC_AVR_LO8_LDI_GS,
  3621. /* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
  3622. of command address) into 8 bit immediate value of LDI insn. */
  3623. BFD_RELOC_AVR_HI8_LDI_PM,
  3624. /* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
  3625. of command address) into 8 bit immediate value of LDI insn. If the address
  3626. is beyond the 128k boundary, the linker inserts a jump stub for this reloc
  3627. below 128k. */
  3628. BFD_RELOC_AVR_HI8_LDI_GS,
  3629. /* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
  3630. of command address) into 8 bit immediate value of LDI insn. */
  3631. BFD_RELOC_AVR_HH8_LDI_PM,
  3632. /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
  3633. (usually command address) into 8 bit immediate value of SUBI insn. */
  3634. BFD_RELOC_AVR_LO8_LDI_PM_NEG,
  3635. /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
  3636. (high 8 bit of 16 bit command address) into 8 bit immediate value
  3637. of SUBI insn. */
  3638. BFD_RELOC_AVR_HI8_LDI_PM_NEG,
  3639. /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
  3640. (high 6 bit of 22 bit command address) into 8 bit immediate
  3641. value of SUBI insn. */
  3642. BFD_RELOC_AVR_HH8_LDI_PM_NEG,
  3643. /* This is a 32 bit reloc for the AVR that stores 23 bit value
  3644. into 22 bits. */
  3645. BFD_RELOC_AVR_CALL,
  3646. /* This is a 16 bit reloc for the AVR that stores all needed bits
  3647. for absolute addressing with ldi with overflow check to linktime */
  3648. BFD_RELOC_AVR_LDI,
  3649. /* This is a 6 bit reloc for the AVR that stores offset for ldd/std
  3650. instructions */
  3651. BFD_RELOC_AVR_6,
  3652. /* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
  3653. instructions */
  3654. BFD_RELOC_AVR_6_ADIW,
  3655. /* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
  3656. in .byte lo8(symbol) */
  3657. BFD_RELOC_AVR_8_LO,
  3658. /* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
  3659. in .byte hi8(symbol) */
  3660. BFD_RELOC_AVR_8_HI,
  3661. /* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
  3662. in .byte hlo8(symbol) */
  3663. BFD_RELOC_AVR_8_HLO,
  3664. /* AVR relocations to mark the difference of two local symbols.
  3665. These are only needed to support linker relaxation and can be ignored
  3666. when not relaxing. The field is set to the value of the difference
  3667. assuming no relaxation. The relocation encodes the position of the
  3668. second symbol so the linker can determine whether to adjust the field
  3669. value. */
  3670. BFD_RELOC_AVR_DIFF8,
  3671. BFD_RELOC_AVR_DIFF16,
  3672. BFD_RELOC_AVR_DIFF32,
  3673. /* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit
  3674. lds and sts instructions supported only tiny core. */
  3675. BFD_RELOC_AVR_LDS_STS_16,
  3676. /* This is a 6 bit reloc for the AVR that stores an I/O register
  3677. number for the IN and OUT instructions */
  3678. BFD_RELOC_AVR_PORT6,
  3679. /* This is a 5 bit reloc for the AVR that stores an I/O register
  3680. number for the SBIC, SBIS, SBI and CBI instructions */
  3681. BFD_RELOC_AVR_PORT5,
  3682. /* RISC-V relocations. */
  3683. BFD_RELOC_RISCV_HI20,
  3684. BFD_RELOC_RISCV_PCREL_HI20,
  3685. BFD_RELOC_RISCV_PCREL_LO12_I,
  3686. BFD_RELOC_RISCV_PCREL_LO12_S,
  3687. BFD_RELOC_RISCV_LO12_I,
  3688. BFD_RELOC_RISCV_LO12_S,
  3689. BFD_RELOC_RISCV_GPREL12_I,
  3690. BFD_RELOC_RISCV_GPREL12_S,
  3691. BFD_RELOC_RISCV_TPREL_HI20,
  3692. BFD_RELOC_RISCV_TPREL_LO12_I,
  3693. BFD_RELOC_RISCV_TPREL_LO12_S,
  3694. BFD_RELOC_RISCV_TPREL_ADD,
  3695. BFD_RELOC_RISCV_CALL,
  3696. BFD_RELOC_RISCV_CALL_PLT,
  3697. BFD_RELOC_RISCV_ADD8,
  3698. BFD_RELOC_RISCV_ADD16,
  3699. BFD_RELOC_RISCV_ADD32,
  3700. BFD_RELOC_RISCV_ADD64,
  3701. BFD_RELOC_RISCV_SUB8,
  3702. BFD_RELOC_RISCV_SUB16,
  3703. BFD_RELOC_RISCV_SUB32,
  3704. BFD_RELOC_RISCV_SUB64,
  3705. BFD_RELOC_RISCV_GOT_HI20,
  3706. BFD_RELOC_RISCV_TLS_GOT_HI20,
  3707. BFD_RELOC_RISCV_TLS_GD_HI20,
  3708. BFD_RELOC_RISCV_JMP,
  3709. BFD_RELOC_RISCV_TLS_DTPMOD32,
  3710. BFD_RELOC_RISCV_TLS_DTPREL32,
  3711. BFD_RELOC_RISCV_TLS_DTPMOD64,
  3712. BFD_RELOC_RISCV_TLS_DTPREL64,
  3713. BFD_RELOC_RISCV_TLS_TPREL32,
  3714. BFD_RELOC_RISCV_TLS_TPREL64,
  3715. BFD_RELOC_RISCV_ALIGN,
  3716. BFD_RELOC_RISCV_RVC_BRANCH,
  3717. BFD_RELOC_RISCV_RVC_JUMP,
  3718. BFD_RELOC_RISCV_RVC_LUI,
  3719. BFD_RELOC_RISCV_GPREL_I,
  3720. BFD_RELOC_RISCV_GPREL_S,
  3721. BFD_RELOC_RISCV_TPREL_I,
  3722. BFD_RELOC_RISCV_TPREL_S,
  3723. BFD_RELOC_RISCV_RELAX,
  3724. BFD_RELOC_RISCV_CFA,
  3725. BFD_RELOC_RISCV_SUB6,
  3726. BFD_RELOC_RISCV_SET6,
  3727. BFD_RELOC_RISCV_SET8,
  3728. BFD_RELOC_RISCV_SET16,
  3729. BFD_RELOC_RISCV_SET32,
  3730. BFD_RELOC_RISCV_32_PCREL,
  3731. /* Renesas RL78 Relocations. */
  3732. BFD_RELOC_RL78_NEG8,
  3733. BFD_RELOC_RL78_NEG16,
  3734. BFD_RELOC_RL78_NEG24,
  3735. BFD_RELOC_RL78_NEG32,
  3736. BFD_RELOC_RL78_16_OP,
  3737. BFD_RELOC_RL78_24_OP,
  3738. BFD_RELOC_RL78_32_OP,
  3739. BFD_RELOC_RL78_8U,
  3740. BFD_RELOC_RL78_16U,
  3741. BFD_RELOC_RL78_24U,
  3742. BFD_RELOC_RL78_DIR3U_PCREL,
  3743. BFD_RELOC_RL78_DIFF,
  3744. BFD_RELOC_RL78_GPRELB,
  3745. BFD_RELOC_RL78_GPRELW,
  3746. BFD_RELOC_RL78_GPRELL,
  3747. BFD_RELOC_RL78_SYM,
  3748. BFD_RELOC_RL78_OP_SUBTRACT,
  3749. BFD_RELOC_RL78_OP_NEG,
  3750. BFD_RELOC_RL78_OP_AND,
  3751. BFD_RELOC_RL78_OP_SHRA,
  3752. BFD_RELOC_RL78_ABS8,
  3753. BFD_RELOC_RL78_ABS16,
  3754. BFD_RELOC_RL78_ABS16_REV,
  3755. BFD_RELOC_RL78_ABS32,
  3756. BFD_RELOC_RL78_ABS32_REV,
  3757. BFD_RELOC_RL78_ABS16U,
  3758. BFD_RELOC_RL78_ABS16UW,
  3759. BFD_RELOC_RL78_ABS16UL,
  3760. BFD_RELOC_RL78_RELAX,
  3761. BFD_RELOC_RL78_HI16,
  3762. BFD_RELOC_RL78_HI8,
  3763. BFD_RELOC_RL78_LO16,
  3764. BFD_RELOC_RL78_CODE,
  3765. BFD_RELOC_RL78_SADDR,
  3766. /* Renesas RX Relocations. */
  3767. BFD_RELOC_RX_NEG8,
  3768. BFD_RELOC_RX_NEG16,
  3769. BFD_RELOC_RX_NEG24,
  3770. BFD_RELOC_RX_NEG32,
  3771. BFD_RELOC_RX_16_OP,
  3772. BFD_RELOC_RX_24_OP,
  3773. BFD_RELOC_RX_32_OP,
  3774. BFD_RELOC_RX_8U,
  3775. BFD_RELOC_RX_16U,
  3776. BFD_RELOC_RX_24U,
  3777. BFD_RELOC_RX_DIR3U_PCREL,
  3778. BFD_RELOC_RX_DIFF,
  3779. BFD_RELOC_RX_GPRELB,
  3780. BFD_RELOC_RX_GPRELW,
  3781. BFD_RELOC_RX_GPRELL,
  3782. BFD_RELOC_RX_SYM,
  3783. BFD_RELOC_RX_OP_SUBTRACT,
  3784. BFD_RELOC_RX_OP_NEG,
  3785. BFD_RELOC_RX_ABS8,
  3786. BFD_RELOC_RX_ABS16,
  3787. BFD_RELOC_RX_ABS16_REV,
  3788. BFD_RELOC_RX_ABS32,
  3789. BFD_RELOC_RX_ABS32_REV,
  3790. BFD_RELOC_RX_ABS16U,
  3791. BFD_RELOC_RX_ABS16UW,
  3792. BFD_RELOC_RX_ABS16UL,
  3793. BFD_RELOC_RX_RELAX,
  3794. /* Direct 12 bit. */
  3795. BFD_RELOC_390_12,
  3796. /* 12 bit GOT offset. */
  3797. BFD_RELOC_390_GOT12,
  3798. /* 32 bit PC relative PLT address. */
  3799. BFD_RELOC_390_PLT32,
  3800. /* Copy symbol at runtime. */
  3801. BFD_RELOC_390_COPY,
  3802. /* Create GOT entry. */
  3803. BFD_RELOC_390_GLOB_DAT,
  3804. /* Create PLT entry. */
  3805. BFD_RELOC_390_JMP_SLOT,
  3806. /* Adjust by program base. */
  3807. BFD_RELOC_390_RELATIVE,
  3808. /* 32 bit PC relative offset to GOT. */
  3809. BFD_RELOC_390_GOTPC,
  3810. /* 16 bit GOT offset. */
  3811. BFD_RELOC_390_GOT16,
  3812. /* PC relative 12 bit shifted by 1. */
  3813. BFD_RELOC_390_PC12DBL,
  3814. /* 12 bit PC rel. PLT shifted by 1. */
  3815. BFD_RELOC_390_PLT12DBL,
  3816. /* PC relative 16 bit shifted by 1. */
  3817. BFD_RELOC_390_PC16DBL,
  3818. /* 16 bit PC rel. PLT shifted by 1. */
  3819. BFD_RELOC_390_PLT16DBL,
  3820. /* PC relative 24 bit shifted by 1. */
  3821. BFD_RELOC_390_PC24DBL,
  3822. /* 24 bit PC rel. PLT shifted by 1. */
  3823. BFD_RELOC_390_PLT24DBL,
  3824. /* PC relative 32 bit shifted by 1. */
  3825. BFD_RELOC_390_PC32DBL,
  3826. /* 32 bit PC rel. PLT shifted by 1. */
  3827. BFD_RELOC_390_PLT32DBL,
  3828. /* 32 bit PC rel. GOT shifted by 1. */
  3829. BFD_RELOC_390_GOTPCDBL,
  3830. /* 64 bit GOT offset. */
  3831. BFD_RELOC_390_GOT64,
  3832. /* 64 bit PC relative PLT address. */
  3833. BFD_RELOC_390_PLT64,
  3834. /* 32 bit rel. offset to GOT entry. */
  3835. BFD_RELOC_390_GOTENT,
  3836. /* 64 bit offset to GOT. */
  3837. BFD_RELOC_390_GOTOFF64,
  3838. /* 12-bit offset to symbol-entry within GOT, with PLT handling. */
  3839. BFD_RELOC_390_GOTPLT12,
  3840. /* 16-bit offset to symbol-entry within GOT, with PLT handling. */
  3841. BFD_RELOC_390_GOTPLT16,
  3842. /* 32-bit offset to symbol-entry within GOT, with PLT handling. */
  3843. BFD_RELOC_390_GOTPLT32,
  3844. /* 64-bit offset to symbol-entry within GOT, with PLT handling. */
  3845. BFD_RELOC_390_GOTPLT64,
  3846. /* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */
  3847. BFD_RELOC_390_GOTPLTENT,
  3848. /* 16-bit rel. offset from the GOT to a PLT entry. */
  3849. BFD_RELOC_390_PLTOFF16,
  3850. /* 32-bit rel. offset from the GOT to a PLT entry. */
  3851. BFD_RELOC_390_PLTOFF32,
  3852. /* 64-bit rel. offset from the GOT to a PLT entry. */
  3853. BFD_RELOC_390_PLTOFF64,
  3854. /* s390 tls relocations. */
  3855. BFD_RELOC_390_TLS_LOAD,
  3856. BFD_RELOC_390_TLS_GDCALL,
  3857. BFD_RELOC_390_TLS_LDCALL,
  3858. BFD_RELOC_390_TLS_GD32,
  3859. BFD_RELOC_390_TLS_GD64,
  3860. BFD_RELOC_390_TLS_GOTIE12,
  3861. BFD_RELOC_390_TLS_GOTIE32,
  3862. BFD_RELOC_390_TLS_GOTIE64,
  3863. BFD_RELOC_390_TLS_LDM32,
  3864. BFD_RELOC_390_TLS_LDM64,
  3865. BFD_RELOC_390_TLS_IE32,
  3866. BFD_RELOC_390_TLS_IE64,
  3867. BFD_RELOC_390_TLS_IEENT,
  3868. BFD_RELOC_390_TLS_LE32,
  3869. BFD_RELOC_390_TLS_LE64,
  3870. BFD_RELOC_390_TLS_LDO32,
  3871. BFD_RELOC_390_TLS_LDO64,
  3872. BFD_RELOC_390_TLS_DTPMOD,
  3873. BFD_RELOC_390_TLS_DTPOFF,
  3874. BFD_RELOC_390_TLS_TPOFF,
  3875. /* Long displacement extension. */
  3876. BFD_RELOC_390_20,
  3877. BFD_RELOC_390_GOT20,
  3878. BFD_RELOC_390_GOTPLT20,
  3879. BFD_RELOC_390_TLS_GOTIE20,
  3880. /* STT_GNU_IFUNC relocation. */
  3881. BFD_RELOC_390_IRELATIVE,
  3882. /* Score relocations
  3883. Low 16 bit for load/store */
  3884. BFD_RELOC_SCORE_GPREL15,
  3885. /* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
  3886. BFD_RELOC_SCORE_DUMMY2,
  3887. BFD_RELOC_SCORE_JMP,
  3888. /* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
  3889. BFD_RELOC_SCORE_BRANCH,
  3890. /* This is a 32-bit reloc for 48-bit instructions. */
  3891. BFD_RELOC_SCORE_IMM30,
  3892. /* This is a 32-bit reloc for 48-bit instructions. */
  3893. BFD_RELOC_SCORE_IMM32,
  3894. /* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
  3895. BFD_RELOC_SCORE16_JMP,
  3896. /* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
  3897. BFD_RELOC_SCORE16_BRANCH,
  3898. /* This is a 9-bit reloc with the right 1 bit assumed to be 0 */
  3899. BFD_RELOC_SCORE_BCMP,
  3900. /* Undocumented Score relocs */
  3901. BFD_RELOC_SCORE_GOT15,
  3902. BFD_RELOC_SCORE_GOT_LO16,
  3903. BFD_RELOC_SCORE_CALL15,
  3904. BFD_RELOC_SCORE_DUMMY_HI16,
  3905. /* Scenix IP2K - 9-bit register number / data address */
  3906. BFD_RELOC_IP2K_FR9,
  3907. /* Scenix IP2K - 4-bit register/data bank number */
  3908. BFD_RELOC_IP2K_BANK,
  3909. /* Scenix IP2K - low 13 bits of instruction word address */
  3910. BFD_RELOC_IP2K_ADDR16CJP,
  3911. /* Scenix IP2K - high 3 bits of instruction word address */
  3912. BFD_RELOC_IP2K_PAGE3,
  3913. /* Scenix IP2K - ext/low/high 8 bits of data address */
  3914. BFD_RELOC_IP2K_LO8DATA,
  3915. BFD_RELOC_IP2K_HI8DATA,
  3916. BFD_RELOC_IP2K_EX8DATA,
  3917. /* Scenix IP2K - low/high 8 bits of instruction word address */
  3918. BFD_RELOC_IP2K_LO8INSN,
  3919. BFD_RELOC_IP2K_HI8INSN,
  3920. /* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */
  3921. BFD_RELOC_IP2K_PC_SKIP,
  3922. /* Scenix IP2K - 16 bit word address in text section. */
  3923. BFD_RELOC_IP2K_TEXT,
  3924. /* Scenix IP2K - 7-bit sp or dp offset */
  3925. BFD_RELOC_IP2K_FR_OFFSET,
  3926. /* Scenix VPE4K coprocessor - data/insn-space addressing */
  3927. BFD_RELOC_VPE4KMATH_DATA,
  3928. BFD_RELOC_VPE4KMATH_INSN,
  3929. /* These two relocations are used by the linker to determine which of
  3930. the entries in a C++ virtual function table are actually used. When
  3931. the --gc-sections option is given, the linker will zero out the entries
  3932. that are not used, so that the code for those functions need not be
  3933. included in the output.
  3934. VTABLE_INHERIT is a zero-space relocation used to describe to the
  3935. linker the inheritance tree of a C++ virtual function table. The
  3936. relocation's symbol should be the parent class' vtable, and the
  3937. relocation should be located at the child vtable.
  3938. VTABLE_ENTRY is a zero-space relocation that describes the use of a
  3939. virtual function table entry. The reloc's symbol should refer to the
  3940. table of the class mentioned in the code. Off of that base, an offset
  3941. describes the entry that is being used. For Rela hosts, this offset
  3942. is stored in the reloc's addend. For Rel hosts, we are forced to put
  3943. this offset in the reloc's section offset. */
  3944. BFD_RELOC_VTABLE_INHERIT,
  3945. BFD_RELOC_VTABLE_ENTRY,
  3946. /* Intel IA64 Relocations. */
  3947. BFD_RELOC_IA64_IMM14,
  3948. BFD_RELOC_IA64_IMM22,
  3949. BFD_RELOC_IA64_IMM64,
  3950. BFD_RELOC_IA64_DIR32MSB,
  3951. BFD_RELOC_IA64_DIR32LSB,
  3952. BFD_RELOC_IA64_DIR64MSB,
  3953. BFD_RELOC_IA64_DIR64LSB,
  3954. BFD_RELOC_IA64_GPREL22,
  3955. BFD_RELOC_IA64_GPREL64I,
  3956. BFD_RELOC_IA64_GPREL32MSB,
  3957. BFD_RELOC_IA64_GPREL32LSB,
  3958. BFD_RELOC_IA64_GPREL64MSB,
  3959. BFD_RELOC_IA64_GPREL64LSB,
  3960. BFD_RELOC_IA64_LTOFF22,
  3961. BFD_RELOC_IA64_LTOFF64I,
  3962. BFD_RELOC_IA64_PLTOFF22,
  3963. BFD_RELOC_IA64_PLTOFF64I,
  3964. BFD_RELOC_IA64_PLTOFF64MSB,
  3965. BFD_RELOC_IA64_PLTOFF64LSB,
  3966. BFD_RELOC_IA64_FPTR64I,
  3967. BFD_RELOC_IA64_FPTR32MSB,
  3968. BFD_RELOC_IA64_FPTR32LSB,
  3969. BFD_RELOC_IA64_FPTR64MSB,
  3970. BFD_RELOC_IA64_FPTR64LSB,
  3971. BFD_RELOC_IA64_PCREL21B,
  3972. BFD_RELOC_IA64_PCREL21BI,
  3973. BFD_RELOC_IA64_PCREL21M,
  3974. BFD_RELOC_IA64_PCREL21F,
  3975. BFD_RELOC_IA64_PCREL22,
  3976. BFD_RELOC_IA64_PCREL60B,
  3977. BFD_RELOC_IA64_PCREL64I,
  3978. BFD_RELOC_IA64_PCREL32MSB,
  3979. BFD_RELOC_IA64_PCREL32LSB,
  3980. BFD_RELOC_IA64_PCREL64MSB,
  3981. BFD_RELOC_IA64_PCREL64LSB,
  3982. BFD_RELOC_IA64_LTOFF_FPTR22,
  3983. BFD_RELOC_IA64_LTOFF_FPTR64I,
  3984. BFD_RELOC_IA64_LTOFF_FPTR32MSB,
  3985. BFD_RELOC_IA64_LTOFF_FPTR32LSB,
  3986. BFD_RELOC_IA64_LTOFF_FPTR64MSB,
  3987. BFD_RELOC_IA64_LTOFF_FPTR64LSB,
  3988. BFD_RELOC_IA64_SEGREL32MSB,
  3989. BFD_RELOC_IA64_SEGREL32LSB,
  3990. BFD_RELOC_IA64_SEGREL64MSB,
  3991. BFD_RELOC_IA64_SEGREL64LSB,
  3992. BFD_RELOC_IA64_SECREL32MSB,
  3993. BFD_RELOC_IA64_SECREL32LSB,
  3994. BFD_RELOC_IA64_SECREL64MSB,
  3995. BFD_RELOC_IA64_SECREL64LSB,
  3996. BFD_RELOC_IA64_REL32MSB,
  3997. BFD_RELOC_IA64_REL32LSB,
  3998. BFD_RELOC_IA64_REL64MSB,
  3999. BFD_RELOC_IA64_REL64LSB,
  4000. BFD_RELOC_IA64_LTV32MSB,
  4001. BFD_RELOC_IA64_LTV32LSB,
  4002. BFD_RELOC_IA64_LTV64MSB,
  4003. BFD_RELOC_IA64_LTV64LSB,
  4004. BFD_RELOC_IA64_IPLTMSB,
  4005. BFD_RELOC_IA64_IPLTLSB,
  4006. BFD_RELOC_IA64_COPY,
  4007. BFD_RELOC_IA64_LTOFF22X,
  4008. BFD_RELOC_IA64_LDXMOV,
  4009. BFD_RELOC_IA64_TPREL14,
  4010. BFD_RELOC_IA64_TPREL22,
  4011. BFD_RELOC_IA64_TPREL64I,
  4012. BFD_RELOC_IA64_TPREL64MSB,
  4013. BFD_RELOC_IA64_TPREL64LSB,
  4014. BFD_RELOC_IA64_LTOFF_TPREL22,
  4015. BFD_RELOC_IA64_DTPMOD64MSB,
  4016. BFD_RELOC_IA64_DTPMOD64LSB,
  4017. BFD_RELOC_IA64_LTOFF_DTPMOD22,
  4018. BFD_RELOC_IA64_DTPREL14,
  4019. BFD_RELOC_IA64_DTPREL22,
  4020. BFD_RELOC_IA64_DTPREL64I,
  4021. BFD_RELOC_IA64_DTPREL32MSB,
  4022. BFD_RELOC_IA64_DTPREL32LSB,
  4023. BFD_RELOC_IA64_DTPREL64MSB,
  4024. BFD_RELOC_IA64_DTPREL64LSB,
  4025. BFD_RELOC_IA64_LTOFF_DTPREL22,
  4026. /* Motorola 68HC11 reloc.
  4027. This is the 8 bit high part of an absolute address. */
  4028. BFD_RELOC_M68HC11_HI8,
  4029. /* Motorola 68HC11 reloc.
  4030. This is the 8 bit low part of an absolute address. */
  4031. BFD_RELOC_M68HC11_LO8,
  4032. /* Motorola 68HC11 reloc.
  4033. This is the 3 bit of a value. */
  4034. BFD_RELOC_M68HC11_3B,
  4035. /* Motorola 68HC11 reloc.
  4036. This reloc marks the beginning of a jump/call instruction.
  4037. It is used for linker relaxation to correctly identify beginning
  4038. of instruction and change some branches to use PC-relative
  4039. addressing mode. */
  4040. BFD_RELOC_M68HC11_RL_JUMP,
  4041. /* Motorola 68HC11 reloc.
  4042. This reloc marks a group of several instructions that gcc generates
  4043. and for which the linker relaxation pass can modify and/or remove
  4044. some of them. */
  4045. BFD_RELOC_M68HC11_RL_GROUP,
  4046. /* Motorola 68HC11 reloc.
  4047. This is the 16-bit lower part of an address. It is used for 'call'
  4048. instruction to specify the symbol address without any special
  4049. transformation (due to memory bank window). */
  4050. BFD_RELOC_M68HC11_LO16,
  4051. /* Motorola 68HC11 reloc.
  4052. This is a 8-bit reloc that specifies the page number of an address.
  4053. It is used by 'call' instruction to specify the page number of
  4054. the symbol. */
  4055. BFD_RELOC_M68HC11_PAGE,
  4056. /* Motorola 68HC11 reloc.
  4057. This is a 24-bit reloc that represents the address with a 16-bit
  4058. value and a 8-bit page number. The symbol address is transformed
  4059. to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
  4060. BFD_RELOC_M68HC11_24,
  4061. /* Motorola 68HC12 reloc.
  4062. This is the 5 bits of a value. */
  4063. BFD_RELOC_M68HC12_5B,
  4064. /* Freescale XGATE reloc.
  4065. This reloc marks the beginning of a bra/jal instruction. */
  4066. BFD_RELOC_XGATE_RL_JUMP,
  4067. /* Freescale XGATE reloc.
  4068. This reloc marks a group of several instructions that gcc generates
  4069. and for which the linker relaxation pass can modify and/or remove
  4070. some of them. */
  4071. BFD_RELOC_XGATE_RL_GROUP,
  4072. /* Freescale XGATE reloc.
  4073. This is the 16-bit lower part of an address. It is used for the '16-bit'
  4074. instructions. */
  4075. BFD_RELOC_XGATE_LO16,
  4076. /* Freescale XGATE reloc. */
  4077. BFD_RELOC_XGATE_GPAGE,
  4078. /* Freescale XGATE reloc. */
  4079. BFD_RELOC_XGATE_24,
  4080. /* Freescale XGATE reloc.
  4081. This is a 9-bit pc-relative reloc. */
  4082. BFD_RELOC_XGATE_PCREL_9,
  4083. /* Freescale XGATE reloc.
  4084. This is a 10-bit pc-relative reloc. */
  4085. BFD_RELOC_XGATE_PCREL_10,
  4086. /* Freescale XGATE reloc.
  4087. This is the 16-bit lower part of an address. It is used for the '16-bit'
  4088. instructions. */
  4089. BFD_RELOC_XGATE_IMM8_LO,
  4090. /* Freescale XGATE reloc.
  4091. This is the 16-bit higher part of an address. It is used for the '16-bit'
  4092. instructions. */
  4093. BFD_RELOC_XGATE_IMM8_HI,
  4094. /* Freescale XGATE reloc.
  4095. This is a 3-bit pc-relative reloc. */
  4096. BFD_RELOC_XGATE_IMM3,
  4097. /* Freescale XGATE reloc.
  4098. This is a 4-bit pc-relative reloc. */
  4099. BFD_RELOC_XGATE_IMM4,
  4100. /* Freescale XGATE reloc.
  4101. This is a 5-bit pc-relative reloc. */
  4102. BFD_RELOC_XGATE_IMM5,
  4103. /* Motorola 68HC12 reloc.
  4104. This is the 9 bits of a value. */
  4105. BFD_RELOC_M68HC12_9B,
  4106. /* Motorola 68HC12 reloc.
  4107. This is the 16 bits of a value. */
  4108. BFD_RELOC_M68HC12_16B,
  4109. /* Motorola 68HC12/XGATE reloc.
  4110. This is a PCREL9 branch. */
  4111. BFD_RELOC_M68HC12_9_PCREL,
  4112. /* Motorola 68HC12/XGATE reloc.
  4113. This is a PCREL10 branch. */
  4114. BFD_RELOC_M68HC12_10_PCREL,
  4115. /* Motorola 68HC12/XGATE reloc.
  4116. This is the 8 bit low part of an absolute address and immediately precedes
  4117. a matching HI8XG part. */
  4118. BFD_RELOC_M68HC12_LO8XG,
  4119. /* Motorola 68HC12/XGATE reloc.
  4120. This is the 8 bit high part of an absolute address and immediately follows
  4121. a matching LO8XG part. */
  4122. BFD_RELOC_M68HC12_HI8XG,
  4123. /* Freescale S12Z reloc.
  4124. This is a 15 bit relative address. If the most significant bits are all zero
  4125. then it may be truncated to 8 bits. */
  4126. BFD_RELOC_S12Z_15_PCREL,
  4127. /* NS CR16 Relocations. */
  4128. BFD_RELOC_CR16_NUM8,
  4129. BFD_RELOC_CR16_NUM16,
  4130. BFD_RELOC_CR16_NUM32,
  4131. BFD_RELOC_CR16_NUM32a,
  4132. BFD_RELOC_CR16_REGREL0,
  4133. BFD_RELOC_CR16_REGREL4,
  4134. BFD_RELOC_CR16_REGREL4a,
  4135. BFD_RELOC_CR16_REGREL14,
  4136. BFD_RELOC_CR16_REGREL14a,
  4137. BFD_RELOC_CR16_REGREL16,
  4138. BFD_RELOC_CR16_REGREL20,
  4139. BFD_RELOC_CR16_REGREL20a,
  4140. BFD_RELOC_CR16_ABS20,
  4141. BFD_RELOC_CR16_ABS24,
  4142. BFD_RELOC_CR16_IMM4,
  4143. BFD_RELOC_CR16_IMM8,
  4144. BFD_RELOC_CR16_IMM16,
  4145. BFD_RELOC_CR16_IMM20,
  4146. BFD_RELOC_CR16_IMM24,
  4147. BFD_RELOC_CR16_IMM32,
  4148. BFD_RELOC_CR16_IMM32a,
  4149. BFD_RELOC_CR16_DISP4,
  4150. BFD_RELOC_CR16_DISP8,
  4151. BFD_RELOC_CR16_DISP16,
  4152. BFD_RELOC_CR16_DISP20,
  4153. BFD_RELOC_CR16_DISP24,
  4154. BFD_RELOC_CR16_DISP24a,
  4155. BFD_RELOC_CR16_SWITCH8,
  4156. BFD_RELOC_CR16_SWITCH16,
  4157. BFD_RELOC_CR16_SWITCH32,
  4158. BFD_RELOC_CR16_GOT_REGREL20,
  4159. BFD_RELOC_CR16_GOTC_REGREL20,
  4160. BFD_RELOC_CR16_GLOB_DAT,
  4161. /* NS CRX Relocations. */
  4162. BFD_RELOC_CRX_REL4,
  4163. BFD_RELOC_CRX_REL8,
  4164. BFD_RELOC_CRX_REL8_CMP,
  4165. BFD_RELOC_CRX_REL16,
  4166. BFD_RELOC_CRX_REL24,
  4167. BFD_RELOC_CRX_REL32,
  4168. BFD_RELOC_CRX_REGREL12,
  4169. BFD_RELOC_CRX_REGREL22,
  4170. BFD_RELOC_CRX_REGREL28,
  4171. BFD_RELOC_CRX_REGREL32,
  4172. BFD_RELOC_CRX_ABS16,
  4173. BFD_RELOC_CRX_ABS32,
  4174. BFD_RELOC_CRX_NUM8,
  4175. BFD_RELOC_CRX_NUM16,
  4176. BFD_RELOC_CRX_NUM32,
  4177. BFD_RELOC_CRX_IMM16,
  4178. BFD_RELOC_CRX_IMM32,
  4179. BFD_RELOC_CRX_SWITCH8,
  4180. BFD_RELOC_CRX_SWITCH16,
  4181. BFD_RELOC_CRX_SWITCH32,
  4182. /* These relocs are only used within the CRIS assembler. They are not
  4183. (at present) written to any object files. */
  4184. BFD_RELOC_CRIS_BDISP8,
  4185. BFD_RELOC_CRIS_UNSIGNED_5,
  4186. BFD_RELOC_CRIS_SIGNED_6,
  4187. BFD_RELOC_CRIS_UNSIGNED_6,
  4188. BFD_RELOC_CRIS_SIGNED_8,
  4189. BFD_RELOC_CRIS_UNSIGNED_8,
  4190. BFD_RELOC_CRIS_SIGNED_16,
  4191. BFD_RELOC_CRIS_UNSIGNED_16,
  4192. BFD_RELOC_CRIS_LAPCQ_OFFSET,
  4193. BFD_RELOC_CRIS_UNSIGNED_4,
  4194. /* Relocs used in ELF shared libraries for CRIS. */
  4195. BFD_RELOC_CRIS_COPY,
  4196. BFD_RELOC_CRIS_GLOB_DAT,
  4197. BFD_RELOC_CRIS_JUMP_SLOT,
  4198. BFD_RELOC_CRIS_RELATIVE,
  4199. /* 32-bit offset to symbol-entry within GOT. */
  4200. BFD_RELOC_CRIS_32_GOT,
  4201. /* 16-bit offset to symbol-entry within GOT. */
  4202. BFD_RELOC_CRIS_16_GOT,
  4203. /* 32-bit offset to symbol-entry within GOT, with PLT handling. */
  4204. BFD_RELOC_CRIS_32_GOTPLT,
  4205. /* 16-bit offset to symbol-entry within GOT, with PLT handling. */
  4206. BFD_RELOC_CRIS_16_GOTPLT,
  4207. /* 32-bit offset to symbol, relative to GOT. */
  4208. BFD_RELOC_CRIS_32_GOTREL,
  4209. /* 32-bit offset to symbol with PLT entry, relative to GOT. */
  4210. BFD_RELOC_CRIS_32_PLT_GOTREL,
  4211. /* 32-bit offset to symbol with PLT entry, relative to this relocation. */
  4212. BFD_RELOC_CRIS_32_PLT_PCREL,
  4213. /* Relocs used in TLS code for CRIS. */
  4214. BFD_RELOC_CRIS_32_GOT_GD,
  4215. BFD_RELOC_CRIS_16_GOT_GD,
  4216. BFD_RELOC_CRIS_32_GD,
  4217. BFD_RELOC_CRIS_DTP,
  4218. BFD_RELOC_CRIS_32_DTPREL,
  4219. BFD_RELOC_CRIS_16_DTPREL,
  4220. BFD_RELOC_CRIS_32_GOT_TPREL,
  4221. BFD_RELOC_CRIS_16_GOT_TPREL,
  4222. BFD_RELOC_CRIS_32_TPREL,
  4223. BFD_RELOC_CRIS_16_TPREL,
  4224. BFD_RELOC_CRIS_DTPMOD,
  4225. BFD_RELOC_CRIS_32_IE,
  4226. /* OpenRISC 1000 Relocations. */
  4227. BFD_RELOC_OR1K_REL_26,
  4228. BFD_RELOC_OR1K_SLO16,
  4229. BFD_RELOC_OR1K_PCREL_PG21,
  4230. BFD_RELOC_OR1K_LO13,
  4231. BFD_RELOC_OR1K_SLO13,
  4232. BFD_RELOC_OR1K_GOTPC_HI16,
  4233. BFD_RELOC_OR1K_GOTPC_LO16,
  4234. BFD_RELOC_OR1K_GOT_AHI16,
  4235. BFD_RELOC_OR1K_GOT16,
  4236. BFD_RELOC_OR1K_GOT_PG21,
  4237. BFD_RELOC_OR1K_GOT_LO13,
  4238. BFD_RELOC_OR1K_PLT26,
  4239. BFD_RELOC_OR1K_PLTA26,
  4240. BFD_RELOC_OR1K_GOTOFF_SLO16,
  4241. BFD_RELOC_OR1K_COPY,
  4242. BFD_RELOC_OR1K_GLOB_DAT,
  4243. BFD_RELOC_OR1K_JMP_SLOT,
  4244. BFD_RELOC_OR1K_RELATIVE,
  4245. BFD_RELOC_OR1K_TLS_GD_HI16,
  4246. BFD_RELOC_OR1K_TLS_GD_LO16,
  4247. BFD_RELOC_OR1K_TLS_GD_PG21,
  4248. BFD_RELOC_OR1K_TLS_GD_LO13,
  4249. BFD_RELOC_OR1K_TLS_LDM_HI16,
  4250. BFD_RELOC_OR1K_TLS_LDM_LO16,
  4251. BFD_RELOC_OR1K_TLS_LDM_PG21,
  4252. BFD_RELOC_OR1K_TLS_LDM_LO13,
  4253. BFD_RELOC_OR1K_TLS_LDO_HI16,
  4254. BFD_RELOC_OR1K_TLS_LDO_LO16,
  4255. BFD_RELOC_OR1K_TLS_IE_HI16,
  4256. BFD_RELOC_OR1K_TLS_IE_AHI16,
  4257. BFD_RELOC_OR1K_TLS_IE_LO16,
  4258. BFD_RELOC_OR1K_TLS_IE_PG21,
  4259. BFD_RELOC_OR1K_TLS_IE_LO13,
  4260. BFD_RELOC_OR1K_TLS_LE_HI16,
  4261. BFD_RELOC_OR1K_TLS_LE_AHI16,
  4262. BFD_RELOC_OR1K_TLS_LE_LO16,
  4263. BFD_RELOC_OR1K_TLS_LE_SLO16,
  4264. BFD_RELOC_OR1K_TLS_TPOFF,
  4265. BFD_RELOC_OR1K_TLS_DTPOFF,
  4266. BFD_RELOC_OR1K_TLS_DTPMOD,
  4267. /* H8 elf Relocations. */
  4268. BFD_RELOC_H8_DIR16A8,
  4269. BFD_RELOC_H8_DIR16R8,
  4270. BFD_RELOC_H8_DIR24A8,
  4271. BFD_RELOC_H8_DIR24R8,
  4272. BFD_RELOC_H8_DIR32A16,
  4273. BFD_RELOC_H8_DISP32A16,
  4274. /* Sony Xstormy16 Relocations. */
  4275. BFD_RELOC_XSTORMY16_REL_12,
  4276. BFD_RELOC_XSTORMY16_12,
  4277. BFD_RELOC_XSTORMY16_24,
  4278. BFD_RELOC_XSTORMY16_FPTR16,
  4279. /* Self-describing complex relocations. */
  4280. BFD_RELOC_RELC,
  4281. /* Infineon Relocations. */
  4282. BFD_RELOC_XC16X_PAG,
  4283. BFD_RELOC_XC16X_POF,
  4284. BFD_RELOC_XC16X_SEG,
  4285. BFD_RELOC_XC16X_SOF,
  4286. /* Relocations used by VAX ELF. */
  4287. BFD_RELOC_VAX_GLOB_DAT,
  4288. BFD_RELOC_VAX_JMP_SLOT,
  4289. BFD_RELOC_VAX_RELATIVE,
  4290. /* Morpho MT - 16 bit immediate relocation. */
  4291. BFD_RELOC_MT_PC16,
  4292. /* Morpho MT - Hi 16 bits of an address. */
  4293. BFD_RELOC_MT_HI16,
  4294. /* Morpho MT - Low 16 bits of an address. */
  4295. BFD_RELOC_MT_LO16,
  4296. /* Morpho MT - Used to tell the linker which vtable entries are used. */
  4297. BFD_RELOC_MT_GNU_VTINHERIT,
  4298. /* Morpho MT - Used to tell the linker which vtable entries are used. */
  4299. BFD_RELOC_MT_GNU_VTENTRY,
  4300. /* Morpho MT - 8 bit immediate relocation. */
  4301. BFD_RELOC_MT_PCINSN8,
  4302. /* msp430 specific relocation codes */
  4303. BFD_RELOC_MSP430_10_PCREL,
  4304. BFD_RELOC_MSP430_16_PCREL,
  4305. BFD_RELOC_MSP430_16,
  4306. BFD_RELOC_MSP430_16_PCREL_BYTE,
  4307. BFD_RELOC_MSP430_16_BYTE,
  4308. BFD_RELOC_MSP430_2X_PCREL,
  4309. BFD_RELOC_MSP430_RL_PCREL,
  4310. BFD_RELOC_MSP430_ABS8,
  4311. BFD_RELOC_MSP430X_PCR20_EXT_SRC,
  4312. BFD_RELOC_MSP430X_PCR20_EXT_DST,
  4313. BFD_RELOC_MSP430X_PCR20_EXT_ODST,
  4314. BFD_RELOC_MSP430X_ABS20_EXT_SRC,
  4315. BFD_RELOC_MSP430X_ABS20_EXT_DST,
  4316. BFD_RELOC_MSP430X_ABS20_EXT_ODST,
  4317. BFD_RELOC_MSP430X_ABS20_ADR_SRC,
  4318. BFD_RELOC_MSP430X_ABS20_ADR_DST,
  4319. BFD_RELOC_MSP430X_PCR16,
  4320. BFD_RELOC_MSP430X_PCR20_CALL,
  4321. BFD_RELOC_MSP430X_ABS16,
  4322. BFD_RELOC_MSP430_ABS_HI16,
  4323. BFD_RELOC_MSP430_PREL31,
  4324. BFD_RELOC_MSP430_SYM_DIFF,
  4325. BFD_RELOC_MSP430_SET_ULEB128,
  4326. BFD_RELOC_MSP430_SUB_ULEB128,
  4327. /* Relocations used by the Altera Nios II core. */
  4328. BFD_RELOC_NIOS2_S16,
  4329. BFD_RELOC_NIOS2_U16,
  4330. BFD_RELOC_NIOS2_CALL26,
  4331. BFD_RELOC_NIOS2_IMM5,
  4332. BFD_RELOC_NIOS2_CACHE_OPX,
  4333. BFD_RELOC_NIOS2_IMM6,
  4334. BFD_RELOC_NIOS2_IMM8,
  4335. BFD_RELOC_NIOS2_HI16,
  4336. BFD_RELOC_NIOS2_LO16,
  4337. BFD_RELOC_NIOS2_HIADJ16,
  4338. BFD_RELOC_NIOS2_GPREL,
  4339. BFD_RELOC_NIOS2_UJMP,
  4340. BFD_RELOC_NIOS2_CJMP,
  4341. BFD_RELOC_NIOS2_CALLR,
  4342. BFD_RELOC_NIOS2_ALIGN,
  4343. BFD_RELOC_NIOS2_GOT16,
  4344. BFD_RELOC_NIOS2_CALL16,
  4345. BFD_RELOC_NIOS2_GOTOFF_LO,
  4346. BFD_RELOC_NIOS2_GOTOFF_HA,
  4347. BFD_RELOC_NIOS2_PCREL_LO,
  4348. BFD_RELOC_NIOS2_PCREL_HA,
  4349. BFD_RELOC_NIOS2_TLS_GD16,
  4350. BFD_RELOC_NIOS2_TLS_LDM16,
  4351. BFD_RELOC_NIOS2_TLS_LDO16,
  4352. BFD_RELOC_NIOS2_TLS_IE16,
  4353. BFD_RELOC_NIOS2_TLS_LE16,
  4354. BFD_RELOC_NIOS2_TLS_DTPMOD,
  4355. BFD_RELOC_NIOS2_TLS_DTPREL,
  4356. BFD_RELOC_NIOS2_TLS_TPREL,
  4357. BFD_RELOC_NIOS2_COPY,
  4358. BFD_RELOC_NIOS2_GLOB_DAT,
  4359. BFD_RELOC_NIOS2_JUMP_SLOT,
  4360. BFD_RELOC_NIOS2_RELATIVE,
  4361. BFD_RELOC_NIOS2_GOTOFF,
  4362. BFD_RELOC_NIOS2_CALL26_NOAT,
  4363. BFD_RELOC_NIOS2_GOT_LO,
  4364. BFD_RELOC_NIOS2_GOT_HA,
  4365. BFD_RELOC_NIOS2_CALL_LO,
  4366. BFD_RELOC_NIOS2_CALL_HA,
  4367. BFD_RELOC_NIOS2_R2_S12,
  4368. BFD_RELOC_NIOS2_R2_I10_1_PCREL,
  4369. BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
  4370. BFD_RELOC_NIOS2_R2_T1I7_2,
  4371. BFD_RELOC_NIOS2_R2_T2I4,
  4372. BFD_RELOC_NIOS2_R2_T2I4_1,
  4373. BFD_RELOC_NIOS2_R2_T2I4_2,
  4374. BFD_RELOC_NIOS2_R2_X1I7_2,
  4375. BFD_RELOC_NIOS2_R2_X2L5,
  4376. BFD_RELOC_NIOS2_R2_F1I5_2,
  4377. BFD_RELOC_NIOS2_R2_L5I4X1,
  4378. BFD_RELOC_NIOS2_R2_T1X1I6,
  4379. BFD_RELOC_NIOS2_R2_T1X1I6_2,
  4380. /* PRU LDI 16-bit unsigned data-memory relocation. */
  4381. BFD_RELOC_PRU_U16,
  4382. /* PRU LDI 16-bit unsigned instruction-memory relocation. */
  4383. BFD_RELOC_PRU_U16_PMEMIMM,
  4384. /* PRU relocation for two consecutive LDI load instructions that load a
  4385. 32 bit value into a register. If the higher bits are all zero, then
  4386. the second instruction may be relaxed. */
  4387. BFD_RELOC_PRU_LDI32,
  4388. /* PRU QBBx 10-bit signed PC-relative relocation. */
  4389. BFD_RELOC_PRU_S10_PCREL,
  4390. /* PRU 8-bit unsigned relocation used for the LOOP instruction. */
  4391. BFD_RELOC_PRU_U8_PCREL,
  4392. /* PRU Program Memory relocations. Used to convert from byte addressing to
  4393. 32-bit word addressing. */
  4394. BFD_RELOC_PRU_32_PMEM,
  4395. BFD_RELOC_PRU_16_PMEM,
  4396. /* PRU relocations to mark the difference of two local symbols.
  4397. These are only needed to support linker relaxation and can be ignored
  4398. when not relaxing. The field is set to the value of the difference
  4399. assuming no relaxation. The relocation encodes the position of the
  4400. second symbol so the linker can determine whether to adjust the field
  4401. value. The PMEM variants encode the word difference, instead of byte
  4402. difference between symbols. */
  4403. BFD_RELOC_PRU_GNU_DIFF8,
  4404. BFD_RELOC_PRU_GNU_DIFF16,
  4405. BFD_RELOC_PRU_GNU_DIFF32,
  4406. BFD_RELOC_PRU_GNU_DIFF16_PMEM,
  4407. BFD_RELOC_PRU_GNU_DIFF32_PMEM,
  4408. /* IQ2000 Relocations. */
  4409. BFD_RELOC_IQ2000_OFFSET_16,
  4410. BFD_RELOC_IQ2000_OFFSET_21,
  4411. BFD_RELOC_IQ2000_UHI16,
  4412. /* Special Xtensa relocation used only by PLT entries in ELF shared
  4413. objects to indicate that the runtime linker should set the value
  4414. to one of its own internal functions or data structures. */
  4415. BFD_RELOC_XTENSA_RTLD,
  4416. /* Xtensa relocations for ELF shared objects. */
  4417. BFD_RELOC_XTENSA_GLOB_DAT,
  4418. BFD_RELOC_XTENSA_JMP_SLOT,
  4419. BFD_RELOC_XTENSA_RELATIVE,
  4420. /* Xtensa relocation used in ELF object files for symbols that may require
  4421. PLT entries. Otherwise, this is just a generic 32-bit relocation. */
  4422. BFD_RELOC_XTENSA_PLT,
  4423. /* Xtensa relocations for backward compatibility. These have been replaced
  4424. by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
  4425. Xtensa relocations to mark the difference of two local symbols.
  4426. These are only needed to support linker relaxation and can be ignored
  4427. when not relaxing. The field is set to the value of the difference
  4428. assuming no relaxation. The relocation encodes the position of the
  4429. first symbol so the linker can determine whether to adjust the field
  4430. value. */
  4431. BFD_RELOC_XTENSA_DIFF8,
  4432. BFD_RELOC_XTENSA_DIFF16,
  4433. BFD_RELOC_XTENSA_DIFF32,
  4434. /* Generic Xtensa relocations for instruction operands. Only the slot
  4435. number is encoded in the relocation. The relocation applies to the
  4436. last PC-relative immediate operand, or if there are no PC-relative
  4437. immediates, to the last immediate operand. */
  4438. BFD_RELOC_XTENSA_SLOT0_OP,
  4439. BFD_RELOC_XTENSA_SLOT1_OP,
  4440. BFD_RELOC_XTENSA_SLOT2_OP,
  4441. BFD_RELOC_XTENSA_SLOT3_OP,
  4442. BFD_RELOC_XTENSA_SLOT4_OP,
  4443. BFD_RELOC_XTENSA_SLOT5_OP,
  4444. BFD_RELOC_XTENSA_SLOT6_OP,
  4445. BFD_RELOC_XTENSA_SLOT7_OP,
  4446. BFD_RELOC_XTENSA_SLOT8_OP,
  4447. BFD_RELOC_XTENSA_SLOT9_OP,
  4448. BFD_RELOC_XTENSA_SLOT10_OP,
  4449. BFD_RELOC_XTENSA_SLOT11_OP,
  4450. BFD_RELOC_XTENSA_SLOT12_OP,
  4451. BFD_RELOC_XTENSA_SLOT13_OP,
  4452. BFD_RELOC_XTENSA_SLOT14_OP,
  4453. /* Alternate Xtensa relocations. Only the slot is encoded in the
  4454. relocation. The meaning of these relocations is opcode-specific. */
  4455. BFD_RELOC_XTENSA_SLOT0_ALT,
  4456. BFD_RELOC_XTENSA_SLOT1_ALT,
  4457. BFD_RELOC_XTENSA_SLOT2_ALT,
  4458. BFD_RELOC_XTENSA_SLOT3_ALT,
  4459. BFD_RELOC_XTENSA_SLOT4_ALT,
  4460. BFD_RELOC_XTENSA_SLOT5_ALT,
  4461. BFD_RELOC_XTENSA_SLOT6_ALT,
  4462. BFD_RELOC_XTENSA_SLOT7_ALT,
  4463. BFD_RELOC_XTENSA_SLOT8_ALT,
  4464. BFD_RELOC_XTENSA_SLOT9_ALT,
  4465. BFD_RELOC_XTENSA_SLOT10_ALT,
  4466. BFD_RELOC_XTENSA_SLOT11_ALT,
  4467. BFD_RELOC_XTENSA_SLOT12_ALT,
  4468. BFD_RELOC_XTENSA_SLOT13_ALT,
  4469. BFD_RELOC_XTENSA_SLOT14_ALT,
  4470. /* Xtensa relocations for backward compatibility. These have all been
  4471. replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
  4472. BFD_RELOC_XTENSA_OP0,
  4473. BFD_RELOC_XTENSA_OP1,
  4474. BFD_RELOC_XTENSA_OP2,
  4475. /* Xtensa relocation to mark that the assembler expanded the
  4476. instructions from an original target. The expansion size is
  4477. encoded in the reloc size. */
  4478. BFD_RELOC_XTENSA_ASM_EXPAND,
  4479. /* Xtensa relocation to mark that the linker should simplify
  4480. assembler-expanded instructions. This is commonly used
  4481. internally by the linker after analysis of a
  4482. BFD_RELOC_XTENSA_ASM_EXPAND. */
  4483. BFD_RELOC_XTENSA_ASM_SIMPLIFY,
  4484. /* Xtensa TLS relocations. */
  4485. BFD_RELOC_XTENSA_TLSDESC_FN,
  4486. BFD_RELOC_XTENSA_TLSDESC_ARG,
  4487. BFD_RELOC_XTENSA_TLS_DTPOFF,
  4488. BFD_RELOC_XTENSA_TLS_TPOFF,
  4489. BFD_RELOC_XTENSA_TLS_FUNC,
  4490. BFD_RELOC_XTENSA_TLS_ARG,
  4491. BFD_RELOC_XTENSA_TLS_CALL,
  4492. /* Xtensa relocations to mark the difference of two local symbols.
  4493. These are only needed to support linker relaxation and can be ignored
  4494. when not relaxing. The field is set to the value of the difference
  4495. assuming no relaxation. The relocation encodes the position of the
  4496. subtracted symbol so the linker can determine whether to adjust the field
  4497. value. PDIFF relocations are used for positive differences, NDIFF
  4498. relocations are used for negative differences. The difference value
  4499. is treated as unsigned with these relocation types, giving full
  4500. 8/16 value ranges. */
  4501. BFD_RELOC_XTENSA_PDIFF8,
  4502. BFD_RELOC_XTENSA_PDIFF16,
  4503. BFD_RELOC_XTENSA_PDIFF32,
  4504. BFD_RELOC_XTENSA_NDIFF8,
  4505. BFD_RELOC_XTENSA_NDIFF16,
  4506. BFD_RELOC_XTENSA_NDIFF32,
  4507. /* 8 bit signed offset in (ix+d) or (iy+d). */
  4508. BFD_RELOC_Z80_DISP8,
  4509. /* First 8 bits of multibyte (32, 24 or 16 bit) value. */
  4510. BFD_RELOC_Z80_BYTE0,
  4511. /* Second 8 bits of multibyte (32, 24 or 16 bit) value. */
  4512. BFD_RELOC_Z80_BYTE1,
  4513. /* Third 8 bits of multibyte (32 or 24 bit) value. */
  4514. BFD_RELOC_Z80_BYTE2,
  4515. /* Fourth 8 bits of multibyte (32 bit) value. */
  4516. BFD_RELOC_Z80_BYTE3,
  4517. /* Lowest 16 bits of multibyte (32 or 24 bit) value. */
  4518. BFD_RELOC_Z80_WORD0,
  4519. /* Highest 16 bits of multibyte (32 or 24 bit) value. */
  4520. BFD_RELOC_Z80_WORD1,
  4521. /* Like BFD_RELOC_16 but big-endian. */
  4522. BFD_RELOC_Z80_16_BE,
  4523. /* DJNZ offset. */
  4524. BFD_RELOC_Z8K_DISP7,
  4525. /* CALR offset. */
  4526. BFD_RELOC_Z8K_CALLR,
  4527. /* 4 bit value. */
  4528. BFD_RELOC_Z8K_IMM4L,
  4529. /* Lattice Mico32 relocations. */
  4530. BFD_RELOC_LM32_CALL,
  4531. BFD_RELOC_LM32_BRANCH,
  4532. BFD_RELOC_LM32_16_GOT,
  4533. BFD_RELOC_LM32_GOTOFF_HI16,
  4534. BFD_RELOC_LM32_GOTOFF_LO16,
  4535. BFD_RELOC_LM32_COPY,
  4536. BFD_RELOC_LM32_GLOB_DAT,
  4537. BFD_RELOC_LM32_JMP_SLOT,
  4538. BFD_RELOC_LM32_RELATIVE,
  4539. /* Difference between two section addreses. Must be followed by a
  4540. BFD_RELOC_MACH_O_PAIR. */
  4541. BFD_RELOC_MACH_O_SECTDIFF,
  4542. /* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */
  4543. BFD_RELOC_MACH_O_LOCAL_SECTDIFF,
  4544. /* Pair of relocation. Contains the first symbol. */
  4545. BFD_RELOC_MACH_O_PAIR,
  4546. /* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */
  4547. BFD_RELOC_MACH_O_SUBTRACTOR32,
  4548. /* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */
  4549. BFD_RELOC_MACH_O_SUBTRACTOR64,
  4550. /* PCREL relocations. They are marked as branch to create PLT entry if
  4551. required. */
  4552. BFD_RELOC_MACH_O_X86_64_BRANCH32,
  4553. BFD_RELOC_MACH_O_X86_64_BRANCH8,
  4554. /* Used when referencing a GOT entry. */
  4555. BFD_RELOC_MACH_O_X86_64_GOT,
  4556. /* Used when loading a GOT entry with movq. It is specially marked so that
  4557. the linker could optimize the movq to a leaq if possible. */
  4558. BFD_RELOC_MACH_O_X86_64_GOT_LOAD,
  4559. /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */
  4560. BFD_RELOC_MACH_O_X86_64_PCREL32_1,
  4561. /* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */
  4562. BFD_RELOC_MACH_O_X86_64_PCREL32_2,
  4563. /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */
  4564. BFD_RELOC_MACH_O_X86_64_PCREL32_4,
  4565. /* Used when referencing a TLV entry. */
  4566. BFD_RELOC_MACH_O_X86_64_TLV,
  4567. /* Addend for PAGE or PAGEOFF. */
  4568. BFD_RELOC_MACH_O_ARM64_ADDEND,
  4569. /* Relative offset to page of GOT slot. */
  4570. BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21,
  4571. /* Relative offset within page of GOT slot. */
  4572. BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12,
  4573. /* Address of a GOT entry. */
  4574. BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT,
  4575. /* This is a 32 bit reloc for the microblaze that stores the
  4576. low 16 bits of a value */
  4577. BFD_RELOC_MICROBLAZE_32_LO,
  4578. /* This is a 32 bit pc-relative reloc for the microblaze that
  4579. stores the low 16 bits of a value */
  4580. BFD_RELOC_MICROBLAZE_32_LO_PCREL,
  4581. /* This is a 32 bit reloc for the microblaze that stores a
  4582. value relative to the read-only small data area anchor */
  4583. BFD_RELOC_MICROBLAZE_32_ROSDA,
  4584. /* This is a 32 bit reloc for the microblaze that stores a
  4585. value relative to the read-write small data area anchor */
  4586. BFD_RELOC_MICROBLAZE_32_RWSDA,
  4587. /* This is a 32 bit reloc for the microblaze to handle
  4588. expressions of the form "Symbol Op Symbol" */
  4589. BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
  4590. /* This is a 64 bit reloc that stores the 32 bit pc relative
  4591. value in two words (with an imm instruction). No relocation is
  4592. done here - only used for relaxing */
  4593. BFD_RELOC_MICROBLAZE_64_NONE,
  4594. /* This is a 64 bit reloc that stores the 32 bit pc relative
  4595. value in two words (with an imm instruction). The relocation is
  4596. PC-relative GOT offset */
  4597. BFD_RELOC_MICROBLAZE_64_GOTPC,
  4598. /* This is a 64 bit reloc that stores the 32 bit pc relative
  4599. value in two words (with an imm instruction). The relocation is
  4600. GOT offset */
  4601. BFD_RELOC_MICROBLAZE_64_GOT,
  4602. /* This is a 64 bit reloc that stores the 32 bit pc relative
  4603. value in two words (with an imm instruction). The relocation is
  4604. PC-relative offset into PLT */
  4605. BFD_RELOC_MICROBLAZE_64_PLT,
  4606. /* This is a 64 bit reloc that stores the 32 bit GOT relative
  4607. value in two words (with an imm instruction). The relocation is
  4608. relative offset from _GLOBAL_OFFSET_TABLE_ */
  4609. BFD_RELOC_MICROBLAZE_64_GOTOFF,
  4610. /* This is a 32 bit reloc that stores the 32 bit GOT relative
  4611. value in a word. The relocation is relative offset from */
  4612. BFD_RELOC_MICROBLAZE_32_GOTOFF,
  4613. /* This is used to tell the dynamic linker to copy the value out of
  4614. the dynamic object into the runtime process image. */
  4615. BFD_RELOC_MICROBLAZE_COPY,
  4616. /* Unused Reloc */
  4617. BFD_RELOC_MICROBLAZE_64_TLS,
  4618. /* This is a 64 bit reloc that stores the 32 bit GOT relative value
  4619. of the GOT TLS GD info entry in two words (with an imm instruction). The
  4620. relocation is GOT offset. */
  4621. BFD_RELOC_MICROBLAZE_64_TLSGD,
  4622. /* This is a 64 bit reloc that stores the 32 bit GOT relative value
  4623. of the GOT TLS LD info entry in two words (with an imm instruction). The
  4624. relocation is GOT offset. */
  4625. BFD_RELOC_MICROBLAZE_64_TLSLD,
  4626. /* This is a 32 bit reloc that stores the Module ID to GOT(n). */
  4627. BFD_RELOC_MICROBLAZE_32_TLSDTPMOD,
  4628. /* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */
  4629. BFD_RELOC_MICROBLAZE_32_TLSDTPREL,
  4630. /* This is a 32 bit reloc for storing TLS offset to two words (uses imm
  4631. instruction) */
  4632. BFD_RELOC_MICROBLAZE_64_TLSDTPREL,
  4633. /* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
  4634. to two words (uses imm instruction). */
  4635. BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL,
  4636. /* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
  4637. to two words (uses imm instruction). */
  4638. BFD_RELOC_MICROBLAZE_64_TLSTPREL,
  4639. /* This is a 64 bit reloc that stores the 32 bit pc relative
  4640. value in two words (with an imm instruction). The relocation is
  4641. PC-relative offset from start of TEXT. */
  4642. BFD_RELOC_MICROBLAZE_64_TEXTPCREL,
  4643. /* This is a 64 bit reloc that stores the 32 bit offset
  4644. value in two words (with an imm instruction). The relocation is
  4645. relative offset from start of TEXT. */
  4646. BFD_RELOC_MICROBLAZE_64_TEXTREL,
  4647. /* AArch64 pseudo relocation code to mark the start of the AArch64
  4648. relocation enumerators. N.B. the order of the enumerators is
  4649. important as several tables in the AArch64 bfd backend are indexed
  4650. by these enumerators; make sure they are all synced. */
  4651. BFD_RELOC_AARCH64_RELOC_START,
  4652. /* Deprecated AArch64 null relocation code. */
  4653. BFD_RELOC_AARCH64_NULL,
  4654. /* AArch64 null relocation code. */
  4655. BFD_RELOC_AARCH64_NONE,
  4656. /* Basic absolute relocations of N bits. These are equivalent to
  4657. BFD_RELOC_N and they were added to assist the indexing of the howto
  4658. table. */
  4659. BFD_RELOC_AARCH64_64,
  4660. BFD_RELOC_AARCH64_32,
  4661. BFD_RELOC_AARCH64_16,
  4662. /* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
  4663. and they were added to assist the indexing of the howto table. */
  4664. BFD_RELOC_AARCH64_64_PCREL,
  4665. BFD_RELOC_AARCH64_32_PCREL,
  4666. BFD_RELOC_AARCH64_16_PCREL,
  4667. /* AArch64 MOV[NZK] instruction with most significant bits 0 to 15
  4668. of an unsigned address/value. */
  4669. BFD_RELOC_AARCH64_MOVW_G0,
  4670. /* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
  4671. an address/value. No overflow checking. */
  4672. BFD_RELOC_AARCH64_MOVW_G0_NC,
  4673. /* AArch64 MOV[NZK] instruction with most significant bits 16 to 31
  4674. of an unsigned address/value. */
  4675. BFD_RELOC_AARCH64_MOVW_G1,
  4676. /* AArch64 MOV[NZK] instruction with less significant bits 16 to 31
  4677. of an address/value. No overflow checking. */
  4678. BFD_RELOC_AARCH64_MOVW_G1_NC,
  4679. /* AArch64 MOV[NZK] instruction with most significant bits 32 to 47
  4680. of an unsigned address/value. */
  4681. BFD_RELOC_AARCH64_MOVW_G2,
  4682. /* AArch64 MOV[NZK] instruction with less significant bits 32 to 47
  4683. of an address/value. No overflow checking. */
  4684. BFD_RELOC_AARCH64_MOVW_G2_NC,
  4685. /* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
  4686. of a signed or unsigned address/value. */
  4687. BFD_RELOC_AARCH64_MOVW_G3,
  4688. /* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
  4689. of a signed value. Changes instruction to MOVZ or MOVN depending on the
  4690. value's sign. */
  4691. BFD_RELOC_AARCH64_MOVW_G0_S,
  4692. /* AArch64 MOV[NZ] instruction with most significant bits 16 to 31
  4693. of a signed value. Changes instruction to MOVZ or MOVN depending on the
  4694. value's sign. */
  4695. BFD_RELOC_AARCH64_MOVW_G1_S,
  4696. /* AArch64 MOV[NZ] instruction with most significant bits 32 to 47
  4697. of a signed value. Changes instruction to MOVZ or MOVN depending on the
  4698. value's sign. */
  4699. BFD_RELOC_AARCH64_MOVW_G2_S,
  4700. /* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
  4701. of a signed value. Changes instruction to MOVZ or MOVN depending on the
  4702. value's sign. */
  4703. BFD_RELOC_AARCH64_MOVW_PREL_G0,
  4704. /* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
  4705. of a signed value. Changes instruction to MOVZ or MOVN depending on the
  4706. value's sign. */
  4707. BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
  4708. /* AArch64 MOVK instruction with most significant bits 16 to 31
  4709. of a signed value. */
  4710. BFD_RELOC_AARCH64_MOVW_PREL_G1,
  4711. /* AArch64 MOVK instruction with most significant bits 16 to 31
  4712. of a signed value. */
  4713. BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
  4714. /* AArch64 MOVK instruction with most significant bits 32 to 47
  4715. of a signed value. */
  4716. BFD_RELOC_AARCH64_MOVW_PREL_G2,
  4717. /* AArch64 MOVK instruction with most significant bits 32 to 47
  4718. of a signed value. */
  4719. BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
  4720. /* AArch64 MOVK instruction with most significant bits 47 to 63
  4721. of a signed value. */
  4722. BFD_RELOC_AARCH64_MOVW_PREL_G3,
  4723. /* AArch64 Load Literal instruction, holding a 19 bit pc-relative word
  4724. offset. The lowest two bits must be zero and are not stored in the
  4725. instruction, giving a 21 bit signed byte offset. */
  4726. BFD_RELOC_AARCH64_LD_LO19_PCREL,
  4727. /* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */
  4728. BFD_RELOC_AARCH64_ADR_LO21_PCREL,
  4729. /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
  4730. offset, giving a 4KB aligned page base address. */
  4731. BFD_RELOC_AARCH64_ADR_HI21_PCREL,
  4732. /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
  4733. offset, giving a 4KB aligned page base address, but with no overflow
  4734. checking. */
  4735. BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL,
  4736. /* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
  4737. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
  4738. BFD_RELOC_AARCH64_ADD_LO12,
  4739. /* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
  4740. address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
  4741. BFD_RELOC_AARCH64_LDST8_LO12,
  4742. /* AArch64 14 bit pc-relative test bit and branch.
  4743. The lowest two bits must be zero and are not stored in the instruction,
  4744. giving a 16 bit signed byte offset. */
  4745. BFD_RELOC_AARCH64_TSTBR14,
  4746. /* AArch64 19 bit pc-relative conditional branch and compare & branch.
  4747. The lowest two bits must be zero and are not stored in the instruction,
  4748. giving a 21 bit signed byte offset. */
  4749. BFD_RELOC_AARCH64_BRANCH19,
  4750. /* AArch64 26 bit pc-relative unconditional branch.
  4751. The lowest two bits must be zero and are not stored in the instruction,
  4752. giving a 28 bit signed byte offset. */
  4753. BFD_RELOC_AARCH64_JUMP26,
  4754. /* AArch64 26 bit pc-relative unconditional branch and link.
  4755. The lowest two bits must be zero and are not stored in the instruction,
  4756. giving a 28 bit signed byte offset. */
  4757. BFD_RELOC_AARCH64_CALL26,
  4758. /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
  4759. address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
  4760. BFD_RELOC_AARCH64_LDST16_LO12,
  4761. /* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
  4762. address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
  4763. BFD_RELOC_AARCH64_LDST32_LO12,
  4764. /* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
  4765. address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
  4766. BFD_RELOC_AARCH64_LDST64_LO12,
  4767. /* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
  4768. address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
  4769. BFD_RELOC_AARCH64_LDST128_LO12,
  4770. /* AArch64 Load Literal instruction, holding a 19 bit PC relative word
  4771. offset of the global offset table entry for a symbol. The lowest two
  4772. bits must be zero and are not stored in the instruction, giving a 21
  4773. bit signed byte offset. This relocation type requires signed overflow
  4774. checking. */
  4775. BFD_RELOC_AARCH64_GOT_LD_PREL19,
  4776. /* Get to the page base of the global offset table entry for a symbol as
  4777. part of an ADRP instruction using a 21 bit PC relative value.Used in
  4778. conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */
  4779. BFD_RELOC_AARCH64_ADR_GOT_PAGE,
  4780. /* Unsigned 12 bit byte offset for 64 bit load/store from the page of
  4781. the GOT entry for this symbol. Used in conjunction with
  4782. BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */
  4783. BFD_RELOC_AARCH64_LD64_GOT_LO12_NC,
  4784. /* Unsigned 12 bit byte offset for 32 bit load/store from the page of
  4785. the GOT entry for this symbol. Used in conjunction with
  4786. BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */
  4787. BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
  4788. /* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
  4789. for this symbol. Valid in LP64 ABI only. */
  4790. BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
  4791. /* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
  4792. for this symbol. Valid in LP64 ABI only. */
  4793. BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
  4794. /* Unsigned 15 bit byte offset for 64 bit load/store from the page of
  4795. the GOT entry for this symbol. Valid in LP64 ABI only. */
  4796. BFD_RELOC_AARCH64_LD64_GOTOFF_LO15,
  4797. /* Scaled 14 bit byte offset to the page base of the global offset table. */
  4798. BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14,
  4799. /* Scaled 15 bit byte offset to the page base of the global offset table. */
  4800. BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15,
  4801. /* Get to the page base of the global offset table entry for a symbols
  4802. tls_index structure as part of an adrp instruction using a 21 bit PC
  4803. relative value. Used in conjunction with
  4804. BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */
  4805. BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
  4806. /* AArch64 TLS General Dynamic */
  4807. BFD_RELOC_AARCH64_TLSGD_ADR_PREL21,
  4808. /* Unsigned 12 bit byte offset to global offset table entry for a symbols
  4809. tls_index structure. Used in conjunction with
  4810. BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */
  4811. BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
  4812. /* AArch64 TLS General Dynamic relocation. */
  4813. BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC,
  4814. /* AArch64 TLS General Dynamic relocation. */
  4815. BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
  4816. /* AArch64 TLS INITIAL EXEC relocation. */
  4817. BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
  4818. /* AArch64 TLS INITIAL EXEC relocation. */
  4819. BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC,
  4820. /* AArch64 TLS INITIAL EXEC relocation. */
  4821. BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC,
  4822. /* AArch64 TLS INITIAL EXEC relocation. */
  4823. BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
  4824. /* AArch64 TLS INITIAL EXEC relocation. */
  4825. BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
  4826. /* AArch64 TLS INITIAL EXEC relocation. */
  4827. BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
  4828. /* bit[23:12] of byte offset to module TLS base address. */
  4829. BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
  4830. /* Unsigned 12 bit byte offset to module TLS base address. */
  4831. BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12,
  4832. /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */
  4833. BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC,
  4834. /* Unsigned 12 bit byte offset to global offset table entry for a symbols
  4835. tls_index structure. Used in conjunction with
  4836. BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */
  4837. BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC,
  4838. /* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
  4839. instruction. */
  4840. BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21,
  4841. /* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */
  4842. BFD_RELOC_AARCH64_TLSLD_ADR_PREL21,
  4843. /* bit[11:1] of byte offset to module TLS base address, encoded in ldst
  4844. instructions. */
  4845. BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
  4846. /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */
  4847. BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
  4848. /* bit[11:2] of byte offset to module TLS base address, encoded in ldst
  4849. instructions. */
  4850. BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
  4851. /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */
  4852. BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
  4853. /* bit[11:3] of byte offset to module TLS base address, encoded in ldst
  4854. instructions. */
  4855. BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
  4856. /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */
  4857. BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
  4858. /* bit[11:0] of byte offset to module TLS base address, encoded in ldst
  4859. instructions. */
  4860. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
  4861. /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */
  4862. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
  4863. /* bit[15:0] of byte offset to module TLS base address. */
  4864. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
  4865. /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */
  4866. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
  4867. /* bit[31:16] of byte offset to module TLS base address. */
  4868. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
  4869. /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */
  4870. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
  4871. /* bit[47:32] of byte offset to module TLS base address. */
  4872. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2,
  4873. /* AArch64 TLS LOCAL EXEC relocation. */
  4874. BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
  4875. /* AArch64 TLS LOCAL EXEC relocation. */
  4876. BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1,
  4877. /* AArch64 TLS LOCAL EXEC relocation. */
  4878. BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
  4879. /* AArch64 TLS LOCAL EXEC relocation. */
  4880. BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0,
  4881. /* AArch64 TLS LOCAL EXEC relocation. */
  4882. BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC,
  4883. /* AArch64 TLS LOCAL EXEC relocation. */
  4884. BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12,
  4885. /* AArch64 TLS LOCAL EXEC relocation. */
  4886. BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12,
  4887. /* AArch64 TLS LOCAL EXEC relocation. */
  4888. BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC,
  4889. /* bit[11:1] of byte offset to module TLS base address, encoded in ldst
  4890. instructions. */
  4891. BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
  4892. /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */
  4893. BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
  4894. /* bit[11:2] of byte offset to module TLS base address, encoded in ldst
  4895. instructions. */
  4896. BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
  4897. /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */
  4898. BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
  4899. /* bit[11:3] of byte offset to module TLS base address, encoded in ldst
  4900. instructions. */
  4901. BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
  4902. /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */
  4903. BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
  4904. /* bit[11:0] of byte offset to module TLS base address, encoded in ldst
  4905. instructions. */
  4906. BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
  4907. /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */
  4908. BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC,
  4909. /* AArch64 TLS DESC relocation. */
  4910. BFD_RELOC_AARCH64_TLSDESC_LD_PREL19,
  4911. /* AArch64 TLS DESC relocation. */
  4912. BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21,
  4913. /* AArch64 TLS DESC relocation. */
  4914. BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
  4915. /* AArch64 TLS DESC relocation. */
  4916. BFD_RELOC_AARCH64_TLSDESC_LD64_LO12,
  4917. /* AArch64 TLS DESC relocation. */
  4918. BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
  4919. /* AArch64 TLS DESC relocation. */
  4920. BFD_RELOC_AARCH64_TLSDESC_ADD_LO12,
  4921. /* AArch64 TLS DESC relocation. */
  4922. BFD_RELOC_AARCH64_TLSDESC_OFF_G1,
  4923. /* AArch64 TLS DESC relocation. */
  4924. BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC,
  4925. /* AArch64 TLS DESC relocation. */
  4926. BFD_RELOC_AARCH64_TLSDESC_LDR,
  4927. /* AArch64 TLS DESC relocation. */
  4928. BFD_RELOC_AARCH64_TLSDESC_ADD,
  4929. /* AArch64 TLS DESC relocation. */
  4930. BFD_RELOC_AARCH64_TLSDESC_CALL,
  4931. /* AArch64 TLS relocation. */
  4932. BFD_RELOC_AARCH64_COPY,
  4933. /* AArch64 TLS relocation. */
  4934. BFD_RELOC_AARCH64_GLOB_DAT,
  4935. /* AArch64 TLS relocation. */
  4936. BFD_RELOC_AARCH64_JUMP_SLOT,
  4937. /* AArch64 TLS relocation. */
  4938. BFD_RELOC_AARCH64_RELATIVE,
  4939. /* AArch64 TLS relocation. */
  4940. BFD_RELOC_AARCH64_TLS_DTPMOD,
  4941. /* AArch64 TLS relocation. */
  4942. BFD_RELOC_AARCH64_TLS_DTPREL,
  4943. /* AArch64 TLS relocation. */
  4944. BFD_RELOC_AARCH64_TLS_TPREL,
  4945. /* AArch64 TLS relocation. */
  4946. BFD_RELOC_AARCH64_TLSDESC,
  4947. /* AArch64 support for STT_GNU_IFUNC. */
  4948. BFD_RELOC_AARCH64_IRELATIVE,
  4949. /* AArch64 pseudo relocation code to mark the end of the AArch64
  4950. relocation enumerators that have direct mapping to ELF reloc codes.
  4951. There are a few more enumerators after this one; those are mainly
  4952. used by the AArch64 assembler for the internal fixup or to select
  4953. one of the above enumerators. */
  4954. BFD_RELOC_AARCH64_RELOC_END,
  4955. /* AArch64 pseudo relocation code to be used internally by the AArch64
  4956. assembler and not (currently) written to any object files. */
  4957. BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP,
  4958. /* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
  4959. address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
  4960. BFD_RELOC_AARCH64_LDST_LO12,
  4961. /* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be
  4962. used internally by the AArch64 assembler and not (currently) written to
  4963. any object files. */
  4964. BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12,
  4965. /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */
  4966. BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC,
  4967. /* AArch64 pseudo relocation code for TLS local exec mode. It's to be
  4968. used internally by the AArch64 assembler and not (currently) written to
  4969. any object files. */
  4970. BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12,
  4971. /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */
  4972. BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
  4973. /* AArch64 pseudo relocation code to be used internally by the AArch64
  4974. assembler and not (currently) written to any object files. */
  4975. BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
  4976. /* AArch64 pseudo relocation code to be used internally by the AArch64
  4977. assembler and not (currently) written to any object files. */
  4978. BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC,
  4979. /* AArch64 pseudo relocation code to be used internally by the AArch64
  4980. assembler and not (currently) written to any object files. */
  4981. BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
  4982. /* Tilera TILEPro Relocations. */
  4983. BFD_RELOC_TILEPRO_COPY,
  4984. BFD_RELOC_TILEPRO_GLOB_DAT,
  4985. BFD_RELOC_TILEPRO_JMP_SLOT,
  4986. BFD_RELOC_TILEPRO_RELATIVE,
  4987. BFD_RELOC_TILEPRO_BROFF_X1,
  4988. BFD_RELOC_TILEPRO_JOFFLONG_X1,
  4989. BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT,
  4990. BFD_RELOC_TILEPRO_IMM8_X0,
  4991. BFD_RELOC_TILEPRO_IMM8_Y0,
  4992. BFD_RELOC_TILEPRO_IMM8_X1,
  4993. BFD_RELOC_TILEPRO_IMM8_Y1,
  4994. BFD_RELOC_TILEPRO_DEST_IMM8_X1,
  4995. BFD_RELOC_TILEPRO_MT_IMM15_X1,
  4996. BFD_RELOC_TILEPRO_MF_IMM15_X1,
  4997. BFD_RELOC_TILEPRO_IMM16_X0,
  4998. BFD_RELOC_TILEPRO_IMM16_X1,
  4999. BFD_RELOC_TILEPRO_IMM16_X0_LO,
  5000. BFD_RELOC_TILEPRO_IMM16_X1_LO,
  5001. BFD_RELOC_TILEPRO_IMM16_X0_HI,
  5002. BFD_RELOC_TILEPRO_IMM16_X1_HI,
  5003. BFD_RELOC_TILEPRO_IMM16_X0_HA,
  5004. BFD_RELOC_TILEPRO_IMM16_X1_HA,
  5005. BFD_RELOC_TILEPRO_IMM16_X0_PCREL,
  5006. BFD_RELOC_TILEPRO_IMM16_X1_PCREL,
  5007. BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL,
  5008. BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL,
  5009. BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL,
  5010. BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL,
  5011. BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL,
  5012. BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL,
  5013. BFD_RELOC_TILEPRO_IMM16_X0_GOT,
  5014. BFD_RELOC_TILEPRO_IMM16_X1_GOT,
  5015. BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO,
  5016. BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO,
  5017. BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI,
  5018. BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI,
  5019. BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA,
  5020. BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA,
  5021. BFD_RELOC_TILEPRO_MMSTART_X0,
  5022. BFD_RELOC_TILEPRO_MMEND_X0,
  5023. BFD_RELOC_TILEPRO_MMSTART_X1,
  5024. BFD_RELOC_TILEPRO_MMEND_X1,
  5025. BFD_RELOC_TILEPRO_SHAMT_X0,
  5026. BFD_RELOC_TILEPRO_SHAMT_X1,
  5027. BFD_RELOC_TILEPRO_SHAMT_Y0,
  5028. BFD_RELOC_TILEPRO_SHAMT_Y1,
  5029. BFD_RELOC_TILEPRO_TLS_GD_CALL,
  5030. BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
  5031. BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
  5032. BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
  5033. BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
  5034. BFD_RELOC_TILEPRO_TLS_IE_LOAD,
  5035. BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
  5036. BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
  5037. BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
  5038. BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO,
  5039. BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI,
  5040. BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI,
  5041. BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA,
  5042. BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA,
  5043. BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,
  5044. BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,
  5045. BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO,
  5046. BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO,
  5047. BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI,
  5048. BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI,
  5049. BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA,
  5050. BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA,
  5051. BFD_RELOC_TILEPRO_TLS_DTPMOD32,
  5052. BFD_RELOC_TILEPRO_TLS_DTPOFF32,
  5053. BFD_RELOC_TILEPRO_TLS_TPOFF32,
  5054. BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
  5055. BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
  5056. BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
  5057. BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
  5058. BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
  5059. BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
  5060. BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
  5061. BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
  5062. /* Tilera TILE-Gx Relocations. */
  5063. BFD_RELOC_TILEGX_HW0,
  5064. BFD_RELOC_TILEGX_HW1,
  5065. BFD_RELOC_TILEGX_HW2,
  5066. BFD_RELOC_TILEGX_HW3,
  5067. BFD_RELOC_TILEGX_HW0_LAST,
  5068. BFD_RELOC_TILEGX_HW1_LAST,
  5069. BFD_RELOC_TILEGX_HW2_LAST,
  5070. BFD_RELOC_TILEGX_COPY,
  5071. BFD_RELOC_TILEGX_GLOB_DAT,
  5072. BFD_RELOC_TILEGX_JMP_SLOT,
  5073. BFD_RELOC_TILEGX_RELATIVE,
  5074. BFD_RELOC_TILEGX_BROFF_X1,
  5075. BFD_RELOC_TILEGX_JUMPOFF_X1,
  5076. BFD_RELOC_TILEGX_JUMPOFF_X1_PLT,
  5077. BFD_RELOC_TILEGX_IMM8_X0,
  5078. BFD_RELOC_TILEGX_IMM8_Y0,
  5079. BFD_RELOC_TILEGX_IMM8_X1,
  5080. BFD_RELOC_TILEGX_IMM8_Y1,
  5081. BFD_RELOC_TILEGX_DEST_IMM8_X1,
  5082. BFD_RELOC_TILEGX_MT_IMM14_X1,
  5083. BFD_RELOC_TILEGX_MF_IMM14_X1,
  5084. BFD_RELOC_TILEGX_MMSTART_X0,
  5085. BFD_RELOC_TILEGX_MMEND_X0,
  5086. BFD_RELOC_TILEGX_SHAMT_X0,
  5087. BFD_RELOC_TILEGX_SHAMT_X1,
  5088. BFD_RELOC_TILEGX_SHAMT_Y0,
  5089. BFD_RELOC_TILEGX_SHAMT_Y1,
  5090. BFD_RELOC_TILEGX_IMM16_X0_HW0,
  5091. BFD_RELOC_TILEGX_IMM16_X1_HW0,
  5092. BFD_RELOC_TILEGX_IMM16_X0_HW1,
  5093. BFD_RELOC_TILEGX_IMM16_X1_HW1,
  5094. BFD_RELOC_TILEGX_IMM16_X0_HW2,
  5095. BFD_RELOC_TILEGX_IMM16_X1_HW2,
  5096. BFD_RELOC_TILEGX_IMM16_X0_HW3,
  5097. BFD_RELOC_TILEGX_IMM16_X1_HW3,
  5098. BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST,
  5099. BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST,
  5100. BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST,
  5101. BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST,
  5102. BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST,
  5103. BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST,
  5104. BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL,
  5105. BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL,
  5106. BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL,
  5107. BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL,
  5108. BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL,
  5109. BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL,
  5110. BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL,
  5111. BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL,
  5112. BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL,
  5113. BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL,
  5114. BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL,
  5115. BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL,
  5116. BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL,
  5117. BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL,
  5118. BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT,
  5119. BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT,
  5120. BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
  5121. BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
  5122. BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
  5123. BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
  5124. BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
  5125. BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
  5126. BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT,
  5127. BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT,
  5128. BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT,
  5129. BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT,
  5130. BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
  5131. BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
  5132. BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD,
  5133. BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD,
  5134. BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
  5135. BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
  5136. BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
  5137. BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
  5138. BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
  5139. BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
  5140. BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD,
  5141. BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD,
  5142. BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD,
  5143. BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD,
  5144. BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE,
  5145. BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE,
  5146. BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
  5147. BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
  5148. BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
  5149. BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
  5150. BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
  5151. BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL,
  5152. BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE,
  5153. BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE,
  5154. BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE,
  5155. BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE,
  5156. BFD_RELOC_TILEGX_TLS_DTPMOD64,
  5157. BFD_RELOC_TILEGX_TLS_DTPOFF64,
  5158. BFD_RELOC_TILEGX_TLS_TPOFF64,
  5159. BFD_RELOC_TILEGX_TLS_DTPMOD32,
  5160. BFD_RELOC_TILEGX_TLS_DTPOFF32,
  5161. BFD_RELOC_TILEGX_TLS_TPOFF32,
  5162. BFD_RELOC_TILEGX_TLS_GD_CALL,
  5163. BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
  5164. BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
  5165. BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
  5166. BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD,
  5167. BFD_RELOC_TILEGX_TLS_IE_LOAD,
  5168. BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
  5169. BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
  5170. BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD,
  5171. BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD,
  5172. /* Linux eBPF relocations. */
  5173. BFD_RELOC_BPF_64,
  5174. BFD_RELOC_BPF_32,
  5175. BFD_RELOC_BPF_16,
  5176. BFD_RELOC_BPF_DISP16,
  5177. BFD_RELOC_BPF_DISP32,
  5178. /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */
  5179. BFD_RELOC_EPIPHANY_SIMM8,
  5180. /* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */
  5181. BFD_RELOC_EPIPHANY_SIMM24,
  5182. /* Adapteva EPIPHANY - 16 most-significant bits of absolute address */
  5183. BFD_RELOC_EPIPHANY_HIGH,
  5184. /* Adapteva EPIPHANY - 16 least-significant bits of absolute address */
  5185. BFD_RELOC_EPIPHANY_LOW,
  5186. /* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */
  5187. BFD_RELOC_EPIPHANY_SIMM11,
  5188. /* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */
  5189. BFD_RELOC_EPIPHANY_IMM11,
  5190. /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */
  5191. BFD_RELOC_EPIPHANY_IMM8,
  5192. /* Visium Relocations. */
  5193. BFD_RELOC_VISIUM_HI16,
  5194. BFD_RELOC_VISIUM_LO16,
  5195. BFD_RELOC_VISIUM_IM16,
  5196. BFD_RELOC_VISIUM_REL16,
  5197. BFD_RELOC_VISIUM_HI16_PCREL,
  5198. BFD_RELOC_VISIUM_LO16_PCREL,
  5199. BFD_RELOC_VISIUM_IM16_PCREL,
  5200. /* WebAssembly relocations. */
  5201. BFD_RELOC_WASM32_LEB128,
  5202. BFD_RELOC_WASM32_LEB128_GOT,
  5203. BFD_RELOC_WASM32_LEB128_GOT_CODE,
  5204. BFD_RELOC_WASM32_LEB128_PLT,
  5205. BFD_RELOC_WASM32_PLT_INDEX,
  5206. BFD_RELOC_WASM32_ABS32_CODE,
  5207. BFD_RELOC_WASM32_COPY,
  5208. BFD_RELOC_WASM32_CODE_POINTER,
  5209. BFD_RELOC_WASM32_INDEX,
  5210. BFD_RELOC_WASM32_PLT_SIG,
  5211. /* C-SKY relocations. */
  5212. BFD_RELOC_CKCORE_NONE,
  5213. BFD_RELOC_CKCORE_ADDR32,
  5214. BFD_RELOC_CKCORE_PCREL_IMM8BY4,
  5215. BFD_RELOC_CKCORE_PCREL_IMM11BY2,
  5216. BFD_RELOC_CKCORE_PCREL_IMM4BY2,
  5217. BFD_RELOC_CKCORE_PCREL32,
  5218. BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2,
  5219. BFD_RELOC_CKCORE_GNU_VTINHERIT,
  5220. BFD_RELOC_CKCORE_GNU_VTENTRY,
  5221. BFD_RELOC_CKCORE_RELATIVE,
  5222. BFD_RELOC_CKCORE_COPY,
  5223. BFD_RELOC_CKCORE_GLOB_DAT,
  5224. BFD_RELOC_CKCORE_JUMP_SLOT,
  5225. BFD_RELOC_CKCORE_GOTOFF,
  5226. BFD_RELOC_CKCORE_GOTPC,
  5227. BFD_RELOC_CKCORE_GOT32,
  5228. BFD_RELOC_CKCORE_PLT32,
  5229. BFD_RELOC_CKCORE_ADDRGOT,
  5230. BFD_RELOC_CKCORE_ADDRPLT,
  5231. BFD_RELOC_CKCORE_PCREL_IMM26BY2,
  5232. BFD_RELOC_CKCORE_PCREL_IMM16BY2,
  5233. BFD_RELOC_CKCORE_PCREL_IMM16BY4,
  5234. BFD_RELOC_CKCORE_PCREL_IMM10BY2,
  5235. BFD_RELOC_CKCORE_PCREL_IMM10BY4,
  5236. BFD_RELOC_CKCORE_ADDR_HI16,
  5237. BFD_RELOC_CKCORE_ADDR_LO16,
  5238. BFD_RELOC_CKCORE_GOTPC_HI16,
  5239. BFD_RELOC_CKCORE_GOTPC_LO16,
  5240. BFD_RELOC_CKCORE_GOTOFF_HI16,
  5241. BFD_RELOC_CKCORE_GOTOFF_LO16,
  5242. BFD_RELOC_CKCORE_GOT12,
  5243. BFD_RELOC_CKCORE_GOT_HI16,
  5244. BFD_RELOC_CKCORE_GOT_LO16,
  5245. BFD_RELOC_CKCORE_PLT12,
  5246. BFD_RELOC_CKCORE_PLT_HI16,
  5247. BFD_RELOC_CKCORE_PLT_LO16,
  5248. BFD_RELOC_CKCORE_ADDRGOT_HI16,
  5249. BFD_RELOC_CKCORE_ADDRGOT_LO16,
  5250. BFD_RELOC_CKCORE_ADDRPLT_HI16,
  5251. BFD_RELOC_CKCORE_ADDRPLT_LO16,
  5252. BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2,
  5253. BFD_RELOC_CKCORE_TOFFSET_LO16,
  5254. BFD_RELOC_CKCORE_DOFFSET_LO16,
  5255. BFD_RELOC_CKCORE_PCREL_IMM18BY2,
  5256. BFD_RELOC_CKCORE_DOFFSET_IMM18,
  5257. BFD_RELOC_CKCORE_DOFFSET_IMM18BY2,
  5258. BFD_RELOC_CKCORE_DOFFSET_IMM18BY4,
  5259. BFD_RELOC_CKCORE_GOTOFF_IMM18,
  5260. BFD_RELOC_CKCORE_GOT_IMM18BY4,
  5261. BFD_RELOC_CKCORE_PLT_IMM18BY4,
  5262. BFD_RELOC_CKCORE_PCREL_IMM7BY4,
  5263. BFD_RELOC_CKCORE_TLS_LE32,
  5264. BFD_RELOC_CKCORE_TLS_IE32,
  5265. BFD_RELOC_CKCORE_TLS_GD32,
  5266. BFD_RELOC_CKCORE_TLS_LDM32,
  5267. BFD_RELOC_CKCORE_TLS_LDO32,
  5268. BFD_RELOC_CKCORE_TLS_DTPMOD32,
  5269. BFD_RELOC_CKCORE_TLS_DTPOFF32,
  5270. BFD_RELOC_CKCORE_TLS_TPOFF32,
  5271. BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4,
  5272. BFD_RELOC_CKCORE_NOJSRI,
  5273. BFD_RELOC_CKCORE_CALLGRAPH,
  5274. BFD_RELOC_CKCORE_IRELATIVE,
  5275. BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4,
  5276. BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4,
  5277. /* S12Z relocations. */
  5278. BFD_RELOC_S12Z_OPR,
  5279. /* LARCH relocations. */
  5280. BFD_RELOC_LARCH_TLS_DTPMOD32,
  5281. BFD_RELOC_LARCH_TLS_DTPREL32,
  5282. BFD_RELOC_LARCH_TLS_DTPMOD64,
  5283. BFD_RELOC_LARCH_TLS_DTPREL64,
  5284. BFD_RELOC_LARCH_TLS_TPREL32,
  5285. BFD_RELOC_LARCH_TLS_TPREL64,
  5286. BFD_RELOC_LARCH_MARK_LA,
  5287. BFD_RELOC_LARCH_MARK_PCREL,
  5288. BFD_RELOC_LARCH_SOP_PUSH_PCREL,
  5289. BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE,
  5290. BFD_RELOC_LARCH_SOP_PUSH_DUP,
  5291. BFD_RELOC_LARCH_SOP_PUSH_GPREL,
  5292. BFD_RELOC_LARCH_SOP_PUSH_TLS_TPREL,
  5293. BFD_RELOC_LARCH_SOP_PUSH_TLS_GOT,
  5294. BFD_RELOC_LARCH_SOP_PUSH_TLS_GD,
  5295. BFD_RELOC_LARCH_SOP_PUSH_PLT_PCREL,
  5296. BFD_RELOC_LARCH_SOP_ASSERT,
  5297. BFD_RELOC_LARCH_SOP_NOT,
  5298. BFD_RELOC_LARCH_SOP_SUB,
  5299. BFD_RELOC_LARCH_SOP_SL,
  5300. BFD_RELOC_LARCH_SOP_SR,
  5301. BFD_RELOC_LARCH_SOP_ADD,
  5302. BFD_RELOC_LARCH_SOP_AND,
  5303. BFD_RELOC_LARCH_SOP_IF_ELSE,
  5304. BFD_RELOC_LARCH_SOP_POP_32_S_10_5,
  5305. BFD_RELOC_LARCH_SOP_POP_32_U_10_12,
  5306. BFD_RELOC_LARCH_SOP_POP_32_S_10_12,
  5307. BFD_RELOC_LARCH_SOP_POP_32_S_10_16,
  5308. BFD_RELOC_LARCH_SOP_POP_32_S_10_16_S2,
  5309. BFD_RELOC_LARCH_SOP_POP_32_S_5_20,
  5310. BFD_RELOC_LARCH_SOP_POP_32_S_0_5_10_16_S2,
  5311. BFD_RELOC_LARCH_SOP_POP_32_S_0_10_10_16_S2,
  5312. BFD_RELOC_LARCH_SOP_POP_32_U,
  5313. BFD_RELOC_LARCH_ADD8,
  5314. BFD_RELOC_LARCH_ADD16,
  5315. BFD_RELOC_LARCH_ADD24,
  5316. BFD_RELOC_LARCH_ADD32,
  5317. BFD_RELOC_LARCH_ADD64,
  5318. BFD_RELOC_LARCH_SUB8,
  5319. BFD_RELOC_LARCH_SUB16,
  5320. BFD_RELOC_LARCH_SUB24,
  5321. BFD_RELOC_LARCH_SUB32,
  5322. BFD_RELOC_LARCH_SUB64,
  5323. BFD_RELOC_UNUSED };
  5324. typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
  5325. reloc_howto_type *bfd_reloc_type_lookup
  5326. (bfd *abfd, bfd_reloc_code_real_type code);
  5327. reloc_howto_type *bfd_reloc_name_lookup
  5328. (bfd *abfd, const char *reloc_name);
  5329. const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
  5330. /* Extracted from syms.c. */
  5331. typedef struct bfd_symbol
  5332. {
  5333. /* A pointer to the BFD which owns the symbol. This information
  5334. is necessary so that a back end can work out what additional
  5335. information (invisible to the application writer) is carried
  5336. with the symbol.
  5337. This field is *almost* redundant, since you can use section->owner
  5338. instead, except that some symbols point to the global sections
  5339. bfd_{abs,com,und}_section. This could be fixed by making
  5340. these globals be per-bfd (or per-target-flavor). FIXME. */
  5341. struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
  5342. /* The text of the symbol. The name is left alone, and not copied; the
  5343. application may not alter it. */
  5344. const char *name;
  5345. /* The value of the symbol. This really should be a union of a
  5346. numeric value with a pointer, since some flags indicate that
  5347. a pointer to another symbol is stored here. */
  5348. symvalue value;
  5349. /* Attributes of a symbol. */
  5350. #define BSF_NO_FLAGS 0
  5351. /* The symbol has local scope; <<static>> in <<C>>. The value
  5352. is the offset into the section of the data. */
  5353. #define BSF_LOCAL (1 << 0)
  5354. /* The symbol has global scope; initialized data in <<C>>. The
  5355. value is the offset into the section of the data. */
  5356. #define BSF_GLOBAL (1 << 1)
  5357. /* The symbol has global scope and is exported. The value is
  5358. the offset into the section of the data. */
  5359. #define BSF_EXPORT BSF_GLOBAL /* No real difference. */
  5360. /* A normal C symbol would be one of:
  5361. <<BSF_LOCAL>>, <<BSF_UNDEFINED>> or <<BSF_GLOBAL>>. */
  5362. /* The symbol is a debugging record. The value has an arbitrary
  5363. meaning, unless BSF_DEBUGGING_RELOC is also set. */
  5364. #define BSF_DEBUGGING (1 << 2)
  5365. /* The symbol denotes a function entry point. Used in ELF,
  5366. perhaps others someday. */
  5367. #define BSF_FUNCTION (1 << 3)
  5368. /* Used by the linker. */
  5369. #define BSF_KEEP (1 << 5)
  5370. /* An ELF common symbol. */
  5371. #define BSF_ELF_COMMON (1 << 6)
  5372. /* A weak global symbol, overridable without warnings by
  5373. a regular global symbol of the same name. */
  5374. #define BSF_WEAK (1 << 7)
  5375. /* This symbol was created to point to a section, e.g. ELF's
  5376. STT_SECTION symbols. */
  5377. #define BSF_SECTION_SYM (1 << 8)
  5378. /* The symbol used to be a common symbol, but now it is
  5379. allocated. */
  5380. #define BSF_OLD_COMMON (1 << 9)
  5381. /* In some files the type of a symbol sometimes alters its
  5382. location in an output file - ie in coff a <<ISFCN>> symbol
  5383. which is also <<C_EXT>> symbol appears where it was
  5384. declared and not at the end of a section. This bit is set
  5385. by the target BFD part to convey this information. */
  5386. #define BSF_NOT_AT_END (1 << 10)
  5387. /* Signal that the symbol is the label of constructor section. */
  5388. #define BSF_CONSTRUCTOR (1 << 11)
  5389. /* Signal that the symbol is a warning symbol. The name is a
  5390. warning. The name of the next symbol is the one to warn about;
  5391. if a reference is made to a symbol with the same name as the next
  5392. symbol, a warning is issued by the linker. */
  5393. #define BSF_WARNING (1 << 12)
  5394. /* Signal that the symbol is indirect. This symbol is an indirect
  5395. pointer to the symbol with the same name as the next symbol. */
  5396. #define BSF_INDIRECT (1 << 13)
  5397. /* BSF_FILE marks symbols that contain a file name. This is used
  5398. for ELF STT_FILE symbols. */
  5399. #define BSF_FILE (1 << 14)
  5400. /* Symbol is from dynamic linking information. */
  5401. #define BSF_DYNAMIC (1 << 15)
  5402. /* The symbol denotes a data object. Used in ELF, and perhaps
  5403. others someday. */
  5404. #define BSF_OBJECT (1 << 16)
  5405. /* This symbol is a debugging symbol. The value is the offset
  5406. into the section of the data. BSF_DEBUGGING should be set
  5407. as well. */
  5408. #define BSF_DEBUGGING_RELOC (1 << 17)
  5409. /* This symbol is thread local. Used in ELF. */
  5410. #define BSF_THREAD_LOCAL (1 << 18)
  5411. /* This symbol represents a complex relocation expression,
  5412. with the expression tree serialized in the symbol name. */
  5413. #define BSF_RELC (1 << 19)
  5414. /* This symbol represents a signed complex relocation expression,
  5415. with the expression tree serialized in the symbol name. */
  5416. #define BSF_SRELC (1 << 20)
  5417. /* This symbol was created by bfd_get_synthetic_symtab. */
  5418. #define BSF_SYNTHETIC (1 << 21)
  5419. /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT.
  5420. The dynamic linker will compute the value of this symbol by
  5421. calling the function that it points to. BSF_FUNCTION must
  5422. also be also set. */
  5423. #define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
  5424. /* This symbol is a globally unique data object. The dynamic linker
  5425. will make sure that in the entire process there is just one symbol
  5426. with this name and type in use. BSF_OBJECT must also be set. */
  5427. #define BSF_GNU_UNIQUE (1 << 23)
  5428. /* This section symbol should be included in the symbol table. */
  5429. #define BSF_SECTION_SYM_USED (1 << 24)
  5430. flagword flags;
  5431. /* A pointer to the section to which this symbol is
  5432. relative. This will always be non NULL, there are special
  5433. sections for undefined and absolute symbols. */
  5434. struct bfd_section *section;
  5435. /* Back end special data. */
  5436. union
  5437. {
  5438. void *p;
  5439. bfd_vma i;
  5440. }
  5441. udata;
  5442. }
  5443. asymbol;
  5444. #define bfd_get_symtab_upper_bound(abfd) \
  5445. BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
  5446. bool bfd_is_local_label (bfd *abfd, asymbol *sym);
  5447. bool bfd_is_local_label_name (bfd *abfd, const char *name);
  5448. #define bfd_is_local_label_name(abfd, name) \
  5449. BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
  5450. bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
  5451. #define bfd_is_target_special_symbol(abfd, sym) \
  5452. BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
  5453. #define bfd_canonicalize_symtab(abfd, location) \
  5454. BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
  5455. bool bfd_set_symtab
  5456. (bfd *abfd, asymbol **location, unsigned int count);
  5457. void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
  5458. #define bfd_make_empty_symbol(abfd) \
  5459. BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
  5460. asymbol *_bfd_generic_make_empty_symbol (bfd *);
  5461. #define bfd_make_debug_symbol(abfd,ptr,size) \
  5462. BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
  5463. int bfd_decode_symclass (asymbol *symbol);
  5464. bool bfd_is_undefined_symclass (int symclass);
  5465. void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
  5466. bool bfd_copy_private_symbol_data
  5467. (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
  5468. #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
  5469. BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
  5470. (ibfd, isymbol, obfd, osymbol))
  5471. /* Extracted from bfd.c. */
  5472. enum bfd_direction
  5473. {
  5474. no_direction = 0,
  5475. read_direction = 1,
  5476. write_direction = 2,
  5477. both_direction = 3
  5478. };
  5479. enum bfd_plugin_format
  5480. {
  5481. bfd_plugin_unknown = 0,
  5482. bfd_plugin_yes = 1,
  5483. bfd_plugin_no = 2
  5484. };
  5485. struct bfd_build_id
  5486. {
  5487. bfd_size_type size;
  5488. bfd_byte data[1];
  5489. };
  5490. struct bfd
  5491. {
  5492. /* The filename the application opened the BFD with. */
  5493. const char *filename;
  5494. /* A pointer to the target jump table. */
  5495. const struct bfd_target *xvec;
  5496. /* The IOSTREAM, and corresponding IO vector that provide access
  5497. to the file backing the BFD. */
  5498. void *iostream;
  5499. const struct bfd_iovec *iovec;
  5500. /* The caching routines use these to maintain a
  5501. least-recently-used list of BFDs. */
  5502. struct bfd *lru_prev, *lru_next;
  5503. /* Track current file position (or current buffer offset for
  5504. in-memory BFDs). When a file is closed by the caching routines,
  5505. BFD retains state information on the file here. */
  5506. ufile_ptr where;
  5507. /* File modified time, if mtime_set is TRUE. */
  5508. long mtime;
  5509. /* A unique identifier of the BFD */
  5510. unsigned int id;
  5511. /* Format_specific flags. */
  5512. flagword flags;
  5513. /* Values that may appear in the flags field of a BFD. These also
  5514. appear in the object_flags field of the bfd_target structure, where
  5515. they indicate the set of flags used by that backend (not all flags
  5516. are meaningful for all object file formats) (FIXME: at the moment,
  5517. the object_flags values have mostly just been copied from backend
  5518. to another, and are not necessarily correct). */
  5519. #define BFD_NO_FLAGS 0x0
  5520. /* BFD contains relocation entries. */
  5521. #define HAS_RELOC 0x1
  5522. /* BFD is directly executable. */
  5523. #define EXEC_P 0x2
  5524. /* BFD has line number information (basically used for F_LNNO in a
  5525. COFF header). */
  5526. #define HAS_LINENO 0x4
  5527. /* BFD has debugging information. */
  5528. #define HAS_DEBUG 0x08
  5529. /* BFD has symbols. */
  5530. #define HAS_SYMS 0x10
  5531. /* BFD has local symbols (basically used for F_LSYMS in a COFF
  5532. header). */
  5533. #define HAS_LOCALS 0x20
  5534. /* BFD is a dynamic object. */
  5535. #define DYNAMIC 0x40
  5536. /* Text section is write protected (if D_PAGED is not set, this is
  5537. like an a.out NMAGIC file) (the linker sets this by default, but
  5538. clears it for -r or -N). */
  5539. #define WP_TEXT 0x80
  5540. /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
  5541. linker sets this by default, but clears it for -r or -n or -N). */
  5542. #define D_PAGED 0x100
  5543. /* BFD is relaxable (this means that bfd_relax_section may be able to
  5544. do something) (sometimes bfd_relax_section can do something even if
  5545. this is not set). */
  5546. #define BFD_IS_RELAXABLE 0x200
  5547. /* This may be set before writing out a BFD to request using a
  5548. traditional format. For example, this is used to request that when
  5549. writing out an a.out object the symbols not be hashed to eliminate
  5550. duplicates. */
  5551. #define BFD_TRADITIONAL_FORMAT 0x400
  5552. /* This flag indicates that the BFD contents are actually cached
  5553. in memory. If this is set, iostream points to a bfd_in_memory
  5554. struct. */
  5555. #define BFD_IN_MEMORY 0x800
  5556. /* This BFD has been created by the linker and doesn't correspond
  5557. to any input file. */
  5558. #define BFD_LINKER_CREATED 0x1000
  5559. /* This may be set before writing out a BFD to request that it
  5560. be written using values for UIDs, GIDs, timestamps, etc. that
  5561. will be consistent from run to run. */
  5562. #define BFD_DETERMINISTIC_OUTPUT 0x2000
  5563. /* Compress sections in this BFD. */
  5564. #define BFD_COMPRESS 0x4000
  5565. /* Decompress sections in this BFD. */
  5566. #define BFD_DECOMPRESS 0x8000
  5567. /* BFD is a dummy, for plugins. */
  5568. #define BFD_PLUGIN 0x10000
  5569. /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */
  5570. #define BFD_COMPRESS_GABI 0x20000
  5571. /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
  5572. BFD. */
  5573. #define BFD_CONVERT_ELF_COMMON 0x40000
  5574. /* Use the ELF STT_COMMON type in this BFD. */
  5575. #define BFD_USE_ELF_STT_COMMON 0x80000
  5576. /* Put pathnames into archives (non-POSIX). */
  5577. #define BFD_ARCHIVE_FULL_PATH 0x100000
  5578. /* Flags bits to be saved in bfd_preserve_save. */
  5579. #define BFD_FLAGS_SAVED \
  5580. (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
  5581. | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
  5582. | BFD_USE_ELF_STT_COMMON)
  5583. /* Flags bits which are for BFD use only. */
  5584. #define BFD_FLAGS_FOR_BFD_USE_MASK \
  5585. (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
  5586. | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
  5587. | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
  5588. /* The format which belongs to the BFD. (object, core, etc.) */
  5589. ENUM_BITFIELD (bfd_format) format : 3;
  5590. /* The direction with which the BFD was opened. */
  5591. ENUM_BITFIELD (bfd_direction) direction : 2;
  5592. /* Is the file descriptor being cached? That is, can it be closed as
  5593. needed, and re-opened when accessed later? */
  5594. unsigned int cacheable : 1;
  5595. /* Marks whether there was a default target specified when the
  5596. BFD was opened. This is used to select which matching algorithm
  5597. to use to choose the back end. */
  5598. unsigned int target_defaulted : 1;
  5599. /* ... and here: (``once'' means at least once). */
  5600. unsigned int opened_once : 1;
  5601. /* Set if we have a locally maintained mtime value, rather than
  5602. getting it from the file each time. */
  5603. unsigned int mtime_set : 1;
  5604. /* Flag set if symbols from this BFD should not be exported. */
  5605. unsigned int no_export : 1;
  5606. /* Remember when output has begun, to stop strange things
  5607. from happening. */
  5608. unsigned int output_has_begun : 1;
  5609. /* Have archive map. */
  5610. unsigned int has_armap : 1;
  5611. /* Set if this is a thin archive. */
  5612. unsigned int is_thin_archive : 1;
  5613. /* Set if this archive should not cache element positions. */
  5614. unsigned int no_element_cache : 1;
  5615. /* Set if only required symbols should be added in the link hash table for
  5616. this object. Used by VMS linkers. */
  5617. unsigned int selective_search : 1;
  5618. /* Set if this is the linker output BFD. */
  5619. unsigned int is_linker_output : 1;
  5620. /* Set if this is the linker input BFD. */
  5621. unsigned int is_linker_input : 1;
  5622. /* If this is an input for a compiler plug-in library. */
  5623. ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
  5624. /* Set if this is a plugin output file. */
  5625. unsigned int lto_output : 1;
  5626. /* Set if this is a slim LTO object not loaded with a compiler plugin. */
  5627. unsigned int lto_slim_object : 1;
  5628. /* Do not attempt to modify this file. Set when detecting errors
  5629. that BFD is not prepared to handle for objcopy/strip. */
  5630. unsigned int read_only : 1;
  5631. /* Set to dummy BFD created when claimed by a compiler plug-in
  5632. library. */
  5633. bfd *plugin_dummy_bfd;
  5634. /* The offset of this bfd in the file, typically 0 if it is not
  5635. contained in an archive. */
  5636. ufile_ptr origin;
  5637. /* The origin in the archive of the proxy entry. This will
  5638. normally be the same as origin, except for thin archives,
  5639. when it will contain the current offset of the proxy in the
  5640. thin archive rather than the offset of the bfd in its actual
  5641. container. */
  5642. ufile_ptr proxy_origin;
  5643. /* A hash table for section names. */
  5644. struct bfd_hash_table section_htab;
  5645. /* Pointer to linked list of sections. */
  5646. struct bfd_section *sections;
  5647. /* The last section on the section list. */
  5648. struct bfd_section *section_last;
  5649. /* The number of sections. */
  5650. unsigned int section_count;
  5651. /* The archive plugin file descriptor. */
  5652. int archive_plugin_fd;
  5653. /* The number of opens on the archive plugin file descriptor. */
  5654. unsigned int archive_plugin_fd_open_count;
  5655. /* A field used by _bfd_generic_link_add_archive_symbols. This will
  5656. be used only for archive elements. */
  5657. int archive_pass;
  5658. /* The total size of memory from bfd_alloc. */
  5659. bfd_size_type alloc_size;
  5660. /* Stuff only useful for object files:
  5661. The start address. */
  5662. bfd_vma start_address;
  5663. /* Symbol table for output BFD (with symcount entries).
  5664. Also used by the linker to cache input BFD symbols. */
  5665. struct bfd_symbol **outsymbols;
  5666. /* Used for input and output. */
  5667. unsigned int symcount;
  5668. /* Used for slurped dynamic symbol tables. */
  5669. unsigned int dynsymcount;
  5670. /* Pointer to structure which contains architecture information. */
  5671. const struct bfd_arch_info *arch_info;
  5672. /* Cached length of file for bfd_get_size. 0 until bfd_get_size is
  5673. called, 1 if stat returns an error or the file size is too large to
  5674. return in ufile_ptr. Both 0 and 1 should be treated as "unknown". */
  5675. ufile_ptr size;
  5676. /* Stuff only useful for archives. */
  5677. void *arelt_data;
  5678. struct bfd *my_archive; /* The containing archive BFD. */
  5679. struct bfd *archive_next; /* The next BFD in the archive. */
  5680. struct bfd *archive_head; /* The first BFD in the archive. */
  5681. struct bfd *nested_archives; /* List of nested archive in a flattened
  5682. thin archive. */
  5683. union {
  5684. /* For input BFDs, a chain of BFDs involved in a link. */
  5685. struct bfd *next;
  5686. /* For output BFD, the linker hash table. */
  5687. struct bfd_link_hash_table *hash;
  5688. } link;
  5689. /* Used by the back end to hold private data. */
  5690. union
  5691. {
  5692. struct aout_data_struct *aout_data;
  5693. struct artdata *aout_ar_data;
  5694. struct coff_tdata *coff_obj_data;
  5695. struct pe_tdata *pe_obj_data;
  5696. struct xcoff_tdata *xcoff_obj_data;
  5697. struct ecoff_tdata *ecoff_obj_data;
  5698. struct srec_data_struct *srec_data;
  5699. struct verilog_data_struct *verilog_data;
  5700. struct ihex_data_struct *ihex_data;
  5701. struct tekhex_data_struct *tekhex_data;
  5702. struct elf_obj_tdata *elf_obj_data;
  5703. struct mmo_data_struct *mmo_data;
  5704. struct sun_core_struct *sun_core_data;
  5705. struct sco5_core_struct *sco5_core_data;
  5706. struct trad_core_struct *trad_core_data;
  5707. struct som_data_struct *som_data;
  5708. struct hpux_core_struct *hpux_core_data;
  5709. struct hppabsd_core_struct *hppabsd_core_data;
  5710. struct sgi_core_struct *sgi_core_data;
  5711. struct lynx_core_struct *lynx_core_data;
  5712. struct osf_core_struct *osf_core_data;
  5713. struct cisco_core_struct *cisco_core_data;
  5714. struct versados_data_struct *versados_data;
  5715. struct netbsd_core_struct *netbsd_core_data;
  5716. struct mach_o_data_struct *mach_o_data;
  5717. struct mach_o_fat_data_struct *mach_o_fat_data;
  5718. struct plugin_data_struct *plugin_data;
  5719. struct bfd_pef_data_struct *pef_data;
  5720. struct bfd_pef_xlib_data_struct *pef_xlib_data;
  5721. struct bfd_sym_data_struct *sym_data;
  5722. void *any;
  5723. }
  5724. tdata;
  5725. /* Used by the application to hold private data. */
  5726. void *usrdata;
  5727. /* Where all the allocated stuff under this BFD goes. This is a
  5728. struct objalloc *, but we use void * to avoid requiring the inclusion
  5729. of objalloc.h. */
  5730. void *memory;
  5731. /* For input BFDs, the build ID, if the object has one. */
  5732. const struct bfd_build_id *build_id;
  5733. };
  5734. static inline const char *
  5735. bfd_get_filename (const bfd *abfd)
  5736. {
  5737. return abfd->filename;
  5738. }
  5739. static inline bool
  5740. bfd_get_cacheable (const bfd *abfd)
  5741. {
  5742. return abfd->cacheable;
  5743. }
  5744. static inline enum bfd_format
  5745. bfd_get_format (const bfd *abfd)
  5746. {
  5747. return abfd->format;
  5748. }
  5749. static inline flagword
  5750. bfd_get_file_flags (const bfd *abfd)
  5751. {
  5752. return abfd->flags;
  5753. }
  5754. static inline bfd_vma
  5755. bfd_get_start_address (const bfd *abfd)
  5756. {
  5757. return abfd->start_address;
  5758. }
  5759. static inline unsigned int
  5760. bfd_get_symcount (const bfd *abfd)
  5761. {
  5762. return abfd->symcount;
  5763. }
  5764. static inline unsigned int
  5765. bfd_get_dynamic_symcount (const bfd *abfd)
  5766. {
  5767. return abfd->dynsymcount;
  5768. }
  5769. static inline struct bfd_symbol **
  5770. bfd_get_outsymbols (const bfd *abfd)
  5771. {
  5772. return abfd->outsymbols;
  5773. }
  5774. static inline unsigned int
  5775. bfd_count_sections (const bfd *abfd)
  5776. {
  5777. return abfd->section_count;
  5778. }
  5779. static inline bool
  5780. bfd_has_map (const bfd *abfd)
  5781. {
  5782. return abfd->has_armap;
  5783. }
  5784. static inline bool
  5785. bfd_is_thin_archive (const bfd *abfd)
  5786. {
  5787. return abfd->is_thin_archive;
  5788. }
  5789. static inline void *
  5790. bfd_usrdata (const bfd *abfd)
  5791. {
  5792. return abfd->usrdata;
  5793. }
  5794. /* See note beside bfd_set_section_userdata. */
  5795. static inline bool
  5796. bfd_set_cacheable (bfd * abfd, bool val)
  5797. {
  5798. abfd->cacheable = val;
  5799. return true;
  5800. }
  5801. static inline void
  5802. bfd_set_thin_archive (bfd *abfd, bool val)
  5803. {
  5804. abfd->is_thin_archive = val;
  5805. }
  5806. static inline void
  5807. bfd_set_usrdata (bfd *abfd, void *val)
  5808. {
  5809. abfd->usrdata = val;
  5810. }
  5811. static inline asection *
  5812. bfd_asymbol_section (const asymbol *sy)
  5813. {
  5814. return sy->section;
  5815. }
  5816. static inline bfd_vma
  5817. bfd_asymbol_value (const asymbol *sy)
  5818. {
  5819. return sy->section->vma + sy->value;
  5820. }
  5821. static inline const char *
  5822. bfd_asymbol_name (const asymbol *sy)
  5823. {
  5824. return sy->name;
  5825. }
  5826. static inline struct bfd *
  5827. bfd_asymbol_bfd (const asymbol *sy)
  5828. {
  5829. return sy->the_bfd;
  5830. }
  5831. static inline void
  5832. bfd_set_asymbol_name (asymbol *sy, const char *name)
  5833. {
  5834. sy->name = name;
  5835. }
  5836. static inline bfd_size_type
  5837. bfd_get_section_limit_octets (const bfd *abfd, const asection *sec)
  5838. {
  5839. if (abfd->direction != write_direction && sec->rawsize != 0)
  5840. return sec->rawsize;
  5841. return sec->size;
  5842. }
  5843. /* Find the address one past the end of SEC. */
  5844. static inline bfd_size_type
  5845. bfd_get_section_limit (const bfd *abfd, const asection *sec)
  5846. {
  5847. return (bfd_get_section_limit_octets (abfd, sec)
  5848. / bfd_octets_per_byte (abfd, sec));
  5849. }
  5850. /* Functions to handle insertion and deletion of a bfd's sections. These
  5851. only handle the list pointers, ie. do not adjust section_count,
  5852. target_index etc. */
  5853. static inline void
  5854. bfd_section_list_remove (bfd *abfd, asection *s)
  5855. {
  5856. asection *next = s->next;
  5857. asection *prev = s->prev;
  5858. if (prev)
  5859. prev->next = next;
  5860. else
  5861. abfd->sections = next;
  5862. if (next)
  5863. next->prev = prev;
  5864. else
  5865. abfd->section_last = prev;
  5866. }
  5867. static inline void
  5868. bfd_section_list_append (bfd *abfd, asection *s)
  5869. {
  5870. s->next = 0;
  5871. if (abfd->section_last)
  5872. {
  5873. s->prev = abfd->section_last;
  5874. abfd->section_last->next = s;
  5875. }
  5876. else
  5877. {
  5878. s->prev = 0;
  5879. abfd->sections = s;
  5880. }
  5881. abfd->section_last = s;
  5882. }
  5883. static inline void
  5884. bfd_section_list_prepend (bfd *abfd, asection *s)
  5885. {
  5886. s->prev = 0;
  5887. if (abfd->sections)
  5888. {
  5889. s->next = abfd->sections;
  5890. abfd->sections->prev = s;
  5891. }
  5892. else
  5893. {
  5894. s->next = 0;
  5895. abfd->section_last = s;
  5896. }
  5897. abfd->sections = s;
  5898. }
  5899. static inline void
  5900. bfd_section_list_insert_after (bfd *abfd, asection *a, asection *s)
  5901. {
  5902. asection *next = a->next;
  5903. s->next = next;
  5904. s->prev = a;
  5905. a->next = s;
  5906. if (next)
  5907. next->prev = s;
  5908. else
  5909. abfd->section_last = s;
  5910. }
  5911. static inline void
  5912. bfd_section_list_insert_before (bfd *abfd, asection *b, asection *s)
  5913. {
  5914. asection *prev = b->prev;
  5915. s->prev = prev;
  5916. s->next = b;
  5917. b->prev = s;
  5918. if (prev)
  5919. prev->next = s;
  5920. else
  5921. abfd->sections = s;
  5922. }
  5923. static inline bool
  5924. bfd_section_removed_from_list (const bfd *abfd, const asection *s)
  5925. {
  5926. return s->next ? s->next->prev != s : abfd->section_last != s;
  5927. }
  5928. typedef enum bfd_error
  5929. {
  5930. bfd_error_no_error = 0,
  5931. bfd_error_system_call,
  5932. bfd_error_invalid_target,
  5933. bfd_error_wrong_format,
  5934. bfd_error_wrong_object_format,
  5935. bfd_error_invalid_operation,
  5936. bfd_error_no_memory,
  5937. bfd_error_no_symbols,
  5938. bfd_error_no_armap,
  5939. bfd_error_no_more_archived_files,
  5940. bfd_error_malformed_archive,
  5941. bfd_error_missing_dso,
  5942. bfd_error_file_not_recognized,
  5943. bfd_error_file_ambiguously_recognized,
  5944. bfd_error_no_contents,
  5945. bfd_error_nonrepresentable_section,
  5946. bfd_error_no_debug_section,
  5947. bfd_error_bad_value,
  5948. bfd_error_file_truncated,
  5949. bfd_error_file_too_big,
  5950. bfd_error_sorry,
  5951. bfd_error_on_input,
  5952. bfd_error_invalid_error_code
  5953. }
  5954. bfd_error_type;
  5955. bfd_error_type bfd_get_error (void);
  5956. void bfd_set_error (bfd_error_type error_tag);
  5957. void bfd_set_input_error (bfd *input, bfd_error_type error_tag);
  5958. const char *bfd_errmsg (bfd_error_type error_tag);
  5959. void bfd_perror (const char *message);
  5960. typedef void (*bfd_error_handler_type) (const char *, va_list);
  5961. void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
  5962. bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
  5963. void bfd_set_error_program_name (const char *);
  5964. typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
  5965. const char *bfd_version,
  5966. const char *bfd_file,
  5967. int bfd_line);
  5968. bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
  5969. long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
  5970. long bfd_canonicalize_reloc
  5971. (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
  5972. void bfd_set_reloc
  5973. (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
  5974. #define bfd_set_reloc(abfd, asect, location, count) \
  5975. BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
  5976. bool bfd_set_file_flags (bfd *abfd, flagword flags);
  5977. int bfd_get_arch_size (bfd *abfd);
  5978. int bfd_get_sign_extend_vma (bfd *abfd);
  5979. bool bfd_set_start_address (bfd *abfd, bfd_vma vma);
  5980. unsigned int bfd_get_gp_size (bfd *abfd);
  5981. void bfd_set_gp_size (bfd *abfd, unsigned int i);
  5982. void bfd_set_gp_value (bfd *abfd, bfd_vma v);
  5983. bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
  5984. bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
  5985. #define bfd_copy_private_header_data(ibfd, obfd) \
  5986. BFD_SEND (obfd, _bfd_copy_private_header_data, \
  5987. (ibfd, obfd))
  5988. bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
  5989. #define bfd_copy_private_bfd_data(ibfd, obfd) \
  5990. BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
  5991. (ibfd, obfd))
  5992. bool bfd_set_private_flags (bfd *abfd, flagword flags);
  5993. #define bfd_set_private_flags(abfd, flags) \
  5994. BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
  5995. #define bfd_sizeof_headers(abfd, info) \
  5996. BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
  5997. #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
  5998. BFD_SEND (abfd, _bfd_find_nearest_line, \
  5999. (abfd, syms, sec, off, file, func, line, NULL))
  6000. #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
  6001. line, disc) \
  6002. BFD_SEND (abfd, _bfd_find_nearest_line, \
  6003. (abfd, syms, sec, off, file, func, line, disc))
  6004. #define bfd_find_line(abfd, syms, sym, file, line) \
  6005. BFD_SEND (abfd, _bfd_find_line, \
  6006. (abfd, syms, sym, file, line))
  6007. #define bfd_find_inliner_info(abfd, file, func, line) \
  6008. BFD_SEND (abfd, _bfd_find_inliner_info, \
  6009. (abfd, file, func, line))
  6010. #define bfd_debug_info_start(abfd) \
  6011. BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
  6012. #define bfd_debug_info_end(abfd) \
  6013. BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
  6014. #define bfd_debug_info_accumulate(abfd, section) \
  6015. BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
  6016. #define bfd_stat_arch_elt(abfd, stat) \
  6017. BFD_SEND (abfd->my_archive ? abfd->my_archive : abfd, \
  6018. _bfd_stat_arch_elt, (abfd, stat))
  6019. #define bfd_update_armap_timestamp(abfd) \
  6020. BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
  6021. #define bfd_set_arch_mach(abfd, arch, mach)\
  6022. BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
  6023. #define bfd_relax_section(abfd, section, link_info, again) \
  6024. BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
  6025. #define bfd_gc_sections(abfd, link_info) \
  6026. BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
  6027. #define bfd_lookup_section_flags(link_info, flag_info, section) \
  6028. BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
  6029. #define bfd_merge_sections(abfd, link_info) \
  6030. BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
  6031. #define bfd_is_group_section(abfd, sec) \
  6032. BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
  6033. #define bfd_group_name(abfd, sec) \
  6034. BFD_SEND (abfd, _bfd_group_name, (abfd, sec))
  6035. #define bfd_discard_group(abfd, sec) \
  6036. BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
  6037. #define bfd_link_hash_table_create(abfd) \
  6038. BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
  6039. #define bfd_link_add_symbols(abfd, info) \
  6040. BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
  6041. #define bfd_link_just_syms(abfd, sec, info) \
  6042. BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
  6043. #define bfd_final_link(abfd, info) \
  6044. BFD_SEND (abfd, _bfd_final_link, (abfd, info))
  6045. #define bfd_free_cached_info(abfd) \
  6046. BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
  6047. #define bfd_get_dynamic_symtab_upper_bound(abfd) \
  6048. BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
  6049. #define bfd_print_private_bfd_data(abfd, file)\
  6050. BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
  6051. #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
  6052. BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
  6053. #define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
  6054. BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
  6055. dyncount, dynsyms, ret))
  6056. #define bfd_get_dynamic_reloc_upper_bound(abfd) \
  6057. BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
  6058. #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
  6059. BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
  6060. extern bfd_byte *bfd_get_relocated_section_contents
  6061. (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
  6062. bool, asymbol **);
  6063. bool bfd_alt_mach_code (bfd *abfd, int alternative);
  6064. bfd_vma bfd_emul_get_maxpagesize (const char *);
  6065. bfd_vma bfd_emul_get_commonpagesize (const char *);
  6066. char *bfd_demangle (bfd *, const char *, int);
  6067. void bfd_update_compression_header
  6068. (bfd *abfd, bfd_byte *contents, asection *sec);
  6069. bool bfd_check_compression_header
  6070. (bfd *abfd, bfd_byte *contents, asection *sec,
  6071. bfd_size_type *uncompressed_size,
  6072. unsigned int *uncompressed_alignment_power);
  6073. int bfd_get_compression_header_size (bfd *abfd, asection *sec);
  6074. bfd_size_type bfd_convert_section_size
  6075. (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
  6076. bool bfd_convert_section_contents
  6077. (bfd *ibfd, asection *isec, bfd *obfd,
  6078. bfd_byte **ptr, bfd_size_type *ptr_size);
  6079. /* Extracted from archive.c. */
  6080. symindex bfd_get_next_mapent
  6081. (bfd *abfd, symindex previous, carsym **sym);
  6082. bool bfd_set_archive_head (bfd *output, bfd *new_head);
  6083. bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
  6084. /* Extracted from corefile.c. */
  6085. const char *bfd_core_file_failing_command (bfd *abfd);
  6086. int bfd_core_file_failing_signal (bfd *abfd);
  6087. int bfd_core_file_pid (bfd *abfd);
  6088. bool core_file_matches_executable_p
  6089. (bfd *core_bfd, bfd *exec_bfd);
  6090. bool generic_core_file_matches_executable_p
  6091. (bfd *core_bfd, bfd *exec_bfd);
  6092. /* Extracted from targets.c. */
  6093. #define BFD_SEND(bfd, message, arglist) \
  6094. ((*((bfd)->xvec->message)) arglist)
  6095. #ifdef DEBUG_BFD_SEND
  6096. #undef BFD_SEND
  6097. #define BFD_SEND(bfd, message, arglist) \
  6098. (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
  6099. ((*((bfd)->xvec->message)) arglist) : \
  6100. (bfd_assert (__FILE__,__LINE__), NULL))
  6101. #endif
  6102. #define BFD_SEND_FMT(bfd, message, arglist) \
  6103. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
  6104. #ifdef DEBUG_BFD_SEND
  6105. #undef BFD_SEND_FMT
  6106. #define BFD_SEND_FMT(bfd, message, arglist) \
  6107. (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
  6108. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
  6109. (bfd_assert (__FILE__,__LINE__), NULL))
  6110. #endif
  6111. /* Defined to TRUE if unused section symbol should be kept. */
  6112. #ifndef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
  6113. #define TARGET_KEEP_UNUSED_SECTION_SYMBOLS true
  6114. #endif
  6115. enum bfd_flavour
  6116. {
  6117. /* N.B. Update bfd_flavour_name if you change this. */
  6118. bfd_target_unknown_flavour,
  6119. bfd_target_aout_flavour,
  6120. bfd_target_coff_flavour,
  6121. bfd_target_ecoff_flavour,
  6122. bfd_target_xcoff_flavour,
  6123. bfd_target_elf_flavour,
  6124. bfd_target_tekhex_flavour,
  6125. bfd_target_srec_flavour,
  6126. bfd_target_verilog_flavour,
  6127. bfd_target_ihex_flavour,
  6128. bfd_target_som_flavour,
  6129. bfd_target_os9k_flavour,
  6130. bfd_target_versados_flavour,
  6131. bfd_target_msdos_flavour,
  6132. bfd_target_ovax_flavour,
  6133. bfd_target_evax_flavour,
  6134. bfd_target_mmo_flavour,
  6135. bfd_target_mach_o_flavour,
  6136. bfd_target_pef_flavour,
  6137. bfd_target_pef_xlib_flavour,
  6138. bfd_target_sym_flavour
  6139. };
  6140. enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
  6141. /* Forward declaration. */
  6142. typedef struct bfd_link_info _bfd_link_info;
  6143. /* Forward declaration. */
  6144. typedef struct flag_info flag_info;
  6145. typedef void (*bfd_cleanup) (bfd *);
  6146. typedef struct bfd_target
  6147. {
  6148. /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
  6149. const char *name;
  6150. /* The "flavour" of a back end is a general indication about
  6151. the contents of a file. */
  6152. enum bfd_flavour flavour;
  6153. /* The order of bytes within the data area of a file. */
  6154. enum bfd_endian byteorder;
  6155. /* The order of bytes within the header parts of a file. */
  6156. enum bfd_endian header_byteorder;
  6157. /* A mask of all the flags which an executable may have set -
  6158. from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>. */
  6159. flagword object_flags;
  6160. /* A mask of all the flags which a section may have set - from
  6161. the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>. */
  6162. flagword section_flags;
  6163. /* The character normally found at the front of a symbol.
  6164. (if any), perhaps `_'. */
  6165. char symbol_leading_char;
  6166. /* The pad character for file names within an archive header. */
  6167. char ar_pad_char;
  6168. /* The maximum number of characters in an archive header. */
  6169. unsigned char ar_max_namelen;
  6170. /* How well this target matches, used to select between various
  6171. possible targets when more than one target matches. */
  6172. unsigned char match_priority;
  6173. /* TRUE if unused section symbols should be kept. */
  6174. bool keep_unused_section_symbols;
  6175. /* Entries for byte swapping for data. These are different from the
  6176. other entry points, since they don't take a BFD as the first argument.
  6177. Certain other handlers could do the same. */
  6178. bfd_uint64_t (*bfd_getx64) (const void *);
  6179. bfd_int64_t (*bfd_getx_signed_64) (const void *);
  6180. void (*bfd_putx64) (bfd_uint64_t, void *);
  6181. bfd_vma (*bfd_getx32) (const void *);
  6182. bfd_signed_vma (*bfd_getx_signed_32) (const void *);
  6183. void (*bfd_putx32) (bfd_vma, void *);
  6184. bfd_vma (*bfd_getx16) (const void *);
  6185. bfd_signed_vma (*bfd_getx_signed_16) (const void *);
  6186. void (*bfd_putx16) (bfd_vma, void *);
  6187. /* Byte swapping for the headers. */
  6188. bfd_uint64_t (*bfd_h_getx64) (const void *);
  6189. bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
  6190. void (*bfd_h_putx64) (bfd_uint64_t, void *);
  6191. bfd_vma (*bfd_h_getx32) (const void *);
  6192. bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
  6193. void (*bfd_h_putx32) (bfd_vma, void *);
  6194. bfd_vma (*bfd_h_getx16) (const void *);
  6195. bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
  6196. void (*bfd_h_putx16) (bfd_vma, void *);
  6197. /* Format dependent routines: these are vectors of entry points
  6198. within the target vector structure, one for each format to check. */
  6199. /* Check the format of a file being read. Return a <<bfd_cleanup>> on
  6200. success or zero on failure. */
  6201. bfd_cleanup (*_bfd_check_format[bfd_type_end]) (bfd *);
  6202. /* Set the format of a file being written. */
  6203. bool (*_bfd_set_format[bfd_type_end]) (bfd *);
  6204. /* Write cached information into a file being written, at <<bfd_close>>. */
  6205. bool (*_bfd_write_contents[bfd_type_end]) (bfd *);
  6206. /* Generic entry points. */
  6207. #define BFD_JUMP_TABLE_GENERIC(NAME) \
  6208. NAME##_close_and_cleanup, \
  6209. NAME##_bfd_free_cached_info, \
  6210. NAME##_new_section_hook, \
  6211. NAME##_get_section_contents, \
  6212. NAME##_get_section_contents_in_window
  6213. /* Called when the BFD is being closed to do any necessary cleanup. */
  6214. bool (*_close_and_cleanup) (bfd *);
  6215. /* Ask the BFD to free all cached information. */
  6216. bool (*_bfd_free_cached_info) (bfd *);
  6217. /* Called when a new section is created. */
  6218. bool (*_new_section_hook) (bfd *, sec_ptr);
  6219. /* Read the contents of a section. */
  6220. bool (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr,
  6221. bfd_size_type);
  6222. bool (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, bfd_window *,
  6223. file_ptr, bfd_size_type);
  6224. /* Entry points to copy private data. */
  6225. #define BFD_JUMP_TABLE_COPY(NAME) \
  6226. NAME##_bfd_copy_private_bfd_data, \
  6227. NAME##_bfd_merge_private_bfd_data, \
  6228. _bfd_generic_init_private_section_data, \
  6229. NAME##_bfd_copy_private_section_data, \
  6230. NAME##_bfd_copy_private_symbol_data, \
  6231. NAME##_bfd_copy_private_header_data, \
  6232. NAME##_bfd_set_private_flags, \
  6233. NAME##_bfd_print_private_bfd_data
  6234. /* Called to copy BFD general private data from one object file
  6235. to another. */
  6236. bool (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
  6237. /* Called to merge BFD general private data from one object file
  6238. to a common output file when linking. */
  6239. bool (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
  6240. /* Called to initialize BFD private section data from one object file
  6241. to another. */
  6242. #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
  6243. BFD_SEND (obfd, _bfd_init_private_section_data, \
  6244. (ibfd, isec, obfd, osec, link_info))
  6245. bool (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr,
  6246. struct bfd_link_info *);
  6247. /* Called to copy BFD private section data from one object file
  6248. to another. */
  6249. bool (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr);
  6250. /* Called to copy BFD private symbol data from one symbol
  6251. to another. */
  6252. bool (*_bfd_copy_private_symbol_data) (bfd *, asymbol *,
  6253. bfd *, asymbol *);
  6254. /* Called to copy BFD private header data from one object file
  6255. to another. */
  6256. bool (*_bfd_copy_private_header_data) (bfd *, bfd *);
  6257. /* Called to set private backend flags. */
  6258. bool (*_bfd_set_private_flags) (bfd *, flagword);
  6259. /* Called to print private BFD data. */
  6260. bool (*_bfd_print_private_bfd_data) (bfd *, void *);
  6261. /* Core file entry points. */
  6262. #define BFD_JUMP_TABLE_CORE(NAME) \
  6263. NAME##_core_file_failing_command, \
  6264. NAME##_core_file_failing_signal, \
  6265. NAME##_core_file_matches_executable_p, \
  6266. NAME##_core_file_pid
  6267. char *(*_core_file_failing_command) (bfd *);
  6268. int (*_core_file_failing_signal) (bfd *);
  6269. bool (*_core_file_matches_executable_p) (bfd *, bfd *);
  6270. int (*_core_file_pid) (bfd *);
  6271. /* Archive entry points. */
  6272. #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
  6273. NAME##_slurp_armap, \
  6274. NAME##_slurp_extended_name_table, \
  6275. NAME##_construct_extended_name_table, \
  6276. NAME##_truncate_arname, \
  6277. NAME##_write_armap, \
  6278. NAME##_read_ar_hdr, \
  6279. NAME##_write_ar_hdr, \
  6280. NAME##_openr_next_archived_file, \
  6281. NAME##_get_elt_at_index, \
  6282. NAME##_generic_stat_arch_elt, \
  6283. NAME##_update_armap_timestamp
  6284. bool (*_bfd_slurp_armap) (bfd *);
  6285. bool (*_bfd_slurp_extended_name_table) (bfd *);
  6286. bool (*_bfd_construct_extended_name_table) (bfd *, char **,
  6287. bfd_size_type *,
  6288. const char **);
  6289. void (*_bfd_truncate_arname) (bfd *, const char *, char *);
  6290. bool (*write_armap) (bfd *, unsigned, struct orl *, unsigned, int);
  6291. void *(*_bfd_read_ar_hdr_fn) (bfd *);
  6292. bool (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
  6293. bfd *(*openr_next_archived_file) (bfd *, bfd *);
  6294. #define bfd_get_elt_at_index(b,i) \
  6295. BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
  6296. bfd *(*_bfd_get_elt_at_index) (bfd *, symindex);
  6297. int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
  6298. bool (*_bfd_update_armap_timestamp) (bfd *);
  6299. /* Entry points used for symbols. */
  6300. #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
  6301. NAME##_get_symtab_upper_bound, \
  6302. NAME##_canonicalize_symtab, \
  6303. NAME##_make_empty_symbol, \
  6304. NAME##_print_symbol, \
  6305. NAME##_get_symbol_info, \
  6306. NAME##_get_symbol_version_string, \
  6307. NAME##_bfd_is_local_label_name, \
  6308. NAME##_bfd_is_target_special_symbol, \
  6309. NAME##_get_lineno, \
  6310. NAME##_find_nearest_line, \
  6311. NAME##_find_line, \
  6312. NAME##_find_inliner_info, \
  6313. NAME##_bfd_make_debug_symbol, \
  6314. NAME##_read_minisymbols, \
  6315. NAME##_minisymbol_to_symbol
  6316. long (*_bfd_get_symtab_upper_bound) (bfd *);
  6317. long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **);
  6318. struct bfd_symbol *
  6319. (*_bfd_make_empty_symbol) (bfd *);
  6320. void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *,
  6321. bfd_print_symbol_type);
  6322. #define bfd_print_symbol(b,p,s,e) \
  6323. BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
  6324. void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, symbol_info *);
  6325. #define bfd_get_symbol_info(b,p,e) \
  6326. BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
  6327. const char *
  6328. (*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
  6329. bool, bool *);
  6330. #define bfd_get_symbol_version_string(b,s,p,h) \
  6331. BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h))
  6332. bool (*_bfd_is_local_label_name) (bfd *, const char *);
  6333. bool (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
  6334. alent *
  6335. (*_get_lineno) (bfd *, struct bfd_symbol *);
  6336. bool (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **,
  6337. struct bfd_section *, bfd_vma,
  6338. const char **, const char **,
  6339. unsigned int *, unsigned int *);
  6340. bool (*_bfd_find_line) (bfd *, struct bfd_symbol **,
  6341. struct bfd_symbol *, const char **,
  6342. unsigned int *);
  6343. bool (*_bfd_find_inliner_info)
  6344. (bfd *, const char **, const char **, unsigned int *);
  6345. /* Back-door to allow format-aware applications to create debug symbols
  6346. while using BFD for everything else. Currently used by the assembler
  6347. when creating COFF files. */
  6348. asymbol *
  6349. (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
  6350. #define bfd_read_minisymbols(b, d, m, s) \
  6351. BFD_SEND (b, _read_minisymbols, (b, d, m, s))
  6352. long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *);
  6353. #define bfd_minisymbol_to_symbol(b, d, m, f) \
  6354. BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
  6355. asymbol *
  6356. (*_minisymbol_to_symbol) (bfd *, bool, const void *, asymbol *);
  6357. /* Routines for relocs. */
  6358. #define BFD_JUMP_TABLE_RELOCS(NAME) \
  6359. NAME##_get_reloc_upper_bound, \
  6360. NAME##_canonicalize_reloc, \
  6361. NAME##_set_reloc, \
  6362. NAME##_bfd_reloc_type_lookup, \
  6363. NAME##_bfd_reloc_name_lookup
  6364. long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
  6365. long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
  6366. struct bfd_symbol **);
  6367. void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
  6368. /* See documentation on reloc types. */
  6369. reloc_howto_type *
  6370. (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
  6371. reloc_howto_type *
  6372. (*reloc_name_lookup) (bfd *, const char *);
  6373. /* Routines used when writing an object file. */
  6374. #define BFD_JUMP_TABLE_WRITE(NAME) \
  6375. NAME##_set_arch_mach, \
  6376. NAME##_set_section_contents
  6377. bool (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture,
  6378. unsigned long);
  6379. bool (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *,
  6380. file_ptr, bfd_size_type);
  6381. /* Routines used by the linker. */
  6382. #define BFD_JUMP_TABLE_LINK(NAME) \
  6383. NAME##_sizeof_headers, \
  6384. NAME##_bfd_get_relocated_section_contents, \
  6385. NAME##_bfd_relax_section, \
  6386. NAME##_bfd_link_hash_table_create, \
  6387. NAME##_bfd_link_add_symbols, \
  6388. NAME##_bfd_link_just_syms, \
  6389. NAME##_bfd_copy_link_hash_symbol_type, \
  6390. NAME##_bfd_final_link, \
  6391. NAME##_bfd_link_split_section, \
  6392. NAME##_bfd_link_check_relocs, \
  6393. NAME##_bfd_gc_sections, \
  6394. NAME##_bfd_lookup_section_flags, \
  6395. NAME##_bfd_merge_sections, \
  6396. NAME##_bfd_is_group_section, \
  6397. NAME##_bfd_group_name, \
  6398. NAME##_bfd_discard_group, \
  6399. NAME##_section_already_linked, \
  6400. NAME##_bfd_define_common_symbol, \
  6401. NAME##_bfd_link_hide_symbol, \
  6402. NAME##_bfd_define_start_stop
  6403. int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
  6404. bfd_byte *
  6405. (*_bfd_get_relocated_section_contents) (bfd *,
  6406. struct bfd_link_info *,
  6407. struct bfd_link_order *,
  6408. bfd_byte *, bool,
  6409. struct bfd_symbol **);
  6410. bool (*_bfd_relax_section) (bfd *, struct bfd_section *,
  6411. struct bfd_link_info *, bool *);
  6412. /* Create a hash table for the linker. Different backends store
  6413. different information in this table. */
  6414. struct bfd_link_hash_table *
  6415. (*_bfd_link_hash_table_create) (bfd *);
  6416. /* Add symbols from this object file into the hash table. */
  6417. bool (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
  6418. /* Indicate that we are only retrieving symbol values from this section. */
  6419. void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
  6420. /* Copy the symbol type and other attributes for a linker script
  6421. assignment of one symbol to another. */
  6422. #define bfd_copy_link_hash_symbol_type(b, t, f) \
  6423. BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
  6424. void (*_bfd_copy_link_hash_symbol_type) (bfd *,
  6425. struct bfd_link_hash_entry *,
  6426. struct bfd_link_hash_entry *);
  6427. /* Do a link based on the link_order structures attached to each
  6428. section of the BFD. */
  6429. bool (*_bfd_final_link) (bfd *, struct bfd_link_info *);
  6430. /* Should this section be split up into smaller pieces during linking. */
  6431. bool (*_bfd_link_split_section) (bfd *, struct bfd_section *);
  6432. /* Check the relocations in the bfd for validity. */
  6433. bool (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
  6434. /* Remove sections that are not referenced from the output. */
  6435. bool (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
  6436. /* Sets the bitmask of allowed and disallowed section flags. */
  6437. bool (*_bfd_lookup_section_flags) (struct bfd_link_info *,
  6438. struct flag_info *, asection *);
  6439. /* Attempt to merge SEC_MERGE sections. */
  6440. bool (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
  6441. /* Is this section a member of a group? */
  6442. bool (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
  6443. /* The group name, if section is a member of a group. */
  6444. const char *(*_bfd_group_name) (bfd *, const struct bfd_section *);
  6445. /* Discard members of a group. */
  6446. bool (*_bfd_discard_group) (bfd *, struct bfd_section *);
  6447. /* Check if SEC has been already linked during a reloceatable or
  6448. final link. */
  6449. bool (*_section_already_linked) (bfd *, asection *,
  6450. struct bfd_link_info *);
  6451. /* Define a common symbol. */
  6452. bool (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
  6453. struct bfd_link_hash_entry *);
  6454. /* Hide a symbol. */
  6455. void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *,
  6456. struct bfd_link_hash_entry *);
  6457. /* Define a __start, __stop, .startof. or .sizeof. symbol. */
  6458. struct bfd_link_hash_entry *
  6459. (*_bfd_define_start_stop) (struct bfd_link_info *, const char *,
  6460. asection *);
  6461. /* Routines to handle dynamic symbols and relocs. */
  6462. #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
  6463. NAME##_get_dynamic_symtab_upper_bound, \
  6464. NAME##_canonicalize_dynamic_symtab, \
  6465. NAME##_get_synthetic_symtab, \
  6466. NAME##_get_dynamic_reloc_upper_bound, \
  6467. NAME##_canonicalize_dynamic_reloc
  6468. /* Get the amount of memory required to hold the dynamic symbols. */
  6469. long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
  6470. /* Read in the dynamic symbols. */
  6471. long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **);
  6472. /* Create synthetized symbols. */
  6473. long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **,
  6474. long, struct bfd_symbol **,
  6475. struct bfd_symbol **);
  6476. /* Get the amount of memory required to hold the dynamic relocs. */
  6477. long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
  6478. /* Read in the dynamic relocs. */
  6479. long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **,
  6480. struct bfd_symbol **);
  6481. /* Opposite endian version of this target. */
  6482. const struct bfd_target *alternative_target;
  6483. /* Data for use by back-end routines, which isn't
  6484. generic enough to belong in this structure. */
  6485. const void *backend_data;
  6486. } bfd_target;
  6487. static inline const char *
  6488. bfd_get_target (const bfd *abfd)
  6489. {
  6490. return abfd->xvec->name;
  6491. }
  6492. static inline enum bfd_flavour
  6493. bfd_get_flavour (const bfd *abfd)
  6494. {
  6495. return abfd->xvec->flavour;
  6496. }
  6497. static inline flagword
  6498. bfd_applicable_file_flags (const bfd *abfd)
  6499. {
  6500. return abfd->xvec->object_flags;
  6501. }
  6502. static inline bool
  6503. bfd_family_coff (const bfd *abfd)
  6504. {
  6505. return (bfd_get_flavour (abfd) == bfd_target_coff_flavour
  6506. || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour);
  6507. }
  6508. static inline bool
  6509. bfd_big_endian (const bfd *abfd)
  6510. {
  6511. return abfd->xvec->byteorder == BFD_ENDIAN_BIG;
  6512. }
  6513. static inline bool
  6514. bfd_little_endian (const bfd *abfd)
  6515. {
  6516. return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE;
  6517. }
  6518. static inline bool
  6519. bfd_header_big_endian (const bfd *abfd)
  6520. {
  6521. return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG;
  6522. }
  6523. static inline bool
  6524. bfd_header_little_endian (const bfd *abfd)
  6525. {
  6526. return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE;
  6527. }
  6528. static inline flagword
  6529. bfd_applicable_section_flags (const bfd *abfd)
  6530. {
  6531. return abfd->xvec->section_flags;
  6532. }
  6533. static inline char
  6534. bfd_get_symbol_leading_char (const bfd *abfd)
  6535. {
  6536. return abfd->xvec->symbol_leading_char;
  6537. }
  6538. static inline enum bfd_flavour
  6539. bfd_asymbol_flavour (const asymbol *sy)
  6540. {
  6541. if ((sy->flags & BSF_SYNTHETIC) != 0)
  6542. return bfd_target_unknown_flavour;
  6543. return sy->the_bfd->xvec->flavour;
  6544. }
  6545. static inline bool
  6546. bfd_keep_unused_section_symbols (const bfd *abfd)
  6547. {
  6548. return abfd->xvec->keep_unused_section_symbols;
  6549. }
  6550. bool bfd_set_default_target (const char *name);
  6551. const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
  6552. const bfd_target *bfd_get_target_info (const char *target_name,
  6553. bfd *abfd,
  6554. bool *is_bigendian,
  6555. int *underscoring,
  6556. const char **def_target_arch);
  6557. const char ** bfd_target_list (void);
  6558. const bfd_target *bfd_iterate_over_targets
  6559. (int (*func) (const bfd_target *, void *),
  6560. void *data);
  6561. const char *bfd_flavour_name (enum bfd_flavour flavour);
  6562. /* Extracted from format.c. */
  6563. bool bfd_check_format (bfd *abfd, bfd_format format);
  6564. bool bfd_check_format_matches
  6565. (bfd *abfd, bfd_format format, char ***matching);
  6566. bool bfd_set_format (bfd *abfd, bfd_format format);
  6567. const char *bfd_format_string (bfd_format format);
  6568. /* Extracted from linker.c. */
  6569. /* Return TRUE if the symbol described by a linker hash entry H
  6570. is going to be absolute. Linker-script defined symbols can be
  6571. converted from absolute to section-relative ones late in the
  6572. link. Use this macro to correctly determine whether the symbol
  6573. will actually end up absolute in output. */
  6574. #define bfd_is_abs_symbol(H) \
  6575. (((H)->type == bfd_link_hash_defined \
  6576. || (H)->type == bfd_link_hash_defweak) \
  6577. && bfd_is_abs_section ((H)->u.def.section) \
  6578. && !(H)->rel_from_abs)
  6579. bool bfd_link_split_section (bfd *abfd, asection *sec);
  6580. #define bfd_link_split_section(abfd, sec) \
  6581. BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
  6582. bool bfd_section_already_linked (bfd *abfd,
  6583. asection *sec,
  6584. struct bfd_link_info *info);
  6585. #define bfd_section_already_linked(abfd, sec, info) \
  6586. BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
  6587. bool bfd_generic_define_common_symbol
  6588. (bfd *output_bfd, struct bfd_link_info *info,
  6589. struct bfd_link_hash_entry *h);
  6590. #define bfd_define_common_symbol(output_bfd, info, h) \
  6591. BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
  6592. void _bfd_generic_link_hide_symbol
  6593. (bfd *output_bfd, struct bfd_link_info *info,
  6594. struct bfd_link_hash_entry *h);
  6595. #define bfd_link_hide_symbol(output_bfd, info, h) \
  6596. BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h))
  6597. struct bfd_link_hash_entry *bfd_generic_define_start_stop
  6598. (struct bfd_link_info *info,
  6599. const char *symbol, asection *sec);
  6600. #define bfd_define_start_stop(output_bfd, info, symbol, sec) \
  6601. BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec))
  6602. struct bfd_elf_version_tree * bfd_find_version_for_sym
  6603. (struct bfd_elf_version_tree *verdefs,
  6604. const char *sym_name, bool *hide);
  6605. bool bfd_hide_sym_by_version
  6606. (struct bfd_elf_version_tree *verdefs, const char *sym_name);
  6607. bool bfd_link_check_relocs
  6608. (bfd *abfd, struct bfd_link_info *info);
  6609. bool _bfd_generic_link_check_relocs
  6610. (bfd *abfd, struct bfd_link_info *info);
  6611. bool bfd_merge_private_bfd_data
  6612. (bfd *ibfd, struct bfd_link_info *info);
  6613. #define bfd_merge_private_bfd_data(ibfd, info) \
  6614. BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
  6615. (ibfd, info))
  6616. /* Extracted from simple.c. */
  6617. bfd_byte *bfd_simple_get_relocated_section_contents
  6618. (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
  6619. /* Extracted from compress.c. */
  6620. bool bfd_get_full_section_contents
  6621. (bfd *abfd, asection *section, bfd_byte **ptr);
  6622. void bfd_cache_section_contents
  6623. (asection *sec, void *contents);
  6624. bool bfd_is_section_compressed_with_header
  6625. (bfd *abfd, asection *section,
  6626. int *compression_header_size_p,
  6627. bfd_size_type *uncompressed_size_p,
  6628. unsigned int *uncompressed_alignment_power_p);
  6629. bool bfd_is_section_compressed
  6630. (bfd *abfd, asection *section);
  6631. bool bfd_init_section_decompress_status
  6632. (bfd *abfd, asection *section);
  6633. bool bfd_init_section_compress_status
  6634. (bfd *abfd, asection *section);
  6635. bool bfd_compress_section
  6636. (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
  6637. #ifdef __cplusplus
  6638. }
  6639. #endif
  6640. #endif