binutils.info 252 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237
  1. This is binutils.info, produced by makeinfo version 6.7 from
  2. binutils.texi.
  3. Copyright (C) 1991-2024 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with no
  7. Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  8. Texts. A copy of the license is included in the section entitled "GNU
  9. Free Documentation License".
  10. INFO-DIR-SECTION Software development
  11. START-INFO-DIR-ENTRY
  12. * Binutils: (binutils). The GNU binary utilities.
  13. END-INFO-DIR-ENTRY
  14. INFO-DIR-SECTION Individual utilities
  15. START-INFO-DIR-ENTRY
  16. * addr2line: (binutils)addr2line. Convert addresses to file and line.
  17. * ar: (binutils)ar. Create, modify, and extract from archives.
  18. * c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols.
  19. * cxxfilt: (binutils)c++filt. MS-DOS name for c++filt.
  20. * dlltool: (binutils)dlltool. Create files needed to build and use DLLs.
  21. * nm: (binutils)nm. List symbols from object files.
  22. * objcopy: (binutils)objcopy. Copy and translate object files.
  23. * objdump: (binutils)objdump. Display information from object files.
  24. * ranlib: (binutils)ranlib. Generate index to archive contents.
  25. * readelf: (binutils)readelf. Display the contents of ELF format files.
  26. * size: (binutils)size. List section sizes and total size.
  27. * strings: (binutils)strings. List printable strings from files.
  28. * strip: (binutils)strip. Discard symbols.
  29. * elfedit: (binutils)elfedit. Update ELF header and property of ELF files.
  30. * windmc: (binutils)windmc. Generator for Windows message resources.
  31. * windres: (binutils)windres. Manipulate Windows resources.
  32. END-INFO-DIR-ENTRY
  33. 
  34. File: binutils.info, Node: Top, Next: ar, Up: (dir)
  35. Introduction
  36. ************
  37. This brief manual contains documentation for the GNU binary utilities
  38. (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24)) version 2.42.0:
  39. This document is distributed under the terms of the GNU Free
  40. Documentation License version 1.3. A copy of the license is included in
  41. the section entitled "GNU Free Documentation License".
  42. * Menu:
  43. * ar:: Create, modify, and extract from archives
  44. * nm:: List symbols from object files
  45. * objcopy:: Copy and translate object files
  46. * objdump:: Display information from object files
  47. * ranlib:: Generate index to archive contents
  48. * size:: List section sizes and total size
  49. * strings:: List printable strings from files
  50. * strip:: Discard symbols
  51. * c++filt:: Filter to demangle encoded C++ symbols
  52. * cxxfilt: c++filt. MS-DOS name for c++filt
  53. * addr2line:: Convert addresses or symbol+offset to file and line
  54. * windmc:: Generator for Windows message resources
  55. * windres:: Manipulate Windows resources
  56. * dlltool:: Create files needed to build and use DLLs
  57. * readelf:: Display the contents of ELF format files
  58. * elfedit:: Update ELF header and property of ELF files
  59. * Common Options:: Command-line options for all utilities
  60. * Selecting the Target System:: How these utilities determine the target
  61. * debuginfod:: Using binutils with debuginfod
  62. * Reporting Bugs:: Reporting Bugs
  63. * GNU Free Documentation License:: GNU Free Documentation License
  64. * Binutils Index:: Binutils Index
  65. 
  66. File: binutils.info, Node: ar, Next: nm, Prev: Top, Up: Top
  67. 1 ar
  68. ****
  69. ar [-]P[MOD] [--plugin NAME] [--target BFDNAME] [--output DIRNAME] [--record-libdeps LIBDEPS] [RELPOS] [COUNT] ARCHIVE [MEMBER...]
  70. ar -M [ <mri-script ]
  71. The GNU 'ar' program creates, modifies, and extracts from archives.
  72. An "archive" is a single file holding a collection of other files in a
  73. structure that makes it possible to retrieve the original individual
  74. files (called "members" of the archive).
  75. The original files' contents, mode (permissions), timestamp, owner,
  76. and group are preserved in the archive, and can be restored on
  77. extraction.
  78. GNU 'ar' can maintain archives whose members have names of any
  79. length; however, depending on how 'ar' is configured on your system, a
  80. limit on member-name length may be imposed for compatibility with
  81. archive formats maintained with other tools. If it exists, the limit is
  82. often 15 characters (typical of formats related to a.out) or 16
  83. characters (typical of formats related to coff).
  84. 'ar' is considered a binary utility because archives of this sort are
  85. most often used as "libraries" holding commonly needed subroutines.
  86. Since libraries often will depend on other libraries, 'ar' can also
  87. record the dependencies of a library when the '--record-libdeps' option
  88. is specified.
  89. 'ar' creates an index to the symbols defined in relocatable object
  90. modules in the archive when you specify the modifier 's'. Once created,
  91. this index is updated in the archive whenever 'ar' makes a change to its
  92. contents (save for the 'q' update operation). An archive with such an
  93. index speeds up linking to the library, and allows routines in the
  94. library to call each other without regard to their placement in the
  95. archive.
  96. You may use 'nm -s' or 'nm --print-armap' to list this index table.
  97. If an archive lacks the table, another form of 'ar' called 'ranlib' can
  98. be used to add just the table.
  99. GNU 'ar' can optionally create a _thin_ archive, which contains a
  100. symbol index and references to the original copies of the member files
  101. of the archive. This is useful for building libraries for use within a
  102. local build tree, where the relocatable objects are expected to remain
  103. available, and copying the contents of each object would only waste time
  104. and space.
  105. An archive can either be _thin_ or it can be normal. It cannot be
  106. both at the same time. Once an archive is created its format cannot be
  107. changed without first deleting it and then creating a new archive in its
  108. place.
  109. Thin archives are also _flattened_, so that adding one thin archive
  110. to another thin archive does not nest it, as would happen with a normal
  111. archive. Instead the elements of the first archive are added
  112. individually to the second archive.
  113. The paths to the elements of the archive are stored relative to the
  114. archive itself.
  115. GNU 'ar' is designed to be compatible with two different facilities.
  116. You can control its activity using command-line options, like the
  117. different varieties of 'ar' on Unix systems; or, if you specify the
  118. single command-line option '-M', you can control it with a script
  119. supplied via standard input, like the MRI "librarian" program.
  120. * Menu:
  121. * ar cmdline:: Controlling 'ar' on the command line
  122. * ar scripts:: Controlling 'ar' with a script
  123. 
  124. File: binutils.info, Node: ar cmdline, Next: ar scripts, Up: ar
  125. 1.1 Controlling 'ar' on the Command Line
  126. ========================================
  127. ar [-X32_64] [-]P[MOD] [--plugin NAME] [--target BFDNAME] [--output DIRNAME] [--record-libdeps LIBDEPS] [--thin] [RELPOS] [COUNT] ARCHIVE [MEMBER...]
  128. When you use 'ar' in the Unix style, 'ar' insists on at least two
  129. arguments to execute: one keyletter specifying the _operation_
  130. (optionally accompanied by other keyletters specifying _modifiers_), and
  131. the archive name to act on.
  132. Most operations can also accept further MEMBER arguments, specifying
  133. particular files to operate on.
  134. GNU 'ar' allows you to mix the operation code P and modifier flags
  135. MOD in any order, within the first command-line argument.
  136. If you wish, you may begin the first command-line argument with a
  137. dash.
  138. The P keyletter specifies what operation to execute; it may be any of
  139. the following, but you must specify only one of them:
  140. 'd'
  141. _Delete_ modules from the archive. Specify the names of modules to
  142. be deleted as MEMBER...; the archive is untouched if you specify no
  143. files to delete.
  144. If you specify the 'v' modifier, 'ar' lists each module as it is
  145. deleted.
  146. 'm'
  147. Use this operation to _move_ members in an archive.
  148. The ordering of members in an archive can make a difference in how
  149. programs are linked using the library, if a symbol is defined in
  150. more than one member.
  151. If no modifiers are used with 'm', any members you name in the
  152. MEMBER arguments are moved to the _end_ of the archive; you can use
  153. the 'a', 'b', or 'i' modifiers to move them to a specified place
  154. instead.
  155. 'p'
  156. _Print_ the specified members of the archive, to the standard
  157. output file. If the 'v' modifier is specified, show the member
  158. name before copying its contents to standard output.
  159. If you specify no MEMBER arguments, all the files in the archive
  160. are printed.
  161. 'q'
  162. _Quick append_; Historically, add the files MEMBER... to the end of
  163. ARCHIVE, without checking for replacement.
  164. The modifiers 'a', 'b', and 'i' do _not_ affect this operation; new
  165. members are always placed at the end of the archive.
  166. The modifier 'v' makes 'ar' list each file as it is appended.
  167. Since the point of this operation is speed, implementations of 'ar'
  168. have the option of not updating the archive's symbol table if one
  169. exists. Too many different systems however assume that symbol
  170. tables are always up-to-date, so GNU 'ar' will rebuild the table
  171. even with a quick append.
  172. Note - GNU 'ar' treats the command 'qs' as a synonym for 'r' -
  173. replacing already existing files in the archive and appending new
  174. ones at the end.
  175. 'r'
  176. Insert the files MEMBER... into ARCHIVE (with _replacement_). This
  177. operation differs from 'q' in that any previously existing members
  178. are deleted if their names match those being added.
  179. If one of the files named in MEMBER... does not exist, 'ar'
  180. displays an error message, and leaves undisturbed any existing
  181. members of the archive matching that name.
  182. By default, new members are added at the end of the file; but you
  183. may use one of the modifiers 'a', 'b', or 'i' to request placement
  184. relative to some existing member.
  185. The modifier 'v' used with this operation elicits a line of output
  186. for each file inserted, along with one of the letters 'a' or 'r' to
  187. indicate whether the file was appended (no old member deleted) or
  188. replaced.
  189. 's'
  190. Add an index to the archive, or update it if it already exists.
  191. Note this command is an exception to the rule that there can only
  192. be one command letter, as it is possible to use it as either a
  193. command or a modifier. In either case it does the same thing.
  194. 't'
  195. Display a _table_ listing the contents of ARCHIVE, or those of the
  196. files listed in MEMBER... that are present in the archive.
  197. Normally only the member name is shown, but if the modifier 'O' is
  198. specified, then the corresponding offset of the member is also
  199. displayed. Finally, in order to see the modes (permissions),
  200. timestamp, owner, group, and size the 'v' modifier should be
  201. included.
  202. If you do not specify a MEMBER, all files in the archive are
  203. listed.
  204. If there is more than one file with the same name (say, 'fie') in
  205. an archive (say 'b.a'), 'ar t b.a fie' lists only the first
  206. instance; to see them all, you must ask for a complete listing--in
  207. our example, 'ar t b.a'.
  208. 'x'
  209. _Extract_ members (named MEMBER) from the archive. You can use the
  210. 'v' modifier with this operation, to request that 'ar' list each
  211. name as it extracts it.
  212. If you do not specify a MEMBER, all files in the archive are
  213. extracted.
  214. Files cannot be extracted from a thin archive, and there are
  215. restrictions on extracting from archives created with 'P': The
  216. paths must not be absolute, may not contain '..', and any
  217. subdirectories in the paths must exist. If it is desired to avoid
  218. these restrictions then used the '--output' option to specify an
  219. output directory.
  220. A number of modifiers (MOD) may immediately follow the P keyletter,
  221. to specify variations on an operation's behavior:
  222. 'a'
  223. Add new files _after_ an existing member of the archive. If you
  224. use the modifier 'a', the name of an existing archive member must
  225. be present as the RELPOS argument, before the ARCHIVE
  226. specification.
  227. 'b'
  228. Add new files _before_ an existing member of the archive. If you
  229. use the modifier 'b', the name of an existing archive member must
  230. be present as the RELPOS argument, before the ARCHIVE
  231. specification. (same as 'i').
  232. 'c'
  233. _Create_ the archive. The specified ARCHIVE is always created if
  234. it did not exist, when you request an update. But a warning is
  235. issued unless you specify in advance that you expect to create it,
  236. by using this modifier.
  237. 'D'
  238. Operate in _deterministic_ mode. When adding files and the archive
  239. index use zero for UIDs, GIDs, timestamps, and use consistent file
  240. modes for all files. When this option is used, if 'ar' is used
  241. with identical options and identical input files, multiple runs
  242. will create identical output files regardless of the input files'
  243. owners, groups, file modes, or modification times.
  244. If 'binutils' was configured with
  245. '--enable-deterministic-archives', then this mode is on by default.
  246. It can be disabled with the 'U' modifier, below.
  247. 'f'
  248. Truncate names in the archive. GNU 'ar' will normally permit file
  249. names of any length. This will cause it to create archives which
  250. are not compatible with the native 'ar' program on some systems.
  251. If this is a concern, the 'f' modifier may be used to truncate file
  252. names when putting them in the archive.
  253. 'i'
  254. Insert new files _before_ an existing member of the archive. If
  255. you use the modifier 'i', the name of an existing archive member
  256. must be present as the RELPOS argument, before the ARCHIVE
  257. specification. (same as 'b').
  258. 'l'
  259. Specify dependencies of this library. The dependencies must
  260. immediately follow this option character, must use the same syntax
  261. as the linker command line, and must be specified within a single
  262. argument. I.e., if multiple items are needed, they must be quoted
  263. to form a single command line argument. For example 'L
  264. "-L/usr/local/lib -lmydep1 -lmydep2"'
  265. 'N'
  266. Uses the COUNT parameter. This is used if there are multiple
  267. entries in the archive with the same name. Extract or delete
  268. instance COUNT of the given name from the archive.
  269. 'o'
  270. Preserve the _original_ dates of members when extracting them. If
  271. you do not specify this modifier, files extracted from the archive
  272. are stamped with the time of extraction.
  273. 'O'
  274. Display member offsets inside the archive. Use together with the
  275. 't' option.
  276. 'P'
  277. Use the full path name when matching or storing names in the
  278. archive. Archives created with full path names are not POSIX
  279. compliant, and thus may not work with tools other than up to date
  280. GNU tools. Modifying such archives with GNU 'ar' without using 'P'
  281. will remove the full path names unless the archive is a thin
  282. archive. Note that 'P' may be useful when adding files to a thin
  283. archive since 'r' without 'P' ignores the path when choosing which
  284. element to replace. Thus
  285. ar rcST archive.a subdir/file1 subdir/file2 file1
  286. will result in the first 'subdir/file1' being replaced with 'file1'
  287. from the current directory. Adding 'P' will prevent this
  288. replacement.
  289. 's'
  290. Write an object-file index into the archive, or update an existing
  291. one, even if no other change is made to the archive. You may use
  292. this modifier flag either with any operation, or alone. Running
  293. 'ar s' on an archive is equivalent to running 'ranlib' on it.
  294. 'S'
  295. Do not generate an archive symbol table. This can speed up
  296. building a large library in several steps. The resulting archive
  297. can not be used with the linker. In order to build a symbol table,
  298. you must omit the 'S' modifier on the last execution of 'ar', or
  299. you must run 'ranlib' on the archive.
  300. 'T'
  301. Deprecated alias for '--thin'. 'T' is not recommended because in
  302. many ar implementations 'T' has a different meaning, as specified
  303. by X/Open System Interface.
  304. 'u'
  305. Normally, 'ar r'... inserts all files listed into the archive. If
  306. you would like to insert _only_ those of the files you list that
  307. are newer than existing members of the same names, use this
  308. modifier. The 'u' modifier is allowed only for the operation 'r'
  309. (replace). In particular, the combination 'qu' is not allowed,
  310. since checking the timestamps would lose any speed advantage from
  311. the operation 'q'.
  312. Note - if an archive has been created in a deterministic manner, eg
  313. via the use of the 'D' modifier, then replacement will always
  314. happen and the 'u' modifier will be ineffective.
  315. 'U'
  316. Do _not_ operate in _deterministic_ mode. This is the inverse of
  317. the 'D' modifier, above: added files and the archive index will get
  318. their actual UID, GID, timestamp, and file mode values.
  319. This is the default unless 'binutils' was configured with
  320. '--enable-deterministic-archives'.
  321. 'v'
  322. This modifier requests the _verbose_ version of an operation. Many
  323. operations display additional information, such as filenames
  324. processed, when the modifier 'v' is appended.
  325. 'V'
  326. This modifier shows the version number of 'ar'.
  327. The 'ar' program also supports some command-line options which are
  328. neither modifiers nor actions, but which do change its behaviour in
  329. specific ways:
  330. '--help'
  331. Displays the list of command-line options supported by 'ar' and
  332. then exits.
  333. '--version'
  334. Displays the version information of 'ar' and then exits.
  335. '-X32_64'
  336. 'ar' ignores an initial option spelled '-X32_64', for compatibility
  337. with AIX. The behaviour produced by this option is the default for
  338. GNU 'ar'. 'ar' does not support any of the other '-X' options; in
  339. particular, it does not support '-X32' which is the default for AIX
  340. 'ar'.
  341. '--plugin NAME'
  342. The optional command-line switch '--plugin NAME' causes 'ar' to
  343. load the plugin called NAME which adds support for more file
  344. formats, including object files with link-time optimization
  345. information.
  346. This option is only available if the toolchain has been built with
  347. plugin support enabled.
  348. If '--plugin' is not provided, but plugin support has been enabled
  349. then 'ar' iterates over the files in '${libdir}/bfd-plugins' in
  350. alphabetic order and the first plugin that claims the object in
  351. question is used.
  352. Please note that this plugin search directory is _not_ the one used
  353. by 'ld''s '-plugin' option. In order to make 'ar' use the linker
  354. plugin it must be copied into the '${libdir}/bfd-plugins'
  355. directory. For GCC based compilations the linker plugin is called
  356. 'liblto_plugin.so.0.0.0'. For Clang based compilations it is
  357. called 'LLVMgold.so'. The GCC plugin is always backwards
  358. compatible with earlier versions, so it is sufficient to just copy
  359. the newest one.
  360. '--target TARGET'
  361. The optional command-line switch '--target BFDNAME' specifies that
  362. the archive members are in an object code format different from
  363. your system's default format. See *Note Target Selection::, for
  364. more information.
  365. '--output DIRNAME'
  366. The '--output' option can be used to specify a path to a directory
  367. into which archive members should be extracted. If this option is
  368. not specified then the current directory will be used.
  369. Note - although the presence of this option does imply a 'x'
  370. extraction operation that option must still be included on the
  371. command line.
  372. '--record-libdeps LIBDEPS'
  373. The '--record-libdeps' option is identical to the 'l' modifier,
  374. just handled in long form.
  375. '--thin'
  376. Make the specified ARCHIVE a _thin_ archive. If it already exists
  377. and is a regular archive, the existing members must be present in
  378. the same directory as ARCHIVE.
  379. 
  380. File: binutils.info, Node: ar scripts, Prev: ar cmdline, Up: ar
  381. 1.2 Controlling 'ar' with a Script
  382. ==================================
  383. ar -M [ <SCRIPT ]
  384. If you use the single command-line option '-M' with 'ar', you can
  385. control its operation with a rudimentary command language. This form of
  386. 'ar' operates interactively if standard input is coming directly from a
  387. terminal. During interactive use, 'ar' prompts for input (the prompt is
  388. 'AR >'), and continues executing even after errors. If you redirect
  389. standard input to a script file, no prompts are issued, and 'ar'
  390. abandons execution (with a nonzero exit code) on any error.
  391. The 'ar' command language is _not_ designed to be equivalent to the
  392. command-line options; in fact, it provides somewhat less control over
  393. archives. The only purpose of the command language is to ease the
  394. transition to GNU 'ar' for developers who already have scripts written
  395. for the MRI "librarian" program.
  396. The syntax for the 'ar' command language is straightforward:
  397. * commands are recognized in upper or lower case; for example, 'LIST'
  398. is the same as 'list'. In the following descriptions, commands are
  399. shown in upper case for clarity.
  400. * a single command may appear on each line; it is the first word on
  401. the line.
  402. * empty lines are allowed, and have no effect.
  403. * comments are allowed; text after either of the characters '*' or
  404. ';' is ignored.
  405. * Whenever you use a list of names as part of the argument to an 'ar'
  406. command, you can separate the individual names with either commas
  407. or blanks. Commas are shown in the explanations below, for
  408. clarity.
  409. * '+' is used as a line continuation character; if '+' appears at the
  410. end of a line, the text on the following line is considered part of
  411. the current command.
  412. Here are the commands you can use in 'ar' scripts, or when using 'ar'
  413. interactively. Three of them have special significance:
  414. 'OPEN' or 'CREATE' specify a "current archive", which is a temporary
  415. file required for most of the other commands.
  416. 'SAVE' commits the changes so far specified by the script. Prior to
  417. 'SAVE', commands affect only the temporary copy of the current archive.
  418. 'ADDLIB ARCHIVE'
  419. 'ADDLIB ARCHIVE (MODULE, MODULE, ... MODULE)'
  420. Add all the contents of ARCHIVE (or, if specified, each named
  421. MODULE from ARCHIVE) to the current archive.
  422. Requires prior use of 'OPEN' or 'CREATE'.
  423. 'ADDMOD MEMBER, MEMBER, ... MEMBER'
  424. Add each named MEMBER as a module in the current archive.
  425. Requires prior use of 'OPEN' or 'CREATE'.
  426. 'CLEAR'
  427. Discard the contents of the current archive, canceling the effect
  428. of any operations since the last 'SAVE'. May be executed (with no
  429. effect) even if no current archive is specified.
  430. 'CREATE ARCHIVE'
  431. Creates an archive, and makes it the current archive (required for
  432. many other commands). The new archive is created with a temporary
  433. name; it is not actually saved as ARCHIVE until you use 'SAVE'.
  434. You can overwrite existing archives; similarly, the contents of any
  435. existing file named ARCHIVE will not be destroyed until 'SAVE'.
  436. 'DELETE MODULE, MODULE, ... MODULE'
  437. Delete each listed MODULE from the current archive; equivalent to
  438. 'ar -d ARCHIVE MODULE ... MODULE'.
  439. Requires prior use of 'OPEN' or 'CREATE'.
  440. 'DIRECTORY ARCHIVE (MODULE, ... MODULE)'
  441. 'DIRECTORY ARCHIVE (MODULE, ... MODULE) OUTPUTFILE'
  442. List each named MODULE present in ARCHIVE. The separate command
  443. 'VERBOSE' specifies the form of the output: when verbose output is
  444. off, output is like that of 'ar -t ARCHIVE MODULE...'. When
  445. verbose output is on, the listing is like 'ar -tv ARCHIVE
  446. MODULE...'.
  447. Output normally goes to the standard output stream; however, if you
  448. specify OUTPUTFILE as a final argument, 'ar' directs the output to
  449. that file.
  450. 'END'
  451. Exit from 'ar', with a '0' exit code to indicate successful
  452. completion. This command does not save the output file; if you
  453. have changed the current archive since the last 'SAVE' command,
  454. those changes are lost.
  455. 'EXTRACT MODULE, MODULE, ... MODULE'
  456. Extract each named MODULE from the current archive, writing them
  457. into the current directory as separate files. Equivalent to 'ar -x
  458. ARCHIVE MODULE...'.
  459. Requires prior use of 'OPEN' or 'CREATE'.
  460. 'LIST'
  461. Display full contents of the current archive, in "verbose" style
  462. regardless of the state of 'VERBOSE'. The effect is like 'ar tv
  463. ARCHIVE'. (This single command is a GNU 'ar' enhancement, rather
  464. than present for MRI compatibility.)
  465. Requires prior use of 'OPEN' or 'CREATE'.
  466. 'OPEN ARCHIVE'
  467. Opens an existing archive for use as the current archive (required
  468. for many other commands). Any changes as the result of subsequent
  469. commands will not actually affect ARCHIVE until you next use
  470. 'SAVE'.
  471. 'REPLACE MODULE, MODULE, ... MODULE'
  472. In the current archive, replace each existing MODULE (named in the
  473. 'REPLACE' arguments) from files in the current working directory.
  474. To execute this command without errors, both the file, and the
  475. module in the current archive, must exist.
  476. Requires prior use of 'OPEN' or 'CREATE'.
  477. 'VERBOSE'
  478. Toggle an internal flag governing the output from 'DIRECTORY'.
  479. When the flag is on, 'DIRECTORY' output matches output from 'ar -tv
  480. '....
  481. 'SAVE'
  482. Commit your changes to the current archive, and actually save it as
  483. a file with the name specified in the last 'CREATE' or 'OPEN'
  484. command.
  485. Requires prior use of 'OPEN' or 'CREATE'.
  486. 
  487. File: binutils.info, Node: nm, Next: objcopy, Prev: ar, Up: Top
  488. 2 nm
  489. ****
  490. nm [-A|-o|--print-file-name]
  491. [-a|--debug-syms]
  492. [-B|--format=bsd]
  493. [-C|--demangle[=STYLE]]
  494. [-D|--dynamic]
  495. [-fFORMAT|--format=FORMAT]
  496. [-g|--extern-only]
  497. [-h|--help]
  498. [--ifunc-chars=CHARS]
  499. [-j|--format=just-symbols]
  500. [-l|--line-numbers] [--inlines]
  501. [-n|-v|--numeric-sort]
  502. [-P|--portability]
  503. [-p|--no-sort]
  504. [-r|--reverse-sort]
  505. [-S|--print-size]
  506. [-s|--print-armap]
  507. [-t RADIX|--radix=RADIX]
  508. [-u|--undefined-only]
  509. [-U|--defined-only]
  510. [-V|--version]
  511. [-W|--no-weak]
  512. [-X 32_64]
  513. [--no-demangle]
  514. [--no-recurse-limit|--recurse-limit]]
  515. [--plugin NAME]
  516. [--size-sort]
  517. [--special-syms]
  518. [--synthetic]
  519. [--target=BFDNAME]
  520. [--unicode=METHOD]
  521. [--with-symbol-versions]
  522. [--without-symbol-versions]
  523. [OBJFILE...]
  524. GNU 'nm' lists the symbols from object files OBJFILE.... If no
  525. object files are listed as arguments, 'nm' assumes the file 'a.out'.
  526. For each symbol, 'nm' shows:
  527. * The symbol value, in the radix selected by options (see below), or
  528. hexadecimal by default.
  529. * The symbol type. At least the following types are used; others
  530. are, as well, depending on the object file format. If lowercase,
  531. the symbol is usually local; if uppercase, the symbol is global
  532. (external). There are however a few lowercase symbols that are
  533. shown for special global symbols ('u', 'v' and 'w').
  534. 'A'
  535. The symbol's value is absolute, and will not be changed by
  536. further linking.
  537. 'B'
  538. 'b'
  539. The symbol is in the BSS data section. This section typically
  540. contains zero-initialized or uninitialized data, although the
  541. exact behavior is system dependent.
  542. 'C'
  543. 'c'
  544. The symbol is common. Common symbols are uninitialized data.
  545. When linking, multiple common symbols may appear with the same
  546. name. If the symbol is defined anywhere, the common symbols
  547. are treated as undefined references. For more details on
  548. common symbols, see the discussion of -warn-common in *note
  549. Linker options: (ld.info)Options. The lower case C character
  550. is used when the symbol is in a special section for small
  551. commons.
  552. 'D'
  553. 'd'
  554. The symbol is in the initialized data section.
  555. 'G'
  556. 'g'
  557. The symbol is in an initialized data section for small
  558. objects. Some object file formats permit more efficient
  559. access to small data objects, such as a global int variable as
  560. opposed to a large global array.
  561. 'i'
  562. For PE format files this indicates that the symbol is in a
  563. section specific to the implementation of DLLs.
  564. For ELF format files this indicates that the symbol is an
  565. indirect function. This is a GNU extension to the standard
  566. set of ELF symbol types. It indicates a symbol which if
  567. referenced by a relocation does not evaluate to its address,
  568. but instead must be invoked at runtime. The runtime execution
  569. will then return the value to be used in the relocation.
  570. Note - the actual symbols display for GNU indirect symbols is
  571. controlled by the '--ifunc-chars' command line option. If
  572. this option has been provided then the first character in the
  573. string will be used for global indirect function symbols. If
  574. the string contains a second character then that will be used
  575. for local indirect function symbols.
  576. 'I'
  577. The symbol is an indirect reference to another symbol.
  578. 'N'
  579. The symbol is a debugging symbol.
  580. 'n'
  581. The symbol is in a non-data, non-code, non-debug read-only
  582. section.
  583. 'p'
  584. The symbol is in a stack unwind section.
  585. 'R'
  586. 'r'
  587. The symbol is in a read only data section.
  588. 'S'
  589. 's'
  590. The symbol is in an uninitialized or zero-initialized data
  591. section for small objects.
  592. 'T'
  593. 't'
  594. The symbol is in the text (code) section.
  595. 'U'
  596. The symbol is undefined.
  597. 'u'
  598. The symbol is a unique global symbol. This is a GNU extension
  599. to the standard set of ELF symbol bindings. For such a symbol
  600. the dynamic linker will make sure that in the entire process
  601. there is just one symbol with this name and type in use.
  602. 'V'
  603. 'v'
  604. The symbol is a weak object. When a weak defined symbol is
  605. linked with a normal defined symbol, the normal defined symbol
  606. is used with no error. When a weak undefined symbol is linked
  607. and the symbol is not defined, the value of the weak symbol
  608. becomes zero with no error. On some systems, uppercase
  609. indicates that a default value has been specified.
  610. 'W'
  611. 'w'
  612. The symbol is a weak symbol that has not been specifically
  613. tagged as a weak object symbol. When a weak defined symbol is
  614. linked with a normal defined symbol, the normal defined symbol
  615. is used with no error. When a weak undefined symbol is linked
  616. and the symbol is not defined, the value of the symbol is
  617. determined in a system-specific manner without error. On some
  618. systems, uppercase indicates that a default value has been
  619. specified.
  620. '-'
  621. The symbol is a stabs symbol in an a.out object file. In this
  622. case, the next values printed are the stabs other field, the
  623. stabs desc field, and the stab type. Stabs symbols are used
  624. to hold debugging information.
  625. '?'
  626. The symbol type is unknown, or object file format specific.
  627. * The symbol name. If a symbol has version information associated
  628. with it, then the version information is displayed as well. If the
  629. versioned symbol is undefined or hidden from linker, the version
  630. string is displayed as a suffix to the symbol name, preceded by an
  631. @ character. For example 'foo@VER_1'. If the version is the
  632. default version to be used when resolving unversioned references to
  633. the symbol, then it is displayed as a suffix preceded by two @
  634. characters. For example 'foo@@VER_2'.
  635. The long and short forms of options, shown here as alternatives, are
  636. equivalent.
  637. '-A'
  638. '-o'
  639. '--print-file-name'
  640. Precede each symbol by the name of the input file (or archive
  641. member) in which it was found, rather than identifying the input
  642. file once only, before all of its symbols.
  643. '-a'
  644. '--debug-syms'
  645. Display all symbols, even debugger-only symbols; normally these are
  646. not listed.
  647. '-B'
  648. The same as '--format=bsd' (for compatibility with the MIPS 'nm').
  649. '-C'
  650. '--demangle[=STYLE]'
  651. Decode ("demangle") low-level symbol names into user-level names.
  652. Besides removing any initial underscore prepended by the system,
  653. this makes C++ function names readable. Different compilers have
  654. different mangling styles. The optional demangling style argument
  655. can be used to choose an appropriate demangling style for your
  656. compiler. *Note c++filt::, for more information on demangling.
  657. '--no-demangle'
  658. Do not demangle low-level symbol names. This is the default.
  659. '--recurse-limit'
  660. '--no-recurse-limit'
  661. '--recursion-limit'
  662. '--no-recursion-limit'
  663. Enables or disables a limit on the amount of recursion performed
  664. whilst demangling strings. Since the name mangling formats allow
  665. for an infinite level of recursion it is possible to create strings
  666. whose decoding will exhaust the amount of stack space available on
  667. the host machine, triggering a memory fault. The limit tries to
  668. prevent this from happening by restricting recursion to 2048 levels
  669. of nesting.
  670. The default is for this limit to be enabled, but disabling it may
  671. be necessary in order to demangle truly complicated names. Note
  672. however that if the recursion limit is disabled then stack
  673. exhaustion is possible and any bug reports about such an event will
  674. be rejected.
  675. '-D'
  676. '--dynamic'
  677. Display the dynamic symbols rather than the normal symbols. This
  678. is only meaningful for dynamic objects, such as certain types of
  679. shared libraries.
  680. '-f FORMAT'
  681. '--format=FORMAT'
  682. Use the output format FORMAT, which can be 'bsd', 'sysv', 'posix'
  683. or 'just-symbols'. The default is 'bsd'. Only the first character
  684. of FORMAT is significant; it can be either upper or lower case.
  685. '-g'
  686. '--extern-only'
  687. Display only external symbols.
  688. '-h'
  689. '--help'
  690. Show a summary of the options to 'nm' and exit.
  691. '--ifunc-chars=CHARS'
  692. When display GNU indirect function symbols 'nm' will default to
  693. using the 'i' character for both local indirect functions and
  694. global indirect functions. The '--ifunc-chars' option allows the
  695. user to specify a string containing one or two characters. The
  696. first character will be used for global indirect function symbols
  697. and the second character, if present, will be used for local
  698. indirect function symbols.
  699. 'j'
  700. The same as '--format=just-symbols'.
  701. '-l'
  702. '--line-numbers'
  703. For each symbol, use debugging information to try to find a
  704. filename and line number. For a defined symbol, look for the line
  705. number of the address of the symbol. For an undefined symbol, look
  706. for the line number of a relocation entry which refers to the
  707. symbol. If line number information can be found, print it after
  708. the other symbol information.
  709. '--inlines'
  710. When option '-l' is active, if the address belongs to a function
  711. that was inlined, then this option causes the source information
  712. for all enclosing scopes back to the first non-inlined function to
  713. be printed as well. For example, if 'main' inlines 'callee1' which
  714. inlines 'callee2', and address is from 'callee2', the source
  715. information for 'callee1' and 'main' will also be printed.
  716. '-n'
  717. '-v'
  718. '--numeric-sort'
  719. Sort symbols numerically by their addresses, rather than
  720. alphabetically by their names.
  721. '-p'
  722. '--no-sort'
  723. Do not bother to sort the symbols in any order; print them in the
  724. order encountered.
  725. '-P'
  726. '--portability'
  727. Use the POSIX.2 standard output format instead of the default
  728. format. Equivalent to '-f posix'.
  729. '-r'
  730. '--reverse-sort'
  731. Reverse the order of the sort (whether numeric or alphabetic); let
  732. the last come first.
  733. '-S'
  734. '--print-size'
  735. Print both value and size of defined symbols for the 'bsd' output
  736. style. This option has no effect for object formats that do not
  737. record symbol sizes, unless '--size-sort' is also used in which
  738. case a calculated size is displayed.
  739. '-s'
  740. '--print-armap'
  741. When listing symbols from archive members, include the index: a
  742. mapping (stored in the archive by 'ar' or 'ranlib') of which
  743. modules contain definitions for which names.
  744. '-t RADIX'
  745. '--radix=RADIX'
  746. Use RADIX as the radix for printing the symbol values. It must be
  747. 'd' for decimal, 'o' for octal, or 'x' for hexadecimal.
  748. '-u'
  749. '--undefined-only'
  750. Display only undefined symbols (those external to each object
  751. file). By default both defined and undefined symbols are
  752. displayed.
  753. '-U'
  754. '--defined-only'
  755. Display only defined symbols for each object file. By default both
  756. defined and undefined symbols are displayed.
  757. '-V'
  758. '--version'
  759. Show the version number of 'nm' and exit.
  760. '-X'
  761. This option is ignored for compatibility with the AIX version of
  762. 'nm'. It takes one parameter which must be the string '32_64'.
  763. The default mode of AIX 'nm' corresponds to '-X 32', which is not
  764. supported by GNU 'nm'.
  765. '--plugin NAME'
  766. Load the plugin called NAME to add support for extra target types.
  767. This option is only available if the toolchain has been built with
  768. plugin support enabled.
  769. If '--plugin' is not provided, but plugin support has been enabled
  770. then 'nm' iterates over the files in '${libdir}/bfd-plugins' in
  771. alphabetic order and the first plugin that claims the object in
  772. question is used.
  773. Please note that this plugin search directory is _not_ the one used
  774. by 'ld''s '-plugin' option. In order to make 'nm' use the linker
  775. plugin it must be copied into the '${libdir}/bfd-plugins'
  776. directory. For GCC based compilations the linker plugin is called
  777. 'liblto_plugin.so.0.0.0'. For Clang based compilations it is
  778. called 'LLVMgold.so'. The GCC plugin is always backwards
  779. compatible with earlier versions, so it is sufficient to just copy
  780. the newest one.
  781. '--size-sort'
  782. Sort symbols by size. For ELF objects symbol sizes are read from
  783. the ELF, for other object types the symbol sizes are computed as
  784. the difference between the value of the symbol and the value of the
  785. symbol with the next higher value. If the 'bsd' output format is
  786. used the size of the symbol is printed, rather than the value, and
  787. '-S' must be used in order both size and value to be printed.
  788. Note - this option does not work if '--undefined-only' has been
  789. enabled as undefined symbols have no size.
  790. '--special-syms'
  791. Display symbols which have a target-specific special meaning.
  792. These symbols are usually used by the target for some special
  793. processing and are not normally helpful when included in the normal
  794. symbol lists. For example for ARM targets this option would skip
  795. the mapping symbols used to mark transitions between ARM code,
  796. THUMB code and data.
  797. '--synthetic'
  798. Include synthetic symbols in the output. These are special symbols
  799. created by the linker for various purposes. They are not shown by
  800. default since they are not part of the binary's original source
  801. code.
  802. '--unicode=[DEFAULT|INVALID|LOCALE|ESCAPE|HEX|HIGHLIGHT]'
  803. Controls the display of UTF-8 encoded multibyte characters in
  804. strings. The default ('--unicode=default') is to give them no
  805. special treatment. The '--unicode=locale' option displays the
  806. sequence in the current locale, which may or may not support them.
  807. The options '--unicode=hex' and '--unicode=invalid' display them as
  808. hex byte sequences enclosed by either angle brackets or curly
  809. braces.
  810. The '--unicode=escape' option displays them as escape sequences
  811. (\UXXXX) and the '--unicode=highlight' option displays them as
  812. escape sequences highlighted in red (if supported by the output
  813. device). The colouring is intended to draw attention to the
  814. presence of unicode sequences where they might not be expected.
  815. '-W'
  816. '--no-weak'
  817. Do not display weak symbols.
  818. '--with-symbol-versions'
  819. '--without-symbol-versions'
  820. Enables or disables the display of symbol version information. The
  821. version string is displayed as a suffix to the symbol name,
  822. preceded by an @ character. For example 'foo@VER_1'. If the
  823. version is the default version to be used when resolving
  824. unversioned references to the symbol then it is displayed as a
  825. suffix preceded by two @ characters. For example 'foo@@VER_2'. By
  826. default, symbol version information is displayed.
  827. '--target=BFDNAME'
  828. Specify an object code format other than your system's default
  829. format. *Note Target Selection::, for more information.
  830. 
  831. File: binutils.info, Node: objcopy, Next: objdump, Prev: nm, Up: Top
  832. 3 objcopy
  833. *********
  834. objcopy [-F BFDNAME|--target=BFDNAME]
  835. [-I BFDNAME|--input-target=BFDNAME]
  836. [-O BFDNAME|--output-target=BFDNAME]
  837. [-B BFDARCH|--binary-architecture=BFDARCH]
  838. [-S|--strip-all]
  839. [-g|--strip-debug]
  840. [--strip-unneeded]
  841. [-K SYMBOLNAME|--keep-symbol=SYMBOLNAME]
  842. [--keep-file-symbols]
  843. [--keep-section-symbols]
  844. [-N SYMBOLNAME|--strip-symbol=SYMBOLNAME]
  845. [--strip-unneeded-symbol=SYMBOLNAME]
  846. [-G SYMBOLNAME|--keep-global-symbol=SYMBOLNAME]
  847. [--localize-hidden]
  848. [-L SYMBOLNAME|--localize-symbol=SYMBOLNAME]
  849. [--globalize-symbol=SYMBOLNAME]
  850. [--globalize-symbols=FILENAME]
  851. [-W SYMBOLNAME|--weaken-symbol=SYMBOLNAME]
  852. [-w|--wildcard]
  853. [-x|--discard-all]
  854. [-X|--discard-locals]
  855. [-b BYTE|--byte=BYTE]
  856. [-i [BREADTH]|--interleave[=BREADTH]]
  857. [--interleave-width=WIDTH]
  858. [-j SECTIONPATTERN|--only-section=SECTIONPATTERN]
  859. [-R SECTIONPATTERN|--remove-section=SECTIONPATTERN]
  860. [--keep-section=SECTIONPATTERN]
  861. [--remove-relocations=SECTIONPATTERN]
  862. [--strip-section-headers]
  863. [-p|--preserve-dates]
  864. [-D|--enable-deterministic-archives]
  865. [-U|--disable-deterministic-archives]
  866. [--debugging]
  867. [--gap-fill=VAL]
  868. [--pad-to=ADDRESS]
  869. [--set-start=VAL]
  870. [--adjust-start=INCR]
  871. [--change-addresses=INCR]
  872. [--change-section-address SECTIONPATTERN{=,+,-}VAL]
  873. [--change-section-lma SECTIONPATTERN{=,+,-}VAL]
  874. [--change-section-vma SECTIONPATTERN{=,+,-}VAL]
  875. [--change-warnings] [--no-change-warnings]
  876. [--set-section-flags SECTIONPATTERN=FLAGS]
  877. [--set-section-alignment SECTIONPATTERN=ALIGN]
  878. [--add-section SECTIONNAME=FILENAME]
  879. [--dump-section SECTIONNAME=FILENAME]
  880. [--update-section SECTIONNAME=FILENAME]
  881. [--rename-section OLDNAME=NEWNAME[,FLAGS]]
  882. [--long-section-names {enable,disable,keep}]
  883. [--change-leading-char] [--remove-leading-char]
  884. [--reverse-bytes=NUM]
  885. [--srec-len=IVAL] [--srec-forceS3]
  886. [--redefine-sym OLD=NEW]
  887. [--redefine-syms=FILENAME]
  888. [--weaken]
  889. [--keep-symbols=FILENAME]
  890. [--strip-symbols=FILENAME]
  891. [--strip-unneeded-symbols=FILENAME]
  892. [--keep-global-symbols=FILENAME]
  893. [--localize-symbols=FILENAME]
  894. [--weaken-symbols=FILENAME]
  895. [--add-symbol NAME=[SECTION:]VALUE[,FLAGS]]
  896. [--alt-machine-code=INDEX]
  897. [--prefix-symbols=STRING]
  898. [--prefix-sections=STRING]
  899. [--prefix-alloc-sections=STRING]
  900. [--add-gnu-debuglink=PATH-TO-FILE]
  901. [--only-keep-debug]
  902. [--strip-dwo]
  903. [--extract-dwo]
  904. [--extract-symbol]
  905. [--writable-text]
  906. [--readonly-text]
  907. [--pure]
  908. [--impure]
  909. [--file-alignment=NUM]
  910. [--heap=RESERVE[,COMMIT]]
  911. [--image-base=ADDRESS]
  912. [--section-alignment=NUM]
  913. [--stack=RESERVE[,COMMIT]]
  914. [--subsystem=WHICH:MAJOR.MINOR]
  915. [--compress-debug-sections]
  916. [--decompress-debug-sections]
  917. [--elf-stt-common=VAL]
  918. [--merge-notes]
  919. [--no-merge-notes]
  920. [--verilog-data-width=VAL]
  921. [-v|--verbose]
  922. [-V|--version]
  923. [--help] [--info]
  924. INFILE [OUTFILE]
  925. The GNU 'objcopy' utility copies the contents of an object file to
  926. another. 'objcopy' uses the GNU BFD Library to read and write the
  927. object files. It can write the destination object file in a format
  928. different from that of the source object file. The exact behavior of
  929. 'objcopy' is controlled by command-line options. Note that 'objcopy'
  930. should be able to copy a fully linked file between any two formats.
  931. However, copying a relocatable object file between any two formats may
  932. not work as expected.
  933. 'objcopy' creates temporary files to do its translations and deletes
  934. them afterward. 'objcopy' uses BFD to do all its translation work; it
  935. has access to all the formats described in BFD and thus is able to
  936. recognize most formats without being told explicitly. *Note BFD:
  937. (ld.info)BFD.
  938. 'objcopy' can be used to generate S-records by using an output target
  939. of 'srec' (e.g., use '-O srec').
  940. 'objcopy' can be used to generate a raw binary file by using an
  941. output target of 'binary' (e.g., use '-O binary'). When 'objcopy'
  942. generates a raw binary file, it will essentially produce a memory dump
  943. of the contents of the input object file. All symbols and relocation
  944. information will be discarded. The memory dump will start at the load
  945. address of the lowest section copied into the output file.
  946. When generating an S-record or a raw binary file, it may be helpful
  947. to use '-S' to remove sections containing debugging information. In
  948. some cases '-R' will be useful to remove sections which contain
  949. information that is not needed by the binary file.
  950. Note--'objcopy' is not able to change the endianness of its input
  951. files. If the input format has an endianness (some formats do not),
  952. 'objcopy' can only copy the inputs into file formats that have the same
  953. endianness or which have no endianness (e.g., 'srec'). (However, see
  954. the '--reverse-bytes' option.)
  955. 'INFILE'
  956. 'OUTFILE'
  957. The input and output files, respectively. If you do not specify
  958. OUTFILE, 'objcopy' creates a temporary file and destructively
  959. renames the result with the name of INFILE.
  960. '-I BFDNAME'
  961. '--input-target=BFDNAME'
  962. Consider the source file's object format to be BFDNAME, rather than
  963. attempting to deduce it. *Note Target Selection::, for more
  964. information.
  965. '-O BFDNAME'
  966. '--output-target=BFDNAME'
  967. Write the output file using the object format BFDNAME. *Note
  968. Target Selection::, for more information.
  969. '-F BFDNAME'
  970. '--target=BFDNAME'
  971. Use BFDNAME as the object format for both the input and the output
  972. file; i.e., simply transfer data from source to destination with no
  973. translation. *Note Target Selection::, for more information.
  974. '-B BFDARCH'
  975. '--binary-architecture=BFDARCH'
  976. Useful when transforming a architecture-less input file into an
  977. object file. In this case the output architecture can be set to
  978. BFDARCH. This option will be ignored if the input file has a known
  979. BFDARCH. You can access this binary data inside a program by
  980. referencing the special symbols that are created by the conversion
  981. process. These symbols are called _binary_OBJFILE_start,
  982. _binary_OBJFILE_end and _binary_OBJFILE_size. e.g. you can
  983. transform a picture file into an object file and then access it in
  984. your code using these symbols.
  985. '-j SECTIONPATTERN'
  986. '--only-section=SECTIONPATTERN'
  987. Copy only the indicated sections from the input file to the output
  988. file. This option may be given more than once. Note that using
  989. this option inappropriately may make the output file unusable.
  990. Wildcard characters are accepted in SECTIONPATTERN.
  991. If the first character of SECTIONPATTERN is the exclamation point
  992. (!) then matching sections will not be copied, even if earlier use
  993. of '--only-section' on the same command line would otherwise copy
  994. it. For example:
  995. --only-section=.text.* --only-section=!.text.foo
  996. will copy all sectinos matching '.text.*' but not the section
  997. '.text.foo'.
  998. '-R SECTIONPATTERN'
  999. '--remove-section=SECTIONPATTERN'
  1000. Remove any section matching SECTIONPATTERN from the output file.
  1001. This option may be given more than once. Note that using this
  1002. option inappropriately may make the output file unusable. Wildcard
  1003. characters are accepted in SECTIONPATTERN. Using both the '-j' and
  1004. '-R' options together results in undefined behaviour.
  1005. If the first character of SECTIONPATTERN is the exclamation point
  1006. (!) then matching sections will not be removed even if an earlier
  1007. use of '--remove-section' on the same command line would otherwise
  1008. remove it. For example:
  1009. --remove-section=.text.* --remove-section=!.text.foo
  1010. will remove all sections matching the pattern '.text.*', but will
  1011. not remove the section '.text.foo'.
  1012. '--keep-section=SECTIONPATTERN'
  1013. When removing sections from the output file, keep sections that
  1014. match SECTIONPATTERN.
  1015. '--remove-relocations=SECTIONPATTERN'
  1016. Remove non-dynamic relocations from the output file for any section
  1017. matching SECTIONPATTERN. This option may be given more than once.
  1018. Note that using this option inappropriately may make the output
  1019. file unusable, and attempting to remove a dynamic relocation
  1020. section such as '.rela.plt' from an executable or shared library
  1021. with '--remove-relocations=.plt' will not work. Wildcard
  1022. characters are accepted in SECTIONPATTERN. For example:
  1023. --remove-relocations=.text.*
  1024. will remove the relocations for all sections matching the pattern
  1025. '.text.*'.
  1026. If the first character of SECTIONPATTERN is the exclamation point
  1027. (!) then matching sections will not have their relocation removed
  1028. even if an earlier use of '--remove-relocations' on the same
  1029. command line would otherwise cause the relocations to be removed.
  1030. For example:
  1031. --remove-relocations=.text.* --remove-relocations=!.text.foo
  1032. will remove all relocations for sections matching the pattern
  1033. '.text.*', but will not remove relocations for the section
  1034. '.text.foo'.
  1035. '--strip-section-headers'
  1036. Strip section header This option is specific to ELF files. Implies
  1037. '--strip-all' and '--merge-notes'.
  1038. '-S'
  1039. '--strip-all'
  1040. Do not copy relocation and symbol information from the source file.
  1041. Also deletes debug sections.
  1042. '-g'
  1043. '--strip-debug'
  1044. Do not copy debugging symbols or sections from the source file.
  1045. '--strip-unneeded'
  1046. Remove all symbols that are not needed for relocation processing in
  1047. addition to debugging symbols and sections stripped by
  1048. '--strip-debug'.
  1049. '-K SYMBOLNAME'
  1050. '--keep-symbol=SYMBOLNAME'
  1051. When stripping symbols, keep symbol SYMBOLNAME even if it would
  1052. normally be stripped. This option may be given more than once.
  1053. '-N SYMBOLNAME'
  1054. '--strip-symbol=SYMBOLNAME'
  1055. Do not copy symbol SYMBOLNAME from the source file. This option
  1056. may be given more than once.
  1057. '--strip-unneeded-symbol=SYMBOLNAME'
  1058. Do not copy symbol SYMBOLNAME from the source file unless it is
  1059. needed by a relocation. This option may be given more than once.
  1060. '-G SYMBOLNAME'
  1061. '--keep-global-symbol=SYMBOLNAME'
  1062. Keep only symbol SYMBOLNAME global. Make all other symbols local
  1063. to the file, so that they are not visible externally. This option
  1064. may be given more than once. Note: this option cannot be used in
  1065. conjunction with the '--globalize-symbol' or '--globalize-symbols'
  1066. options.
  1067. '--localize-hidden'
  1068. In an ELF object, mark all symbols that have hidden or internal
  1069. visibility as local. This option applies on top of symbol-specific
  1070. localization options such as '-L'.
  1071. '-L SYMBOLNAME'
  1072. '--localize-symbol=SYMBOLNAME'
  1073. Convert a global or weak symbol called SYMBOLNAME into a local
  1074. symbol, so that it is not visible externally. This option may be
  1075. given more than once. Note - unique symbols are not converted.
  1076. '-W SYMBOLNAME'
  1077. '--weaken-symbol=SYMBOLNAME'
  1078. Make symbol SYMBOLNAME weak. This option may be given more than
  1079. once.
  1080. '--globalize-symbol=SYMBOLNAME'
  1081. Give symbol SYMBOLNAME global scoping so that it is visible outside
  1082. of the file in which it is defined. This option may be given more
  1083. than once. Note: this option cannot be used in conjunction with
  1084. the '-G' or '--keep-global-symbol' options.
  1085. '-w'
  1086. '--wildcard'
  1087. Permit regular expressions in SYMBOLNAMEs used in other command
  1088. line options. The question mark (?), asterisk (*), backslash (\)
  1089. and square brackets ([]) operators can be used anywhere in the
  1090. symbol name. If the first character of the symbol name is the
  1091. exclamation point (!) then the sense of the switch is reversed for
  1092. that symbol. For example:
  1093. -w -W !foo -W fo*
  1094. would cause objcopy to weaken all symbols that start with "fo"
  1095. except for the symbol "foo".
  1096. '-x'
  1097. '--discard-all'
  1098. Do not copy non-global symbols from the source file.
  1099. '-X'
  1100. '--discard-locals'
  1101. Do not copy compiler-generated local symbols. (These usually start
  1102. with 'L' or '.'.)
  1103. '-b BYTE'
  1104. '--byte=BYTE'
  1105. If interleaving has been enabled via the '--interleave' option then
  1106. start the range of bytes to keep at the BYTEth byte. BYTE can be
  1107. in the range from 0 to BREADTH-1, where BREADTH is the value given
  1108. by the '--interleave' option.
  1109. '-i [BREADTH]'
  1110. '--interleave[=BREADTH]'
  1111. Only copy a range out of every BREADTH bytes. (Header data is not
  1112. affected). Select which byte in the range begins the copy with the
  1113. '--byte' option. Select the width of the range with the
  1114. '--interleave-width' option.
  1115. This option is useful for creating files to program ROM. It is
  1116. typically used with an 'srec' output target. Note that 'objcopy'
  1117. will complain if you do not specify the '--byte' option as well.
  1118. The default interleave breadth is 4, so with '--byte' set to 0,
  1119. 'objcopy' would copy the first byte out of every four bytes from
  1120. the input to the output.
  1121. '--interleave-width=WIDTH'
  1122. When used with the '--interleave' option, copy WIDTH bytes at a
  1123. time. The start of the range of bytes to be copied is set by the
  1124. '--byte' option, and the extent of the range is set with the
  1125. '--interleave' option.
  1126. The default value for this option is 1. The value of WIDTH plus
  1127. the BYTE value set by the '--byte' option must not exceed the
  1128. interleave breadth set by the '--interleave' option.
  1129. This option can be used to create images for two 16-bit flashes
  1130. interleaved in a 32-bit bus by passing '-b 0 -i 4
  1131. --interleave-width=2' and '-b 2 -i 4 --interleave-width=2' to two
  1132. 'objcopy' commands. If the input was '12345678' then the outputs
  1133. would be '1256' and '3478' respectively.
  1134. '-p'
  1135. '--preserve-dates'
  1136. Set the access and modification dates of the output file to be the
  1137. same as those of the input file.
  1138. This option also copies the date stored in a PE format file's
  1139. header, unless the SOURCE_DATE_EPOCH environment variable is
  1140. defined. If it is defined then this variable will be used as the
  1141. date stored in the header, interpreted as the number of seconds
  1142. since the Unix epoch.
  1143. '-D'
  1144. '--enable-deterministic-archives'
  1145. Operate in _deterministic_ mode. When copying archive members and
  1146. writing the archive index, use zero for UIDs, GIDs, timestamps, and
  1147. use consistent file modes for all files.
  1148. If 'binutils' was configured with
  1149. '--enable-deterministic-archives', then this mode is on by default.
  1150. It can be disabled with the '-U' option, below.
  1151. '-U'
  1152. '--disable-deterministic-archives'
  1153. Do _not_ operate in _deterministic_ mode. This is the inverse of
  1154. the '-D' option, above: when copying archive members and writing
  1155. the archive index, use their actual UID, GID, timestamp, and file
  1156. mode values.
  1157. This is the default unless 'binutils' was configured with
  1158. '--enable-deterministic-archives'.
  1159. '--debugging'
  1160. Convert debugging information, if possible. This is not the
  1161. default because only certain debugging formats are supported, and
  1162. the conversion process can be time consuming.
  1163. '--gap-fill VAL'
  1164. Fill gaps between sections with VAL. This operation applies to the
  1165. _load address_ (LMA) of the sections. It is done by increasing the
  1166. size of the section with the lower address, and filling in the
  1167. extra space created with VAL.
  1168. '--pad-to ADDRESS'
  1169. Pad the output file up to the load address ADDRESS. This is done
  1170. by increasing the size of the last section. The extra space is
  1171. filled in with the value specified by '--gap-fill' (default zero).
  1172. '--set-start VAL'
  1173. Set the start address (also known as the entry address) of the new
  1174. file to VAL. Not all object file formats support setting the start
  1175. address.
  1176. '--change-start INCR'
  1177. '--adjust-start INCR'
  1178. Change the start address (also known as the entry address) by
  1179. adding INCR. Not all object file formats support setting the start
  1180. address.
  1181. '--change-addresses INCR'
  1182. '--adjust-vma INCR'
  1183. Change the VMA and LMA addresses of all sections, as well as the
  1184. start address, by adding INCR. Some object file formats do not
  1185. permit section addresses to be changed arbitrarily. Note that this
  1186. does not relocate the sections; if the program expects sections to
  1187. be loaded at a certain address, and this option is used to change
  1188. the sections such that they are loaded at a different address, the
  1189. program may fail.
  1190. '--change-section-address SECTIONPATTERN{=,+,-}VAL'
  1191. '--adjust-section-vma SECTIONPATTERN{=,+,-}VAL'
  1192. Set or change both the VMA address and the LMA address of any
  1193. section matching SECTIONPATTERN. If '=' is used, the section
  1194. address is set to VAL. Otherwise, VAL is added to or subtracted
  1195. from the section address. See the comments under
  1196. '--change-addresses', above. If SECTIONPATTERN does not match any
  1197. sections in the input file, a warning will be issued, unless
  1198. '--no-change-warnings' is used.
  1199. '--change-section-lma SECTIONPATTERN{=,+,-}VAL'
  1200. Set or change the LMA address of any sections matching
  1201. SECTIONPATTERN. The LMA address is the address where the section
  1202. will be loaded into memory at program load time. Normally this is
  1203. the same as the VMA address, which is the address of the section at
  1204. program run time, but on some systems, especially those where a
  1205. program is held in ROM, the two can be different. If '=' is used,
  1206. the section address is set to VAL. Otherwise, VAL is added to or
  1207. subtracted from the section address. See the comments under
  1208. '--change-addresses', above. If SECTIONPATTERN does not match any
  1209. sections in the input file, a warning will be issued, unless
  1210. '--no-change-warnings' is used.
  1211. '--change-section-vma SECTIONPATTERN{=,+,-}VAL'
  1212. Set or change the VMA address of any section matching
  1213. SECTIONPATTERN. The VMA address is the address where the section
  1214. will be located once the program has started executing. Normally
  1215. this is the same as the LMA address, which is the address where the
  1216. section will be loaded into memory, but on some systems, especially
  1217. those where a program is held in ROM, the two can be different. If
  1218. '=' is used, the section address is set to VAL. Otherwise, VAL is
  1219. added to or subtracted from the section address. See the comments
  1220. under '--change-addresses', above. If SECTIONPATTERN does not
  1221. match any sections in the input file, a warning will be issued,
  1222. unless '--no-change-warnings' is used.
  1223. '--change-warnings'
  1224. '--adjust-warnings'
  1225. If '--change-section-address' or '--change-section-lma' or
  1226. '--change-section-vma' is used, and the section pattern does not
  1227. match any sections, issue a warning. This is the default.
  1228. '--no-change-warnings'
  1229. '--no-adjust-warnings'
  1230. Do not issue a warning if '--change-section-address' or
  1231. '--adjust-section-lma' or '--adjust-section-vma' is used, even if
  1232. the section pattern does not match any sections.
  1233. '--set-section-flags SECTIONPATTERN=FLAGS'
  1234. Set the flags for any sections matching SECTIONPATTERN. The FLAGS
  1235. argument is a comma separated string of flag names. The recognized
  1236. names are 'alloc', 'contents', 'load', 'noload', 'readonly',
  1237. 'code', 'data', 'rom', 'exclude', 'share', 'debug', and 'large'.
  1238. You can set the 'contents' flag for a section which does not have
  1239. contents, but it is not meaningful to clear the 'contents' flag of
  1240. a section which does have contents-just remove the section instead.
  1241. Not all flags are meaningful for all object file formats. In
  1242. particular the 'share' flag is only meaningful for COFF format
  1243. files and not for ELF format files. The ELF x86-64 specific flag
  1244. 'large' corresponds to SHF_X86_64_LARGE.
  1245. '--set-section-alignment SECTIONPATTERN=ALIGN'
  1246. Set the alignment for any sections matching SECTIONPATTERN. ALIGN
  1247. specifies the alignment in bytes and must be a power of two, i.e.
  1248. 1, 2, 4, 8....
  1249. '--add-section SECTIONNAME=FILENAME'
  1250. Add a new section named SECTIONNAME while copying the file. The
  1251. contents of the new section are taken from the file FILENAME. The
  1252. size of the section will be the size of the file. This option only
  1253. works on file formats which can support sections with arbitrary
  1254. names. Note - it may be necessary to use the '--set-section-flags'
  1255. option to set the attributes of the newly created section.
  1256. '--dump-section SECTIONNAME=FILENAME'
  1257. Place the contents of section named SECTIONNAME into the file
  1258. FILENAME, overwriting any contents that may have been there
  1259. previously. This option is the inverse of '--add-section'. This
  1260. option is similar to the '--only-section' option except that it
  1261. does not create a formatted file, it just dumps the contents as raw
  1262. binary data, without applying any relocations. The option can be
  1263. specified more than once.
  1264. '--update-section SECTIONNAME=FILENAME'
  1265. Replace the existing contents of a section named SECTIONNAME with
  1266. the contents of file FILENAME. The size of the section will be
  1267. adjusted to the size of the file. The section flags for
  1268. SECTIONNAME will be unchanged. For ELF format files the section to
  1269. segment mapping will also remain unchanged, something which is not
  1270. possible using '--remove-section' followed by '--add-section'. The
  1271. option can be specified more than once.
  1272. Note - it is possible to use '--rename-section' and
  1273. '--update-section' to both update and rename a section from one
  1274. command line. In this case, pass the original section name to
  1275. '--update-section', and the original and new section names to
  1276. '--rename-section'.
  1277. '--add-symbol NAME=[SECTION:]VALUE[,FLAGS]'
  1278. Add a new symbol named NAME while copying the file. This option
  1279. may be specified multiple times. If the SECTION is given, the
  1280. symbol will be associated with and relative to that section,
  1281. otherwise it will be an ABS symbol. Specifying an undefined
  1282. section will result in a fatal error. There is no check for the
  1283. value, it will be taken as specified. Symbol flags can be
  1284. specified and not all flags will be meaningful for all object file
  1285. formats. By default, the symbol will be global. The special flag
  1286. 'before=OTHERSYM' will insert the new symbol in front of the
  1287. specified OTHERSYM, otherwise the symbol(s) will be added at the
  1288. end of the symbol table in the order they appear.
  1289. '--rename-section OLDNAME=NEWNAME[,FLAGS]'
  1290. Rename a section from OLDNAME to NEWNAME, optionally changing the
  1291. section's flags to FLAGS in the process. This has the advantage
  1292. over using a linker script to perform the rename in that the output
  1293. stays as an object file and does not become a linked executable.
  1294. This option accepts the same set of flags as the
  1295. '--set-section-flags' option.
  1296. This option is particularly helpful when the input format is
  1297. binary, since this will always create a section called .data. If
  1298. for example, you wanted instead to create a section called .rodata
  1299. containing binary data you could use the following command line to
  1300. achieve it:
  1301. objcopy -I binary -O <output_format> -B <architecture> \
  1302. --rename-section .data=.rodata,alloc,load,readonly,data,contents \
  1303. <input_binary_file> <output_object_file>
  1304. '--long-section-names {enable,disable,keep}'
  1305. Controls the handling of long section names when processing 'COFF'
  1306. and 'PE-COFF' object formats. The default behaviour, 'keep', is to
  1307. preserve long section names if any are present in the input file.
  1308. The 'enable' and 'disable' options forcibly enable or disable the
  1309. use of long section names in the output object; when 'disable' is
  1310. in effect, any long section names in the input object will be
  1311. truncated. The 'enable' option will only emit long section names
  1312. if any are present in the inputs; this is mostly the same as
  1313. 'keep', but it is left undefined whether the 'enable' option might
  1314. force the creation of an empty string table in the output file.
  1315. '--change-leading-char'
  1316. Some object file formats use special characters at the start of
  1317. symbols. The most common such character is underscore, which
  1318. compilers often add before every symbol. This option tells
  1319. 'objcopy' to change the leading character of every symbol when it
  1320. converts between object file formats. If the object file formats
  1321. use the same leading character, this option has no effect.
  1322. Otherwise, it will add a character, or remove a character, or
  1323. change a character, as appropriate.
  1324. '--remove-leading-char'
  1325. If the first character of a global symbol is a special symbol
  1326. leading character used by the object file format, remove the
  1327. character. The most common symbol leading character is underscore.
  1328. This option will remove a leading underscore from all global
  1329. symbols. This can be useful if you want to link together objects
  1330. of different file formats with different conventions for symbol
  1331. names. This is different from '--change-leading-char' because it
  1332. always changes the symbol name when appropriate, regardless of the
  1333. object file format of the output file.
  1334. '--reverse-bytes=NUM'
  1335. Reverse the bytes in a section with output contents. A section
  1336. length must be evenly divisible by the value given in order for the
  1337. swap to be able to take place. Reversing takes place before the
  1338. interleaving is performed.
  1339. This option is used typically in generating ROM images for
  1340. problematic target systems. For example, on some target boards,
  1341. the 32-bit words fetched from 8-bit ROMs are re-assembled in
  1342. little-endian byte order regardless of the CPU byte order.
  1343. Depending on the programming model, the endianness of the ROM may
  1344. need to be modified.
  1345. Consider a simple file with a section containing the following
  1346. eight bytes: '12345678'.
  1347. Using '--reverse-bytes=2' for the above example, the bytes in the
  1348. output file would be ordered '21436587'.
  1349. Using '--reverse-bytes=4' for the above example, the bytes in the
  1350. output file would be ordered '43218765'.
  1351. By using '--reverse-bytes=2' for the above example, followed by
  1352. '--reverse-bytes=4' on the output file, the bytes in the second
  1353. output file would be ordered '34127856'.
  1354. '--srec-len=IVAL'
  1355. Meaningful only for srec output. Set the maximum length of the
  1356. Srecords being produced to IVAL. This length covers both address,
  1357. data and crc fields.
  1358. '--srec-forceS3'
  1359. Meaningful only for srec output. Avoid generation of S1/S2
  1360. records, creating S3-only record format.
  1361. '--redefine-sym OLD=NEW'
  1362. Change the name of a symbol OLD, to NEW. This can be useful when
  1363. one is trying link two things together for which you have no
  1364. source, and there are name collisions.
  1365. '--redefine-syms=FILENAME'
  1366. Apply '--redefine-sym' to each symbol pair "OLD NEW" listed in the
  1367. file FILENAME. FILENAME is simply a flat file, with one symbol
  1368. pair per line. Line comments may be introduced by the hash
  1369. character. This option may be given more than once.
  1370. '--weaken'
  1371. Change all global symbols in the file to be weak. This can be
  1372. useful when building an object which will be linked against other
  1373. objects using the '-R' option to the linker. This option is only
  1374. effective when using an object file format which supports weak
  1375. symbols.
  1376. '--keep-symbols=FILENAME'
  1377. Apply '--keep-symbol' option to each symbol listed in the file
  1378. FILENAME. FILENAME is simply a flat file, with one symbol name per
  1379. line. Line comments may be introduced by the hash character. This
  1380. option may be given more than once.
  1381. '--strip-symbols=FILENAME'
  1382. Apply '--strip-symbol' option to each symbol listed in the file
  1383. FILENAME. FILENAME is simply a flat file, with one symbol name per
  1384. line. Line comments may be introduced by the hash character. This
  1385. option may be given more than once.
  1386. '--strip-unneeded-symbols=FILENAME'
  1387. Apply '--strip-unneeded-symbol' option to each symbol listed in the
  1388. file FILENAME. FILENAME is simply a flat file, with one symbol
  1389. name per line. Line comments may be introduced by the hash
  1390. character. This option may be given more than once.
  1391. '--keep-global-symbols=FILENAME'
  1392. Apply '--keep-global-symbol' option to each symbol listed in the
  1393. file FILENAME. FILENAME is simply a flat file, with one symbol
  1394. name per line. Line comments may be introduced by the hash
  1395. character. This option may be given more than once.
  1396. '--localize-symbols=FILENAME'
  1397. Apply '--localize-symbol' option to each symbol listed in the file
  1398. FILENAME. FILENAME is simply a flat file, with one symbol name per
  1399. line. Line comments may be introduced by the hash character. This
  1400. option may be given more than once.
  1401. '--globalize-symbols=FILENAME'
  1402. Apply '--globalize-symbol' option to each symbol listed in the file
  1403. FILENAME. FILENAME is simply a flat file, with one symbol name per
  1404. line. Line comments may be introduced by the hash character. This
  1405. option may be given more than once. Note: this option cannot be
  1406. used in conjunction with the '-G' or '--keep-global-symbol'
  1407. options.
  1408. '--weaken-symbols=FILENAME'
  1409. Apply '--weaken-symbol' option to each symbol listed in the file
  1410. FILENAME. FILENAME is simply a flat file, with one symbol name per
  1411. line. Line comments may be introduced by the hash character. This
  1412. option may be given more than once.
  1413. '--alt-machine-code=INDEX'
  1414. If the output architecture has alternate machine codes, use the
  1415. INDEXth code instead of the default one. This is useful in case a
  1416. machine is assigned an official code and the tool-chain adopts the
  1417. new code, but other applications still depend on the original code
  1418. being used. For ELF based architectures if the INDEX alternative
  1419. does not exist then the value is treated as an absolute number to
  1420. be stored in the e_machine field of the ELF header.
  1421. '--writable-text'
  1422. Mark the output text as writable. This option isn't meaningful for
  1423. all object file formats.
  1424. '--readonly-text'
  1425. Make the output text write protected. This option isn't meaningful
  1426. for all object file formats.
  1427. '--pure'
  1428. Mark the output file as demand paged. This option isn't meaningful
  1429. for all object file formats.
  1430. '--impure'
  1431. Mark the output file as impure. This option isn't meaningful for
  1432. all object file formats.
  1433. '--prefix-symbols=STRING'
  1434. Prefix all symbols in the output file with STRING.
  1435. '--prefix-sections=STRING'
  1436. Prefix all section names in the output file with STRING.
  1437. '--prefix-alloc-sections=STRING'
  1438. Prefix all the names of all allocated sections in the output file
  1439. with STRING.
  1440. '--add-gnu-debuglink=PATH-TO-FILE'
  1441. Creates a .gnu_debuglink section which contains a reference to
  1442. PATH-TO-FILE and adds it to the output file. Note: the file at
  1443. PATH-TO-FILE must exist. Part of the process of adding the
  1444. .gnu_debuglink section involves embedding a checksum of the
  1445. contents of the debug info file into the section.
  1446. If the debug info file is built in one location but it is going to
  1447. be installed at a later time into a different location then do not
  1448. use the path to the installed location. The '--add-gnu-debuglink'
  1449. option will fail because the installed file does not exist yet.
  1450. Instead put the debug info file in the current directory and use
  1451. the '--add-gnu-debuglink' option without any directory components,
  1452. like this:
  1453. objcopy --add-gnu-debuglink=foo.debug
  1454. At debug time the debugger will attempt to look for the separate
  1455. debug info file in a set of known locations. The exact set of
  1456. these locations varies depending upon the distribution being used,
  1457. but it typically includes:
  1458. '* The same directory as the executable.'
  1459. '* A sub-directory of the directory containing the executable'
  1460. called .debug
  1461. '* A global debug directory such as /usr/lib/debug.'
  1462. As long as the debug info file has been installed into one of these
  1463. locations before the debugger is run everything should work
  1464. correctly.
  1465. '--keep-section-symbils'
  1466. When stripping a file, perhaps with '--strip-debug' or
  1467. '--strip-unneeded', retain any symbols specifying section names,
  1468. which would otherwise get stripped.
  1469. '--keep-file-symbols'
  1470. When stripping a file, perhaps with '--strip-debug' or
  1471. '--strip-unneeded', retain any symbols specifying source file
  1472. names, which would otherwise get stripped.
  1473. '--only-keep-debug'
  1474. Strip a file, removing contents of any sections that would not be
  1475. stripped by '--strip-debug' and leaving the debugging sections
  1476. intact. In ELF files, this preserves all note sections in the
  1477. output.
  1478. Note - the section headers of the stripped sections are preserved,
  1479. including their sizes, but the contents of the section are
  1480. discarded. The section headers are preserved so that other tools
  1481. can match up the debuginfo file with the real executable, even if
  1482. that executable has been relocated to a different address space.
  1483. The intention is that this option will be used in conjunction with
  1484. '--add-gnu-debuglink' to create a two part executable. One a
  1485. stripped binary which will occupy less space in RAM and in a
  1486. distribution and the second a debugging information file which is
  1487. only needed if debugging abilities are required. The suggested
  1488. procedure to create these files is as follows:
  1489. 1. Link the executable as normal. Assuming that it is called
  1490. 'foo' then...
  1491. 2. Run 'objcopy --only-keep-debug foo foo.dbg' to create a file
  1492. containing the debugging info.
  1493. 3. Run 'objcopy --strip-debug foo' to create a stripped
  1494. executable.
  1495. 4. Run 'objcopy --add-gnu-debuglink=foo.dbg foo' to add a link to
  1496. the debugging info into the stripped executable.
  1497. Note--the choice of '.dbg' as an extension for the debug info file
  1498. is arbitrary. Also the '--only-keep-debug' step is optional. You
  1499. could instead do this:
  1500. 1. Link the executable as normal.
  1501. 2. Copy 'foo' to 'foo.full'
  1502. 3. Run 'objcopy --strip-debug foo'
  1503. 4. Run 'objcopy --add-gnu-debuglink=foo.full foo'
  1504. i.e., the file pointed to by the '--add-gnu-debuglink' can be the
  1505. full executable. It does not have to be a file created by the
  1506. '--only-keep-debug' switch.
  1507. Note--this switch is only intended for use on fully linked files.
  1508. It does not make sense to use it on object files where the
  1509. debugging information may be incomplete. Besides the gnu_debuglink
  1510. feature currently only supports the presence of one filename
  1511. containing debugging information, not multiple filenames on a
  1512. one-per-object-file basis.
  1513. '--strip-dwo'
  1514. Remove the contents of all DWARF .dwo sections, leaving the
  1515. remaining debugging sections and all symbols intact. This option
  1516. is intended for use by the compiler as part of the '-gsplit-dwarf'
  1517. option, which splits debug information between the .o file and a
  1518. separate .dwo file. The compiler generates all debug information
  1519. in the same file, then uses the '--extract-dwo' option to copy the
  1520. .dwo sections to the .dwo file, then the '--strip-dwo' option to
  1521. remove those sections from the original .o file.
  1522. '--extract-dwo'
  1523. Extract the contents of all DWARF .dwo sections. See the
  1524. '--strip-dwo' option for more information.
  1525. '--file-alignment NUM'
  1526. Specify the file alignment. Sections in the file will always begin
  1527. at file offsets which are multiples of this number. This defaults
  1528. to 512. [This option is specific to PE targets.]
  1529. '--heap RESERVE'
  1530. '--heap RESERVE,COMMIT'
  1531. Specify the number of bytes of memory to reserve (and optionally
  1532. commit) to be used as heap for this program. [This option is
  1533. specific to PE targets.]
  1534. '--image-base VALUE'
  1535. Use VALUE as the base address of your program or dll. This is the
  1536. lowest memory location that will be used when your program or dll
  1537. is loaded. To reduce the need to relocate and improve performance
  1538. of your dlls, each should have a unique base address and not
  1539. overlap any other dlls. The default is 0x400000 for executables,
  1540. and 0x10000000 for dlls. [This option is specific to PE targets.]
  1541. '--section-alignment NUM'
  1542. Sets the section alignment field in the PE header. Sections in
  1543. memory will always begin at addresses which are a multiple of this
  1544. number. Defaults to 0x1000. [This option is specific to PE
  1545. targets.]
  1546. '--stack RESERVE'
  1547. '--stack RESERVE,COMMIT'
  1548. Specify the number of bytes of memory to reserve (and optionally
  1549. commit) to be used as stack for this program. [This option is
  1550. specific to PE targets.]
  1551. '--subsystem WHICH'
  1552. '--subsystem WHICH:MAJOR'
  1553. '--subsystem WHICH:MAJOR.MINOR'
  1554. Specifies the subsystem under which your program will execute. The
  1555. legal values for WHICH are 'native', 'windows', 'console', 'posix',
  1556. 'efi-app', 'efi-bsd', 'efi-rtd', 'sal-rtd', and 'xbox'. You may
  1557. optionally set the subsystem version also. Numeric values are also
  1558. accepted for WHICH. [This option is specific to PE targets.]
  1559. '--extract-symbol'
  1560. Keep the file's section flags and symbols but remove all section
  1561. data. Specifically, the option:
  1562. * removes the contents of all sections;
  1563. * sets the size of every section to zero; and
  1564. * sets the file's start address to zero.
  1565. This option is used to build a '.sym' file for a VxWorks kernel.
  1566. It can also be a useful way of reducing the size of a
  1567. '--just-symbols' linker input file.
  1568. '--compress-debug-sections'
  1569. Compress DWARF debug sections using zlib with SHF_COMPRESSED from
  1570. the ELF ABI. Note - if compression would actually make a section
  1571. _larger_, then it is not compressed.
  1572. '--compress-debug-sections=none'
  1573. '--compress-debug-sections=zlib'
  1574. '--compress-debug-sections=zlib-gnu'
  1575. '--compress-debug-sections=zlib-gabi'
  1576. '--compress-debug-sections=zstd'
  1577. For ELF files, these options control how DWARF debug sections are
  1578. compressed. '--compress-debug-sections=none' is equivalent to
  1579. '--decompress-debug-sections'. '--compress-debug-sections=zlib'
  1580. and '--compress-debug-sections=zlib-gabi' are equivalent to
  1581. '--compress-debug-sections'. '--compress-debug-sections=zlib-gnu'
  1582. compresses DWARF debug sections using the obsoleted zlib-gnu
  1583. format. The debug sections are renamed to begin with '.zdebug'.
  1584. '--compress-debug-sections=zstd' compresses DWARF debug sections
  1585. using zstd. Note - if compression would actually make a section
  1586. _larger_, then it is not compressed nor renamed.
  1587. '--decompress-debug-sections'
  1588. Decompress DWARF debug sections. For a '.zdebug' section, the
  1589. original name is restored.
  1590. '--elf-stt-common=yes'
  1591. '--elf-stt-common=no'
  1592. For ELF files, these options control whether common symbols should
  1593. be converted to the 'STT_COMMON' or 'STT_OBJECT' type.
  1594. '--elf-stt-common=yes' converts common symbol type to 'STT_COMMON'.
  1595. '--elf-stt-common=no' converts common symbol type to 'STT_OBJECT'.
  1596. '--merge-notes'
  1597. '--no-merge-notes'
  1598. For ELF files, attempt (or do not attempt) to reduce the size of
  1599. any SHT_NOTE type sections by removing duplicate notes.
  1600. '-V'
  1601. '--version'
  1602. Show the version number of 'objcopy'.
  1603. '--verilog-data-width=BYTES'
  1604. For Verilog output, this options controls the number of bytes
  1605. converted for each output data element. The input target controls
  1606. the endianness of the conversion.
  1607. '-v'
  1608. '--verbose'
  1609. Verbose output: list all object files modified. In the case of
  1610. archives, 'objcopy -V' lists all members of the archive.
  1611. '--help'
  1612. Show a summary of the options to 'objcopy'.
  1613. '--info'
  1614. Display a list showing all architectures and object formats
  1615. available.
  1616. 
  1617. File: binutils.info, Node: objdump, Next: ranlib, Prev: objcopy, Up: Top
  1618. 4 objdump
  1619. *********
  1620. objdump [-a|--archive-headers]
  1621. [-b BFDNAME|--target=BFDNAME]
  1622. [-C|--demangle[=STYLE] ]
  1623. [-d|--disassemble[=SYMBOL]]
  1624. [-D|--disassemble-all]
  1625. [-z|--disassemble-zeroes]
  1626. [-EB|-EL|--endian={big | little }]
  1627. [-f|--file-headers]
  1628. [-F|--file-offsets]
  1629. [--file-start-context]
  1630. [-g|--debugging]
  1631. [-e|--debugging-tags]
  1632. [-h|--section-headers|--headers]
  1633. [-i|--info]
  1634. [-j SECTION|--section=SECTION]
  1635. [-l|--line-numbers]
  1636. [-S|--source]
  1637. [--source-comment[=TEXT]]
  1638. [-m MACHINE|--architecture=MACHINE]
  1639. [-M OPTIONS|--disassembler-options=OPTIONS]
  1640. [-p|--private-headers]
  1641. [-P OPTIONS|--private=OPTIONS]
  1642. [-r|--reloc]
  1643. [-R|--dynamic-reloc]
  1644. [-s|--full-contents]
  1645. [-Z|--decompress]
  1646. [-W[lLiaprmfFsoORtUuTgAck]|
  1647. --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
  1648. [-WK|--dwarf=follow-links]
  1649. [-WN|--dwarf=no-follow-links]
  1650. [-wD|--dwarf=use-debuginfod]
  1651. [-wE|--dwarf=do-not-use-debuginfod]
  1652. [-L|--process-links]
  1653. [--ctf=SECTION]
  1654. [--sframe=SECTION]
  1655. [-G|--stabs]
  1656. [-t|--syms]
  1657. [-T|--dynamic-syms]
  1658. [-x|--all-headers]
  1659. [-w|--wide]
  1660. [--start-address=ADDRESS]
  1661. [--stop-address=ADDRESS]
  1662. [--no-addresses]
  1663. [--prefix-addresses]
  1664. [--[no-]show-raw-insn]
  1665. [--adjust-vma=OFFSET]
  1666. [--show-all-symbols]
  1667. [--dwarf-depth=N]
  1668. [--dwarf-start=N]
  1669. [--ctf-parent=SECTION]
  1670. [--no-recurse-limit|--recurse-limit]
  1671. [--special-syms]
  1672. [--prefix=PREFIX]
  1673. [--prefix-strip=LEVEL]
  1674. [--insn-width=WIDTH]
  1675. [--visualize-jumps[=color|=extended-color|=off]
  1676. [--disassembler-color=[off|terminal|on|extended]
  1677. [-U METHOD] [--unicode=METHOD]
  1678. [-V|--version]
  1679. [-H|--help]
  1680. OBJFILE...
  1681. 'objdump' displays information about one or more object files. The
  1682. options control what particular information to display. This
  1683. information is mostly useful to programmers who are working on the
  1684. compilation tools, as opposed to programmers who just want their program
  1685. to compile and work.
  1686. OBJFILE... are the object files to be examined. When you specify
  1687. archives, 'objdump' shows information on each of the member object
  1688. files.
  1689. The long and short forms of options, shown here as alternatives, are
  1690. equivalent. At least one option from the list
  1691. '-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-P,-r,-R,-s,-S,-t,-T,-V,-x' must be
  1692. given.
  1693. '-a'
  1694. '--archive-header'
  1695. If any of the OBJFILE files are archives, display the archive
  1696. header information (in a format similar to 'ls -l'). Besides the
  1697. information you could list with 'ar tv', 'objdump -a' shows the
  1698. object file format of each archive member.
  1699. '--adjust-vma=OFFSET'
  1700. When dumping information, first add OFFSET to all the section
  1701. addresses. This is useful if the section addresses do not
  1702. correspond to the symbol table, which can happen when putting
  1703. sections at particular addresses when using a format which can not
  1704. represent section addresses, such as a.out.
  1705. '-b BFDNAME'
  1706. '--target=BFDNAME'
  1707. Specify that the object-code format for the object files is
  1708. BFDNAME. This option may not be necessary; OBJDUMP can
  1709. automatically recognize many formats.
  1710. For example,
  1711. objdump -b oasys -m vax -h fu.o
  1712. displays summary information from the section headers ('-h') of
  1713. 'fu.o', which is explicitly identified ('-m') as a VAX object file
  1714. in the format produced by Oasys compilers. You can list the
  1715. formats available with the '-i' option. *Note Target Selection::,
  1716. for more information.
  1717. '-C'
  1718. '--demangle[=STYLE]'
  1719. Decode ("demangle") low-level symbol names into user-level names.
  1720. Besides removing any initial underscore prepended by the system,
  1721. this makes C++ function names readable. Different compilers have
  1722. different mangling styles. The optional demangling style argument
  1723. can be used to choose an appropriate demangling style for your
  1724. compiler. *Note c++filt::, for more information on demangling.
  1725. '--recurse-limit'
  1726. '--no-recurse-limit'
  1727. '--recursion-limit'
  1728. '--no-recursion-limit'
  1729. Enables or disables a limit on the amount of recursion performed
  1730. whilst demangling strings. Since the name mangling formats allow
  1731. for an infinite level of recursion it is possible to create strings
  1732. whose decoding will exhaust the amount of stack space available on
  1733. the host machine, triggering a memory fault. The limit tries to
  1734. prevent this from happening by restricting recursion to 2048 levels
  1735. of nesting.
  1736. The default is for this limit to be enabled, but disabling it may
  1737. be necessary in order to demangle truly complicated names. Note
  1738. however that if the recursion limit is disabled then stack
  1739. exhaustion is possible and any bug reports about such an event will
  1740. be rejected.
  1741. '-g'
  1742. '--debugging'
  1743. Display debugging information. This attempts to parse STABS
  1744. debugging format information stored in the file and print it out
  1745. using a C like syntax. If no STABS debugging was found this option
  1746. falls back on the '-W' option to print any DWARF information in the
  1747. file.
  1748. '-e'
  1749. '--debugging-tags'
  1750. Like '-g', but the information is generated in a format compatible
  1751. with ctags tool.
  1752. '-d'
  1753. '--disassemble'
  1754. '--disassemble=SYMBOL'
  1755. Display the assembler mnemonics for the machine instructions from
  1756. the input file. This option only disassembles those sections which
  1757. are expected to contain instructions. If the optional SYMBOL
  1758. argument is given, then display the assembler mnemonics starting at
  1759. SYMBOL. If SYMBOL is a function name then disassembly will stop at
  1760. the end of the function, otherwise it will stop when the next
  1761. symbol is encountered. If there are no matches for SYMBOL then
  1762. nothing will be displayed.
  1763. Note if the '--dwarf=follow-links' option is enabled then any
  1764. symbol tables in linked debug info files will be read in and used
  1765. when disassembling.
  1766. '-D'
  1767. '--disassemble-all'
  1768. Like '-d', but disassemble the contents of all non-empty non-bss
  1769. sections, not just those expected to contain instructions. '-j'
  1770. may be used to select specific sections.
  1771. This option also has a subtle effect on the disassembly of
  1772. instructions in code sections. When option '-d' is in effect
  1773. objdump will assume that any symbols present in a code section
  1774. occur on the boundary between instructions and it will refuse to
  1775. disassemble across such a boundary. When option '-D' is in effect
  1776. however this assumption is supressed. This means that it is
  1777. possible for the output of '-d' and '-D' to differ if, for example,
  1778. data is stored in code sections.
  1779. If the target is an ARM architecture this switch also has the
  1780. effect of forcing the disassembler to decode pieces of data found
  1781. in code sections as if they were instructions.
  1782. Note if the '--dwarf=follow-links' option is enabled then any
  1783. symbol tables in linked debug info files will be read in and used
  1784. when disassembling.
  1785. '--no-addresses'
  1786. When disassembling, don't print addresses on each line or for
  1787. symbols and relocation offsets. In combination with
  1788. '--no-show-raw-insn' this may be useful for comparing compiler
  1789. output.
  1790. '--prefix-addresses'
  1791. When disassembling, print the complete address on each line. This
  1792. is the older disassembly format.
  1793. '-EB'
  1794. '-EL'
  1795. '--endian={big|little}'
  1796. Specify the endianness of the object files. This only affects
  1797. disassembly. This can be useful when disassembling a file format
  1798. which does not describe endianness information, such as S-records.
  1799. '-f'
  1800. '--file-headers'
  1801. Display summary information from the overall header of each of the
  1802. OBJFILE files.
  1803. '-F'
  1804. '--file-offsets'
  1805. When disassembling sections, whenever a symbol is displayed, also
  1806. display the file offset of the region of data that is about to be
  1807. dumped. If zeroes are being skipped, then when disassembly
  1808. resumes, tell the user how many zeroes were skipped and the file
  1809. offset of the location from where the disassembly resumes. When
  1810. dumping sections, display the file offset of the location from
  1811. where the dump starts.
  1812. '--file-start-context'
  1813. Specify that when displaying interlisted source code/disassembly
  1814. (assumes '-S') from a file that has not yet been displayed, extend
  1815. the context to the start of the file.
  1816. '-h'
  1817. '--section-headers'
  1818. '--headers'
  1819. Display summary information from the section headers of the object
  1820. file.
  1821. File segments may be relocated to nonstandard addresses, for
  1822. example by using the '-Ttext', '-Tdata', or '-Tbss' options to
  1823. 'ld'. However, some object file formats, such as a.out, do not
  1824. store the starting address of the file segments. In those
  1825. situations, although 'ld' relocates the sections correctly, using
  1826. 'objdump -h' to list the file section headers cannot show the
  1827. correct addresses. Instead, it shows the usual addresses, which
  1828. are implicit for the target.
  1829. Note, in some cases it is possible for a section to have both the
  1830. READONLY and the NOREAD attributes set. In such cases the NOREAD
  1831. attribute takes precedence, but 'objdump' will report both since
  1832. the exact setting of the flag bits might be important.
  1833. '-H'
  1834. '--help'
  1835. Print a summary of the options to 'objdump' and exit.
  1836. '-i'
  1837. '--info'
  1838. Display a list showing all architectures and object formats
  1839. available for specification with '-b' or '-m'.
  1840. '-j NAME'
  1841. '--section=NAME'
  1842. Display information for section NAME. This option may be specified
  1843. multiple times.
  1844. '-L'
  1845. '--process-links'
  1846. Display the contents of non-debug sections found in separate
  1847. debuginfo files that are linked to the main file. This option
  1848. automatically implies the '-WK' option, and only sections requested
  1849. by other command line options will be displayed.
  1850. '-l'
  1851. '--line-numbers'
  1852. Label the display (using debugging information) with the filename
  1853. and source line numbers corresponding to the object code or relocs
  1854. shown. Only useful with '-d', '-D', or '-r'.
  1855. '-m MACHINE'
  1856. '--architecture=MACHINE'
  1857. Specify the architecture to use when disassembling object files.
  1858. This can be useful when disassembling object files which do not
  1859. describe architecture information, such as S-records. You can list
  1860. the available architectures with the '-i' option.
  1861. For most architectures it is possible to supply an architecture
  1862. name and a machine name, separated by a colon. For example
  1863. 'foo:bar' would refer to the 'bar' machine type in the 'foo'
  1864. architecture. This can be helpful if objdump has been configured
  1865. to support multiple architectures.
  1866. If the target is an ARM architecture then this switch has an
  1867. additional effect. It restricts the disassembly to only those
  1868. instructions supported by the architecture specified by MACHINE.
  1869. If it is necessary to use this switch because the input file does
  1870. not contain any architecture information, but it is also desired to
  1871. disassemble all the instructions use '-marm'.
  1872. '-M OPTIONS'
  1873. '--disassembler-options=OPTIONS'
  1874. Pass target specific information to the disassembler. Only
  1875. supported on some targets. If it is necessary to specify more than
  1876. one disassembler option then multiple '-M' options can be used or
  1877. can be placed together into a comma separated list.
  1878. For ARC, 'dsp' controls the printing of DSP instructions, 'spfp'
  1879. selects the printing of FPX single precision FP instructions,
  1880. 'dpfp' selects the printing of FPX double precision FP
  1881. instructions, 'quarkse_em' selects the printing of special
  1882. QuarkSE-EM instructions, 'fpuda' selects the printing of double
  1883. precision assist instructions, 'fpus' selects the printing of FPU
  1884. single precision FP instructions, while 'fpud' selects the printing
  1885. of FPU double precision FP instructions. Additionally, one can
  1886. choose to have all the immediates printed in hexadecimal using
  1887. 'hex'. By default, the short immediates are printed using the
  1888. decimal representation, while the long immediate values are printed
  1889. as hexadecimal.
  1890. 'cpu=...' allows one to enforce a particular ISA when disassembling
  1891. instructions, overriding the '-m' value or whatever is in the ELF
  1892. file. This might be useful to select ARC EM or HS ISA, because
  1893. architecture is same for those and disassembler relies on private
  1894. ELF header data to decide if code is for EM or HS. This option
  1895. might be specified multiple times - only the latest value will be
  1896. used. Valid values are same as for the assembler '-mcpu=...'
  1897. option.
  1898. If the target is an ARM architecture then this switch can be used
  1899. to select which register name set is used during disassembler.
  1900. Specifying '-M reg-names-std' (the default) will select the
  1901. register names as used in ARM's instruction set documentation, but
  1902. with register 13 called 'sp', register 14 called 'lr' and register
  1903. 15 called 'pc'. Specifying '-M reg-names-apcs' will select the
  1904. name set used by the ARM Procedure Call Standard, whilst specifying
  1905. '-M reg-names-raw' will just use 'r' followed by the register
  1906. number.
  1907. There are also two variants on the APCS register naming scheme
  1908. enabled by '-M reg-names-atpcs' and '-M reg-names-special-atpcs'
  1909. which use the ARM/Thumb Procedure Call Standard naming conventions.
  1910. (Either with the normal register names or the special register
  1911. names).
  1912. This option can also be used for ARM architectures to force the
  1913. disassembler to interpret all instructions as Thumb instructions by
  1914. using the switch '--disassembler-options=force-thumb'. This can be
  1915. useful when attempting to disassemble thumb code produced by other
  1916. compilers.
  1917. For AArch64 targets this switch can be used to set whether
  1918. instructions are disassembled as the most general instruction using
  1919. the '-M no-aliases' option or whether instruction notes should be
  1920. generated as comments in the disasssembly using '-M notes'.
  1921. For the x86, some of the options duplicate functions of the '-m'
  1922. switch, but allow finer grained control.
  1923. 'x86-64'
  1924. 'i386'
  1925. 'i8086'
  1926. Select disassembly for the given architecture.
  1927. 'intel'
  1928. 'att'
  1929. Select between intel syntax mode and AT&T syntax mode.
  1930. 'amd64'
  1931. 'intel64'
  1932. Select between AMD64 ISA and Intel64 ISA.
  1933. 'intel-mnemonic'
  1934. 'att-mnemonic'
  1935. Select between intel mnemonic mode and AT&T mnemonic mode.
  1936. Note: 'intel-mnemonic' implies 'intel' and 'att-mnemonic'
  1937. implies 'att'.
  1938. 'addr64'
  1939. 'addr32'
  1940. 'addr16'
  1941. 'data32'
  1942. 'data16'
  1943. Specify the default address size and operand size. These five
  1944. options will be overridden if 'x86-64', 'i386' or 'i8086'
  1945. appear later in the option string.
  1946. 'suffix'
  1947. When in AT&T mode and also for a limited set of instructions
  1948. when in Intel mode, instructs the disassembler to print a
  1949. mnemonic suffix even when the suffix could be inferred by the
  1950. operands or, for certain instructions, the execution mode's
  1951. defaults.
  1952. For PowerPC, the '-M' argument 'raw' selects disasssembly of
  1953. hardware insns rather than aliases. For example, you will see
  1954. 'rlwinm' rather than 'clrlwi', and 'addi' rather than 'li'. All of
  1955. the '-m' arguments for 'gas' that select a CPU are supported.
  1956. These are: '403', '405', '440', '464', '476', '601', '603', '604',
  1957. '620', '7400', '7410', '7450', '7455', '750cl', '821', '850',
  1958. '860', 'a2', 'booke', 'booke32', 'cell', 'com', 'e200z2', 'e200z4',
  1959. 'e300', 'e500', 'e500mc', 'e500mc64', 'e500x2', 'e5500', 'e6500',
  1960. 'efs', 'power4', 'power5', 'power6', 'power7', 'power8', 'power9',
  1961. 'power10', 'power11', 'ppc', 'ppc32', 'ppc64', 'ppc64bridge',
  1962. 'ppcps', 'pwr', 'pwr2', 'pwr4', 'pwr5', 'pwr5x', 'pwr6', 'pwr7',
  1963. 'pwr8', 'pwr9', 'pwr10', 'pwr11', 'pwrx', 'titan', 'vle', and
  1964. 'future'. '32' and '64' modify the default or a prior CPU
  1965. selection, disabling and enabling 64-bit insns respectively. In
  1966. addition, 'altivec', 'any', 'lsp', 'htm', 'vsx', 'spe' and 'spe2'
  1967. add capabilities to a previous _or later_ CPU selection. 'any'
  1968. will disassemble any opcode known to binutils, but in cases where
  1969. an opcode has two different meanings or different arguments, you
  1970. may not see the disassembly you expect. If you disassemble without
  1971. giving a CPU selection, a default will be chosen from information
  1972. gleaned by BFD from the object files headers, but the result again
  1973. may not be as you expect.
  1974. For MIPS, this option controls the printing of instruction mnemonic
  1975. names and register names in disassembled instructions. Multiple
  1976. selections from the following may be specified as a comma separated
  1977. string, and invalid options are ignored:
  1978. 'no-aliases'
  1979. Print the 'raw' instruction mnemonic instead of some pseudo
  1980. instruction mnemonic. I.e., print 'daddu' or 'or' instead of
  1981. 'move', 'sll' instead of 'nop', etc.
  1982. 'msa'
  1983. Disassemble MSA instructions.
  1984. 'virt'
  1985. Disassemble the virtualization ASE instructions.
  1986. 'xpa'
  1987. Disassemble the eXtended Physical Address (XPA) ASE
  1988. instructions.
  1989. 'gpr-names=ABI'
  1990. Print GPR (general-purpose register) names as appropriate for
  1991. the specified ABI. By default, GPR names are selected
  1992. according to the ABI of the binary being disassembled.
  1993. 'fpr-names=ABI'
  1994. Print FPR (floating-point register) names as appropriate for
  1995. the specified ABI. By default, FPR numbers are printed rather
  1996. than names.
  1997. 'cp0-names=ARCH'
  1998. Print CP0 (system control coprocessor; coprocessor 0) register
  1999. names as appropriate for the CPU or architecture specified by
  2000. ARCH. By default, CP0 register names are selected according
  2001. to the architecture and CPU of the binary being disassembled.
  2002. 'hwr-names=ARCH'
  2003. Print HWR (hardware register, used by the 'rdhwr' instruction)
  2004. names as appropriate for the CPU or architecture specified by
  2005. ARCH. By default, HWR names are selected according to the
  2006. architecture and CPU of the binary being disassembled.
  2007. 'reg-names=ABI'
  2008. Print GPR and FPR names as appropriate for the selected ABI.
  2009. 'reg-names=ARCH'
  2010. Print CPU-specific register names (CP0 register and HWR names)
  2011. as appropriate for the selected CPU or architecture.
  2012. For any of the options listed above, ABI or ARCH may be specified
  2013. as 'numeric' to have numbers printed rather than names, for the
  2014. selected types of registers. You can list the available values of
  2015. ABI and ARCH using the '--help' option.
  2016. For VAX, you can specify function entry addresses with '-M
  2017. entry:0xf00ba'. You can use this multiple times to properly
  2018. disassemble VAX binary files that don't contain symbol tables (like
  2019. ROM dumps). In these cases, the function entry mask would
  2020. otherwise be decoded as VAX instructions, which would probably lead
  2021. the rest of the function being wrongly disassembled.
  2022. '-p'
  2023. '--private-headers'
  2024. Print information that is specific to the object file format. The
  2025. exact information printed depends upon the object file format. For
  2026. some object file formats, no additional information is printed.
  2027. '-P OPTIONS'
  2028. '--private=OPTIONS'
  2029. Print information that is specific to the object file format. The
  2030. argument OPTIONS is a comma separated list that depends on the
  2031. format (the lists of options is displayed with the help).
  2032. For XCOFF, the available options are:
  2033. 'header'
  2034. 'aout'
  2035. 'sections'
  2036. 'syms'
  2037. 'relocs'
  2038. 'lineno,'
  2039. 'loader'
  2040. 'except'
  2041. 'typchk'
  2042. 'traceback'
  2043. 'toc'
  2044. 'ldinfo'
  2045. For PE, the available options are:
  2046. 'header'
  2047. 'sections'
  2048. Not all object formats support this option. In particular the ELF
  2049. format does not use it.
  2050. '-r'
  2051. '--reloc'
  2052. Print the relocation entries of the file. If used with '-d' or
  2053. '-D', the relocations are printed interspersed with the
  2054. disassembly.
  2055. '-R'
  2056. '--dynamic-reloc'
  2057. Print the dynamic relocation entries of the file. This is only
  2058. meaningful for dynamic objects, such as certain types of shared
  2059. libraries. As for '-r', if used with '-d' or '-D', the relocations
  2060. are printed interspersed with the disassembly.
  2061. '-s'
  2062. '--full-contents'
  2063. Display the full contents of sections, often used in combination
  2064. with '-j' to request specific sections. By default all non-empty
  2065. non-bss sections are displayed. By default any compressed section
  2066. will be displayed in its compressed form. In order to see the
  2067. contents in a decompressed form add the '-Z' option to the command
  2068. line.
  2069. '-S'
  2070. '--source'
  2071. Display source code intermixed with disassembly, if possible.
  2072. Implies '-d'.
  2073. '--show-all-symbols'
  2074. When disassembling, show all the symbols that match a given
  2075. address, not just the first one.
  2076. '--source-comment[=TXT]'
  2077. Like the '-S' option, but all source code lines are displayed with
  2078. a prefix of TXT. Typically TXT will be a comment string which can
  2079. be used to distinguish the assembler code from the source code. If
  2080. TXT is not provided then a default string of "# " (hash followed by
  2081. a space), will be used.
  2082. '--prefix=PREFIX'
  2083. Specify PREFIX to add to the absolute paths when used with '-S'.
  2084. '--prefix-strip=LEVEL'
  2085. Indicate how many initial directory names to strip off the
  2086. hardwired absolute paths. It has no effect without
  2087. '--prefix='PREFIX.
  2088. '--show-raw-insn'
  2089. When disassembling instructions, print the instruction in hex as
  2090. well as in symbolic form. This is the default except when
  2091. '--prefix-addresses' is used.
  2092. '--no-show-raw-insn'
  2093. When disassembling instructions, do not print the instruction
  2094. bytes. This is the default when '--prefix-addresses' is used.
  2095. '--insn-width=WIDTH'
  2096. Display WIDTH bytes on a single line when disassembling
  2097. instructions.
  2098. '--visualize-jumps[=color|=extended-color|=off]'
  2099. Visualize jumps that stay inside a function by drawing ASCII art
  2100. between the start and target addresses. The optional '=color'
  2101. argument adds color to the output using simple terminal colors.
  2102. Alternatively the '=extended-color' argument will add color using
  2103. 8bit colors, but these might not work on all terminals.
  2104. If it is necessary to disable the 'visualize-jumps' option after it
  2105. has previously been enabled then use 'visualize-jumps=off'.
  2106. '--disassembler-color=off'
  2107. '--disassembler-color=terminal'
  2108. '--disassembler-color=on|color|colour'
  2109. '--disassembler-color=extened|extended-color|extened-colour'
  2110. Enables or disables the use of colored syntax highlighting in
  2111. disassembly output. The default behaviour is determined via a
  2112. configure time option. Note, not all architectures support colored
  2113. syntax highlighting, and depending upon the terminal used, colored
  2114. output may not actually be legible.
  2115. The 'on' argument adds colors using simple terminal colors.
  2116. The 'terminal' argument does the same, but only if the output
  2117. device is a terminal.
  2118. The 'extended-color' argument is similar to the 'on' argument, but
  2119. it uses 8-bit colors. These may not work on all terminals.
  2120. The 'off' argument disables colored disassembly.
  2121. '-W[lLiaprmfFsoORtUuTgAckK]'
  2122. '--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]'
  2123. Displays the contents of the DWARF debug sections in the file, if
  2124. any are present. Compressed debug sections are automatically
  2125. decompressed (temporarily) before they are displayed. If one or
  2126. more of the optional letters or words follows the switch then only
  2127. those type(s) of data will be dumped. The letters and words refer
  2128. to the following information:
  2129. 'a'
  2130. '=abbrev'
  2131. Displays the contents of the '.debug_abbrev' section.
  2132. 'A'
  2133. '=addr'
  2134. Displays the contents of the '.debug_addr' section.
  2135. 'c'
  2136. '=cu_index'
  2137. Displays the contents of the '.debug_cu_index' and/or
  2138. '.debug_tu_index' sections.
  2139. 'f'
  2140. '=frames'
  2141. Display the raw contents of a '.debug_frame' section.
  2142. 'F'
  2143. '=frames-interp'
  2144. Display the interpreted contents of a '.debug_frame' section.
  2145. 'g'
  2146. '=gdb_index'
  2147. Displays the contents of the '.gdb_index' and/or
  2148. '.debug_names' sections.
  2149. 'i'
  2150. '=info'
  2151. Displays the contents of the '.debug_info' section. Note: the
  2152. output from this option can also be restricted by the use of
  2153. the '--dwarf-depth' and '--dwarf-start' options.
  2154. 'k'
  2155. '=links'
  2156. Displays the contents of the '.gnu_debuglink',
  2157. '.gnu_debugaltlink' and '.debug_sup' sections, if any of them
  2158. are present. Also displays any links to separate dwarf object
  2159. files (dwo), if they are specified by the DW_AT_GNU_dwo_name
  2160. or DW_AT_dwo_name attributes in the '.debug_info' section.
  2161. 'K'
  2162. '=follow-links'
  2163. Display the contents of any selected debug sections that are
  2164. found in linked, separate debug info file(s). This can result
  2165. in multiple versions of the same debug section being displayed
  2166. if it exists in more than one file.
  2167. In addition, when displaying DWARF attributes, if a form is
  2168. found that references the separate debug info file, then the
  2169. referenced contents will also be displayed.
  2170. Note - in some distributions this option is enabled by
  2171. default. It can be disabled via the 'N' debug option. The
  2172. default can be chosen when configuring the binutils via the
  2173. '--enable-follow-debug-links=yes' or
  2174. '--enable-follow-debug-links=no' options. If these are not
  2175. used then the default is to enable the following of debug
  2176. links.
  2177. Note - if support for the debuginfod protocol was enabled when
  2178. the binutils were built then this option will also include an
  2179. attempt to contact any debuginfod servers mentioned in the
  2180. DEBUGINFOD_URLS environment variable. This could take some
  2181. time to resolve. This behaviour can be disabled via the
  2182. '=do-not-use-debuginfod' debug option.
  2183. 'N'
  2184. '=no-follow-links'
  2185. Disables the following of links to separate debug info files.
  2186. 'D'
  2187. '=use-debuginfod'
  2188. Enables contacting debuginfod servers if there is a need to
  2189. follow debug links. This is the default behaviour.
  2190. 'E'
  2191. '=do-not-use-debuginfod'
  2192. Disables contacting debuginfod servers when there is a need to
  2193. follow debug links.
  2194. 'l'
  2195. '=rawline'
  2196. Displays the contents of the '.debug_line' section in a raw
  2197. format.
  2198. 'L'
  2199. '=decodedline'
  2200. Displays the interpreted contents of the '.debug_line'
  2201. section.
  2202. 'm'
  2203. '=macro'
  2204. Displays the contents of the '.debug_macro' and/or
  2205. '.debug_macinfo' sections.
  2206. 'o'
  2207. '=loc'
  2208. Displays the contents of the '.debug_loc' and/or
  2209. '.debug_loclists' sections.
  2210. 'O'
  2211. '=str-offsets'
  2212. Displays the contents of the '.debug_str_offsets' section.
  2213. 'p'
  2214. '=pubnames'
  2215. Displays the contents of the '.debug_pubnames' and/or
  2216. '.debug_gnu_pubnames' sections.
  2217. 'r'
  2218. '=aranges'
  2219. Displays the contents of the '.debug_aranges' section.
  2220. 'R'
  2221. '=Ranges'
  2222. Displays the contents of the '.debug_ranges' and/or
  2223. '.debug_rnglists' sections.
  2224. 's'
  2225. '=str'
  2226. Displays the contents of the '.debug_str', '.debug_line_str'
  2227. and/or '.debug_str_offsets' sections.
  2228. 't'
  2229. '=pubtype'
  2230. Displays the contents of the '.debug_pubtypes' and/or
  2231. '.debug_gnu_pubtypes' sections.
  2232. 'T'
  2233. '=trace_aranges'
  2234. Displays the contents of the '.trace_aranges' section.
  2235. 'u'
  2236. '=trace_abbrev'
  2237. Displays the contents of the '.trace_abbrev' section.
  2238. 'U'
  2239. '=trace_info'
  2240. Displays the contents of the '.trace_info' section.
  2241. Note: displaying the contents of '.debug_static_funcs',
  2242. '.debug_static_vars' and 'debug_weaknames' sections is not
  2243. currently supported.
  2244. '--dwarf-depth=N'
  2245. Limit the dump of the '.debug_info' section to N children. This is
  2246. only useful with '--debug-dump=info'. The default is to print all
  2247. DIEs; the special value 0 for N will also have this effect.
  2248. With a non-zero value for N, DIEs at or deeper than N levels will
  2249. not be printed. The range for N is zero-based.
  2250. '--dwarf-start=N'
  2251. Print only DIEs beginning with the DIE numbered N. This is only
  2252. useful with '--debug-dump=info'.
  2253. If specified, this option will suppress printing of any header
  2254. information and all DIEs before the DIE numbered N. Only siblings
  2255. and children of the specified DIE will be printed.
  2256. This can be used in conjunction with '--dwarf-depth'.
  2257. '--dwarf-check'
  2258. Enable additional checks for consistency of Dwarf information.
  2259. '--ctf[=SECTION]'
  2260. Display the contents of the specified CTF section. CTF sections
  2261. themselves contain many subsections, all of which are displayed in
  2262. order.
  2263. By default, display the name of the section named .CTF, which is
  2264. the name emitted by 'ld'.
  2265. '--ctf-parent=MEMBER'
  2266. If the CTF section contains ambiguously-defined types, it will
  2267. consist of an archive of many CTF dictionaries, all inheriting from
  2268. one dictionary containing unambiguous types. This member is by
  2269. default named .CTF, like the section containing it, but it is
  2270. possible to change this name using the
  2271. 'ctf_link_set_memb_name_changer' function at link time. When
  2272. looking at CTF archives that have been created by a linker that
  2273. uses the name changer to rename the parent archive member,
  2274. '--ctf-parent' can be used to specify the name used for the parent.
  2275. '--sframe[=SECTION]'
  2276. Display the contents of the specified SFrame section.
  2277. By default, display the name of the section named .SFRAME, which is
  2278. the name emitted by 'ld'.
  2279. '-G'
  2280. '--stabs'
  2281. Display the full contents of any sections requested. Display the
  2282. contents of the .stab and .stab.index and .stab.excl sections from
  2283. an ELF file. This is only useful on systems (such as Solaris 2.0)
  2284. in which '.stab' debugging symbol-table entries are carried in an
  2285. ELF section. In most other file formats, debugging symbol-table
  2286. entries are interleaved with linkage symbols, and are visible in
  2287. the '--syms' output.
  2288. '--start-address=ADDRESS'
  2289. Start displaying data at the specified address. This affects the
  2290. output of the '-d', '-r' and '-s' options.
  2291. '--stop-address=ADDRESS'
  2292. Stop displaying data at the specified address. This affects the
  2293. output of the '-d', '-r' and '-s' options.
  2294. '-t'
  2295. '--syms'
  2296. Print the symbol table entries of the file. This is similar to the
  2297. information provided by the 'nm' program, although the display
  2298. format is different. The format of the output depends upon the
  2299. format of the file being dumped, but there are two main types. One
  2300. looks like this:
  2301. [ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss
  2302. [ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred
  2303. where the number inside the square brackets is the number of the
  2304. entry in the symbol table, the SEC number is the section number,
  2305. the FL value are the symbol's flag bits, the TY number is the
  2306. symbol's type, the SCL number is the symbol's storage class and the
  2307. NX value is the number of auxiliary entries associated with the
  2308. symbol. The last two fields are the symbol's value and its name.
  2309. The other common output format, usually seen with ELF based files,
  2310. looks like this:
  2311. 00000000 l d .bss 00000000 .bss
  2312. 00000000 g .text 00000000 fred
  2313. Here the first number is the symbol's value (sometimes referred to
  2314. as its address). The next field is actually a set of characters
  2315. and spaces indicating the flag bits that are set on the symbol.
  2316. These characters are described below. Next is the section with
  2317. which the symbol is associated or _*ABS*_ if the section is
  2318. absolute (ie not connected with any section), or _*UND*_ if the
  2319. section is referenced in the file being dumped, but not defined
  2320. there.
  2321. After the section name comes another field, a number, which for
  2322. common symbols is the alignment and for other symbol is the size.
  2323. Finally the symbol's name is displayed.
  2324. The flag characters are divided into 7 groups as follows:
  2325. 'l'
  2326. 'g'
  2327. 'u'
  2328. '!'
  2329. The symbol is a local (l), global (g), unique global (u),
  2330. neither global nor local (a space) or both global and local
  2331. (!). A symbol can be neither local or global for a variety of
  2332. reasons, e.g., because it is used for debugging, but it is
  2333. probably an indication of a bug if it is ever both local and
  2334. global. Unique global symbols are a GNU extension to the
  2335. standard set of ELF symbol bindings. For such a symbol the
  2336. dynamic linker will make sure that in the entire process there
  2337. is just one symbol with this name and type in use.
  2338. 'w'
  2339. The symbol is weak (w) or strong (a space).
  2340. 'C'
  2341. The symbol denotes a constructor (C) or an ordinary symbol (a
  2342. space).
  2343. 'W'
  2344. The symbol is a warning (W) or a normal symbol (a space). A
  2345. warning symbol's name is a message to be displayed if the
  2346. symbol following the warning symbol is ever referenced.
  2347. 'I'
  2348. 'i'
  2349. The symbol is an indirect reference to another symbol (I), a
  2350. function to be evaluated during reloc processing (i) or a
  2351. normal symbol (a space).
  2352. 'd'
  2353. 'D'
  2354. The symbol is a debugging symbol (d) or a dynamic symbol (D)
  2355. or a normal symbol (a space).
  2356. 'F'
  2357. 'f'
  2358. 'O'
  2359. The symbol is the name of a function (F) or a file (f) or an
  2360. object (O) or just a normal symbol (a space).
  2361. '-T'
  2362. '--dynamic-syms'
  2363. Print the dynamic symbol table entries of the file. This is only
  2364. meaningful for dynamic objects, such as certain types of shared
  2365. libraries. This is similar to the information provided by the 'nm'
  2366. program when given the '-D' ('--dynamic') option.
  2367. The output format is similar to that produced by the '--syms'
  2368. option, except that an extra field is inserted before the symbol's
  2369. name, giving the version information associated with the symbol.
  2370. If the version is the default version to be used when resolving
  2371. unversioned references to the symbol then it's displayed as is,
  2372. otherwise it's put into parentheses.
  2373. '--special-syms'
  2374. When displaying symbols include those which the target considers to
  2375. be special in some way and which would not normally be of interest
  2376. to the user.
  2377. '-U [D|I|L|E|X|H]'
  2378. '--unicode=[DEFAULT|INVALID|LOCALE|ESCAPE|HEX|HIGHLIGHT]'
  2379. Controls the display of UTF-8 encoded multibyte characters in
  2380. strings. The default ('--unicode=default') is to give them no
  2381. special treatment. The '--unicode=locale' option displays the
  2382. sequence in the current locale, which may or may not support them.
  2383. The options '--unicode=hex' and '--unicode=invalid' display them as
  2384. hex byte sequences enclosed by either angle brackets or curly
  2385. braces.
  2386. The '--unicode=escape' option displays them as escape sequences
  2387. (\UXXXX) and the '--unicode=highlight' option displays them as
  2388. escape sequences highlighted in red (if supported by the output
  2389. device). The colouring is intended to draw attention to the
  2390. presence of unicode sequences where they might not be expected.
  2391. '-V'
  2392. '--version'
  2393. Print the version number of 'objdump' and exit.
  2394. '-x'
  2395. '--all-headers'
  2396. Display all available header information, including the symbol
  2397. table and relocation entries. Using '-x' is equivalent to
  2398. specifying all of '-a -f -h -p -r -t'.
  2399. '-w'
  2400. '--wide'
  2401. Format some lines for output devices that have more than 80
  2402. columns. Also do not truncate symbol names when they are
  2403. displayed.
  2404. '-z'
  2405. '--disassemble-zeroes'
  2406. Normally the disassembly output will skip blocks of zeroes. This
  2407. option directs the disassembler to disassemble those blocks, just
  2408. like any other data.
  2409. '-Z'
  2410. '--decompress'
  2411. The '-Z' option is meant to be used in conunction with the '-s'
  2412. option. It instructs 'objdump' to decompress any compressed
  2413. sections before displaying their contents.
  2414. 
  2415. File: binutils.info, Node: ranlib, Next: size, Prev: objdump, Up: Top
  2416. 5 ranlib
  2417. ********
  2418. ranlib [--plugin NAME] [-DhHvVt] ARCHIVE
  2419. 'ranlib' generates an index to the contents of an archive and stores
  2420. it in the archive. The index lists each symbol defined by a member of
  2421. an archive that is a relocatable object file.
  2422. You may use 'nm -s' or 'nm --print-armap' to list this index.
  2423. An archive with such an index speeds up linking to the library and
  2424. allows routines in the library to call each other without regard to
  2425. their placement in the archive.
  2426. The GNU 'ranlib' program is another form of GNU 'ar'; running
  2427. 'ranlib' is completely equivalent to executing 'ar -s'. *Note ar::.
  2428. '-h'
  2429. '-H'
  2430. '--help'
  2431. Show usage information for 'ranlib'.
  2432. '-v'
  2433. '-V'
  2434. '--version'
  2435. Show the version number of 'ranlib'.
  2436. '-D'
  2437. Operate in _deterministic_ mode. The symbol map archive member's
  2438. header will show zero for the UID, GID, and timestamp. When this
  2439. option is used, multiple runs will produce identical output files.
  2440. If 'binutils' was configured with
  2441. '--enable-deterministic-archives', then this mode is on by default.
  2442. It can be disabled with the '-U' option, described below.
  2443. '-t'
  2444. Update the timestamp of the symbol map of an archive.
  2445. '-U'
  2446. Do _not_ operate in _deterministic_ mode. This is the inverse of
  2447. the '-D' option, above: the archive index will get actual UID, GID,
  2448. timestamp, and file mode values.
  2449. If 'binutils' was configured _without_
  2450. '--enable-deterministic-archives', then this mode is on by default.
  2451. 
  2452. File: binutils.info, Node: size, Next: strings, Prev: ranlib, Up: Top
  2453. 6 size
  2454. ******
  2455. size [-A|-B|-G|--format=COMPATIBILITY]
  2456. [--help]
  2457. [-d|-o|-x|--radix=NUMBER]
  2458. [--common]
  2459. [-t|--totals]
  2460. [--target=BFDNAME] [-V|--version]
  2461. [-f]
  2462. [OBJFILE...]
  2463. The GNU 'size' utility lists the section sizes and the total size for
  2464. each of the binary files OBJFILE on its argument list. By default, one
  2465. line of output is generated for each file or each module if the file is
  2466. an archive.
  2467. OBJFILE... are the files to be examined. If none are specified, the
  2468. file 'a.out' will be used instead.
  2469. The command-line options have the following meanings:
  2470. '-A'
  2471. '-B'
  2472. '-G'
  2473. '--format=COMPATIBILITY'
  2474. Using one of these options, you can choose whether the output from
  2475. GNU 'size' resembles output from System V 'size' (using '-A', or
  2476. '--format=sysv'), or Berkeley 'size' (using '-B', or
  2477. '--format=berkeley'). The default is the one-line format similar
  2478. to Berkeley's. Alternatively, you can choose the GNU format output
  2479. (using '-G', or '--format=gnu'), this is similar to Berkeley's
  2480. output format, but sizes are counted differently.
  2481. Here is an example of the Berkeley (default) format of output from
  2482. 'size':
  2483. $ size --format=Berkeley ranlib size
  2484. text data bss dec hex filename
  2485. 294880 81920 11592 388392 5ed28 ranlib
  2486. 294880 81920 11888 388688 5ee50 size
  2487. The Berkeley style output counts read only data in the 'text'
  2488. column, not in the 'data' column, the 'dec' and 'hex' columns both
  2489. display the sum of the 'text', 'data', and 'bss' columns in decimal
  2490. and hexadecimal respectively.
  2491. The GNU format counts read only data in the 'data' column, not the
  2492. 'text' column, and only displays the sum of the 'text', 'data', and
  2493. 'bss' columns once, in the 'total' column. The '--radix' option
  2494. can be used to change the number base for all columns. Here is the
  2495. same data displayed with GNU conventions:
  2496. $ size --format=GNU ranlib size
  2497. text data bss total filename
  2498. 279880 96920 11592 388392 ranlib
  2499. 279880 96920 11888 388688 size
  2500. This is the same data, but displayed closer to System V
  2501. conventions:
  2502. $ size --format=SysV ranlib size
  2503. ranlib :
  2504. section size addr
  2505. .text 294880 8192
  2506. .data 81920 303104
  2507. .bss 11592 385024
  2508. Total 388392
  2509. size :
  2510. section size addr
  2511. .text 294880 8192
  2512. .data 81920 303104
  2513. .bss 11888 385024
  2514. Total 388688
  2515. '--help'
  2516. '-h'
  2517. '-H'
  2518. '-?'
  2519. Show a summary of acceptable arguments and options.
  2520. '-d'
  2521. '-o'
  2522. '-x'
  2523. '--radix=NUMBER'
  2524. Using one of these options, you can control whether the size of
  2525. each section is given in decimal ('-d', or '--radix=10'); octal
  2526. ('-o', or '--radix=8'); or hexadecimal ('-x', or '--radix=16'). In
  2527. '--radix=NUMBER', only the three values (8, 10, 16) are supported.
  2528. The total size is always given in two radices; decimal and
  2529. hexadecimal for '-d' or '-x' output, or octal and hexadecimal if
  2530. you're using '-o'.
  2531. '--common'
  2532. Print total size of common symbols in each file. When using
  2533. Berkeley or GNU format these are included in the bss size.
  2534. '-t'
  2535. '--totals'
  2536. Show totals of all objects listed (Berkeley or GNU format mode
  2537. only).
  2538. '--target=BFDNAME'
  2539. Specify that the object-code format for OBJFILE is BFDNAME. This
  2540. option may not be necessary; 'size' can automatically recognize
  2541. many formats. *Note Target Selection::, for more information.
  2542. '-v'
  2543. '-V'
  2544. '--version'
  2545. Display the version number of 'size'.
  2546. '-f'
  2547. Ignored. This option is used by other versions of the 'size'
  2548. program, but it is not supported by the GNU Binutils version.
  2549. 
  2550. File: binutils.info, Node: strings, Next: strip, Prev: size, Up: Top
  2551. 7 strings
  2552. *********
  2553. strings [-afovV] [-MIN-LEN]
  2554. [-n MIN-LEN] [--bytes=MIN-LEN]
  2555. [-t RADIX] [--radix=RADIX]
  2556. [-e ENCODING] [--encoding=ENCODING]
  2557. [-U METHOD] [--unicode=METHOD]
  2558. [-] [--all] [--print-file-name]
  2559. [-T BFDNAME] [--target=BFDNAME]
  2560. [-w] [--include-all-whitespace]
  2561. [-s] [--output-separator SEP_STRING]
  2562. [--help] [--version] FILE...
  2563. For each FILE given, GNU 'strings' prints the printable character
  2564. sequences that are at least 4 characters long (or the number given with
  2565. the options below) and are followed by an unprintable character.
  2566. Depending upon how the strings program was configured it will default
  2567. to either displaying all the printable sequences that it can find in
  2568. each file, or only those sequences that are in loadable, initialized
  2569. data sections. If the file type is unrecognizable, or if strings is
  2570. reading from stdin then it will always display all of the printable
  2571. sequences that it can find.
  2572. For backwards compatibility any file that occurs after a command-line
  2573. option of just '-' will also be scanned in full, regardless of the
  2574. presence of any '-d' option.
  2575. 'strings' is mainly useful for determining the contents of non-text
  2576. files.
  2577. '-a'
  2578. '--all'
  2579. '-'
  2580. Scan the whole file, regardless of what sections it contains or
  2581. whether those sections are loaded or initialized. Normally this is
  2582. the default behaviour, but strings can be configured so that the
  2583. '-d' is the default instead.
  2584. The '-' option is position dependent and forces strings to perform
  2585. full scans of any file that is mentioned after the '-' on the
  2586. command line, even if the '-d' option has been specified.
  2587. '-d'
  2588. '--data'
  2589. Only print strings from initialized, loaded data sections in the
  2590. file. This may reduce the amount of garbage in the output, but it
  2591. also exposes the strings program to any security flaws that may be
  2592. present in the BFD library used to scan and load sections. Strings
  2593. can be configured so that this option is the default behaviour. In
  2594. such cases the '-a' option can be used to avoid using the BFD
  2595. library and instead just print all of the strings found in the
  2596. file.
  2597. '-f'
  2598. '--print-file-name'
  2599. Print the name of the file before each string.
  2600. '--help'
  2601. Print a summary of the program usage on the standard output and
  2602. exit.
  2603. '-MIN-LEN'
  2604. '-n MIN-LEN'
  2605. '--bytes=MIN-LEN'
  2606. Print sequences of displayable characters that are at least MIN-LEN
  2607. characters long. If not specified a default minimum length of 4 is
  2608. used. The distinction between displayable and non-displayable
  2609. characters depends upon the setting of the '-e' and '-U' options.
  2610. Sequences are always terminated at control characters such as
  2611. new-line and carriage-return, but not the tab character.
  2612. '-o'
  2613. Like '-t o'. Some other versions of 'strings' have '-o' act like
  2614. '-t d' instead. Since we can not be compatible with both ways, we
  2615. simply chose one.
  2616. '-t RADIX'
  2617. '--radix=RADIX'
  2618. Print the offset within the file before each string. The single
  2619. character argument specifies the radix of the offset--'o' for
  2620. octal, 'x' for hexadecimal, or 'd' for decimal.
  2621. '-e ENCODING'
  2622. '--encoding=ENCODING'
  2623. Select the character encoding of the strings that are to be found.
  2624. Possible values for ENCODING are: 's' = single-7-bit-byte
  2625. characters (default), 'S' = single-8-bit-byte characters, 'b' =
  2626. 16-bit bigendian, 'l' = 16-bit littleendian, 'B' = 32-bit
  2627. bigendian, 'L' = 32-bit littleendian. Useful for finding wide
  2628. character strings. ('l' and 'b' apply to, for example, Unicode
  2629. UTF-16/UCS-2 encodings).
  2630. '-U [D|I|L|E|X|H]'
  2631. '--unicode=[DEFAULT|INVALID|LOCALE|ESCAPE|HEX|HIGHLIGHT]'
  2632. Controls the display of UTF-8 encoded multibyte characters in
  2633. strings. The default ('--unicode=default') is to give them no
  2634. special treatment, and instead rely upon the setting of the
  2635. '--encoding' option. The other values for this option
  2636. automatically enable '--encoding=S'.
  2637. The '--unicode=invalid' option treats them as non-graphic
  2638. characters and hence not part of a valid string. All the remaining
  2639. options treat them as valid string characters.
  2640. The '--unicode=locale' option displays them in the current locale,
  2641. which may or may not support UTF-8 encoding. The '--unicode=hex'
  2642. option displays them as hex byte sequences enclosed between <>
  2643. characters. The '--unicode=escape' option displays them as escape
  2644. sequences (\UXXXX) and the '--unicode=highlight' option displays
  2645. them as escape sequences highlighted in red (if supported by the
  2646. output device). The colouring is intended to draw attention to the
  2647. presence of unicode sequences where they might not be expected.
  2648. '-T BFDNAME'
  2649. '--target=BFDNAME'
  2650. Specify an object code format other than your system's default
  2651. format. *Note Target Selection::, for more information.
  2652. '-v'
  2653. '-V'
  2654. '--version'
  2655. Print the program version number on the standard output and exit.
  2656. '-w'
  2657. '--include-all-whitespace'
  2658. By default tab and space characters are included in the strings
  2659. that are displayed, but other whitespace characters, such a
  2660. newlines and carriage returns, are not. The '-w' option changes
  2661. this so that all whitespace characters are considered to be part of
  2662. a string.
  2663. '-s'
  2664. '--output-separator'
  2665. By default, output strings are delimited by a new-line. This
  2666. option allows you to supply any string to be used as the output
  2667. record separator. Useful with -include-all-whitespace where
  2668. strings may contain new-lines internally.
  2669. 
  2670. File: binutils.info, Node: strip, Next: c++filt, Prev: strings, Up: Top
  2671. 8 strip
  2672. *******
  2673. strip [-F BFDNAME |--target=BFDNAME]
  2674. [-I BFDNAME |--input-target=BFDNAME]
  2675. [-O BFDNAME |--output-target=BFDNAME]
  2676. [-s|--strip-all]
  2677. [-S|-g|-d|--strip-debug]
  2678. [--strip-dwo]
  2679. [-K SYMBOLNAME|--keep-symbol=SYMBOLNAME]
  2680. [-M|--merge-notes][--no-merge-notes]
  2681. [-N SYMBOLNAME |--strip-symbol=SYMBOLNAME]
  2682. [-w|--wildcard]
  2683. [-x|--discard-all] [-X |--discard-locals]
  2684. [-R SECTIONNAME |--remove-section=SECTIONNAME]
  2685. [--keep-section=SECTIONPATTERN]
  2686. [--remove-relocations=SECTIONPATTERN]
  2687. [--strip-section-headers]
  2688. [-o FILE] [-p|--preserve-dates]
  2689. [-D|--enable-deterministic-archives]
  2690. [-U|--disable-deterministic-archives]
  2691. [--keep-section-symbols]
  2692. [--keep-file-symbols]
  2693. [--only-keep-debug]
  2694. [-v |--verbose] [-V|--version]
  2695. [--help] [--info]
  2696. OBJFILE...
  2697. GNU 'strip' discards all symbols from object files OBJFILE. The list
  2698. of object files may include archives. At least one object file must be
  2699. given.
  2700. 'strip' modifies the files named in its argument, rather than writing
  2701. modified copies under different names.
  2702. '-F BFDNAME'
  2703. '--target=BFDNAME'
  2704. Treat the original OBJFILE as a file with the object code format
  2705. BFDNAME, and rewrite it in the same format. *Note Target
  2706. Selection::, for more information.
  2707. '--help'
  2708. Show a summary of the options to 'strip' and exit.
  2709. '--info'
  2710. Display a list showing all architectures and object formats
  2711. available.
  2712. '-I BFDNAME'
  2713. '--input-target=BFDNAME'
  2714. Treat the original OBJFILE as a file with the object code format
  2715. BFDNAME. *Note Target Selection::, for more information.
  2716. '-O BFDNAME'
  2717. '--output-target=BFDNAME'
  2718. Replace OBJFILE with a file in the output format BFDNAME. *Note
  2719. Target Selection::, for more information.
  2720. '-R SECTIONNAME'
  2721. '--remove-section=SECTIONNAME'
  2722. Remove any section named SECTIONNAME from the output file, in
  2723. addition to whatever sections would otherwise be removed. This
  2724. option may be given more than once. Note that using this option
  2725. inappropriately may make the output file unusable. The wildcard
  2726. character '*' may be given at the end of SECTIONNAME. If so, then
  2727. any section starting with SECTIONNAME will be removed.
  2728. If the first character of SECTIONPATTERN is the exclamation point
  2729. (!) then matching sections will not be removed even if an earlier
  2730. use of '--remove-section' on the same command line would otherwise
  2731. remove it. For example:
  2732. --remove-section=.text.* --remove-section=!.text.foo
  2733. will remove all sections matching the pattern '.text.*', but will
  2734. not remove the section '.text.foo'.
  2735. '--keep-section=SECTIONPATTERN'
  2736. When removing sections from the output file, keep sections that
  2737. match SECTIONPATTERN.
  2738. '--remove-relocations=SECTIONPATTERN'
  2739. Remove relocations from the output file for any section matching
  2740. SECTIONPATTERN. This option may be given more than once. Note
  2741. that using this option inappropriately may make the output file
  2742. unusable. Wildcard characters are accepted in SECTIONPATTERN. For
  2743. example:
  2744. --remove-relocations=.text.*
  2745. will remove the relocations for all sections matching the patter
  2746. '.text.*'.
  2747. If the first character of SECTIONPATTERN is the exclamation point
  2748. (!) then matching sections will not have their relocation removed
  2749. even if an earlier use of '--remove-relocations' on the same
  2750. command line would otherwise cause the relocations to be removed.
  2751. For example:
  2752. --remove-relocations=.text.* --remove-relocations=!.text.foo
  2753. will remove all relocations for sections matching the pattern
  2754. '.text.*', but will not remove relocations for the section
  2755. '.text.foo'.
  2756. '--strip-section-headers'
  2757. Strip section headers. This option is specific to ELF files.
  2758. Implies '--strip-all' and '--merge-notes'.
  2759. '-s'
  2760. '--strip-all'
  2761. Remove all symbols.
  2762. '-g'
  2763. '-S'
  2764. '-d'
  2765. '--strip-debug'
  2766. Remove debugging symbols only.
  2767. '--strip-dwo'
  2768. Remove the contents of all DWARF .dwo sections, leaving the
  2769. remaining debugging sections and all symbols intact. See the
  2770. description of this option in the 'objcopy' section for more
  2771. information.
  2772. '--strip-unneeded'
  2773. Remove all symbols that are not needed for relocation processing in
  2774. addition to debugging symbols and sections stripped by
  2775. '--strip-debug'.
  2776. '-K SYMBOLNAME'
  2777. '--keep-symbol=SYMBOLNAME'
  2778. When stripping symbols, keep symbol SYMBOLNAME even if it would
  2779. normally be stripped. This option may be given more than once.
  2780. '-M'
  2781. '--merge-notes'
  2782. '--no-merge-notes'
  2783. For ELF files, attempt (or do not attempt) to reduce the size of
  2784. any SHT_NOTE type sections by removing duplicate notes. The
  2785. default is to attempt this reduction unless stripping debug or DWO
  2786. information.
  2787. '-N SYMBOLNAME'
  2788. '--strip-symbol=SYMBOLNAME'
  2789. Remove symbol SYMBOLNAME from the source file. This option may be
  2790. given more than once, and may be combined with strip options other
  2791. than '-K'.
  2792. '-o FILE'
  2793. Put the stripped output in FILE, rather than replacing the existing
  2794. file. When this argument is used, only one OBJFILE argument may be
  2795. specified.
  2796. '-p'
  2797. '--preserve-dates'
  2798. Preserve the access and modification dates of the file.
  2799. '-D'
  2800. '--enable-deterministic-archives'
  2801. Operate in _deterministic_ mode. When copying archive members and
  2802. writing the archive index, use zero for UIDs, GIDs, timestamps, and
  2803. use consistent file modes for all files.
  2804. If 'binutils' was configured with
  2805. '--enable-deterministic-archives', then this mode is on by default.
  2806. It can be disabled with the '-U' option, below.
  2807. '-U'
  2808. '--disable-deterministic-archives'
  2809. Do _not_ operate in _deterministic_ mode. This is the inverse of
  2810. the '-D' option, above: when copying archive members and writing
  2811. the archive index, use their actual UID, GID, timestamp, and file
  2812. mode values.
  2813. This is the default unless 'binutils' was configured with
  2814. '--enable-deterministic-archives'.
  2815. '-w'
  2816. '--wildcard'
  2817. Permit regular expressions in SYMBOLNAMEs used in other command
  2818. line options. The question mark (?), asterisk (*), backslash (\)
  2819. and square brackets ([]) operators can be used anywhere in the
  2820. symbol name. If the first character of the symbol name is the
  2821. exclamation point (!) then the sense of the switch is reversed for
  2822. that symbol. For example:
  2823. -w -K !foo -K fo*
  2824. would cause strip to only keep symbols that start with the letters
  2825. "fo", but to discard the symbol "foo".
  2826. '-x'
  2827. '--discard-all'
  2828. Remove non-global symbols.
  2829. '-X'
  2830. '--discard-locals'
  2831. Remove compiler-generated local symbols. (These usually start with
  2832. 'L' or '.'.)
  2833. '--keep-section-symbols'
  2834. When stripping a file, perhaps with '--strip-debug' or
  2835. '--strip-unneeded', retain any symbols specifying section names,
  2836. which would otherwise get stripped.
  2837. '--keep-file-symbols'
  2838. When stripping a file, perhaps with '--strip-debug' or
  2839. '--strip-unneeded', retain any symbols specifying source file
  2840. names, which would otherwise get stripped.
  2841. '--only-keep-debug'
  2842. Strip a file, emptying the contents of any sections that would not
  2843. be stripped by '--strip-debug' and leaving the debugging sections
  2844. intact. In ELF files, this preserves all the note sections in the
  2845. output as well.
  2846. Note - the section headers of the stripped sections are preserved,
  2847. including their sizes, but the contents of the section are
  2848. discarded. The section headers are preserved so that other tools
  2849. can match up the debuginfo file with the real executable, even if
  2850. that executable has been relocated to a different address space.
  2851. The intention is that this option will be used in conjunction with
  2852. '--add-gnu-debuglink' to create a two part executable. One a
  2853. stripped binary which will occupy less space in RAM and in a
  2854. distribution and the second a debugging information file which is
  2855. only needed if debugging abilities are required. The suggested
  2856. procedure to create these files is as follows:
  2857. 1. Link the executable as normal. Assuming that it is called
  2858. 'foo' then...
  2859. 2. Run 'objcopy --only-keep-debug foo foo.dbg' to create a file
  2860. containing the debugging info.
  2861. 3. Run 'objcopy --strip-debug foo' to create a stripped
  2862. executable.
  2863. 4. Run 'objcopy --add-gnu-debuglink=foo.dbg foo' to add a link to
  2864. the debugging info into the stripped executable.
  2865. Note--the choice of '.dbg' as an extension for the debug info file
  2866. is arbitrary. Also the '--only-keep-debug' step is optional. You
  2867. could instead do this:
  2868. 1. Link the executable as normal.
  2869. 2. Copy 'foo' to 'foo.full'
  2870. 3. Run 'strip --strip-debug foo'
  2871. 4. Run 'objcopy --add-gnu-debuglink=foo.full foo'
  2872. i.e., the file pointed to by the '--add-gnu-debuglink' can be the
  2873. full executable. It does not have to be a file created by the
  2874. '--only-keep-debug' switch.
  2875. Note--this switch is only intended for use on fully linked files.
  2876. It does not make sense to use it on object files where the
  2877. debugging information may be incomplete. Besides the gnu_debuglink
  2878. feature currently only supports the presence of one filename
  2879. containing debugging information, not multiple filenames on a
  2880. one-per-object-file basis.
  2881. '-V'
  2882. '--version'
  2883. Show the version number for 'strip'.
  2884. '-v'
  2885. '--verbose'
  2886. Verbose output: list all object files modified. In the case of
  2887. archives, 'strip -v' lists all members of the archive.
  2888. 
  2889. File: binutils.info, Node: c++filt, Next: addr2line, Prev: strip, Up: Top
  2890. 9 c++filt
  2891. *********
  2892. c++filt [-_|--strip-underscore]
  2893. [-n|--no-strip-underscore]
  2894. [-p|--no-params]
  2895. [-t|--types]
  2896. [-i|--no-verbose]
  2897. [-r|--no-recurse-limit]
  2898. [-R|--recurse-limit]
  2899. [-s FORMAT|--format=FORMAT]
  2900. [--help] [--version] [SYMBOL...]
  2901. The C++ and Java languages provide function overloading, which means
  2902. that you can write many functions with the same name, providing that
  2903. each function takes parameters of different types. In order to be able
  2904. to distinguish these similarly named functions C++ and Java encode them
  2905. into a low-level assembler name which uniquely identifies each different
  2906. version. This process is known as "mangling". The 'c++filt' (1)
  2907. program does the inverse mapping: it decodes ("demangles") low-level
  2908. names into user-level names so that they can be read.
  2909. Every alphanumeric word (consisting of letters, digits, underscores,
  2910. dollars, or periods) seen in the input is a potential mangled name. If
  2911. the name decodes into a C++ name, the C++ name replaces the low-level
  2912. name in the output, otherwise the original word is output. In this way
  2913. you can pass an entire assembler source file, containing mangled names,
  2914. through 'c++filt' and see the same source file containing demangled
  2915. names.
  2916. You can also use 'c++filt' to decipher individual symbols by passing
  2917. them on the command line:
  2918. c++filt SYMBOL
  2919. If no SYMBOL arguments are given, 'c++filt' reads symbol names from
  2920. the standard input instead. All the results are printed on the standard
  2921. output. The difference between reading names from the command line
  2922. versus reading names from the standard input is that command-line
  2923. arguments are expected to be just mangled names and no checking is
  2924. performed to separate them from surrounding text. Thus for example:
  2925. c++filt -n _Z1fv
  2926. will work and demangle the name to "f()" whereas:
  2927. c++filt -n _Z1fv,
  2928. will not work. (Note the extra comma at the end of the mangled name
  2929. which makes it invalid). This command however will work:
  2930. echo _Z1fv, | c++filt -n
  2931. and will display "f(),", i.e., the demangled name followed by a
  2932. trailing comma. This behaviour is because when the names are read from
  2933. the standard input it is expected that they might be part of an
  2934. assembler source file where there might be extra, extraneous characters
  2935. trailing after a mangled name. For example:
  2936. .type _Z1fv, @function
  2937. '-_'
  2938. '--strip-underscore'
  2939. On some systems, both the C and C++ compilers put an underscore in
  2940. front of every name. For example, the C name 'foo' gets the
  2941. low-level name '_foo'. This option removes the initial underscore.
  2942. Whether 'c++filt' removes the underscore by default is target
  2943. dependent.
  2944. '-n'
  2945. '--no-strip-underscore'
  2946. Do not remove the initial underscore.
  2947. '-p'
  2948. '--no-params'
  2949. When demangling the name of a function, do not display the types of
  2950. the function's parameters.
  2951. '-t'
  2952. '--types'
  2953. Attempt to demangle types as well as function names. This is
  2954. disabled by default since mangled types are normally only used
  2955. internally in the compiler, and they can be confused with
  2956. non-mangled names. For example, a function called "a" treated as a
  2957. mangled type name would be demangled to "signed char".
  2958. '-i'
  2959. '--no-verbose'
  2960. Do not include implementation details (if any) in the demangled
  2961. output.
  2962. '-r'
  2963. '-R'
  2964. '--recurse-limit'
  2965. '--no-recurse-limit'
  2966. '--recursion-limit'
  2967. '--no-recursion-limit'
  2968. Enables or disables a limit on the amount of recursion performed
  2969. whilst demangling strings. Since the name mangling formats allow
  2970. for an infinite level of recursion it is possible to create strings
  2971. whose decoding will exhaust the amount of stack space available on
  2972. the host machine, triggering a memory fault. The limit tries to
  2973. prevent this from happening by restricting recursion to 2048 levels
  2974. of nesting.
  2975. The default is for this limit to be enabled, but disabling it may
  2976. be necessary in order to demangle truly complicated names. Note
  2977. however that if the recursion limit is disabled then stack
  2978. exhaustion is possible and any bug reports about such an event will
  2979. be rejected.
  2980. The '-r' option is a synonym for the '--no-recurse-limit' option.
  2981. The '-R' option is a synonym for the '--recurse-limit' option.
  2982. '-s FORMAT'
  2983. '--format=FORMAT'
  2984. 'c++filt' can decode various methods of mangling, used by different
  2985. compilers. The argument to this option selects which method it
  2986. uses:
  2987. 'auto'
  2988. Automatic selection based on executable (the default method)
  2989. 'gnu'
  2990. the one used by the GNU C++ compiler (g++)
  2991. 'lucid'
  2992. the one used by the Lucid compiler (lcc)
  2993. 'arm'
  2994. the one specified by the C++ Annotated Reference Manual
  2995. 'hp'
  2996. the one used by the HP compiler (aCC)
  2997. 'edg'
  2998. the one used by the EDG compiler
  2999. 'gnu-v3'
  3000. the one used by the GNU C++ compiler (g++) with the V3 ABI.
  3001. 'java'
  3002. the one used by the GNU Java compiler (gcj)
  3003. 'gnat'
  3004. the one used by the GNU Ada compiler (GNAT).
  3005. '--help'
  3006. Print a summary of the options to 'c++filt' and exit.
  3007. '--version'
  3008. Print the version number of 'c++filt' and exit.
  3009. _Warning:_ 'c++filt' is a new utility, and the details of its user
  3010. interface are subject to change in future releases. In particular,
  3011. a command-line option may be required in the future to decode a
  3012. name passed as an argument on the command line; in other words,
  3013. c++filt SYMBOL
  3014. may in a future release become
  3015. c++filt OPTION SYMBOL
  3016. ---------- Footnotes ----------
  3017. (1) MS-DOS does not allow '+' characters in file names, so on MS-DOS
  3018. this program is named 'CXXFILT'.
  3019. 
  3020. File: binutils.info, Node: addr2line, Next: windmc, Prev: c++filt, Up: Top
  3021. 10 addr2line
  3022. ************
  3023. addr2line [-a|--addresses]
  3024. [-b BFDNAME|--target=BFDNAME]
  3025. [-C|--demangle[=STYLE]]
  3026. [-r|--no-recurse-limit]
  3027. [-R|--recurse-limit]
  3028. [-e FILENAME|--exe=FILENAME]
  3029. [-f|--functions] [-s|--basename]
  3030. [-i|--inlines]
  3031. [-p|--pretty-print]
  3032. [-j|--section=NAME]
  3033. [-H|--help] [-V|--version]
  3034. [addr addr ...]
  3035. 'addr2line' translates addresses or symbol+offset into file names and
  3036. line numbers. Given an address or symbol+offset in an executable or an
  3037. offset in a section of a relocatable object, it uses the debugging
  3038. information to figure out which file name and line number are associated
  3039. with it.
  3040. The executable or relocatable object to use is specified with the
  3041. '-e' option. The default is the file 'a.out'. The section in the
  3042. relocatable object to use is specified with the '-j' option.
  3043. 'addr2line' has two modes of operation.
  3044. In the first, hexadecimal addresses or symbol+offset are specified on
  3045. the command line, and 'addr2line' displays the file name and line number
  3046. for each address.
  3047. In the second, 'addr2line' reads hexadecimal addresses or
  3048. symbol+offset from standard input, and prints the file name and line
  3049. number for each address on standard output. In this mode, 'addr2line'
  3050. may be used in a pipe to convert dynamically chosen addresses.
  3051. The format of the output is 'FILENAME:LINENO'. By default each input
  3052. address generates one line of output.
  3053. Two options can generate additional lines before each
  3054. 'FILENAME:LINENO' line (in that order).
  3055. If the '-a' option is used then a line with the input address is
  3056. displayed.
  3057. If the '-f' option is used, then a line with the 'FUNCTIONNAME' is
  3058. displayed. This is the name of the function containing the address.
  3059. One option can generate additional lines after the 'FILENAME:LINENO'
  3060. line.
  3061. If the '-i' option is used and the code at the given address is
  3062. present there because of inlining by the compiler then additional lines
  3063. are displayed afterwards. One or two extra lines (if the '-f' option is
  3064. used) are displayed for each inlined function.
  3065. Alternatively if the '-p' option is used then each input address
  3066. generates a single, long, output line containing the address, the
  3067. function name, the file name and the line number. If the '-i' option
  3068. has also been used then any inlined functions will be displayed in the
  3069. same manner, but on separate lines, and prefixed by the text '(inlined
  3070. by)'.
  3071. If the file name or function name can not be determined, 'addr2line'
  3072. will print two question marks in their place. If the line number can
  3073. not be determined, 'addr2line' will print 0.
  3074. When symbol+offset is used, +offset is optional, except when the
  3075. symbol is ambigious with a hex number. The resolved symbols can be
  3076. mangled or unmangled, except unmangled symbols with + are not allowed.
  3077. The long and short forms of options, shown here as alternatives, are
  3078. equivalent.
  3079. '-a'
  3080. '--addresses'
  3081. Display the address before the function name, file and line number
  3082. information. The address is printed with a '0x' prefix to easily
  3083. identify it.
  3084. '-b BFDNAME'
  3085. '--target=BFDNAME'
  3086. Specify that the object-code format for the object files is
  3087. BFDNAME.
  3088. '-C'
  3089. '--demangle[=STYLE]'
  3090. Decode ("demangle") low-level symbol names into user-level names.
  3091. Besides removing any initial underscore prepended by the system,
  3092. this makes C++ function names readable. Different compilers have
  3093. different mangling styles. The optional demangling style argument
  3094. can be used to choose an appropriate demangling style for your
  3095. compiler. *Note c++filt::, for more information on demangling.
  3096. '-e FILENAME'
  3097. '--exe=FILENAME'
  3098. Specify the name of the executable for which addresses should be
  3099. translated. The default file is 'a.out'.
  3100. '-f'
  3101. '--functions'
  3102. Display function names as well as file and line number information.
  3103. '-s'
  3104. '--basenames'
  3105. Display only the base of each file name.
  3106. '-i'
  3107. '--inlines'
  3108. If the address belongs to a function that was inlined, the source
  3109. information for all enclosing scopes back to the first non-inlined
  3110. function will also be printed. For example, if 'main' inlines
  3111. 'callee1' which inlines 'callee2', and address is from 'callee2',
  3112. the source information for 'callee1' and 'main' will also be
  3113. printed.
  3114. '-j'
  3115. '--section'
  3116. Read offsets relative to the specified section instead of absolute
  3117. addresses.
  3118. '-p'
  3119. '--pretty-print'
  3120. Make the output more human friendly: each location are printed on
  3121. one line. If option '-i' is specified, lines for all enclosing
  3122. scopes are prefixed with '(inlined by)'.
  3123. '-r'
  3124. '-R'
  3125. '--recurse-limit'
  3126. '--no-recurse-limit'
  3127. '--recursion-limit'
  3128. '--no-recursion-limit'
  3129. Enables or disables a limit on the amount of recursion performed
  3130. whilst demangling strings. Since the name mangling formats allow
  3131. for an infinite level of recursion it is possible to create strings
  3132. whose decoding will exhaust the amount of stack space available on
  3133. the host machine, triggering a memory fault. The limit tries to
  3134. prevent this from happening by restricting recursion to 2048 levels
  3135. of nesting.
  3136. The default is for this limit to be enabled, but disabling it may
  3137. be necessary in order to demangle truly complicated names. Note
  3138. however that if the recursion limit is disabled then stack
  3139. exhaustion is possible and any bug reports about such an event will
  3140. be rejected.
  3141. The '-r' option is a synonym for the '--no-recurse-limit' option.
  3142. The '-R' option is a synonym for the '--recurse-limit' option.
  3143. Note this option is only effective if the '-C' or '--demangle'
  3144. option has been enabled.
  3145. 
  3146. File: binutils.info, Node: windmc, Next: windres, Prev: addr2line, Up: Top
  3147. 11 windmc
  3148. *********
  3149. 'windmc' may be used to generator Windows message resources.
  3150. _Warning:_ 'windmc' is not always built as part of the binary
  3151. utilities, since it is only useful for Windows targets.
  3152. windmc [options] input-file
  3153. 'windmc' reads message definitions from an input file (.mc) and
  3154. translate them into a set of output files. The output files may be of
  3155. four kinds:
  3156. 'h'
  3157. A C header file containing the message definitions.
  3158. 'rc'
  3159. A resource file compilable by the 'windres' tool.
  3160. 'bin'
  3161. One or more binary files containing the resource data for a
  3162. specific message language.
  3163. 'dbg'
  3164. A C include file that maps message id's to their symbolic name.
  3165. The exact description of these different formats is available in
  3166. documentation from Microsoft.
  3167. When 'windmc' converts from the 'mc' format to the 'bin' format,
  3168. 'rc', 'h', and optional 'dbg' it is acting like the Windows Message
  3169. Compiler.
  3170. '-a'
  3171. '--ascii_in'
  3172. Specifies that the input file specified is ASCII. This is the
  3173. default behaviour.
  3174. '-A'
  3175. '--ascii_out'
  3176. Specifies that messages in the output 'bin' files should be in
  3177. ASCII format.
  3178. '-b'
  3179. '--binprefix'
  3180. Specifies that 'bin' filenames should have to be prefixed by the
  3181. basename of the source file.
  3182. '-c'
  3183. '--customflag'
  3184. Sets the customer bit in all message id's.
  3185. '-C CODEPAGE'
  3186. '--codepage_in CODEPAGE'
  3187. Sets the default codepage to be used to convert input file to
  3188. UTF16. The default is ocdepage 1252.
  3189. '-d'
  3190. '--decimal_values'
  3191. Outputs the constants in the header file in decimal. Default is
  3192. using hexadecimal output.
  3193. '-e EXT'
  3194. '--extension EXT'
  3195. The extension for the header file. The default is .h extension.
  3196. '-F TARGET'
  3197. '--target TARGET'
  3198. Specify the BFD format to use for a bin file as output. This is a
  3199. BFD target name; you can use the '--help' option to see a list of
  3200. supported targets. Normally 'windmc' will use the default format,
  3201. which is the first one listed by the '--help' option. *note Target
  3202. Selection::.
  3203. '-h PATH'
  3204. '--headerdir PATH'
  3205. The target directory of the generated header file. The default is
  3206. the current directory.
  3207. '-H'
  3208. '--help'
  3209. Displays a list of command-line options and then exits.
  3210. '-m CHARACTERS'
  3211. '--maxlength CHARACTERS'
  3212. Instructs 'windmc' to generate a warning if the length of any
  3213. message exceeds the number specified.
  3214. '-n'
  3215. '--nullterminate'
  3216. Terminate message text in 'bin' files by zero. By default they are
  3217. terminated by CR/LF.
  3218. '-o'
  3219. '--hresult_use'
  3220. Not yet implemented. Instructs 'windmc' to generate an OLE2 header
  3221. file, using HRESULT definitions. Status codes are used if the flag
  3222. is not specified.
  3223. '-O CODEPAGE'
  3224. '--codepage_out CODEPAGE'
  3225. Sets the default codepage to be used to output text files. The
  3226. default is ocdepage 1252.
  3227. '-r PATH'
  3228. '--rcdir PATH'
  3229. The target directory for the generated 'rc' script and the
  3230. generated 'bin' files that the resource compiler script includes.
  3231. The default is the current directory.
  3232. '-u'
  3233. '--unicode_in'
  3234. Specifies that the input file is UTF16.
  3235. '-U'
  3236. '--unicode_out'
  3237. Specifies that messages in the output 'bin' file should be in UTF16
  3238. format. This is the default behaviour.
  3239. '-v'
  3240. '--verbose'
  3241. Enable verbose mode.
  3242. '-V'
  3243. '--version'
  3244. Prints the version number for 'windmc'.
  3245. '-x PATH'
  3246. '--xdgb PATH'
  3247. The path of the 'dbg' C include file that maps message id's to the
  3248. symbolic name. No such file is generated without specifying the
  3249. switch.
  3250. 
  3251. File: binutils.info, Node: windres, Next: dlltool, Prev: windmc, Up: Top
  3252. 12 windres
  3253. **********
  3254. 'windres' may be used to manipulate Windows resources.
  3255. _Warning:_ 'windres' is not always built as part of the binary
  3256. utilities, since it is only useful for Windows targets.
  3257. windres [options] [input-file] [output-file]
  3258. 'windres' reads resources from an input file and copies them into an
  3259. output file. Either file may be in one of three formats:
  3260. 'rc'
  3261. A text format read by the Resource Compiler.
  3262. 'res'
  3263. A binary format generated by the Resource Compiler.
  3264. 'coff'
  3265. A COFF object or executable.
  3266. The exact description of these different formats is available in
  3267. documentation from Microsoft.
  3268. When 'windres' converts from the 'rc' format to the 'res' format, it
  3269. is acting like the Windows Resource Compiler. When 'windres' converts
  3270. from the 'res' format to the 'coff' format, it is acting like the
  3271. Windows 'CVTRES' program.
  3272. When 'windres' generates an 'rc' file, the output is similar but not
  3273. identical to the format expected for the input. When an input 'rc' file
  3274. refers to an external filename, an output 'rc' file will instead include
  3275. the file contents.
  3276. If the input or output format is not specified, 'windres' will guess
  3277. based on the file name, or, for the input file, the file contents. A
  3278. file with an extension of '.rc' will be treated as an 'rc' file, a file
  3279. with an extension of '.res' will be treated as a 'res' file, and a file
  3280. with an extension of '.o' or '.exe' will be treated as a 'coff' file.
  3281. If no output file is specified, 'windres' will print the resources in
  3282. 'rc' format to standard output.
  3283. The normal use is for you to write an 'rc' file, use 'windres' to
  3284. convert it to a COFF object file, and then link the COFF file into your
  3285. application. This will make the resources described in the 'rc' file
  3286. available to Windows.
  3287. '-i FILENAME'
  3288. '--input FILENAME'
  3289. The name of the input file. If this option is not used, then
  3290. 'windres' will use the first non-option argument as the input file
  3291. name. If there are no non-option arguments, then 'windres' will
  3292. read from standard input. 'windres' can not read a COFF file from
  3293. standard input.
  3294. '-o FILENAME'
  3295. '--output FILENAME'
  3296. The name of the output file. If this option is not used, then
  3297. 'windres' will use the first non-option argument, after any used
  3298. for the input file name, as the output file name. If there is no
  3299. non-option argument, then 'windres' will write to standard output.
  3300. 'windres' can not write a COFF file to standard output. Note, for
  3301. compatibility with 'rc' the option '-fo' is also accepted, but its
  3302. use is not recommended.
  3303. '-J FORMAT'
  3304. '--input-format FORMAT'
  3305. The input format to read. FORMAT may be 'res', 'rc', or 'coff'.
  3306. If no input format is specified, 'windres' will guess, as described
  3307. above.
  3308. '-O FORMAT'
  3309. '--output-format FORMAT'
  3310. The output format to generate. FORMAT may be 'res', 'rc', or
  3311. 'coff'. If no output format is specified, 'windres' will guess, as
  3312. described above.
  3313. '-F TARGET'
  3314. '--target TARGET'
  3315. Specify the BFD format to use for a COFF file as input or output.
  3316. This is a BFD target name; you can use the '--help' option to see a
  3317. list of supported targets. Normally 'windres' will use the default
  3318. format, which is the first one listed by the '--help' option.
  3319. *note Target Selection::.
  3320. '--preprocessor PROGRAM'
  3321. When 'windres' reads an 'rc' file, it runs it through the C
  3322. preprocessor first. This option may be used to specify the
  3323. preprocessor to use. The default preprocessor is 'gcc'.
  3324. '--preprocessor-arg OPTION'
  3325. When 'windres' reads an 'rc' file, it runs it through the C
  3326. preprocessor first. This option may be used to specify additional
  3327. text to be passed to preprocessor on its command line. This option
  3328. can be used multiple times to add multiple options to the
  3329. preprocessor command line. If the '--preprocessor' option has not
  3330. been specified then a default set of preprocessor arguments will be
  3331. used, with any '--preprocessor-arg' options being placed after them
  3332. on the command line. These default arguments are '-E',
  3333. '-xc-header' and '-DRC_INVOKED'.
  3334. '-I DIRECTORY'
  3335. '--include-dir DIRECTORY'
  3336. Specify an include directory to use when reading an 'rc' file.
  3337. 'windres' will pass this to the preprocessor as an '-I' option.
  3338. 'windres' will also search this directory when looking for files
  3339. named in the 'rc' file. If the argument passed to this command
  3340. matches any of the supported FORMATS (as described in the '-J'
  3341. option), it will issue a deprecation warning, and behave just like
  3342. the '-J' option. New programs should not use this behaviour. If a
  3343. directory happens to match a FORMAT, simple prefix it with './' to
  3344. disable the backward compatibility.
  3345. '-D TARGET'
  3346. '--define SYM[=VAL]'
  3347. Specify a '-D' option to pass to the preprocessor when reading an
  3348. 'rc' file.
  3349. '-U TARGET'
  3350. '--undefine SYM'
  3351. Specify a '-U' option to pass to the preprocessor when reading an
  3352. 'rc' file.
  3353. '-r'
  3354. Ignored for compatibility with rc.
  3355. '-v'
  3356. Enable verbose mode. This tells you what the preprocessor is if
  3357. you didn't specify one.
  3358. '-c VAL'
  3359. '--codepage VAL'
  3360. Specify the default codepage to use when reading an 'rc' file. VAL
  3361. should be a hexadecimal prefixed by '0x' or decimal codepage code.
  3362. The valid range is from zero up to 0xffff, but the validity of the
  3363. codepage is host and configuration dependent.
  3364. '-l VAL'
  3365. '--language VAL'
  3366. Specify the default language to use when reading an 'rc' file. VAL
  3367. should be a hexadecimal language code. The low eight bits are the
  3368. language, and the high eight bits are the sublanguage.
  3369. '--use-temp-file'
  3370. Use a temporary file to instead of using popen to read the output
  3371. of the preprocessor. Use this option if the popen implementation
  3372. is buggy on the host (eg., certain non-English language versions of
  3373. Windows 95 and Windows 98 are known to have buggy popen where the
  3374. output will instead go the console).
  3375. '--no-use-temp-file'
  3376. Use popen, not a temporary file, to read the output of the
  3377. preprocessor. This is the default behaviour.
  3378. '-h'
  3379. '--help'
  3380. Prints a usage summary.
  3381. '-V'
  3382. '--version'
  3383. Prints the version number for 'windres'.
  3384. '--yydebug'
  3385. If 'windres' is compiled with 'YYDEBUG' defined as '1', this will
  3386. turn on parser debugging.
  3387. 
  3388. File: binutils.info, Node: dlltool, Next: readelf, Prev: windres, Up: Top
  3389. 13 dlltool
  3390. **********
  3391. 'dlltool' is used to create the files needed to create dynamic link
  3392. libraries (DLLs) on systems which understand PE format image files such
  3393. as Windows. A DLL contains an export table which contains information
  3394. that the runtime loader needs to resolve references from a referencing
  3395. program.
  3396. The export table is generated by this program by reading in a '.def'
  3397. file or scanning the '.a' and '.o' files which will be in the DLL. A
  3398. '.o' file can contain information in special '.drectve' sections with
  3399. export information.
  3400. _Note:_ 'dlltool' is not always built as part of the binary
  3401. utilities, since it is only useful for those targets which support
  3402. DLLs.
  3403. dlltool [-d|--input-def DEF-FILE-NAME]
  3404. [-b|--base-file BASE-FILE-NAME]
  3405. [-e|--output-exp EXPORTS-FILE-NAME]
  3406. [-z|--output-def DEF-FILE-NAME]
  3407. [-l|--output-lib LIBRARY-FILE-NAME]
  3408. [-y|--output-delaylib LIBRARY-FILE-NAME]
  3409. [--export-all-symbols] [--no-export-all-symbols]
  3410. [--exclude-symbols LIST]
  3411. [--no-default-excludes]
  3412. [-S|--as PATH-TO-ASSEMBLER] [-f|--as-flags OPTIONS]
  3413. [-D|--dllname NAME] [-m|--machine MACHINE]
  3414. [-a|--add-indirect]
  3415. [-U|--add-underscore] [--add-stdcall-underscore]
  3416. [-k|--kill-at] [-A|--add-stdcall-alias]
  3417. [-p|--ext-prefix-alias PREFIX]
  3418. [-x|--no-idata4] [-c|--no-idata5]
  3419. [--use-nul-prefixed-import-tables]
  3420. [-I|--identify LIBRARY-FILE-NAME] [--identify-strict]
  3421. [-i|--interwork]
  3422. [-n|--nodelete] [-t|--temp-prefix PREFIX]
  3423. [-v|--verbose]
  3424. [-h|--help] [-V|--version]
  3425. [--no-leading-underscore] [--leading-underscore]
  3426. [--deterministic-libraries] [--non-deterministic-libraries]
  3427. [object-file ...]
  3428. 'dlltool' reads its inputs, which can come from the '-d' and '-b'
  3429. options as well as object files specified on the command line. It then
  3430. processes these inputs and if the '-e' option has been specified it
  3431. creates a exports file. If the '-l' option has been specified it
  3432. creates a library file and if the '-z' option has been specified it
  3433. creates a def file. Any or all of the '-e', '-l' and '-z' options can
  3434. be present in one invocation of dlltool.
  3435. When creating a DLL, along with the source for the DLL, it is
  3436. necessary to have three other files. 'dlltool' can help with the
  3437. creation of these files.
  3438. The first file is a '.def' file which specifies which functions are
  3439. exported from the DLL, which functions the DLL imports, and so on. This
  3440. is a text file and can be created by hand, or 'dlltool' can be used to
  3441. create it using the '-z' option. In this case 'dlltool' will scan the
  3442. object files specified on its command line looking for those functions
  3443. which have been specially marked as being exported and put entries for
  3444. them in the '.def' file it creates.
  3445. In order to mark a function as being exported from a DLL, it needs to
  3446. have an '-export:<name_of_function>' entry in the '.drectve' section of
  3447. the object file. This can be done in C by using the asm() operator:
  3448. asm (".section .drectve");
  3449. asm (".ascii \"-export:my_func\"");
  3450. int my_func (void) { ... }
  3451. The second file needed for DLL creation is an exports file. This
  3452. file is linked with the object files that make up the body of the DLL
  3453. and it handles the interface between the DLL and the outside world.
  3454. This is a binary file and it can be created by giving the '-e' option to
  3455. 'dlltool' when it is creating or reading in a '.def' file.
  3456. The third file needed for DLL creation is the library file that
  3457. programs will link with in order to access the functions in the DLL (an
  3458. 'import library'). This file can be created by giving the '-l' option
  3459. to dlltool when it is creating or reading in a '.def' file.
  3460. If the '-y' option is specified, dlltool generates a delay-import
  3461. library that can be used instead of the normal import library to allow a
  3462. program to link to the dll only as soon as an imported function is
  3463. called for the first time. The resulting executable will need to be
  3464. linked to the static delayimp library containing __delayLoadHelper2(),
  3465. which in turn will import LoadLibraryA and GetProcAddress from kernel32.
  3466. 'dlltool' builds the library file by hand, but it builds the exports
  3467. file by creating temporary files containing assembler statements and
  3468. then assembling these. The '-S' command-line option can be used to
  3469. specify the path to the assembler that dlltool will use, and the '-f'
  3470. option can be used to pass specific flags to that assembler. The '-n'
  3471. can be used to prevent dlltool from deleting these temporary assembler
  3472. files when it is done, and if '-n' is specified twice then this will
  3473. prevent dlltool from deleting the temporary object files it used to
  3474. build the library.
  3475. Here is an example of creating a DLL from a source file 'dll.c' and
  3476. also creating a program (from an object file called 'program.o') that
  3477. uses that DLL:
  3478. gcc -c dll.c
  3479. dlltool -e exports.o -l dll.lib dll.o
  3480. gcc dll.o exports.o -o dll.dll
  3481. gcc program.o dll.lib -o program
  3482. 'dlltool' may also be used to query an existing import library to
  3483. determine the name of the DLL to which it is associated. See the
  3484. description of the '-I' or '--identify' option.
  3485. The command-line options have the following meanings:
  3486. '-d FILENAME'
  3487. '--input-def FILENAME'
  3488. Specifies the name of a '.def' file to be read in and processed.
  3489. '-b FILENAME'
  3490. '--base-file FILENAME'
  3491. Specifies the name of a base file to be read in and processed. The
  3492. contents of this file will be added to the relocation section in
  3493. the exports file generated by dlltool.
  3494. '-e FILENAME'
  3495. '--output-exp FILENAME'
  3496. Specifies the name of the export file to be created by dlltool.
  3497. '-z FILENAME'
  3498. '--output-def FILENAME'
  3499. Specifies the name of the '.def' file to be created by dlltool.
  3500. '-l FILENAME'
  3501. '--output-lib FILENAME'
  3502. Specifies the name of the library file to be created by dlltool.
  3503. '-y FILENAME'
  3504. '--output-delaylib FILENAME'
  3505. Specifies the name of the delay-import library file to be created
  3506. by dlltool.
  3507. '--deterministic-libraries'
  3508. '--non-deterministic-libraries'
  3509. When creating output libraries in response to either the
  3510. '--output-lib' or '--output-delaylib' options either use the value
  3511. of zero for any timestamps, user ids and group ids created
  3512. ('--deterministic-libraries') or the actual timestamps, user ids
  3513. and group ids ('--non-deterministic-libraries').
  3514. '--export-all-symbols'
  3515. Treat all global and weak defined symbols found in the input object
  3516. files as symbols to be exported. There is a small list of symbols
  3517. which are not exported by default; see the '--no-default-excludes'
  3518. option. You may add to the list of symbols to not export by using
  3519. the '--exclude-symbols' option.
  3520. '--no-export-all-symbols'
  3521. Only export symbols explicitly listed in an input '.def' file or in
  3522. '.drectve' sections in the input object files. This is the default
  3523. behaviour. The '.drectve' sections are created by 'dllexport'
  3524. attributes in the source code.
  3525. '--exclude-symbols LIST'
  3526. Do not export the symbols in LIST. This is a list of symbol names
  3527. separated by comma or colon characters. The symbol names should
  3528. not contain a leading underscore. This is only meaningful when
  3529. '--export-all-symbols' is used.
  3530. '--no-default-excludes'
  3531. When '--export-all-symbols' is used, it will by default avoid
  3532. exporting certain special symbols. The current list of symbols to
  3533. avoid exporting is 'DllMain@12', 'DllEntryPoint@0', 'impure_ptr'.
  3534. You may use the '--no-default-excludes' option to go ahead and
  3535. export these special symbols. This is only meaningful when
  3536. '--export-all-symbols' is used.
  3537. '-S PATH'
  3538. '--as PATH'
  3539. Specifies the path, including the filename, of the assembler to be
  3540. used to create the exports file.
  3541. '-f OPTIONS'
  3542. '--as-flags OPTIONS'
  3543. Specifies any specific command-line options to be passed to the
  3544. assembler when building the exports file. This option will work
  3545. even if the '-S' option is not used. This option only takes one
  3546. argument, and if it occurs more than once on the command line, then
  3547. later occurrences will override earlier occurrences. So if it is
  3548. necessary to pass multiple options to the assembler they should be
  3549. enclosed in double quotes.
  3550. '-D NAME'
  3551. '--dll-name NAME'
  3552. Specifies the name to be stored in the '.def' file as the name of
  3553. the DLL when the '-e' option is used. If this option is not
  3554. present, then the filename given to the '-e' option will be used as
  3555. the name of the DLL.
  3556. '-m MACHINE'
  3557. '-machine MACHINE'
  3558. Specifies the type of machine for which the library file should be
  3559. built. 'dlltool' has a built in default type, depending upon how
  3560. it was created, but this option can be used to override that. This
  3561. is normally only useful when creating DLLs for an ARM processor,
  3562. when the contents of the DLL are actually encode using Thumb
  3563. instructions.
  3564. '-a'
  3565. '--add-indirect'
  3566. Specifies that when 'dlltool' is creating the exports file it
  3567. should add a section which allows the exported functions to be
  3568. referenced without using the import library. Whatever the hell
  3569. that means!
  3570. '-U'
  3571. '--add-underscore'
  3572. Specifies that when 'dlltool' is creating the exports file it
  3573. should prepend an underscore to the names of _all_ exported
  3574. symbols.
  3575. '--no-leading-underscore'
  3576. '--leading-underscore'
  3577. Specifies whether standard symbol should be forced to be prefixed,
  3578. or not.
  3579. '--add-stdcall-underscore'
  3580. Specifies that when 'dlltool' is creating the exports file it
  3581. should prepend an underscore to the names of exported _stdcall_
  3582. functions. Variable names and non-stdcall function names are not
  3583. modified. This option is useful when creating GNU-compatible
  3584. import libs for third party DLLs that were built with MS-Windows
  3585. tools.
  3586. '-k'
  3587. '--kill-at'
  3588. Specifies that '@<number>' suffixes should be omitted from the
  3589. names of stdcall functions that will be imported from the DLL. This
  3590. is useful when creating an import library for a DLL which exports
  3591. stdcall functions but without the usual '@<number>' symbol name
  3592. suffix.
  3593. This does not change the naming of symbols provided by the import
  3594. library to programs linked against it, but only the entries in the
  3595. import table (ie the .idata section).
  3596. '-A'
  3597. '--add-stdcall-alias'
  3598. Specifies that when 'dlltool' is creating the exports file it
  3599. should add aliases for stdcall symbols without '@ <number>' in
  3600. addition to the symbols with '@ <number>'.
  3601. '-p'
  3602. '--ext-prefix-alias PREFIX'
  3603. Causes 'dlltool' to create external aliases for all DLL imports
  3604. with the specified prefix. The aliases are created for both
  3605. external and import symbols with no leading underscore.
  3606. '-x'
  3607. '--no-idata4'
  3608. Specifies that when 'dlltool' is creating the exports and library
  3609. files it should omit the '.idata4' section. This is for
  3610. compatibility with certain operating systems.
  3611. '--use-nul-prefixed-import-tables'
  3612. Specifies that when 'dlltool' is creating the exports and library
  3613. files it should prefix the '.idata4' and '.idata5' by zero an
  3614. element. This emulates old gnu import library generation of
  3615. 'dlltool'. By default this option is turned off.
  3616. '-c'
  3617. '--no-idata5'
  3618. Specifies that when 'dlltool' is creating the exports and library
  3619. files it should omit the '.idata5' section. This is for
  3620. compatibility with certain operating systems.
  3621. '-I FILENAME'
  3622. '--identify FILENAME'
  3623. Specifies that 'dlltool' should inspect the import library
  3624. indicated by FILENAME and report, on 'stdout', the name(s) of the
  3625. associated DLL(s). This can be performed in addition to any other
  3626. operations indicated by the other options and arguments. 'dlltool'
  3627. fails if the import library does not exist or is not actually an
  3628. import library. See also '--identify-strict'.
  3629. '--identify-strict'
  3630. Modifies the behavior of the '--identify' option, such that an
  3631. error is reported if FILENAME is associated with more than one DLL.
  3632. '-i'
  3633. '--interwork'
  3634. Specifies that 'dlltool' should mark the objects in the library
  3635. file and exports file that it produces as supporting interworking
  3636. between ARM and Thumb code.
  3637. '-n'
  3638. '--nodelete'
  3639. Makes 'dlltool' preserve the temporary assembler files it used to
  3640. create the exports file. If this option is repeated then dlltool
  3641. will also preserve the temporary object files it uses to create the
  3642. library file.
  3643. '-t PREFIX'
  3644. '--temp-prefix PREFIX'
  3645. Makes 'dlltool' use PREFIX when constructing the names of temporary
  3646. assembler and object files. By default, the temp file prefix is
  3647. generated from the pid.
  3648. '-v'
  3649. '--verbose'
  3650. Make dlltool describe what it is doing.
  3651. '-h'
  3652. '--help'
  3653. Displays a list of command-line options and then exits.
  3654. '-V'
  3655. '--version'
  3656. Displays dlltool's version number and then exits.
  3657. * Menu:
  3658. * def file format:: The format of the dlltool '.def' file
  3659. 
  3660. File: binutils.info, Node: def file format, Up: dlltool
  3661. 13.1 The format of the 'dlltool' '.def' file
  3662. ============================================
  3663. A '.def' file contains any number of the following commands:
  3664. 'NAME' NAME '[ ,' BASE ']'
  3665. The result is going to be named NAME'.exe'.
  3666. 'LIBRARY' NAME '[ ,' BASE ']'
  3667. The result is going to be named NAME'.dll'. Note: If you want to
  3668. use LIBRARY as name then you need to quote. Otherwise this will
  3669. fail due a necessary hack for libtool (see PR binutils/13710 for
  3670. more details).
  3671. 'EXPORTS ( ( (' NAME1 '[ = ' NAME2 '] ) | ( ' NAME1 '=' MODULE-NAME '.' EXTERNAL-NAME ') ) [ == ' ITS_NAME ']'
  3672. '[' INTEGER '] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *'
  3673. Declares NAME1 as an exported symbol from the DLL, with optional
  3674. ordinal number INTEGER, or declares NAME1 as an alias (forward) of
  3675. the function EXTERNAL-NAME in the DLL. If ITS_NAME is specified,
  3676. this name is used as string in export table. MODULE-NAME. Note:
  3677. The 'EXPORTS' has to be the last command in .def file, as keywords
  3678. are treated - beside 'LIBRARY' - as simple name-identifiers. If
  3679. you want to use LIBRARY as name then you need to quote it.
  3680. 'IMPORTS ( (' INTERNAL-NAME '=' MODULE-NAME '.' INTEGER ') | [' INTERNAL-NAME '= ]' MODULE-NAME '.' EXTERNAL-NAME ') [ == ) ITS_NAME ] *'
  3681. Declares that EXTERNAL-NAME or the exported function whose ordinal
  3682. number is INTEGER is to be imported from the file MODULE-NAME. If
  3683. INTERNAL-NAME is specified then this is the name that the imported
  3684. function will be referred to in the body of the DLL. If ITS_NAME is
  3685. specified, this name is used as string in import table. Note: The
  3686. 'IMPORTS' has to be the last command in .def file, as keywords are
  3687. treated - beside 'LIBRARY' - as simple name-identifiers. If you
  3688. want to use LIBRARY as name then you need to quote it.
  3689. 'DESCRIPTION' STRING
  3690. Puts STRING into the output '.exp' file in the '.rdata' section.
  3691. 'STACKSIZE' NUMBER-RESERVE '[, ' NUMBER-COMMIT ']'
  3692. 'HEAPSIZE' NUMBER-RESERVE '[, ' NUMBER-COMMIT ']'
  3693. Generates '--stack' or '--heap' NUMBER-RESERVE,NUMBER-COMMIT in the
  3694. output '.drectve' section. The linker will see this and act upon
  3695. it.
  3696. 'CODE' ATTR '+'
  3697. 'DATA' ATTR '+'
  3698. 'SECTIONS (' SECTION-NAME ATTR' + ) *'
  3699. Generates '--attr' SECTION-NAME ATTR in the output '.drectve'
  3700. section, where ATTR is one of 'READ', 'WRITE', 'EXECUTE' or
  3701. 'SHARED'. The linker will see this and act upon it.
  3702. 
  3703. File: binutils.info, Node: readelf, Next: elfedit, Prev: dlltool, Up: Top
  3704. 14 readelf
  3705. **********
  3706. readelf [-a|--all]
  3707. [-h|--file-header]
  3708. [-l|--program-headers|--segments]
  3709. [-S|--section-headers|--sections]
  3710. [-g|--section-groups]
  3711. [-t|--section-details]
  3712. [-e|--headers]
  3713. [-s|--syms|--symbols]
  3714. [--dyn-syms|--lto-syms]
  3715. [--sym-base=[0|8|10|16]]
  3716. [--demangle=STYLE|--no-demangle]
  3717. [--quiet]
  3718. [--recurse-limit|--no-recurse-limit]
  3719. [-U METHOD|--unicode=METHOD]
  3720. [-X|--extra-sym-info|--no-extra-sym-info]
  3721. [-n|--notes]
  3722. [-r|--relocs]
  3723. [-u|--unwind]
  3724. [-d|--dynamic]
  3725. [-V|--version-info]
  3726. [-A|--arch-specific]
  3727. [-D|--use-dynamic]
  3728. [-L|--lint|--enable-checks]
  3729. [-x <number or name>|--hex-dump=<number or name>]
  3730. [-p <number or name>|--string-dump=<number or name>]
  3731. [-R <number or name>|--relocated-dump=<number or name>]
  3732. [-z|--decompress]
  3733. [-c|--archive-index]
  3734. [-w[lLiaprmfFsoORtUuTgAck]|
  3735. --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
  3736. [-wK|--debug-dump=follow-links]
  3737. [-wN|--debug-dump=no-follow-links]
  3738. [-wD|--debug-dump=use-debuginfod]
  3739. [-wE|--debug-dump=do-not-use-debuginfod]
  3740. [-P|--process-links]
  3741. [--dwarf-depth=N]
  3742. [--dwarf-start=N]
  3743. [--ctf=SECTION]
  3744. [--ctf-parent=SECTION]
  3745. [--ctf-symbols=SECTION]
  3746. [--ctf-strings=SECTION]
  3747. [--sframe=SECTION]
  3748. [-I|--histogram]
  3749. [-v|--version]
  3750. [-W|--wide]
  3751. [-T|--silent-truncation]
  3752. [-H|--help]
  3753. ELFFILE...
  3754. 'readelf' displays information about one or more ELF format object
  3755. files. The options control what particular information to display.
  3756. ELFFILE... are the object files to be examined. 32-bit and 64-bit
  3757. ELF files are supported, as are archives containing ELF files.
  3758. This program performs a similar function to 'objdump' but it goes
  3759. into more detail and it exists independently of the BFD library, so if
  3760. there is a bug in BFD then readelf will not be affected.
  3761. The long and short forms of options, shown here as alternatives, are
  3762. equivalent. At least one option besides '-v' or '-H' must be given.
  3763. '-a'
  3764. '--all'
  3765. Equivalent to specifying '--file-header', '--program-headers',
  3766. '--sections', '--symbols', '--relocs', '--dynamic', '--notes',
  3767. '--version-info', '--arch-specific', '--unwind', '--section-groups'
  3768. and '--histogram'.
  3769. Note - this option does not enable '--use-dynamic' itself, so if
  3770. that option is not present on the command line then dynamic symbols
  3771. and dynamic relocs will not be displayed.
  3772. '-h'
  3773. '--file-header'
  3774. Displays the information contained in the ELF header at the start
  3775. of the file.
  3776. '-l'
  3777. '--program-headers'
  3778. '--segments'
  3779. Displays the information contained in the file's segment headers,
  3780. if it has any.
  3781. '--quiet'
  3782. Suppress "no symbols" diagnostic.
  3783. '-S'
  3784. '--sections'
  3785. '--section-headers'
  3786. Displays the information contained in the file's section headers,
  3787. if it has any.
  3788. '-g'
  3789. '--section-groups'
  3790. Displays the information contained in the file's section groups, if
  3791. it has any.
  3792. '-t'
  3793. '--section-details'
  3794. Displays the detailed section information. Implies '-S'.
  3795. '-s'
  3796. '--symbols'
  3797. '--syms'
  3798. Displays the entries in symbol table section of the file, if it has
  3799. one. If a symbol has version information associated with it then
  3800. this is displayed as well. The version string is displayed as a
  3801. suffix to the symbol name, preceded by an @ character. For example
  3802. 'foo@VER_1'. If the version is the default version to be used when
  3803. resolving unversioned references to the symbol then it is displayed
  3804. as a suffix preceded by two @ characters. For example
  3805. 'foo@@VER_2'.
  3806. '--dyn-syms'
  3807. Displays the entries in dynamic symbol table section of the file,
  3808. if it has one. The output format is the same as the format used by
  3809. the '--syms' option.
  3810. '--lto-syms'
  3811. Displays the contents of any LTO symbol tables in the file.
  3812. '--sym-base=[0|8|10|16]'
  3813. Forces the size field of the symbol table to use the given base.
  3814. Any unrecognized options will be treated as '0'. '--sym-base=0'
  3815. represents the default and legacy behaviour. This will output
  3816. sizes as decimal for numbers less than 100000. For sizes 100000
  3817. and greater hexadecimal notation will be used with a 0x prefix.
  3818. '--sym-base=8' will give the symbol sizes in octal.
  3819. '--sym-base=10' will always give the symbol sizes in decimal.
  3820. '--sym-base=16' will always give the symbol sizes in hexadecimal
  3821. with a 0x prefix.
  3822. '-C'
  3823. '--demangle[=STYLE]'
  3824. Decode ("demangle") low-level symbol names into user-level names.
  3825. This makes C++ function names readable. Different compilers have
  3826. different mangling styles. The optional demangling style argument
  3827. can be used to choose an appropriate demangling style for your
  3828. compiler. *Note c++filt::, for more information on demangling.
  3829. '--no-demangle'
  3830. Do not demangle low-level symbol names. This is the default.
  3831. '--recurse-limit'
  3832. '--no-recurse-limit'
  3833. '--recursion-limit'
  3834. '--no-recursion-limit'
  3835. Enables or disables a limit on the amount of recursion performed
  3836. whilst demangling strings. Since the name mangling formats allow
  3837. for an infinite level of recursion it is possible to create strings
  3838. whose decoding will exhaust the amount of stack space available on
  3839. the host machine, triggering a memory fault. The limit tries to
  3840. prevent this from happening by restricting recursion to 2048 levels
  3841. of nesting.
  3842. The default is for this limit to be enabled, but disabling it may
  3843. be necessary in order to demangle truly complicated names. Note
  3844. however that if the recursion limit is disabled then stack
  3845. exhaustion is possible and any bug reports about such an event will
  3846. be rejected.
  3847. '-U [D|I|L|E|X|H]'
  3848. '--unicode=[default|invalid|locale|escape|hex|highlight]'
  3849. Controls the display of non-ASCII characters in identifier names.
  3850. The default ('--unicode=locale' or '--unicode=default') is to treat
  3851. them as multibyte characters and display them in the current
  3852. locale. All other versions of this option treat the bytes as UTF-8
  3853. encoded values and attempt to interpret them. If they cannot be
  3854. interpreted or if the '--unicode=invalid' option is used then they
  3855. are displayed as a sequence of hex bytes, encloses in curly
  3856. parethesis characters.
  3857. Using the '--unicode=escape' option will display the characters as
  3858. as unicode escape sequences (\UXXXX). Using the '--unicode=hex'
  3859. will display the characters as hex byte sequences enclosed between
  3860. angle brackets.
  3861. Using the '--unicode=highlight' will display the characters as
  3862. unicode escape sequences but it will also highlighted them in red,
  3863. assuming that colouring is supported by the output device. The
  3864. colouring is intended to draw attention to the presence of unicode
  3865. sequences when they might not be expected.
  3866. '-X'
  3867. '--extra-sym-info'
  3868. When displaying details of symbols, include extra information not
  3869. normally presented. Currently this just adds the name of the
  3870. section referenced by the symbol's index field, if there is one.
  3871. In the future more information may be displayed when this option is
  3872. enabled.
  3873. Enabling this option effectively enables the '--wide' option as
  3874. well, at least when displaying symbol information.
  3875. '--no-extra-sym-info'
  3876. Disables the effect of the '--extra-sym-info' option. This is the
  3877. default.
  3878. '-e'
  3879. '--headers'
  3880. Display all the headers in the file. Equivalent to '-h -l -S'.
  3881. '-n'
  3882. '--notes'
  3883. Displays the contents of the NOTE segments and/or sections, if any.
  3884. '-r'
  3885. '--relocs'
  3886. Displays the contents of the file's relocation section, if it has
  3887. one.
  3888. '-u'
  3889. '--unwind'
  3890. Displays the contents of the file's unwind section, if it has one.
  3891. Only the unwind sections for IA64 ELF files, as well as ARM unwind
  3892. tables ('.ARM.exidx' / '.ARM.extab') are currently supported. If
  3893. support is not yet implemented for your architecture you could try
  3894. dumping the contents of the .EH_FRAMES section using the
  3895. '--debug-dump=frames' or '--debug-dump=frames-interp' options.
  3896. '-d'
  3897. '--dynamic'
  3898. Displays the contents of the file's dynamic section, if it has one.
  3899. '-V'
  3900. '--version-info'
  3901. Displays the contents of the version sections in the file, it they
  3902. exist.
  3903. '-A'
  3904. '--arch-specific'
  3905. Displays architecture-specific information in the file, if there is
  3906. any.
  3907. '-D'
  3908. '--use-dynamic'
  3909. When displaying symbols, this option makes 'readelf' use the symbol
  3910. hash tables in the file's dynamic section, rather than the symbol
  3911. table sections.
  3912. When displaying relocations, this option makes 'readelf' display
  3913. the dynamic relocations rather than the static relocations.
  3914. '-L'
  3915. '--lint'
  3916. '--enable-checks'
  3917. Displays warning messages about possible problems with the file(s)
  3918. being examined. If used on its own then all of the contents of the
  3919. file(s) will be examined. If used with one of the dumping options
  3920. then the warning messages will only be produced for the things
  3921. being displayed.
  3922. '-x <number or name>'
  3923. '--hex-dump=<number or name>'
  3924. Displays the contents of the indicated section as a hexadecimal
  3925. bytes. A number identifies a particular section by index in the
  3926. section table; any other string identifies all sections with that
  3927. name in the object file.
  3928. '-R <number or name>'
  3929. '--relocated-dump=<number or name>'
  3930. Displays the contents of the indicated section as a hexadecimal
  3931. bytes. A number identifies a particular section by index in the
  3932. section table; any other string identifies all sections with that
  3933. name in the object file. The contents of the section will be
  3934. relocated before they are displayed.
  3935. '-p <number or name>'
  3936. '--string-dump=<number or name>'
  3937. Displays the contents of the indicated section as printable
  3938. strings. A number identifies a particular section by index in the
  3939. section table; any other string identifies all sections with that
  3940. name in the object file.
  3941. '-z'
  3942. '--decompress'
  3943. Requests that the section(s) being dumped by 'x', 'R' or 'p'
  3944. options are decompressed before being displayed. If the section(s)
  3945. are not compressed then they are displayed as is.
  3946. '-c'
  3947. '--archive-index'
  3948. Displays the file symbol index information contained in the header
  3949. part of binary archives. Performs the same function as the 't'
  3950. command to 'ar', but without using the BFD library. *Note ar::.
  3951. '-w[lLiaprmfFsOoRtUuTgAckK]'
  3952. '--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]'
  3953. Displays the contents of the DWARF debug sections in the file, if
  3954. any are present. Compressed debug sections are automatically
  3955. decompressed (temporarily) before they are displayed. If one or
  3956. more of the optional letters or words follows the switch then only
  3957. those type(s) of data will be dumped. The letters and words refer
  3958. to the following information:
  3959. 'a'
  3960. '=abbrev'
  3961. Displays the contents of the '.debug_abbrev' section.
  3962. 'A'
  3963. '=addr'
  3964. Displays the contents of the '.debug_addr' section.
  3965. 'c'
  3966. '=cu_index'
  3967. Displays the contents of the '.debug_cu_index' and/or
  3968. '.debug_tu_index' sections.
  3969. 'f'
  3970. '=frames'
  3971. Display the raw contents of a '.debug_frame' section.
  3972. 'F'
  3973. '=frames-interp'
  3974. Display the interpreted contents of a '.debug_frame' section.
  3975. 'g'
  3976. '=gdb_index'
  3977. Displays the contents of the '.gdb_index' and/or
  3978. '.debug_names' sections.
  3979. 'i'
  3980. '=info'
  3981. Displays the contents of the '.debug_info' section. Note: the
  3982. output from this option can also be restricted by the use of
  3983. the '--dwarf-depth' and '--dwarf-start' options.
  3984. 'k'
  3985. '=links'
  3986. Displays the contents of the '.gnu_debuglink',
  3987. '.gnu_debugaltlink' and '.debug_sup' sections, if any of them
  3988. are present. Also displays any links to separate dwarf object
  3989. files (dwo), if they are specified by the DW_AT_GNU_dwo_name
  3990. or DW_AT_dwo_name attributes in the '.debug_info' section.
  3991. 'K'
  3992. '=follow-links'
  3993. Display the contents of any selected debug sections that are
  3994. found in linked, separate debug info file(s). This can result
  3995. in multiple versions of the same debug section being displayed
  3996. if it exists in more than one file.
  3997. In addition, when displaying DWARF attributes, if a form is
  3998. found that references the separate debug info file, then the
  3999. referenced contents will also be displayed.
  4000. Note - in some distributions this option is enabled by
  4001. default. It can be disabled via the 'N' debug option. The
  4002. default can be chosen when configuring the binutils via the
  4003. '--enable-follow-debug-links=yes' or
  4004. '--enable-follow-debug-links=no' options. If these are not
  4005. used then the default is to enable the following of debug
  4006. links.
  4007. Note - if support for the debuginfod protocol was enabled when
  4008. the binutils were built then this option will also include an
  4009. attempt to contact any debuginfod servers mentioned in the
  4010. DEBUGINFOD_URLS environment variable. This could take some
  4011. time to resolve. This behaviour can be disabled via the
  4012. '=do-not-use-debuginfod' debug option.
  4013. 'N'
  4014. '=no-follow-links'
  4015. Disables the following of links to separate debug info files.
  4016. 'D'
  4017. '=use-debuginfod'
  4018. Enables contacting debuginfod servers if there is a need to
  4019. follow debug links. This is the default behaviour.
  4020. 'E'
  4021. '=do-not-use-debuginfod'
  4022. Disables contacting debuginfod servers when there is a need to
  4023. follow debug links.
  4024. 'l'
  4025. '=rawline'
  4026. Displays the contents of the '.debug_line' section in a raw
  4027. format.
  4028. 'L'
  4029. '=decodedline'
  4030. Displays the interpreted contents of the '.debug_line'
  4031. section.
  4032. 'm'
  4033. '=macro'
  4034. Displays the contents of the '.debug_macro' and/or
  4035. '.debug_macinfo' sections.
  4036. 'o'
  4037. '=loc'
  4038. Displays the contents of the '.debug_loc' and/or
  4039. '.debug_loclists' sections.
  4040. 'O'
  4041. '=str-offsets'
  4042. Displays the contents of the '.debug_str_offsets' section.
  4043. 'p'
  4044. '=pubnames'
  4045. Displays the contents of the '.debug_pubnames' and/or
  4046. '.debug_gnu_pubnames' sections.
  4047. 'r'
  4048. '=aranges'
  4049. Displays the contents of the '.debug_aranges' section.
  4050. 'R'
  4051. '=Ranges'
  4052. Displays the contents of the '.debug_ranges' and/or
  4053. '.debug_rnglists' sections.
  4054. 's'
  4055. '=str'
  4056. Displays the contents of the '.debug_str', '.debug_line_str'
  4057. and/or '.debug_str_offsets' sections.
  4058. 't'
  4059. '=pubtype'
  4060. Displays the contents of the '.debug_pubtypes' and/or
  4061. '.debug_gnu_pubtypes' sections.
  4062. 'T'
  4063. '=trace_aranges'
  4064. Displays the contents of the '.trace_aranges' section.
  4065. 'u'
  4066. '=trace_abbrev'
  4067. Displays the contents of the '.trace_abbrev' section.
  4068. 'U'
  4069. '=trace_info'
  4070. Displays the contents of the '.trace_info' section.
  4071. Note: displaying the contents of '.debug_static_funcs',
  4072. '.debug_static_vars' and 'debug_weaknames' sections is not
  4073. currently supported.
  4074. '--dwarf-depth=N'
  4075. Limit the dump of the '.debug_info' section to N children. This is
  4076. only useful with '--debug-dump=info'. The default is to print all
  4077. DIEs; the special value 0 for N will also have this effect.
  4078. With a non-zero value for N, DIEs at or deeper than N levels will
  4079. not be printed. The range for N is zero-based.
  4080. '--dwarf-start=N'
  4081. Print only DIEs beginning with the DIE numbered N. This is only
  4082. useful with '--debug-dump=info'.
  4083. If specified, this option will suppress printing of any header
  4084. information and all DIEs before the DIE numbered N. Only siblings
  4085. and children of the specified DIE will be printed.
  4086. This can be used in conjunction with '--dwarf-depth'.
  4087. '-P'
  4088. '--process-links'
  4089. Display the contents of non-debug sections found in separate
  4090. debuginfo files that are linked to the main file. This option
  4091. automatically implies the '-wK' option, and only sections requested
  4092. by other command line options will be displayed.
  4093. '--ctf[=SECTION]'
  4094. Display the contents of the specified CTF section. CTF sections
  4095. themselves contain many subsections, all of which are displayed in
  4096. order.
  4097. By default, display the name of the section named .CTF, which is
  4098. the name emitted by 'ld'.
  4099. '--ctf-parent=MEMBER'
  4100. If the CTF section contains ambiguously-defined types, it will
  4101. consist of an archive of many CTF dictionaries, all inheriting from
  4102. one dictionary containing unambiguous types. This member is by
  4103. default named .CTF, like the section containing it, but it is
  4104. possible to change this name using the
  4105. 'ctf_link_set_memb_name_changer' function at link time. When
  4106. looking at CTF archives that have been created by a linker that
  4107. uses the name changer to rename the parent archive member,
  4108. '--ctf-parent' can be used to specify the name used for the parent.
  4109. '--ctf-symbols=SECTION'
  4110. '--ctf-strings=SECTION'
  4111. Specify the name of another section from which the CTF file can
  4112. inherit strings and symbols. By default, the '.symtab' and its
  4113. linked string table are used.
  4114. If either of '--ctf-symbols' or '--ctf-strings' is specified, the
  4115. other must be specified as well.
  4116. '-I'
  4117. '--histogram'
  4118. Display a histogram of bucket list lengths when displaying the
  4119. contents of the symbol tables.
  4120. '-v'
  4121. '--version'
  4122. Display the version number of readelf.
  4123. '-W'
  4124. '--wide'
  4125. Don't break output lines to fit into 80 columns. By default
  4126. 'readelf' breaks section header and segment listing lines for
  4127. 64-bit ELF files, so that they fit into 80 columns. This option
  4128. causes 'readelf' to print each section header resp. each segment
  4129. one a single line, which is far more readable on terminals wider
  4130. than 80 columns.
  4131. '-T'
  4132. '--silent-truncation'
  4133. Normally when readelf is displaying a symbol name, and it has to
  4134. truncate the name to fit into an 80 column display, it will add a
  4135. suffix of '[...]' to the name. This command line option disables
  4136. this behaviour, allowing 5 more characters of the name to be
  4137. displayed and restoring the old behaviour of readelf (prior to
  4138. release 2.35).
  4139. '-H'
  4140. '--help'
  4141. Display the command-line options understood by 'readelf'.
  4142. 
  4143. File: binutils.info, Node: elfedit, Next: Common Options, Prev: readelf, Up: Top
  4144. 15 elfedit
  4145. **********
  4146. elfedit [--input-mach=MACHINE]
  4147. [--input-type=TYPE]
  4148. [--input-osabi=OSABI]
  4149. [--input-abiversion=VERSION]
  4150. --output-mach=MACHINE
  4151. --output-type=TYPE
  4152. --output-osabi=OSABI
  4153. --output-abiversion=VERSION
  4154. --enable-x86-feature=FEATURE
  4155. --disable-x86-feature=FEATURE
  4156. [-v|--version]
  4157. [-h|--help]
  4158. ELFFILE...
  4159. 'elfedit' updates the ELF header and program property of ELF files
  4160. which have the matching ELF machine and file types. The options control
  4161. how and which fields in the ELF header and program property should be
  4162. updated.
  4163. ELFFILE... are the ELF files to be updated. 32-bit and 64-bit ELF
  4164. files are supported, as are archives containing ELF files.
  4165. The long and short forms of options, shown here as alternatives, are
  4166. equivalent. At least one of the '--output-mach', '--output-type',
  4167. '--output-osabi', '--output-abiversion', '--enable-x86-feature' and
  4168. '--disable-x86-feature' options must be given.
  4169. '--input-mach=MACHINE'
  4170. Set the matching input ELF machine type to MACHINE. If
  4171. '--input-mach' isn't specified, it will match any ELF machine
  4172. types.
  4173. The supported ELF machine types are, I386, IAMCU, L1OM, K1OM and
  4174. X86-64.
  4175. '--output-mach=MACHINE'
  4176. Change the ELF machine type in the ELF header to MACHINE. The
  4177. supported ELF machine types are the same as '--input-mach'.
  4178. '--input-type=TYPE'
  4179. Set the matching input ELF file type to TYPE. If '--input-type'
  4180. isn't specified, it will match any ELF file types.
  4181. The supported ELF file types are, REL, EXEC and DYN.
  4182. '--output-type=TYPE'
  4183. Change the ELF file type in the ELF header to TYPE. The supported
  4184. ELF types are the same as '--input-type'.
  4185. '--input-osabi=OSABI'
  4186. Set the matching input ELF file OSABI to OSABI. If '--input-osabi'
  4187. isn't specified, it will match any ELF OSABIs.
  4188. The supported ELF OSABIs are, NONE, HPUX, NETBSD, GNU, LINUX (alias
  4189. for GNU), SOLARIS, AIX, IRIX, FREEBSD, TRU64, MODESTO, OPENBSD,
  4190. OPENVMS, NSK, AROS and FENIXOS.
  4191. '--output-osabi=OSABI'
  4192. Change the ELF OSABI in the ELF header to OSABI. The supported ELF
  4193. OSABI are the same as '--input-osabi'.
  4194. '--input-abiversion=VERSION'
  4195. Set the matching input ELF file ABIVERSION to VERSION. VERSION
  4196. must be between 0 and 255. If '--input-abiversion' isn't
  4197. specified, it will match any ELF ABIVERSIONs.
  4198. '--output-abiversion=VERSION'
  4199. Change the ELF ABIVERSION in the ELF header to VERSION. VERSION
  4200. must be between 0 and 255.
  4201. '--enable-x86-feature=FEATURE'
  4202. Set the FEATURE bit in program property in EXEC or DYN ELF files
  4203. with machine types of I386 or X86-64. The supported features are,
  4204. IBT, SHSTK, LAM_U48 and LAM_U57.
  4205. '--disable-x86-feature=FEATURE'
  4206. Clear the FEATURE bit in program property in EXEC or DYN ELF files
  4207. with machine types of I386 or X86-64. The supported features are
  4208. the same as '--enable-x86-feature'.
  4209. Note: '--enable-x86-feature' and '--disable-x86-feature' are
  4210. available only on hosts with 'mmap' support.
  4211. '-v'
  4212. '--version'
  4213. Display the version number of 'elfedit'.
  4214. '-h'
  4215. '--help'
  4216. Display the command-line options understood by 'elfedit'.
  4217. 
  4218. File: binutils.info, Node: Common Options, Next: Selecting the Target System, Prev: elfedit, Up: Top
  4219. 16 Common Options
  4220. *****************
  4221. The following command-line options are supported by all of the programs
  4222. described in this manual.
  4223. '@FILE'
  4224. Read command-line options from FILE. The options read are inserted
  4225. in place of the original @FILE option. If FILE does not exist, or
  4226. cannot be read, then the option will be treated literally, and not
  4227. removed.
  4228. Options in FILE are separated by whitespace. A whitespace
  4229. character may be included in an option by surrounding the entire
  4230. option in either single or double quotes. Any character (including
  4231. a backslash) may be included by prefixing the character to be
  4232. included with a backslash. The FILE may itself contain additional
  4233. @FILE options; any such options will be processed recursively.
  4234. '--help'
  4235. Display the command-line options supported by the program.
  4236. '--version'
  4237. Display the version number of the program.
  4238. 
  4239. File: binutils.info, Node: Selecting the Target System, Next: debuginfod, Prev: Common Options, Up: Top
  4240. 17 Selecting the Target System
  4241. ******************************
  4242. You can specify two aspects of the target system to the GNU binary file
  4243. utilities, each in several ways:
  4244. * the target
  4245. * the architecture
  4246. In the following summaries, the lists of ways to specify values are
  4247. in order of decreasing precedence. The ways listed first override those
  4248. listed later.
  4249. The commands to list valid values only list the values for which the
  4250. programs you are running were configured. If they were configured with
  4251. '--enable-targets=all', the commands list most of the available values,
  4252. but a few are left out; not all targets can be configured in at once
  4253. because some of them can only be configured "native" (on hosts with the
  4254. same type as the target system).
  4255. * Menu:
  4256. * Target Selection::
  4257. * Architecture Selection::
  4258. 
  4259. File: binutils.info, Node: Target Selection, Next: Architecture Selection, Up: Selecting the Target System
  4260. 17.1 Target Selection
  4261. =====================
  4262. A "target" is an object file format. A given target may be supported
  4263. for multiple architectures (*note Architecture Selection::). A target
  4264. selection may also have variations for different operating systems or
  4265. architectures.
  4266. The command to list valid target values is 'objdump -i' (the first
  4267. column of output contains the relevant information).
  4268. Some sample values are: 'a.out-hp300bsd', 'ecoff-littlemips',
  4269. 'a.out-sunos-big'.
  4270. You can also specify a target using a configuration triplet. This is
  4271. the same sort of name that is passed to 'configure' to specify a target.
  4272. When you use a configuration triplet as an argument, it must be fully
  4273. canonicalized. You can see the canonical version of a triplet by
  4274. running the shell script 'config.sub' which is included with the
  4275. sources.
  4276. Some sample configuration triplets are: 'm68k-hp-bsd',
  4277. 'mips-dec-ultrix', 'sparc-sun-sunos'.
  4278. 'objdump' Target
  4279. ----------------
  4280. Ways to specify:
  4281. 1. command-line option: '-b' or '--target'
  4282. 2. environment variable 'GNUTARGET'
  4283. 3. deduced from the input file
  4284. 'objcopy' and 'strip' Input Target
  4285. ----------------------------------
  4286. Ways to specify:
  4287. 1. command-line options: '-I' or '--input-target', or '-F' or
  4288. '--target'
  4289. 2. environment variable 'GNUTARGET'
  4290. 3. deduced from the input file
  4291. 'objcopy' and 'strip' Output Target
  4292. -----------------------------------
  4293. Ways to specify:
  4294. 1. command-line options: '-O' or '--output-target', or '-F' or
  4295. '--target'
  4296. 2. the input target (see "'objcopy' and 'strip' Input Target" above)
  4297. 3. environment variable 'GNUTARGET'
  4298. 4. deduced from the input file
  4299. 'nm', 'size', and 'strings' Target
  4300. ----------------------------------
  4301. Ways to specify:
  4302. 1. command-line option: '--target'
  4303. 2. environment variable 'GNUTARGET'
  4304. 3. deduced from the input file
  4305. 
  4306. File: binutils.info, Node: Architecture Selection, Prev: Target Selection, Up: Selecting the Target System
  4307. 17.2 Architecture Selection
  4308. ===========================
  4309. An "architecture" is a type of CPU on which an object file is to run.
  4310. Its name may contain a colon, separating the name of the processor
  4311. family from the name of the particular CPU.
  4312. The command to list valid architecture values is 'objdump -i' (the
  4313. second column contains the relevant information).
  4314. Sample values: 'm68k:68020', 'mips:3000', 'sparc'.
  4315. 'objdump' Architecture
  4316. ----------------------
  4317. Ways to specify:
  4318. 1. command-line option: '-m' or '--architecture'
  4319. 2. deduced from the input file
  4320. 'objcopy', 'nm', 'size', 'strings' Architecture
  4321. -----------------------------------------------
  4322. Ways to specify:
  4323. 1. deduced from the input file
  4324. 
  4325. File: binutils.info, Node: debuginfod, Next: Reporting Bugs, Prev: Selecting the Target System, Up: Top
  4326. 18 debuginfod
  4327. *************
  4328. debuginfod is a web service that indexes ELF/DWARF debugging resources
  4329. by build-id and serves them over HTTP. For more information see:
  4330. _https://sourceware.org/elfutils/Debuginfod.html_
  4331. Binutils can be built with the debuginfod client library
  4332. 'libdebuginfod' using the '--with-debuginfod' configure option. This
  4333. option is enabled by default if 'libdebuginfod' is installed and found
  4334. at configure time. This allows 'objdump' and 'readelf' to automatically
  4335. query debuginfod servers for separate debug files when the files are
  4336. otherwise not found.
  4337. debuginfod is packaged with elfutils, starting with version 0.178.
  4338. You can get the latest version from 'https://sourceware.org/elfutils/'.
  4339. The DWARF info dumping tools ('readelf' and 'objdump') have options
  4340. to control when they should access the debuginfod servers. By default
  4341. this access is enabled.
  4342. 
  4343. File: binutils.info, Node: Reporting Bugs, Next: GNU Free Documentation License, Prev: debuginfod, Up: Top
  4344. 19 Reporting Bugs
  4345. *****************
  4346. Your bug reports play an essential role in making the binary utilities
  4347. reliable.
  4348. Reporting a bug may help you by bringing a solution to your problem,
  4349. or it may not. But in any case the principal function of a bug report
  4350. is to help the entire community by making the next version of the binary
  4351. utilities work better. Bug reports are your contribution to their
  4352. maintenance.
  4353. In order for a bug report to serve its purpose, you must include the
  4354. information that enables us to fix the bug.
  4355. * Menu:
  4356. * Bug Criteria:: Have you found a bug?
  4357. * Bug Reporting:: How to report bugs
  4358. 
  4359. File: binutils.info, Node: Bug Criteria, Next: Bug Reporting, Up: Reporting Bugs
  4360. 19.1 Have You Found a Bug?
  4361. ==========================
  4362. If you are not sure whether you have found a bug, here are some
  4363. guidelines:
  4364. * If a binary utility gets a fatal signal, for any input whatever,
  4365. that is a bug. Reliable utilities never crash.
  4366. * If a binary utility produces an error message for valid input, that
  4367. is a bug.
  4368. * If you are an experienced user of binary utilities, your
  4369. suggestions for improvement are welcome in any case.
  4370. 
  4371. File: binutils.info, Node: Bug Reporting, Prev: Bug Criteria, Up: Reporting Bugs
  4372. 19.2 How to Report Bugs
  4373. =======================
  4374. A number of companies and individuals offer support for GNU products.
  4375. If you obtained the binary utilities from a support organization, we
  4376. recommend you contact that organization first.
  4377. You can find contact information for many support companies and
  4378. individuals in the file 'etc/SERVICE' in the GNU Emacs distribution.
  4379. In any event, we also recommend that you send bug reports for the
  4380. binary utilities to <https://bugs.linaro.org/>.
  4381. The fundamental principle of reporting bugs usefully is this: *report
  4382. all the facts*. If you are not sure whether to state a fact or leave it
  4383. out, state it!
  4384. Often people omit facts because they think they know what causes the
  4385. problem and assume that some details do not matter. Thus, you might
  4386. assume that the name of a file you use in an example does not matter.
  4387. Well, probably it does not, but one cannot be sure. Perhaps the bug is
  4388. a stray memory reference which happens to fetch from the location where
  4389. that pathname is stored in memory; perhaps, if the pathname were
  4390. different, the contents of that location would fool the utility into
  4391. doing the right thing despite the bug. Play it safe and give a
  4392. specific, complete example. That is the easiest thing for you to do,
  4393. and the most helpful.
  4394. Keep in mind that the purpose of a bug report is to enable us to fix
  4395. the bug if it is new to us. Therefore, always write your bug reports on
  4396. the assumption that the bug has not been reported previously.
  4397. Sometimes people give a few sketchy facts and ask, "Does this ring a
  4398. bell?" This cannot help us fix a bug, so it is basically useless. We
  4399. respond by asking for enough details to enable us to investigate. You
  4400. might as well expedite matters by sending them to begin with.
  4401. To enable us to fix the bug, you should include all these things:
  4402. * The version of the utility. Each utility announces it if you start
  4403. it with the '--version' argument.
  4404. Without this, we will not know whether there is any point in
  4405. looking for the bug in the current version of the binary utilities.
  4406. * Any patches you may have applied to the source, including any
  4407. patches made to the 'BFD' library.
  4408. * The type of machine you are using, and the operating system name
  4409. and version number.
  4410. * What compiler (and its version) was used to compile the
  4411. utilities--e.g. "'gcc-2.7'".
  4412. * The command arguments you gave the utility to observe the bug. To
  4413. guarantee you will not omit something important, list them all. A
  4414. copy of the Makefile (or the output from make) is sufficient.
  4415. If we were to try to guess the arguments, we would probably guess
  4416. wrong and then we might not encounter the bug.
  4417. * A complete input file, or set of input files, that will reproduce
  4418. the bug. If the utility is reading an object file or files, then
  4419. it is generally most helpful to send the actual object files.
  4420. If the source files were produced exclusively using GNU programs
  4421. (e.g., 'gcc', 'gas', and/or the GNU 'ld'), then it may be OK to
  4422. send the source files rather than the object files. In this case,
  4423. be sure to say exactly what version of 'gcc', or whatever, was used
  4424. to produce the object files. Also say how 'gcc', or whatever, was
  4425. configured.
  4426. * A description of what behavior you observe that you believe is
  4427. incorrect. For example, "It gets a fatal signal."
  4428. Of course, if the bug is that the utility gets a fatal signal, then
  4429. we will certainly notice it. But if the bug is incorrect output,
  4430. we might not notice unless it is glaringly wrong. You might as
  4431. well not give us a chance to make a mistake.
  4432. Even if the problem you experience is a fatal signal, you should
  4433. still say so explicitly. Suppose something strange is going on,
  4434. such as your copy of the utility is out of sync, or you have
  4435. encountered a bug in the C library on your system. (This has
  4436. happened!) Your copy might crash and ours would not. If you told
  4437. us to expect a crash, then when ours fails to crash, we would know
  4438. that the bug was not happening for us. If you had not told us to
  4439. expect a crash, then we would not be able to draw any conclusion
  4440. from our observations.
  4441. * If you wish to suggest changes to the source, send us context
  4442. diffs, as generated by 'diff' with the '-u', '-c', or '-p' option.
  4443. Always send diffs from the old file to the new file. If you wish
  4444. to discuss something in the 'ld' source, refer to it by context,
  4445. not by line number.
  4446. The line numbers in our development sources will not match those in
  4447. your sources. Your line numbers would convey no useful information
  4448. to us.
  4449. Here are some things that are not necessary:
  4450. * A description of the envelope of the bug.
  4451. Often people who encounter a bug spend a lot of time investigating
  4452. which changes to the input file will make the bug go away and which
  4453. changes will not affect it.
  4454. This is often time consuming and not very useful, because the way
  4455. we will find the bug is by running a single example under the
  4456. debugger with breakpoints, not by pure deduction from a series of
  4457. examples. We recommend that you save your time for something else.
  4458. Of course, if you can find a simpler example to report _instead_ of
  4459. the original one, that is a convenience for us. Errors in the
  4460. output will be easier to spot, running under the debugger will take
  4461. less time, and so on.
  4462. However, simplification is not vital; if you do not want to do
  4463. this, report the bug anyway and send us the entire test case you
  4464. used.
  4465. * A patch for the bug.
  4466. A patch for the bug does help us if it is a good one. But do not
  4467. omit the necessary information, such as the test case, on the
  4468. assumption that a patch is all we need. We might see problems with
  4469. your patch and decide to fix the problem another way, or we might
  4470. not understand it at all.
  4471. Sometimes with programs as complicated as the binary utilities it
  4472. is very hard to construct an example that will make the program
  4473. follow a certain path through the code. If you do not send us the
  4474. example, we will not be able to construct one, so we will not be
  4475. able to verify that the bug is fixed.
  4476. And if we cannot understand what bug you are trying to fix, or why
  4477. your patch should be an improvement, we will not install it. A
  4478. test case will help us to understand.
  4479. * A guess about what the bug is or what it depends on.
  4480. Such guesses are usually wrong. Even we cannot guess right about
  4481. such things without first using the debugger to find the facts.
  4482. 
  4483. File: binutils.info, Node: GNU Free Documentation License, Next: Binutils Index, Prev: Reporting Bugs, Up: Top
  4484. Appendix A GNU Free Documentation License
  4485. *****************************************
  4486. Version 1.3, 3 November 2008
  4487. Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
  4488. <http://fsf.org/>
  4489. Everyone is permitted to copy and distribute verbatim copies
  4490. of this license document, but changing it is not allowed.
  4491. 0. PREAMBLE
  4492. The purpose of this License is to make a manual, textbook, or other
  4493. functional and useful document "free" in the sense of freedom: to
  4494. assure everyone the effective freedom to copy and redistribute it,
  4495. with or without modifying it, either commercially or
  4496. noncommercially. Secondarily, this License preserves for the
  4497. author and publisher a way to get credit for their work, while not
  4498. being considered responsible for modifications made by others.
  4499. This License is a kind of "copyleft", which means that derivative
  4500. works of the document must themselves be free in the same sense.
  4501. It complements the GNU General Public License, which is a copyleft
  4502. license designed for free software.
  4503. We have designed this License in order to use it for manuals for
  4504. free software, because free software needs free documentation: a
  4505. free program should come with manuals providing the same freedoms
  4506. that the software does. But this License is not limited to
  4507. software manuals; it can be used for any textual work, regardless
  4508. of subject matter or whether it is published as a printed book. We
  4509. recommend this License principally for works whose purpose is
  4510. instruction or reference.
  4511. 1. APPLICABILITY AND DEFINITIONS
  4512. This License applies to any manual or other work, in any medium,
  4513. that contains a notice placed by the copyright holder saying it can
  4514. be distributed under the terms of this License. Such a notice
  4515. grants a world-wide, royalty-free license, unlimited in duration,
  4516. to use that work under the conditions stated herein. The
  4517. "Document", below, refers to any such manual or work. Any member
  4518. of the public is a licensee, and is addressed as "you". You accept
  4519. the license if you copy, modify or distribute the work in a way
  4520. requiring permission under copyright law.
  4521. A "Modified Version" of the Document means any work containing the
  4522. Document or a portion of it, either copied verbatim, or with
  4523. modifications and/or translated into another language.
  4524. A "Secondary Section" is a named appendix or a front-matter section
  4525. of the Document that deals exclusively with the relationship of the
  4526. publishers or authors of the Document to the Document's overall
  4527. subject (or to related matters) and contains nothing that could
  4528. fall directly within that overall subject. (Thus, if the Document
  4529. is in part a textbook of mathematics, a Secondary Section may not
  4530. explain any mathematics.) The relationship could be a matter of
  4531. historical connection with the subject or with related matters, or
  4532. of legal, commercial, philosophical, ethical or political position
  4533. regarding them.
  4534. The "Invariant Sections" are certain Secondary Sections whose
  4535. titles are designated, as being those of Invariant Sections, in the
  4536. notice that says that the Document is released under this License.
  4537. If a section does not fit the above definition of Secondary then it
  4538. is not allowed to be designated as Invariant. The Document may
  4539. contain zero Invariant Sections. If the Document does not identify
  4540. any Invariant Sections then there are none.
  4541. The "Cover Texts" are certain short passages of text that are
  4542. listed, as Front-Cover Texts or Back-Cover Texts, in the notice
  4543. that says that the Document is released under this License. A
  4544. Front-Cover Text may be at most 5 words, and a Back-Cover Text may
  4545. be at most 25 words.
  4546. A "Transparent" copy of the Document means a machine-readable copy,
  4547. represented in a format whose specification is available to the
  4548. general public, that is suitable for revising the document
  4549. straightforwardly with generic text editors or (for images composed
  4550. of pixels) generic paint programs or (for drawings) some widely
  4551. available drawing editor, and that is suitable for input to text
  4552. formatters or for automatic translation to a variety of formats
  4553. suitable for input to text formatters. A copy made in an otherwise
  4554. Transparent file format whose markup, or absence of markup, has
  4555. been arranged to thwart or discourage subsequent modification by
  4556. readers is not Transparent. An image format is not Transparent if
  4557. used for any substantial amount of text. A copy that is not
  4558. "Transparent" is called "Opaque".
  4559. Examples of suitable formats for Transparent copies include plain
  4560. ASCII without markup, Texinfo input format, LaTeX input format,
  4561. SGML or XML using a publicly available DTD, and standard-conforming
  4562. simple HTML, PostScript or PDF designed for human modification.
  4563. Examples of transparent image formats include PNG, XCF and JPG.
  4564. Opaque formats include proprietary formats that can be read and
  4565. edited only by proprietary word processors, SGML or XML for which
  4566. the DTD and/or processing tools are not generally available, and
  4567. the machine-generated HTML, PostScript or PDF produced by some word
  4568. processors for output purposes only.
  4569. The "Title Page" means, for a printed book, the title page itself,
  4570. plus such following pages as are needed to hold, legibly, the
  4571. material this License requires to appear in the title page. For
  4572. works in formats which do not have any title page as such, "Title
  4573. Page" means the text near the most prominent appearance of the
  4574. work's title, preceding the beginning of the body of the text.
  4575. The "publisher" means any person or entity that distributes copies
  4576. of the Document to the public.
  4577. A section "Entitled XYZ" means a named subunit of the Document
  4578. whose title either is precisely XYZ or contains XYZ in parentheses
  4579. following text that translates XYZ in another language. (Here XYZ
  4580. stands for a specific section name mentioned below, such as
  4581. "Acknowledgements", "Dedications", "Endorsements", or "History".)
  4582. To "Preserve the Title" of such a section when you modify the
  4583. Document means that it remains a section "Entitled XYZ" according
  4584. to this definition.
  4585. The Document may include Warranty Disclaimers next to the notice
  4586. which states that this License applies to the Document. These
  4587. Warranty Disclaimers are considered to be included by reference in
  4588. this License, but only as regards disclaiming warranties: any other
  4589. implication that these Warranty Disclaimers may have is void and
  4590. has no effect on the meaning of this License.
  4591. 2. VERBATIM COPYING
  4592. You may copy and distribute the Document in any medium, either
  4593. commercially or noncommercially, provided that this License, the
  4594. copyright notices, and the license notice saying this License
  4595. applies to the Document are reproduced in all copies, and that you
  4596. add no other conditions whatsoever to those of this License. You
  4597. may not use technical measures to obstruct or control the reading
  4598. or further copying of the copies you make or distribute. However,
  4599. you may accept compensation in exchange for copies. If you
  4600. distribute a large enough number of copies you must also follow the
  4601. conditions in section 3.
  4602. You may also lend copies, under the same conditions stated above,
  4603. and you may publicly display copies.
  4604. 3. COPYING IN QUANTITY
  4605. If you publish printed copies (or copies in media that commonly
  4606. have printed covers) of the Document, numbering more than 100, and
  4607. the Document's license notice requires Cover Texts, you must
  4608. enclose the copies in covers that carry, clearly and legibly, all
  4609. these Cover Texts: Front-Cover Texts on the front cover, and
  4610. Back-Cover Texts on the back cover. Both covers must also clearly
  4611. and legibly identify you as the publisher of these copies. The
  4612. front cover must present the full title with all words of the title
  4613. equally prominent and visible. You may add other material on the
  4614. covers in addition. Copying with changes limited to the covers, as
  4615. long as they preserve the title of the Document and satisfy these
  4616. conditions, can be treated as verbatim copying in other respects.
  4617. If the required texts for either cover are too voluminous to fit
  4618. legibly, you should put the first ones listed (as many as fit
  4619. reasonably) on the actual cover, and continue the rest onto
  4620. adjacent pages.
  4621. If you publish or distribute Opaque copies of the Document
  4622. numbering more than 100, you must either include a machine-readable
  4623. Transparent copy along with each Opaque copy, or state in or with
  4624. each Opaque copy a computer-network location from which the general
  4625. network-using public has access to download using public-standard
  4626. network protocols a complete Transparent copy of the Document, free
  4627. of added material. If you use the latter option, you must take
  4628. reasonably prudent steps, when you begin distribution of Opaque
  4629. copies in quantity, to ensure that this Transparent copy will
  4630. remain thus accessible at the stated location until at least one
  4631. year after the last time you distribute an Opaque copy (directly or
  4632. through your agents or retailers) of that edition to the public.
  4633. It is requested, but not required, that you contact the authors of
  4634. the Document well before redistributing any large number of copies,
  4635. to give them a chance to provide you with an updated version of the
  4636. Document.
  4637. 4. MODIFICATIONS
  4638. You may copy and distribute a Modified Version of the Document
  4639. under the conditions of sections 2 and 3 above, provided that you
  4640. release the Modified Version under precisely this License, with the
  4641. Modified Version filling the role of the Document, thus licensing
  4642. distribution and modification of the Modified Version to whoever
  4643. possesses a copy of it. In addition, you must do these things in
  4644. the Modified Version:
  4645. A. Use in the Title Page (and on the covers, if any) a title
  4646. distinct from that of the Document, and from those of previous
  4647. versions (which should, if there were any, be listed in the
  4648. History section of the Document). You may use the same title
  4649. as a previous version if the original publisher of that
  4650. version gives permission.
  4651. B. List on the Title Page, as authors, one or more persons or
  4652. entities responsible for authorship of the modifications in
  4653. the Modified Version, together with at least five of the
  4654. principal authors of the Document (all of its principal
  4655. authors, if it has fewer than five), unless they release you
  4656. from this requirement.
  4657. C. State on the Title page the name of the publisher of the
  4658. Modified Version, as the publisher.
  4659. D. Preserve all the copyright notices of the Document.
  4660. E. Add an appropriate copyright notice for your modifications
  4661. adjacent to the other copyright notices.
  4662. F. Include, immediately after the copyright notices, a license
  4663. notice giving the public permission to use the Modified
  4664. Version under the terms of this License, in the form shown in
  4665. the Addendum below.
  4666. G. Preserve in that license notice the full lists of Invariant
  4667. Sections and required Cover Texts given in the Document's
  4668. license notice.
  4669. H. Include an unaltered copy of this License.
  4670. I. Preserve the section Entitled "History", Preserve its Title,
  4671. and add to it an item stating at least the title, year, new
  4672. authors, and publisher of the Modified Version as given on the
  4673. Title Page. If there is no section Entitled "History" in the
  4674. Document, create one stating the title, year, authors, and
  4675. publisher of the Document as given on its Title Page, then add
  4676. an item describing the Modified Version as stated in the
  4677. previous sentence.
  4678. J. Preserve the network location, if any, given in the Document
  4679. for public access to a Transparent copy of the Document, and
  4680. likewise the network locations given in the Document for
  4681. previous versions it was based on. These may be placed in the
  4682. "History" section. You may omit a network location for a work
  4683. that was published at least four years before the Document
  4684. itself, or if the original publisher of the version it refers
  4685. to gives permission.
  4686. K. For any section Entitled "Acknowledgements" or "Dedications",
  4687. Preserve the Title of the section, and preserve in the section
  4688. all the substance and tone of each of the contributor
  4689. acknowledgements and/or dedications given therein.
  4690. L. Preserve all the Invariant Sections of the Document, unaltered
  4691. in their text and in their titles. Section numbers or the
  4692. equivalent are not considered part of the section titles.
  4693. M. Delete any section Entitled "Endorsements". Such a section
  4694. may not be included in the Modified Version.
  4695. N. Do not retitle any existing section to be Entitled
  4696. "Endorsements" or to conflict in title with any Invariant
  4697. Section.
  4698. O. Preserve any Warranty Disclaimers.
  4699. If the Modified Version includes new front-matter sections or
  4700. appendices that qualify as Secondary Sections and contain no
  4701. material copied from the Document, you may at your option designate
  4702. some or all of these sections as invariant. To do this, add their
  4703. titles to the list of Invariant Sections in the Modified Version's
  4704. license notice. These titles must be distinct from any other
  4705. section titles.
  4706. You may add a section Entitled "Endorsements", provided it contains
  4707. nothing but endorsements of your Modified Version by various
  4708. parties--for example, statements of peer review or that the text
  4709. has been approved by an organization as the authoritative
  4710. definition of a standard.
  4711. You may add a passage of up to five words as a Front-Cover Text,
  4712. and a passage of up to 25 words as a Back-Cover Text, to the end of
  4713. the list of Cover Texts in the Modified Version. Only one passage
  4714. of Front-Cover Text and one of Back-Cover Text may be added by (or
  4715. through arrangements made by) any one entity. If the Document
  4716. already includes a cover text for the same cover, previously added
  4717. by you or by arrangement made by the same entity you are acting on
  4718. behalf of, you may not add another; but you may replace the old
  4719. one, on explicit permission from the previous publisher that added
  4720. the old one.
  4721. The author(s) and publisher(s) of the Document do not by this
  4722. License give permission to use their names for publicity for or to
  4723. assert or imply endorsement of any Modified Version.
  4724. 5. COMBINING DOCUMENTS
  4725. You may combine the Document with other documents released under
  4726. this License, under the terms defined in section 4 above for
  4727. modified versions, provided that you include in the combination all
  4728. of the Invariant Sections of all of the original documents,
  4729. unmodified, and list them all as Invariant Sections of your
  4730. combined work in its license notice, and that you preserve all
  4731. their Warranty Disclaimers.
  4732. The combined work need only contain one copy of this License, and
  4733. multiple identical Invariant Sections may be replaced with a single
  4734. copy. If there are multiple Invariant Sections with the same name
  4735. but different contents, make the title of each such section unique
  4736. by adding at the end of it, in parentheses, the name of the
  4737. original author or publisher of that section if known, or else a
  4738. unique number. Make the same adjustment to the section titles in
  4739. the list of Invariant Sections in the license notice of the
  4740. combined work.
  4741. In the combination, you must combine any sections Entitled
  4742. "History" in the various original documents, forming one section
  4743. Entitled "History"; likewise combine any sections Entitled
  4744. "Acknowledgements", and any sections Entitled "Dedications". You
  4745. must delete all sections Entitled "Endorsements."
  4746. 6. COLLECTIONS OF DOCUMENTS
  4747. You may make a collection consisting of the Document and other
  4748. documents released under this License, and replace the individual
  4749. copies of this License in the various documents with a single copy
  4750. that is included in the collection, provided that you follow the
  4751. rules of this License for verbatim copying of each of the documents
  4752. in all other respects.
  4753. You may extract a single document from such a collection, and
  4754. distribute it individually under this License, provided you insert
  4755. a copy of this License into the extracted document, and follow this
  4756. License in all other respects regarding verbatim copying of that
  4757. document.
  4758. 7. AGGREGATION WITH INDEPENDENT WORKS
  4759. A compilation of the Document or its derivatives with other
  4760. separate and independent documents or works, in or on a volume of a
  4761. storage or distribution medium, is called an "aggregate" if the
  4762. copyright resulting from the compilation is not used to limit the
  4763. legal rights of the compilation's users beyond what the individual
  4764. works permit. When the Document is included in an aggregate, this
  4765. License does not apply to the other works in the aggregate which
  4766. are not themselves derivative works of the Document.
  4767. If the Cover Text requirement of section 3 is applicable to these
  4768. copies of the Document, then if the Document is less than one half
  4769. of the entire aggregate, the Document's Cover Texts may be placed
  4770. on covers that bracket the Document within the aggregate, or the
  4771. electronic equivalent of covers if the Document is in electronic
  4772. form. Otherwise they must appear on printed covers that bracket
  4773. the whole aggregate.
  4774. 8. TRANSLATION
  4775. Translation is considered a kind of modification, so you may
  4776. distribute translations of the Document under the terms of section
  4777. 4. Replacing Invariant Sections with translations requires special
  4778. permission from their copyright holders, but you may include
  4779. translations of some or all Invariant Sections in addition to the
  4780. original versions of these Invariant Sections. You may include a
  4781. translation of this License, and all the license notices in the
  4782. Document, and any Warranty Disclaimers, provided that you also
  4783. include the original English version of this License and the
  4784. original versions of those notices and disclaimers. In case of a
  4785. disagreement between the translation and the original version of
  4786. this License or a notice or disclaimer, the original version will
  4787. prevail.
  4788. If a section in the Document is Entitled "Acknowledgements",
  4789. "Dedications", or "History", the requirement (section 4) to
  4790. Preserve its Title (section 1) will typically require changing the
  4791. actual title.
  4792. 9. TERMINATION
  4793. You may not copy, modify, sublicense, or distribute the Document
  4794. except as expressly provided under this License. Any attempt
  4795. otherwise to copy, modify, sublicense, or distribute it is void,
  4796. and will automatically terminate your rights under this License.
  4797. However, if you cease all violation of this License, then your
  4798. license from a particular copyright holder is reinstated (a)
  4799. provisionally, unless and until the copyright holder explicitly and
  4800. finally terminates your license, and (b) permanently, if the
  4801. copyright holder fails to notify you of the violation by some
  4802. reasonable means prior to 60 days after the cessation.
  4803. Moreover, your license from a particular copyright holder is
  4804. reinstated permanently if the copyright holder notifies you of the
  4805. violation by some reasonable means, this is the first time you have
  4806. received notice of violation of this License (for any work) from
  4807. that copyright holder, and you cure the violation prior to 30 days
  4808. after your receipt of the notice.
  4809. Termination of your rights under this section does not terminate
  4810. the licenses of parties who have received copies or rights from you
  4811. under this License. If your rights have been terminated and not
  4812. permanently reinstated, receipt of a copy of some or all of the
  4813. same material does not give you any rights to use it.
  4814. 10. FUTURE REVISIONS OF THIS LICENSE
  4815. The Free Software Foundation may publish new, revised versions of
  4816. the GNU Free Documentation License from time to time. Such new
  4817. versions will be similar in spirit to the present version, but may
  4818. differ in detail to address new problems or concerns. See
  4819. <http://www.gnu.org/copyleft/>.
  4820. Each version of the License is given a distinguishing version
  4821. number. If the Document specifies that a particular numbered
  4822. version of this License "or any later version" applies to it, you
  4823. have the option of following the terms and conditions either of
  4824. that specified version or of any later version that has been
  4825. published (not as a draft) by the Free Software Foundation. If the
  4826. Document does not specify a version number of this License, you may
  4827. choose any version ever published (not as a draft) by the Free
  4828. Software Foundation. If the Document specifies that a proxy can
  4829. decide which future versions of this License can be used, that
  4830. proxy's public statement of acceptance of a version permanently
  4831. authorizes you to choose that version for the Document.
  4832. 11. RELICENSING
  4833. "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
  4834. World Wide Web server that publishes copyrightable works and also
  4835. provides prominent facilities for anybody to edit those works. A
  4836. public wiki that anybody can edit is an example of such a server.
  4837. A "Massive Multiauthor Collaboration" (or "MMC") contained in the
  4838. site means any set of copyrightable works thus published on the MMC
  4839. site.
  4840. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
  4841. license published by Creative Commons Corporation, a not-for-profit
  4842. corporation with a principal place of business in San Francisco,
  4843. California, as well as future copyleft versions of that license
  4844. published by that same organization.
  4845. "Incorporate" means to publish or republish a Document, in whole or
  4846. in part, as part of another Document.
  4847. An MMC is "eligible for relicensing" if it is licensed under this
  4848. License, and if all works that were first published under this
  4849. License somewhere other than this MMC, and subsequently
  4850. incorporated in whole or in part into the MMC, (1) had no cover
  4851. texts or invariant sections, and (2) were thus incorporated prior
  4852. to November 1, 2008.
  4853. The operator of an MMC Site may republish an MMC contained in the
  4854. site under CC-BY-SA on the same site at any time before August 1,
  4855. 2009, provided the MMC is eligible for relicensing.
  4856. ADDENDUM: How to use this License for your documents
  4857. ====================================================
  4858. To use this License in a document you have written, include a copy of
  4859. the License in the document and put the following copyright and license
  4860. notices just after the title page:
  4861. Copyright (C) YEAR YOUR NAME.
  4862. Permission is granted to copy, distribute and/or modify this document
  4863. under the terms of the GNU Free Documentation License, Version 1.3
  4864. or any later version published by the Free Software Foundation;
  4865. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  4866. Texts. A copy of the license is included in the section entitled ``GNU
  4867. Free Documentation License''.
  4868. If you have Invariant Sections, Front-Cover Texts and Back-Cover
  4869. Texts, replace the "with...Texts." line with this:
  4870. with the Invariant Sections being LIST THEIR TITLES, with
  4871. the Front-Cover Texts being LIST, and with the Back-Cover Texts
  4872. being LIST.
  4873. If you have Invariant Sections without Cover Texts, or some other
  4874. combination of the three, merge those two alternatives to suit the
  4875. situation.
  4876. If your document contains nontrivial examples of program code, we
  4877. recommend releasing these examples in parallel under your choice of free
  4878. software license, such as the GNU General Public License, to permit
  4879. their use in free software.
  4880. 
  4881. File: binutils.info, Node: Binutils Index, Prev: GNU Free Documentation License, Up: Top
  4882. Binutils Index
  4883. **************
  4884. �[index�]
  4885. * Menu:
  4886. * -enable-deterministic-archives: ar cmdline. (line 150)
  4887. * -enable-deterministic-archives <1>: ar cmdline. (line 242)
  4888. * -enable-deterministic-archives <2>: objcopy. (line 370)
  4889. * -enable-deterministic-archives <3>: objcopy. (line 380)
  4890. * -enable-deterministic-archives <4>: ranlib. (line 32)
  4891. * -enable-deterministic-archives <5>: ranlib. (line 44)
  4892. * -enable-deterministic-archives <6>: strip. (line 163)
  4893. * -enable-deterministic-archives <7>: strip. (line 173)
  4894. * .stab: objdump. (line 798)
  4895. * Add prefix to absolute paths: objdump. (line 543)
  4896. * addr2line: addr2line. (line 6)
  4897. * address to file name and line number: addr2line. (line 6)
  4898. * all header information, object file: objdump. (line 936)
  4899. * ar: ar. (line 6)
  4900. * ar compatibility: ar. (line 63)
  4901. * architecture: objdump. (line 276)
  4902. * architectures available: objdump. (line 253)
  4903. * archive contents: ranlib. (line 6)
  4904. * Archive file symbol index information: readelf. (line 289)
  4905. * archive headers: objdump. (line 85)
  4906. * archives: ar. (line 6)
  4907. * base files: dlltool. (line 125)
  4908. * bug criteria: Bug Criteria. (line 6)
  4909. * bug reports: Bug Reporting. (line 6)
  4910. * bugs: Reporting Bugs. (line 6)
  4911. * bugs, reporting: Bug Reporting. (line 6)
  4912. * c++filt: c++filt. (line 6)
  4913. * changing object addresses: objcopy. (line 417)
  4914. * changing section address: objcopy. (line 427)
  4915. * changing section LMA: objcopy. (line 436)
  4916. * changing section VMA: objcopy. (line 449)
  4917. * changing start address: objcopy. (line 411)
  4918. * collections of files: ar. (line 6)
  4919. * Compact Type Format: objdump. (line 769)
  4920. * Compact Type Format <1>: readelf. (line 473)
  4921. * compatibility, ar: ar. (line 63)
  4922. * compressed section contents: objdump. (line 954)
  4923. * contents of archive: ar cmdline. (line 97)
  4924. * crash: Bug Criteria. (line 9)
  4925. * creating archives: ar cmdline. (line 144)
  4926. * creating thin archive: ar cmdline. (line 318)
  4927. * CTF: objdump. (line 769)
  4928. * CTF <1>: readelf. (line 473)
  4929. * cxxfilt: c++filt. (line 16)
  4930. * dates in archive: ar cmdline. (line 188)
  4931. * debug symbols: objdump. (line 798)
  4932. * debugging symbols: nm. (line 190)
  4933. * deleting from archive: ar cmdline. (line 26)
  4934. * demangling C++ symbols: c++filt. (line 6)
  4935. * demangling in nm: nm. (line 198)
  4936. * demangling in nm <1>: readelf. (line 141)
  4937. * demangling in objdump: objdump. (line 113)
  4938. * demangling in objdump <1>: addr2line. (line 91)
  4939. * deterministic archives: ar cmdline. (line 150)
  4940. * deterministic archives <1>: ar cmdline. (line 242)
  4941. * deterministic archives <2>: objcopy. (line 370)
  4942. * deterministic archives <3>: objcopy. (line 380)
  4943. * deterministic archives <4>: ranlib. (line 32)
  4944. * deterministic archives <5>: ranlib. (line 44)
  4945. * deterministic archives <6>: strip. (line 163)
  4946. * deterministic archives <7>: strip. (line 173)
  4947. * disassembling object code: objdump. (line 154)
  4948. * disassembly architecture: objdump. (line 276)
  4949. * disassembly endianness: objdump. (line 203)
  4950. * disassembly, with source: objdump. (line 528)
  4951. * disassembly, with source <1>: objdump. (line 536)
  4952. * discarding symbols: strip. (line 6)
  4953. * DLL: dlltool. (line 6)
  4954. * dlltool: dlltool. (line 6)
  4955. * dynamic relocation entries, in object file: objdump. (line 512)
  4956. * dynamic symbol table entries, printing: objdump. (line 897)
  4957. * dynamic symbols: nm. (line 228)
  4958. * ELF dynamic section information: readelf. (line 229)
  4959. * ELF dynamic symbol table information: readelf. (line 121)
  4960. * ELF file header information: readelf. (line 81)
  4961. * ELF file information: readelf. (line 6)
  4962. * ELF notes: readelf. (line 211)
  4963. * ELF object file format: objdump. (line 798)
  4964. * ELF program header information: readelf. (line 87)
  4965. * ELF reloc information: readelf. (line 215)
  4966. * ELF section group information: readelf. (line 101)
  4967. * ELF section information: readelf. (line 96)
  4968. * ELF section information <1>: readelf. (line 106)
  4969. * ELF segment information: readelf. (line 87)
  4970. * ELF symbol table information: readelf. (line 111)
  4971. * ELF version sections information: readelf. (line 233)
  4972. * elfedit: elfedit. (line 6)
  4973. * endianness: objdump. (line 203)
  4974. * error on valid input: Bug Criteria. (line 12)
  4975. * external symbols: nm. (line 240)
  4976. * external symbols <1>: nm. (line 316)
  4977. * external symbols <2>: nm. (line 322)
  4978. * extract from archive: ar cmdline. (line 114)
  4979. * fatal signal: Bug Criteria. (line 9)
  4980. * file name: nm. (line 184)
  4981. * header information, all: objdump. (line 936)
  4982. * input .def file: dlltool. (line 121)
  4983. * input file name: nm. (line 184)
  4984. * Instruction width: objdump. (line 560)
  4985. * libraries: ar. (line 25)
  4986. * listings strings: strings. (line 6)
  4987. * LTO symbol table: readelf. (line 126)
  4988. * machine instructions: objdump. (line 154)
  4989. * moving in archive: ar cmdline. (line 34)
  4990. * MRI compatibility, ar: ar scripts. (line 8)
  4991. * name duplication in archive: ar cmdline. (line 108)
  4992. * name length: ar. (line 18)
  4993. * nm: nm. (line 6)
  4994. * nm compatibility: nm. (line 194)
  4995. * nm compatibility <1>: nm. (line 234)
  4996. * nm format: nm. (line 194)
  4997. * nm format <1>: nm. (line 234)
  4998. * not writing archive index: ar cmdline. (line 217)
  4999. * objdump: objdump. (line 6)
  5000. * objdump inlines: nm. (line 268)
  5001. * object code format: nm. (line 409)
  5002. * object code format <1>: objdump. (line 99)
  5003. * object code format <2>: size. (line 107)
  5004. * object code format <3>: strings. (line 120)
  5005. * object code format <4>: addr2line. (line 86)
  5006. * object file header: objdump. (line 209)
  5007. * object file information: objdump. (line 6)
  5008. * object file offsets: objdump. (line 214)
  5009. * object file sections: objdump. (line 519)
  5010. * object file sections <1>: objdump. (line 954)
  5011. * object formats available: objdump. (line 253)
  5012. * offsets of files: ar cmdline. (line 193)
  5013. * operations on archive: ar cmdline. (line 22)
  5014. * plugins: ar cmdline. (line 276)
  5015. * plugins <1>: nm. (line 336)
  5016. * printing from archive: ar cmdline. (line 46)
  5017. * printing strings: strings. (line 6)
  5018. * quick append to archive: ar cmdline. (line 54)
  5019. * quiet: readelf. (line 91)
  5020. * radix for section sizes: size. (line 89)
  5021. * ranlib: ranlib. (line 6)
  5022. * ranlib <1>: ar cmdline. (line 91)
  5023. * readelf: readelf. (line 6)
  5024. * relative placement in archive: ar cmdline. (line 132)
  5025. * relocation entries, in object file: objdump. (line 506)
  5026. * removing symbols: strip. (line 6)
  5027. * repeated names in archive: ar cmdline. (line 108)
  5028. * replacement in archive: ar cmdline. (line 73)
  5029. * reporting bugs: Reporting Bugs. (line 6)
  5030. * scripts, ar: ar scripts. (line 8)
  5031. * section addresses in objdump: objdump. (line 91)
  5032. * section headers: objdump. (line 230)
  5033. * section information: objdump. (line 258)
  5034. * section sizes: size. (line 6)
  5035. * sections, full contents: objdump. (line 519)
  5036. * sections, full contents <1>: objdump. (line 954)
  5037. * separate debug files: debuginfod. (line 6)
  5038. * SFrame: objdump. (line 790)
  5039. * size: size. (line 6)
  5040. * size display format: size. (line 29)
  5041. * size number format: size. (line 89)
  5042. * sorting symbols: nm. (line 283)
  5043. * source code context: objdump. (line 223)
  5044. * source disassembly: objdump. (line 528)
  5045. * source disassembly <1>: objdump. (line 536)
  5046. * source file name: nm. (line 184)
  5047. * source filenames for object files: objdump. (line 270)
  5048. * stab: objdump. (line 798)
  5049. * start-address: objdump. (line 807)
  5050. * stop-address: objdump. (line 811)
  5051. * strings: strings. (line 6)
  5052. * strings, printing: strings. (line 6)
  5053. * strip: strip. (line 6)
  5054. * Strip absolute paths: objdump. (line 546)
  5055. * symbol index: ar. (line 31)
  5056. * symbol index <1>: ranlib. (line 6)
  5057. * symbol index, listing: nm. (line 305)
  5058. * symbol line numbers: nm. (line 260)
  5059. * symbol table entries, printing: objdump. (line 816)
  5060. * symbol table size base: readelf. (line 129)
  5061. * symbols: nm. (line 6)
  5062. * symbols, discarding: strip. (line 6)
  5063. * thin archives: ar. (line 43)
  5064. * undefined symbols: nm. (line 316)
  5065. * undefined symbols <1>: nm. (line 322)
  5066. * Unix compatibility, ar: ar cmdline. (line 8)
  5067. * unwind information: readelf. (line 220)
  5068. * Update ELF header: elfedit. (line 6)
  5069. * updating an archive: ar cmdline. (line 229)
  5070. * version: Top. (line 6)
  5071. * VMA in objdump: objdump. (line 91)
  5072. * wide output, printing: objdump. (line 942)
  5073. * writing archive index: ar cmdline. (line 211)
  5074. 
  5075. Tag Table:
  5076. Node: Top1834
  5077. Node: ar3603
  5078. Node: ar cmdline6937
  5079. Node: ar scripts20448
  5080. Node: nm26134
  5081. Node: objcopy41844
  5082. Node: objdump83375
  5083. Node: ranlib121783
  5084. Node: size123382
  5085. Node: strings127526
  5086. Node: strip133361
  5087. Node: c++filt143382
  5088. Ref: c++filt-Footnote-1149243
  5089. Node: addr2line149349
  5090. Node: windmc155304
  5091. Node: windres158963
  5092. Node: dlltool165533
  5093. Node: def file format178986
  5094. Node: readelf181516
  5095. Node: elfedit201257
  5096. Node: Common Options204683
  5097. Node: Selecting the Target System205717
  5098. Node: Target Selection206645
  5099. Node: Architecture Selection208626
  5100. Node: debuginfod209454
  5101. Node: Reporting Bugs210456
  5102. Node: Bug Criteria211218
  5103. Node: Bug Reporting211771
  5104. Node: GNU Free Documentation License218630
  5105. Node: Binutils Index243790
  5106. 
  5107. End Tag Table
  5108. 
  5109. Local Variables:
  5110. coding: utf-8
  5111. End: