binutils.info 209 KB

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