binutils.info 223 KB

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