binutils.info 230 KB

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