binutils.html 355 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1991-2024 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3
  6. or any later version published by the Free Software Foundation;
  7. with no Invariant Sections, with no Front-Cover Texts, and with no
  8. Back-Cover Texts. A copy of the license is included in the
  9. section entitled "GNU Free Documentation License".
  10. -->
  11. <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <title>GNU Binary Utilities</title>
  15. <meta name="description" content="GNU Binary Utilities">
  16. <meta name="keywords" content="GNU Binary Utilities">
  17. <meta name="resource-type" content="document">
  18. <meta name="distribution" content="global">
  19. <meta name="Generator" content="makeinfo">
  20. <link href="#Top" rel="start" title="Top">
  21. <link href="#Binutils-Index" rel="index" title="Binutils Index">
  22. <link href="#SEC_Contents" rel="contents" title="Table of Contents">
  23. <style type="text/css">
  24. <!--
  25. a.summary-letter {text-decoration: none}
  26. blockquote.indentedblock {margin-right: 0em}
  27. div.display {margin-left: 3.2em}
  28. div.example {margin-left: 3.2em}
  29. div.lisp {margin-left: 3.2em}
  30. kbd {font-style: oblique}
  31. pre.display {font-family: inherit}
  32. pre.format {font-family: inherit}
  33. pre.menu-comment {font-family: serif}
  34. pre.menu-preformatted {font-family: serif}
  35. span.nolinebreak {white-space: nowrap}
  36. span.roman {font-family: initial; font-weight: normal}
  37. span.sansserif {font-family: sans-serif; font-weight: normal}
  38. ul.no-bullet {list-style: none}
  39. -->
  40. </style>
  41. </head>
  42. <body lang="en">
  43. <h1 class="settitle" align="center"><small>GNU</small> Binary Utilities</h1>
  44. <span id="SEC_Contents"></span>
  45. <h2 class="contents-heading">Table of Contents</h2>
  46. <div class="contents">
  47. <ul class="no-bullet">
  48. <li><a id="toc-ar-1" href="#ar">1 ar</a>
  49. <ul class="no-bullet">
  50. <li><a id="toc-Controlling-ar-on-the-Command-Line" href="#ar-cmdline">1.1 Controlling <code>ar</code> on the Command Line</a></li>
  51. <li><a id="toc-Controlling-ar-with-a-Script" href="#ar-scripts">1.2 Controlling <code>ar</code> with a Script</a></li>
  52. </ul></li>
  53. <li><a id="toc-nm-1" href="#nm">2 nm</a></li>
  54. <li><a id="toc-objcopy-1" href="#objcopy">3 objcopy</a></li>
  55. <li><a id="toc-objdump-1" href="#objdump">4 objdump</a></li>
  56. <li><a id="toc-ranlib-1" href="#ranlib">5 ranlib</a></li>
  57. <li><a id="toc-size-1" href="#size">6 size</a></li>
  58. <li><a id="toc-strings-1" href="#strings">7 strings</a></li>
  59. <li><a id="toc-strip-1" href="#strip">8 strip</a></li>
  60. <li><a id="toc-c_002b_002bfilt-1" href="#c_002b_002bfilt">9 c++filt</a></li>
  61. <li><a id="toc-addr2line-1" href="#addr2line">10 addr2line</a></li>
  62. <li><a id="toc-windmc-1" href="#windmc">11 windmc</a></li>
  63. <li><a id="toc-windres-1" href="#windres">12 windres</a></li>
  64. <li><a id="toc-dlltool-1" href="#dlltool">13 dlltool</a>
  65. <ul class="no-bullet">
  66. <li><a id="toc-The-format-of-the-dlltool-_002edef-file" href="#def-file-format">13.1 The format of the <code>dlltool</code> <samp>.def</samp> file</a></li>
  67. </ul></li>
  68. <li><a id="toc-readelf-1" href="#readelf">14 readelf</a></li>
  69. <li><a id="toc-elfedit-1" href="#elfedit">15 elfedit</a></li>
  70. <li><a id="toc-Common-Options-1" href="#Common-Options">16 Common Options</a></li>
  71. <li><a id="toc-Selecting-the-Target-System-1" href="#Selecting-the-Target-System">17 Selecting the Target System</a>
  72. <ul class="no-bullet">
  73. <li><a id="toc-Target-Selection-1" href="#Target-Selection">17.1 Target Selection</a></li>
  74. <li><a id="toc-Architecture-Selection-1" href="#Architecture-Selection">17.2 Architecture Selection</a></li>
  75. </ul></li>
  76. <li><a id="toc-debuginfod-1" href="#debuginfod">18 debuginfod</a></li>
  77. <li><a id="toc-Reporting-Bugs-1" href="#Reporting-Bugs">19 Reporting Bugs</a>
  78. <ul class="no-bullet">
  79. <li><a id="toc-Have-You-Found-a-Bug_003f" href="#Bug-Criteria">19.1 Have You Found a Bug?</a></li>
  80. <li><a id="toc-How-to-Report-Bugs" href="#Bug-Reporting">19.2 How to Report Bugs</a></li>
  81. </ul></li>
  82. <li><a id="toc-GNU-Free-Documentation-License-1" href="#GNU-Free-Documentation-License">Appendix A GNU Free Documentation License</a></li>
  83. <li><a id="toc-Binutils-Index-1" href="#Binutils-Index" rel="index">Binutils Index</a></li>
  84. </ul>
  85. </div>
  86. <span id="Top"></span><div class="header">
  87. <p>
  88. Next: <a href="#ar" accesskey="n" rel="next">ar</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  89. </div>
  90. <span id="Introduction"></span><h1 class="top">Introduction</h1>
  91. <span id="index-version"></span>
  92. <p>This brief manual contains documentation for the <small>GNU</small> binary
  93. utilities
  94. (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24))
  95. version 2.42.0:
  96. </p>
  97. <p>This document is distributed under the terms of the GNU Free
  98. Documentation License version 1.3. A copy of the license is included
  99. in the section entitled &ldquo;GNU Free Documentation License&rdquo;.
  100. </p>
  101. <table class="menu" border="0" cellspacing="0">
  102. <tr><td align="left" valign="top">&bull; <a href="#ar" accesskey="1">ar</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Create, modify, and extract from archives
  103. </td></tr>
  104. <tr><td align="left" valign="top">&bull; <a href="#nm" accesskey="2">nm</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List symbols from object files
  105. </td></tr>
  106. <tr><td align="left" valign="top">&bull; <a href="#objcopy" accesskey="3">objcopy</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Copy and translate object files
  107. </td></tr>
  108. <tr><td align="left" valign="top">&bull; <a href="#objdump" accesskey="4">objdump</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Display information from object files
  109. </td></tr>
  110. <tr><td align="left" valign="top">&bull; <a href="#ranlib" accesskey="5">ranlib</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Generate index to archive contents
  111. </td></tr>
  112. <tr><td align="left" valign="top">&bull; <a href="#size" accesskey="6">size</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List section sizes and total size
  113. </td></tr>
  114. <tr><td align="left" valign="top">&bull; <a href="#strings" accesskey="7">strings</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List printable strings from files
  115. </td></tr>
  116. <tr><td align="left" valign="top">&bull; <a href="#strip" accesskey="8">strip</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Discard symbols
  117. </td></tr>
  118. <tr><td align="left" valign="top">&bull; <a href="#c_002b_002bfilt" accesskey="9">c++filt</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Filter to demangle encoded C++ symbols
  119. </td></tr>
  120. <tr><td align="left" valign="top">&bull; <a href="#c_002b_002bfilt">cxxfilt</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">MS-DOS name for c++filt
  121. </td></tr>
  122. <tr><td align="left" valign="top">&bull; <a href="#addr2line">addr2line</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Convert addresses or symbol+offset to file and line
  123. </td></tr>
  124. <tr><td align="left" valign="top">&bull; <a href="#windmc">windmc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Generator for Windows message resources
  125. </td></tr>
  126. <tr><td align="left" valign="top">&bull; <a href="#windres">windres</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Manipulate Windows resources
  127. </td></tr>
  128. <tr><td align="left" valign="top">&bull; <a href="#dlltool">dlltool</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Create files needed to build and use DLLs
  129. </td></tr>
  130. <tr><td align="left" valign="top">&bull; <a href="#readelf">readelf</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Display the contents of ELF format files
  131. </td></tr>
  132. <tr><td align="left" valign="top">&bull; <a href="#elfedit">elfedit</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Update ELF header and property of ELF files
  133. </td></tr>
  134. <tr><td align="left" valign="top">&bull; <a href="#Common-Options">Common Options</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Command-line options for all utilities
  135. </td></tr>
  136. <tr><td align="left" valign="top">&bull; <a href="#Selecting-the-Target-System">Selecting the Target System</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How these utilities determine the target
  137. </td></tr>
  138. <tr><td align="left" valign="top">&bull; <a href="#debuginfod">debuginfod</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Using binutils with debuginfod
  139. </td></tr>
  140. <tr><td align="left" valign="top">&bull; <a href="#Reporting-Bugs">Reporting Bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Reporting Bugs
  141. </td></tr>
  142. <tr><td align="left" valign="top">&bull; <a href="#GNU-Free-Documentation-License">GNU Free Documentation License</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">GNU Free Documentation License
  143. </td></tr>
  144. <tr><td align="left" valign="top">&bull; <a href="#Binutils-Index" rel="index">Binutils Index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Binutils Index
  145. </td></tr>
  146. </table>
  147. <hr>
  148. <span id="ar"></span><div class="header">
  149. <p>
  150. Next: <a href="#nm" accesskey="n" rel="next">nm</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  151. </div>
  152. <span id="ar-1"></span><h2 class="chapter">1 ar</h2>
  153. <span id="index-ar"></span>
  154. <span id="index-archives"></span>
  155. <span id="index-collections-of-files"></span>
  156. <div class="example">
  157. <pre class="example">ar [-]<var>p</var>[<var>mod</var>] [<samp>--plugin</samp> <var>name</var>] [<samp>--target</samp> <var>bfdname</var>] [<samp>--output</samp> <var>dirname</var>] [<samp>--record-libdeps</samp> <var>libdeps</var>] [<var>relpos</var>] [<var>count</var>] <var>archive</var> [<var>member</var>&hellip;]
  158. ar -M [ &lt;mri-script ]
  159. </pre></div>
  160. <p>The <small>GNU</small> <code>ar</code> program creates, modifies, and extracts from
  161. archives. An <em>archive</em> is a single file holding a collection of
  162. other files in a structure that makes it possible to retrieve
  163. the original individual files (called <em>members</em> of the archive).
  164. </p>
  165. <p>The original files&rsquo; contents, mode (permissions), timestamp, owner, and
  166. group are preserved in the archive, and can be restored on
  167. extraction.
  168. </p>
  169. <span id="index-name-length"></span>
  170. <p><small>GNU</small> <code>ar</code> can maintain archives whose members have names of any
  171. length; however, depending on how <code>ar</code> is configured on your
  172. system, a limit on member-name length may be imposed for compatibility
  173. with archive formats maintained with other tools. If it exists, the
  174. limit is often 15 characters (typical of formats related to a.out) or 16
  175. characters (typical of formats related to coff).
  176. </p>
  177. <span id="index-libraries"></span>
  178. <p><code>ar</code> is considered a binary utility because archives of this sort
  179. are most often used as <em>libraries</em> holding commonly needed
  180. subroutines. Since libraries often will depend on other libraries,
  181. <code>ar</code> can also record the dependencies of a library when the
  182. <samp>--record-libdeps</samp> option is specified.
  183. </p>
  184. <span id="index-symbol-index"></span>
  185. <p><code>ar</code> creates an index to the symbols defined in relocatable
  186. object modules in the archive when you specify the modifier &lsquo;<samp>s</samp>&rsquo;.
  187. Once created, this index is updated in the archive whenever <code>ar</code>
  188. makes a change to its contents (save for the &lsquo;<samp>q</samp>&rsquo; update operation).
  189. An archive with such an index speeds up linking to the library, and
  190. allows routines in the library to call each other without regard to
  191. their placement in the archive.
  192. </p>
  193. <p>You may use &lsquo;<samp>nm -s</samp>&rsquo; or &lsquo;<samp>nm --print-armap</samp>&rsquo; to list this index
  194. table. If an archive lacks the table, another form of <code>ar</code> called
  195. <code>ranlib</code> can be used to add just the table.
  196. </p>
  197. <span id="index-thin-archives"></span>
  198. <p><small>GNU</small> <code>ar</code> can optionally create a <em>thin</em> archive,
  199. which contains a symbol index and references to the original copies
  200. of the member files of the archive. This is useful for building
  201. libraries for use within a local build tree, where the relocatable
  202. objects are expected to remain available, and copying the contents of
  203. each object would only waste time and space.
  204. </p>
  205. <p>An archive can either be <em>thin</em> or it can be normal. It cannot
  206. be both at the same time. Once an archive is created its format
  207. cannot be changed without first deleting it and then creating a new
  208. archive in its place.
  209. </p>
  210. <p>Thin archives are also <em>flattened</em>, so that adding one thin
  211. archive to another thin archive does not nest it, as would happen with
  212. a normal archive. Instead the elements of the first archive are added
  213. individually to the second archive.
  214. </p>
  215. <p>The paths to the elements of the archive are stored relative to the
  216. archive itself.
  217. </p>
  218. <span id="index-compatibility_002c-ar"></span>
  219. <span id="index-ar-compatibility"></span>
  220. <p><small>GNU</small> <code>ar</code> is designed to be compatible with two different
  221. facilities. You can control its activity using command-line options,
  222. like the different varieties of <code>ar</code> on Unix systems; or, if you
  223. specify the single command-line option <samp>-M</samp>, you can control it
  224. with a script supplied via standard input, like the MRI &ldquo;librarian&rdquo;
  225. program.
  226. </p>
  227. <table class="menu" border="0" cellspacing="0">
  228. <tr><td align="left" valign="top">&bull; <a href="#ar-cmdline" accesskey="1">ar cmdline</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Controlling <code>ar</code> on the command line
  229. </td></tr>
  230. <tr><td align="left" valign="top">&bull; <a href="#ar-scripts" accesskey="2">ar scripts</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Controlling <code>ar</code> with a script
  231. </td></tr>
  232. </table>
  233. <hr>
  234. <span id="ar-cmdline"></span><div class="header">
  235. <p>
  236. Next: <a href="#ar-scripts" accesskey="n" rel="next">ar scripts</a>, Up: <a href="#ar" accesskey="u" rel="up">ar</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  237. </div>
  238. <span id="Controlling-ar-on-the-Command-Line"></span><h3 class="section">1.1 Controlling <code>ar</code> on the Command Line</h3>
  239. <div class="example">
  240. <pre class="example">ar [<samp>-X32_64</samp>] [<samp>-</samp>]<var>p</var>[<var>mod</var>] [<samp>--plugin</samp> <var>name</var>] [<samp>--target</samp> <var>bfdname</var>] [<samp>--output</samp> <var>dirname</var>] [<samp>--record-libdeps</samp> <var>libdeps</var>] [<samp>--thin</samp>] [<var>relpos</var>] [<var>count</var>] <var>archive</var> [<var>member</var>&hellip;]
  241. </pre></div>
  242. <span id="index-Unix-compatibility_002c-ar"></span>
  243. <p>When you use <code>ar</code> in the Unix style, <code>ar</code> insists on at least two
  244. arguments to execute: one keyletter specifying the <em>operation</em>
  245. (optionally accompanied by other keyletters specifying
  246. <em>modifiers</em>), and the archive name to act on.
  247. </p>
  248. <p>Most operations can also accept further <var>member</var> arguments,
  249. specifying particular files to operate on.
  250. </p>
  251. <p><small>GNU</small> <code>ar</code> allows you to mix the operation code <var>p</var> and modifier
  252. flags <var>mod</var> in any order, within the first command-line argument.
  253. </p>
  254. <p>If you wish, you may begin the first command-line argument with a
  255. dash.
  256. </p>
  257. <span id="index-operations-on-archive"></span>
  258. <p>The <var>p</var> keyletter specifies what operation to execute; it may be
  259. any of the following, but you must specify only one of them:
  260. </p>
  261. <dl compact="compact">
  262. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  263. <dd><span id="index-deleting-from-archive"></span>
  264. <p><em>Delete</em> modules from the archive. Specify the names of modules to
  265. be deleted as <var>member</var>&hellip;; the archive is untouched if you
  266. specify no files to delete.
  267. </p>
  268. <p>If you specify the &lsquo;<samp>v</samp>&rsquo; modifier, <code>ar</code> lists each module
  269. as it is deleted.
  270. </p>
  271. </dd>
  272. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  273. <dd><span id="index-moving-in-archive"></span>
  274. <p>Use this operation to <em>move</em> members in an archive.
  275. </p>
  276. <p>The ordering of members in an archive can make a difference in how
  277. programs are linked using the library, if a symbol is defined in more
  278. than one member.
  279. </p>
  280. <p>If no modifiers are used with <code>m</code>, any members you name in the
  281. <var>member</var> arguments are moved to the <em>end</em> of the archive;
  282. you can use the &lsquo;<samp>a</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo;, or &lsquo;<samp>i</samp>&rsquo; modifiers to move them to a
  283. specified place instead.
  284. </p>
  285. </dd>
  286. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  287. <dd><span id="index-printing-from-archive"></span>
  288. <p><em>Print</em> the specified members of the archive, to the standard
  289. output file. If the &lsquo;<samp>v</samp>&rsquo; modifier is specified, show the member
  290. name before copying its contents to standard output.
  291. </p>
  292. <p>If you specify no <var>member</var> arguments, all the files in the archive are
  293. printed.
  294. </p>
  295. </dd>
  296. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  297. <dd><span id="index-quick-append-to-archive"></span>
  298. <p><em>Quick append</em>; Historically, add the files <var>member</var>&hellip; to the end of
  299. <var>archive</var>, without checking for replacement.
  300. </p>
  301. <p>The modifiers &lsquo;<samp>a</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo;, and &lsquo;<samp>i</samp>&rsquo; do <em>not</em> affect this
  302. operation; new members are always placed at the end of the archive.
  303. </p>
  304. <p>The modifier &lsquo;<samp>v</samp>&rsquo; makes <code>ar</code> list each file as it is appended.
  305. </p>
  306. <p>Since the point of this operation is speed, implementations of
  307. <code>ar</code> have the option of not updating the archive&rsquo;s symbol
  308. table if one exists. Too many different systems however assume that
  309. symbol tables are always up-to-date, so <small>GNU</small> <code>ar</code> will
  310. rebuild the table even with a quick append.
  311. </p>
  312. <p>Note - <small>GNU</small> <code>ar</code> treats the command &lsquo;<samp>qs</samp>&rsquo; as a
  313. synonym for &lsquo;<samp>r</samp>&rsquo; - replacing already existing files in the
  314. archive and appending new ones at the end.
  315. </p>
  316. </dd>
  317. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  318. <dd><span id="index-replacement-in-archive"></span>
  319. <p>Insert the files <var>member</var>&hellip; into <var>archive</var> (with
  320. <em>replacement</em>). This operation differs from &lsquo;<samp>q</samp>&rsquo; in that any
  321. previously existing members are deleted if their names match those being
  322. added.
  323. </p>
  324. <p>If one of the files named in <var>member</var>&hellip; does not exist, <code>ar</code>
  325. displays an error message, and leaves undisturbed any existing members
  326. of the archive matching that name.
  327. </p>
  328. <p>By default, new members are added at the end of the file; but you may
  329. use one of the modifiers &lsquo;<samp>a</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo;, or &lsquo;<samp>i</samp>&rsquo; to request
  330. placement relative to some existing member.
  331. </p>
  332. <p>The modifier &lsquo;<samp>v</samp>&rsquo; used with this operation elicits a line of
  333. output for each file inserted, along with one of the letters &lsquo;<samp>a</samp>&rsquo; or
  334. &lsquo;<samp>r</samp>&rsquo; to indicate whether the file was appended (no old member
  335. deleted) or replaced.
  336. </p>
  337. </dd>
  338. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  339. <dd><span id="index-ranlib"></span>
  340. <p>Add an index to the archive, or update it if it already exists. Note
  341. this command is an exception to the rule that there can only be one
  342. command letter, as it is possible to use it as either a command or a
  343. modifier. In either case it does the same thing.
  344. </p>
  345. </dd>
  346. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  347. <dd><span id="index-contents-of-archive"></span>
  348. <p>Display a <em>table</em> listing the contents of <var>archive</var>, or those
  349. of the files listed in <var>member</var>&hellip; that are present in the
  350. archive. Normally only the member name is shown, but if the modifier
  351. &lsquo;<samp>O</samp>&rsquo; is specified, then the corresponding offset of the member is also
  352. displayed. Finally, in order to see the modes (permissions), timestamp,
  353. owner, group, and size the &lsquo;<samp>v</samp>&rsquo; modifier should be included.
  354. </p>
  355. <p>If you do not specify a <var>member</var>, all files in the archive
  356. are listed.
  357. </p>
  358. <span id="index-repeated-names-in-archive"></span>
  359. <span id="index-name-duplication-in-archive"></span>
  360. <p>If there is more than one file with the same name (say, &lsquo;<samp>fie</samp>&rsquo;) in
  361. an archive (say &lsquo;<samp>b.a</samp>&rsquo;), &lsquo;<samp>ar t b.a fie</samp>&rsquo; lists only the
  362. first instance; to see them all, you must ask for a complete
  363. listing&mdash;in our example, &lsquo;<samp>ar t b.a</samp>&rsquo;.
  364. </p>
  365. </dd>
  366. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  367. <dd><span id="index-extract-from-archive"></span>
  368. <p><em>Extract</em> members (named <var>member</var>) from the archive. You can
  369. use the &lsquo;<samp>v</samp>&rsquo; modifier with this operation, to request that
  370. <code>ar</code> list each name as it extracts it.
  371. </p>
  372. <p>If you do not specify a <var>member</var>, all files in the archive
  373. are extracted.
  374. </p>
  375. <p>Files cannot be extracted from a thin archive, and there are
  376. restrictions on extracting from archives created with <samp>P</samp>: The
  377. paths must not be absolute, may not contain <code>..</code>, and any
  378. subdirectories in the paths must exist. If it is desired to avoid
  379. these restrictions then used the <samp>--output</samp> option to specify
  380. an output directory.
  381. </p></dd>
  382. </dl>
  383. <p>A number of modifiers (<var>mod</var>) may immediately follow the <var>p</var>
  384. keyletter, to specify variations on an operation&rsquo;s behavior:
  385. </p>
  386. <dl compact="compact">
  387. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  388. <dd><span id="index-relative-placement-in-archive"></span>
  389. <p>Add new files <em>after</em> an existing member of the
  390. archive. If you use the modifier &lsquo;<samp>a</samp>&rsquo;, the name of an existing archive
  391. member must be present as the <var>relpos</var> argument, before the
  392. <var>archive</var> specification.
  393. </p>
  394. </dd>
  395. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  396. <dd><p>Add new files <em>before</em> an existing member of the
  397. archive. If you use the modifier &lsquo;<samp>b</samp>&rsquo;, the name of an existing archive
  398. member must be present as the <var>relpos</var> argument, before the
  399. <var>archive</var> specification. (same as &lsquo;<samp>i</samp>&rsquo;).
  400. </p>
  401. </dd>
  402. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  403. <dd><span id="index-creating-archives"></span>
  404. <p><em>Create</em> the archive. The specified <var>archive</var> is always
  405. created if it did not exist, when you request an update. But a warning is
  406. issued unless you specify in advance that you expect to create it, by
  407. using this modifier.
  408. </p>
  409. </dd>
  410. <dt>&lsquo;<samp>D</samp>&rsquo;</dt>
  411. <dd><span id="index-deterministic-archives"></span>
  412. <span id="index-_002d_002denable_002ddeterministic_002darchives"></span>
  413. <p>Operate in <em>deterministic</em> mode. When adding files and the archive
  414. index use zero for UIDs, GIDs, timestamps, and use consistent file modes
  415. for all files. When this option is used, if <code>ar</code> is used with
  416. identical options and identical input files, multiple runs will create
  417. identical output files regardless of the input files&rsquo; owners, groups,
  418. file modes, or modification times.
  419. </p>
  420. <p>If <samp>binutils</samp> was configured with
  421. <samp>--enable-deterministic-archives</samp>, then this mode is on by default.
  422. It can be disabled with the &lsquo;<samp>U</samp>&rsquo; modifier, below.
  423. </p>
  424. </dd>
  425. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  426. <dd><p>Truncate names in the archive. <small>GNU</small> <code>ar</code> will normally permit file
  427. names of any length. This will cause it to create archives which are
  428. not compatible with the native <code>ar</code> program on some systems. If
  429. this is a concern, the &lsquo;<samp>f</samp>&rsquo; modifier may be used to truncate file
  430. names when putting them in the archive.
  431. </p>
  432. </dd>
  433. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  434. <dd><p>Insert new files <em>before</em> an existing member of the
  435. archive. If you use the modifier &lsquo;<samp>i</samp>&rsquo;, the name of an existing archive
  436. member must be present as the <var>relpos</var> argument, before the
  437. <var>archive</var> specification. (same as &lsquo;<samp>b</samp>&rsquo;).
  438. </p>
  439. </dd>
  440. <dt>&lsquo;<samp>l</samp>&rsquo;</dt>
  441. <dd><p>Specify dependencies of this library. The dependencies must immediately
  442. follow this option character, must use the same syntax as the linker
  443. command line, and must be specified within a single argument. I.e., if
  444. multiple items are needed, they must be quoted to form a single command
  445. line argument. For example &lsquo;<samp>L &quot;-L/usr/local/lib -lmydep1 -lmydep2&quot;</samp>&rsquo;
  446. </p>
  447. </dd>
  448. <dt>&lsquo;<samp>N</samp>&rsquo;</dt>
  449. <dd><p>Uses the <var>count</var> parameter. This is used if there are multiple
  450. entries in the archive with the same name. Extract or delete instance
  451. <var>count</var> of the given name from the archive.
  452. </p>
  453. </dd>
  454. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  455. <dd><span id="index-dates-in-archive"></span>
  456. <p>Preserve the <em>original</em> dates of members when extracting them. If
  457. you do not specify this modifier, files extracted from the archive
  458. are stamped with the time of extraction.
  459. </p>
  460. </dd>
  461. <dt>&lsquo;<samp>O</samp>&rsquo;</dt>
  462. <dd><span id="index-offsets-of-files"></span>
  463. <p>Display member offsets inside the archive. Use together with the &lsquo;<samp>t</samp>&rsquo;
  464. option.
  465. </p>
  466. </dd>
  467. <dt>&lsquo;<samp>P</samp>&rsquo;</dt>
  468. <dd><p>Use the full path name when matching or storing names in the archive.
  469. Archives created with full path names are not POSIX compliant, and
  470. thus may not work with tools other than up to date <small>GNU</small> tools.
  471. Modifying such archives with <small>GNU</small> <code>ar</code> without using
  472. <samp>P</samp> will remove the full path names unless the archive is a
  473. thin archive. Note that <samp>P</samp> may be useful when adding files to
  474. a thin archive since <samp>r</samp> without <samp>P</samp> ignores the path
  475. when choosing which element to replace. Thus
  476. </p><div class="example">
  477. <pre class="example">ar rcST archive.a subdir/file1 subdir/file2 file1
  478. </pre></div>
  479. <p>will result in the first <code>subdir/file1</code> being replaced with
  480. <code>file1</code> from the current directory. Adding <samp>P</samp> will
  481. prevent this replacement.
  482. </p>
  483. </dd>
  484. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  485. <dd><span id="index-writing-archive-index"></span>
  486. <p>Write an object-file index into the archive, or update an existing one,
  487. even if no other change is made to the archive. You may use this modifier
  488. flag either with any operation, or alone. Running &lsquo;<samp>ar s</samp>&rsquo; on an
  489. archive is equivalent to running &lsquo;<samp>ranlib</samp>&rsquo; on it.
  490. </p>
  491. </dd>
  492. <dt>&lsquo;<samp>S</samp>&rsquo;</dt>
  493. <dd><span id="index-not-writing-archive-index"></span>
  494. <p>Do not generate an archive symbol table. This can speed up building a
  495. large library in several steps. The resulting archive can not be used
  496. with the linker. In order to build a symbol table, you must omit the
  497. &lsquo;<samp>S</samp>&rsquo; modifier on the last execution of &lsquo;<samp>ar</samp>&rsquo;, or you must run
  498. &lsquo;<samp>ranlib</samp>&rsquo; on the archive.
  499. </p>
  500. </dd>
  501. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  502. <dd><p>Deprecated alias for <samp>--thin</samp>. <samp>T</samp> is not recommended because in
  503. many ar implementations <samp>T</samp> has a different meaning, as specified by
  504. X/Open System Interface.
  505. </p>
  506. </dd>
  507. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  508. <dd><span id="index-updating-an-archive"></span>
  509. <p>Normally, &lsquo;<samp>ar r</samp>&rsquo;&hellip; inserts all files
  510. listed into the archive. If you would like to insert <em>only</em> those
  511. of the files you list that are newer than existing members of the same
  512. names, use this modifier. The &lsquo;<samp>u</samp>&rsquo; modifier is allowed only for the
  513. operation &lsquo;<samp>r</samp>&rsquo; (replace). In particular, the combination &lsquo;<samp>qu</samp>&rsquo; is
  514. not allowed, since checking the timestamps would lose any speed
  515. advantage from the operation &lsquo;<samp>q</samp>&rsquo;.
  516. </p>
  517. <p>Note - if an archive has been created in a deterministic manner, eg
  518. via the use of the <samp>D</samp> modifier, then replacement will always
  519. happen and the <samp>u</samp> modifier will be ineffective.
  520. </p>
  521. </dd>
  522. <dt>&lsquo;<samp>U</samp>&rsquo;</dt>
  523. <dd><span id="index-deterministic-archives-1"></span>
  524. <span id="index-_002d_002denable_002ddeterministic_002darchives-1"></span>
  525. <p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the inverse
  526. of the &lsquo;<samp>D</samp>&rsquo; modifier, above: added files and the archive index will
  527. get their actual UID, GID, timestamp, and file mode values.
  528. </p>
  529. <p>This is the default unless <samp>binutils</samp> was configured with
  530. <samp>--enable-deterministic-archives</samp>.
  531. </p>
  532. </dd>
  533. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  534. <dd><p>This modifier requests the <em>verbose</em> version of an operation. Many
  535. operations display additional information, such as filenames processed,
  536. when the modifier &lsquo;<samp>v</samp>&rsquo; is appended.
  537. </p>
  538. </dd>
  539. <dt>&lsquo;<samp>V</samp>&rsquo;</dt>
  540. <dd><p>This modifier shows the version number of <code>ar</code>.
  541. </p></dd>
  542. </dl>
  543. <p>The <code>ar</code> program also supports some command-line options which
  544. are neither modifiers nor actions, but which do change its behaviour
  545. in specific ways:
  546. </p>
  547. <dl compact="compact">
  548. <dt>&lsquo;<samp>--help</samp>&rsquo;</dt>
  549. <dd><p>Displays the list of command-line options supported by <code>ar</code>
  550. and then exits.
  551. </p>
  552. </dd>
  553. <dt>&lsquo;<samp>--version</samp>&rsquo;</dt>
  554. <dd><p>Displays the version information of <code>ar</code> and then exits.
  555. </p>
  556. </dd>
  557. <dt>&lsquo;<samp>-X32_64</samp>&rsquo;</dt>
  558. <dd><p><code>ar</code> ignores an initial option spelled &lsquo;<samp>-X32_64</samp>&rsquo;, for
  559. compatibility with AIX. The behaviour produced by this option is the
  560. default for <small>GNU</small> <code>ar</code>. <code>ar</code> does not support any
  561. of the other &lsquo;<samp>-X</samp>&rsquo; options; in particular, it does not support
  562. <samp>-X32</samp> which is the default for AIX <code>ar</code>.
  563. </p>
  564. </dd>
  565. <dt>&lsquo;<samp>--plugin <var>name</var></samp>&rsquo;</dt>
  566. <dd><span id="index-plugins"></span>
  567. <p>The optional command-line switch <samp>--plugin <var>name</var></samp> causes
  568. <code>ar</code> to load the plugin called <var>name</var> which adds support
  569. for more file formats, including object files with link-time
  570. optimization information.
  571. </p>
  572. <p>This option is only available if the toolchain has been built with
  573. plugin support enabled.
  574. </p>
  575. <p>If <samp>--plugin</samp> is not provided, but plugin support has been
  576. enabled then <code>ar</code> iterates over the files in
  577. <samp>${libdir}/bfd-plugins</samp> in alphabetic order and the first
  578. plugin that claims the object in question is used.
  579. </p>
  580. <p>Please note that this plugin search directory is <em>not</em> the one
  581. used by <code>ld</code>&rsquo;s <samp>-plugin</samp> option. In order to make
  582. <code>ar</code> use the linker plugin it must be copied into the
  583. <samp>${libdir}/bfd-plugins</samp> directory. For GCC based compilations
  584. the linker plugin is called <samp>liblto_plugin.so.0.0.0</samp>. For Clang
  585. based compilations it is called <samp>LLVMgold.so</samp>. The GCC plugin
  586. is always backwards compatible with earlier versions, so it is
  587. sufficient to just copy the newest one.
  588. </p>
  589. </dd>
  590. <dt>&lsquo;<samp>--target <var>target</var></samp>&rsquo;</dt>
  591. <dd><p>The optional command-line switch <samp>--target <var>bfdname</var></samp>
  592. specifies that the archive members are in an object code format
  593. different from your system&rsquo;s default format. See
  594. See <a href="#Target-Selection">Target Selection</a>, for more information.
  595. </p>
  596. </dd>
  597. <dt>&lsquo;<samp>--output <var>dirname</var></samp>&rsquo;</dt>
  598. <dd><p>The <samp>--output</samp> option can be used to specify a path to a
  599. directory into which archive members should be extracted. If this
  600. option is not specified then the current directory will be used.
  601. </p>
  602. <p>Note - although the presence of this option does imply a <samp>x</samp>
  603. extraction operation that option must still be included on the command
  604. line.
  605. </p>
  606. </dd>
  607. <dt>&lsquo;<samp>--record-libdeps <var>libdeps</var></samp>&rsquo;</dt>
  608. <dd><p>The <samp>--record-libdeps</samp> option is identical to the <samp>l</samp> modifier,
  609. just handled in long form.
  610. </p>
  611. </dd>
  612. <dt>&lsquo;<samp>--thin</samp>&rsquo;</dt>
  613. <dd><span id="index-creating-thin-archive"></span>
  614. <p>Make the specified <var>archive</var> a <em>thin</em> archive. If it already
  615. exists and is a regular archive, the existing members must be present
  616. in the same directory as <var>archive</var>.
  617. </p>
  618. </dd>
  619. </dl>
  620. <hr>
  621. <span id="ar-scripts"></span><div class="header">
  622. <p>
  623. Previous: <a href="#ar-cmdline" accesskey="p" rel="prev">ar cmdline</a>, Up: <a href="#ar" accesskey="u" rel="up">ar</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  624. </div>
  625. <span id="Controlling-ar-with-a-Script"></span><h3 class="section">1.2 Controlling <code>ar</code> with a Script</h3>
  626. <div class="example">
  627. <pre class="example">ar -M [ &lt;<var>script</var> ]
  628. </pre></div>
  629. <span id="index-MRI-compatibility_002c-ar"></span>
  630. <span id="index-scripts_002c-ar"></span>
  631. <p>If you use the single command-line option &lsquo;<samp>-M</samp>&rsquo; with <code>ar</code>, you
  632. can control its operation with a rudimentary command language. This
  633. form of <code>ar</code> operates interactively if standard input is coming
  634. directly from a terminal. During interactive use, <code>ar</code> prompts for
  635. input (the prompt is &lsquo;<samp>AR &gt;</samp>&rsquo;), and continues executing even after
  636. errors. If you redirect standard input to a script file, no prompts are
  637. issued, and <code>ar</code> abandons execution (with a nonzero exit code)
  638. on any error.
  639. </p>
  640. <p>The <code>ar</code> command language is <em>not</em> designed to be equivalent
  641. to the command-line options; in fact, it provides somewhat less control
  642. over archives. The only purpose of the command language is to ease the
  643. transition to <small>GNU</small> <code>ar</code> for developers who already have scripts
  644. written for the MRI &ldquo;librarian&rdquo; program.
  645. </p>
  646. <p>The syntax for the <code>ar</code> command language is straightforward:
  647. </p><ul>
  648. <li> commands are recognized in upper or lower case; for example, <code>LIST</code>
  649. is the same as <code>list</code>. In the following descriptions, commands are
  650. shown in upper case for clarity.
  651. </li><li> a single command may appear on each line; it is the first word on the
  652. line.
  653. </li><li> empty lines are allowed, and have no effect.
  654. </li><li> comments are allowed; text after either of the characters &lsquo;<samp>*</samp>&rsquo;
  655. or &lsquo;<samp>;</samp>&rsquo; is ignored.
  656. </li><li> Whenever you use a list of names as part of the argument to an <code>ar</code>
  657. command, you can separate the individual names with either commas or
  658. blanks. Commas are shown in the explanations below, for clarity.
  659. </li><li> &lsquo;<samp>+</samp>&rsquo; is used as a line continuation character; if &lsquo;<samp>+</samp>&rsquo; appears
  660. at the end of a line, the text on the following line is considered part
  661. of the current command.
  662. </li></ul>
  663. <p>Here are the commands you can use in <code>ar</code> scripts, or when using
  664. <code>ar</code> interactively. Three of them have special significance:
  665. </p>
  666. <p><code>OPEN</code> or <code>CREATE</code> specify a <em>current archive</em>, which is
  667. a temporary file required for most of the other commands.
  668. </p>
  669. <p><code>SAVE</code> commits the changes so far specified by the script. Prior
  670. to <code>SAVE</code>, commands affect only the temporary copy of the current
  671. archive.
  672. </p>
  673. <dl compact="compact">
  674. <dt><code>ADDLIB <var>archive</var></code></dt>
  675. <dt><code>ADDLIB <var>archive</var> (<var>module</var>, <var>module</var>, &hellip; <var>module</var>)</code></dt>
  676. <dd><p>Add all the contents of <var>archive</var> (or, if specified, each named
  677. <var>module</var> from <var>archive</var>) to the current archive.
  678. </p>
  679. <p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>.
  680. </p>
  681. </dd>
  682. <dt><code>ADDMOD <var>member</var>, <var>member</var>, &hellip; <var>member</var></code></dt>
  683. <dd><p>Add each named <var>member</var> as a module in the current archive.
  684. </p>
  685. <p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>.
  686. </p>
  687. </dd>
  688. <dt><code>CLEAR</code></dt>
  689. <dd><p>Discard the contents of the current archive, canceling the effect of
  690. any operations since the last <code>SAVE</code>. May be executed (with no
  691. effect) even if no current archive is specified.
  692. </p>
  693. </dd>
  694. <dt><code>CREATE <var>archive</var></code></dt>
  695. <dd><p>Creates an archive, and makes it the current archive (required for many
  696. other commands). The new archive is created with a temporary name; it
  697. is not actually saved as <var>archive</var> until you use <code>SAVE</code>.
  698. You can overwrite existing archives; similarly, the contents of any
  699. existing file named <var>archive</var> will not be destroyed until <code>SAVE</code>.
  700. </p>
  701. </dd>
  702. <dt><code>DELETE <var>module</var>, <var>module</var>, &hellip; <var>module</var></code></dt>
  703. <dd><p>Delete each listed <var>module</var> from the current archive; equivalent to
  704. &lsquo;<samp>ar -d <var>archive</var> <var>module</var> &hellip; <var>module</var></samp>&rsquo;.
  705. </p>
  706. <p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>.
  707. </p>
  708. </dd>
  709. <dt><code>DIRECTORY <var>archive</var> (<var>module</var>, &hellip; <var>module</var>)</code></dt>
  710. <dt><code>DIRECTORY <var>archive</var> (<var>module</var>, &hellip; <var>module</var>) <var>outputfile</var></code></dt>
  711. <dd><p>List each named <var>module</var> present in <var>archive</var>. The separate
  712. command <code>VERBOSE</code> specifies the form of the output: when verbose
  713. output is off, output is like that of &lsquo;<samp>ar -t <var>archive</var>
  714. <var>module</var>&hellip;</samp>&rsquo;. When verbose output is on, the listing is like
  715. &lsquo;<samp>ar -tv <var>archive</var> <var>module</var>&hellip;</samp>&rsquo;.
  716. </p>
  717. <p>Output normally goes to the standard output stream; however, if you
  718. specify <var>outputfile</var> as a final argument, <code>ar</code> directs the
  719. output to that file.
  720. </p>
  721. </dd>
  722. <dt><code>END</code></dt>
  723. <dd><p>Exit from <code>ar</code>, with a <code>0</code> exit code to indicate successful
  724. completion. This command does not save the output file; if you have
  725. changed the current archive since the last <code>SAVE</code> command, those
  726. changes are lost.
  727. </p>
  728. </dd>
  729. <dt><code>EXTRACT <var>module</var>, <var>module</var>, &hellip; <var>module</var></code></dt>
  730. <dd><p>Extract each named <var>module</var> from the current archive, writing them
  731. into the current directory as separate files. Equivalent to &lsquo;<samp>ar -x
  732. <var>archive</var> <var>module</var>&hellip;</samp>&rsquo;.
  733. </p>
  734. <p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>.
  735. </p>
  736. </dd>
  737. <dt><code>LIST</code></dt>
  738. <dd><p>Display full contents of the current archive, in &ldquo;verbose&rdquo; style
  739. regardless of the state of <code>VERBOSE</code>. The effect is like &lsquo;<samp>ar
  740. tv <var>archive</var></samp>&rsquo;. (This single command is a <small>GNU</small> <code>ar</code>
  741. enhancement, rather than present for MRI compatibility.)
  742. </p>
  743. <p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>.
  744. </p>
  745. </dd>
  746. <dt><code>OPEN <var>archive</var></code></dt>
  747. <dd><p>Opens an existing archive for use as the current archive (required for
  748. many other commands). Any changes as the result of subsequent commands
  749. will not actually affect <var>archive</var> until you next use <code>SAVE</code>.
  750. </p>
  751. </dd>
  752. <dt><code>REPLACE <var>module</var>, <var>module</var>, &hellip; <var>module</var></code></dt>
  753. <dd><p>In the current archive, replace each existing <var>module</var> (named in
  754. the <code>REPLACE</code> arguments) from files in the current working directory.
  755. To execute this command without errors, both the file, and the module in
  756. the current archive, must exist.
  757. </p>
  758. <p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>.
  759. </p>
  760. </dd>
  761. <dt><code>VERBOSE</code></dt>
  762. <dd><p>Toggle an internal flag governing the output from <code>DIRECTORY</code>.
  763. When the flag is on, <code>DIRECTORY</code> output matches output from
  764. &lsquo;<samp>ar -tv </samp>&rsquo;&hellip;.
  765. </p>
  766. </dd>
  767. <dt><code>SAVE</code></dt>
  768. <dd><p>Commit your changes to the current archive, and actually save it as a
  769. file with the name specified in the last <code>CREATE</code> or <code>OPEN</code>
  770. command.
  771. </p>
  772. <p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>.
  773. </p>
  774. </dd>
  775. </dl>
  776. <hr>
  777. <span id="nm"></span><div class="header">
  778. <p>
  779. Next: <a href="#objcopy" accesskey="n" rel="next">objcopy</a>, Previous: <a href="#ar" accesskey="p" rel="prev">ar</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  780. </div>
  781. <span id="nm-1"></span><h2 class="chapter">2 nm</h2>
  782. <span id="index-symbols"></span>
  783. <span id="index-nm"></span>
  784. <div class="example">
  785. <pre class="example">nm [<samp>-A</samp>|<samp>-o</samp>|<samp>--print-file-name</samp>]
  786. [<samp>-a</samp>|<samp>--debug-syms</samp>]
  787. [<samp>-B</samp>|<samp>--format=bsd</samp>]
  788. [<samp>-C</samp>|<samp>--demangle</samp>[=<var>style</var>]]
  789. [<samp>-D</samp>|<samp>--dynamic</samp>]
  790. [<samp>-f</samp><var>format</var>|<samp>--format=</samp><var>format</var>]
  791. [<samp>-g</samp>|<samp>--extern-only</samp>]
  792. [<samp>-h</samp>|<samp>--help</samp>]
  793. [<samp>--ifunc-chars=<var>CHARS</var></samp>]
  794. [<samp>-j</samp>|<samp>--format=just-symbols</samp>]
  795. [<samp>-l</samp>|<samp>--line-numbers</samp>] [<samp>--inlines</samp>]
  796. [<samp>-n</samp>|<samp>-v</samp>|<samp>--numeric-sort</samp>]
  797. [<samp>-P</samp>|<samp>--portability</samp>]
  798. [<samp>-p</samp>|<samp>--no-sort</samp>]
  799. [<samp>-r</samp>|<samp>--reverse-sort</samp>]
  800. [<samp>-S</samp>|<samp>--print-size</samp>]
  801. [<samp>-s</samp>|<samp>--print-armap</samp>]
  802. [<samp>-t</samp> <var>radix</var>|<samp>--radix=</samp><var>radix</var>]
  803. [<samp>-u</samp>|<samp>--undefined-only</samp>]
  804. [<samp>-U</samp>|<samp>--defined-only</samp>]
  805. [<samp>-V</samp>|<samp>--version</samp>]
  806. [<samp>-W</samp>|<samp>--no-weak</samp>]
  807. [<samp>-X 32_64</samp>]
  808. [<samp>--no-demangle</samp>]
  809. [<samp>--no-recurse-limit</samp>|<samp>--recurse-limit</samp>]]
  810. [<samp>--plugin</samp> <var>name</var>]
  811. [<samp>--size-sort</samp>]
  812. [<samp>--special-syms</samp>]
  813. [<samp>--synthetic</samp>]
  814. [<samp>--target=</samp><var>bfdname</var>]
  815. [<samp>--unicode=</samp><var>method</var>]
  816. [<samp>--with-symbol-versions</samp>]
  817. [<samp>--without-symbol-versions</samp>]
  818. [<var>objfile</var>&hellip;]
  819. </pre></div>
  820. <p><small>GNU</small> <code>nm</code> lists the symbols from object files <var>objfile</var>&hellip;.
  821. If no object files are listed as arguments, <code>nm</code> assumes the file
  822. <samp>a.out</samp>.
  823. </p>
  824. <p>For each symbol, <code>nm</code> shows:
  825. </p>
  826. <ul>
  827. <li> The symbol value, in the radix selected by options (see below), or
  828. hexadecimal by default.
  829. </li><li> The symbol type. At least the following types are used; others are, as
  830. well, depending on the object file format. If lowercase, the symbol is
  831. usually local; if uppercase, the symbol is global (external). There
  832. are however a few lowercase symbols that are shown for special global
  833. symbols (<code>u</code>, <code>v</code> and <code>w</code>).
  834. <dl compact="compact">
  835. <dt><code>A</code></dt>
  836. <dd><p>The symbol&rsquo;s value is absolute, and will not be changed by further
  837. linking.
  838. </p>
  839. </dd>
  840. <dt><code>B</code></dt>
  841. <dt><code>b</code></dt>
  842. <dd><p>The symbol is in the BSS data section. This section typically
  843. contains zero-initialized or uninitialized data, although the exact
  844. behavior is system dependent.
  845. </p>
  846. </dd>
  847. <dt><code>C</code></dt>
  848. <dt><code>c</code></dt>
  849. <dd><p>The symbol is common. Common symbols are uninitialized data. When
  850. linking, multiple common symbols may appear with the same name. If the
  851. symbol is defined anywhere, the common symbols are treated as undefined
  852. references.
  853. For more details on common symbols, see the discussion of
  854. &ndash;warn-common in <a href="https://sourceware.org/binutils/docs/ld/Options.html#Options">Linker options</a> in <cite>The GNU linker</cite>.
  855. The lower case <var>c</var> character is used when the symbol is in a
  856. special section for small commons.
  857. </p>
  858. </dd>
  859. <dt><code>D</code></dt>
  860. <dt><code>d</code></dt>
  861. <dd><p>The symbol is in the initialized data section.
  862. </p>
  863. </dd>
  864. <dt><code>G</code></dt>
  865. <dt><code>g</code></dt>
  866. <dd><p>The symbol is in an initialized data section for small objects. Some
  867. object file formats permit more efficient access to small data objects,
  868. such as a global int variable as opposed to a large global array.
  869. </p>
  870. </dd>
  871. <dt><code>i</code></dt>
  872. <dd><p>For PE format files this indicates that the symbol is in a section
  873. specific to the implementation of DLLs.
  874. </p>
  875. <p>For ELF format files this indicates that the symbol is an indirect
  876. function. This is a GNU extension to the standard set of ELF symbol
  877. types. It indicates a symbol which if referenced by a relocation does
  878. not evaluate to its address, but instead must be invoked at runtime.
  879. The runtime execution will then return the value to be used in the
  880. relocation.
  881. </p>
  882. <p>Note - the actual symbols display for GNU indirect symbols is
  883. controlled by the <samp>--ifunc-chars</samp> command line option. If this
  884. option has been provided then the first character in the string will
  885. be used for global indirect function symbols. If the string contains
  886. a second character then that will be used for local indirect function
  887. symbols.
  888. </p>
  889. </dd>
  890. <dt><code>I</code></dt>
  891. <dd><p>The symbol is an indirect reference to another symbol.
  892. </p>
  893. </dd>
  894. <dt><code>N</code></dt>
  895. <dd><p>The symbol is a debugging symbol.
  896. </p>
  897. </dd>
  898. <dt><code>n</code></dt>
  899. <dd><p>The symbol is in a non-data, non-code, non-debug read-only section.
  900. </p>
  901. </dd>
  902. <dt><code>p</code></dt>
  903. <dd><p>The symbol is in a stack unwind section.
  904. </p>
  905. </dd>
  906. <dt><code>R</code></dt>
  907. <dt><code>r</code></dt>
  908. <dd><p>The symbol is in a read only data section.
  909. </p>
  910. </dd>
  911. <dt><code>S</code></dt>
  912. <dt><code>s</code></dt>
  913. <dd><p>The symbol is in an uninitialized or zero-initialized data section
  914. for small objects.
  915. </p>
  916. </dd>
  917. <dt><code>T</code></dt>
  918. <dt><code>t</code></dt>
  919. <dd><p>The symbol is in the text (code) section.
  920. </p>
  921. </dd>
  922. <dt><code>U</code></dt>
  923. <dd><p>The symbol is undefined.
  924. </p>
  925. </dd>
  926. <dt><code>u</code></dt>
  927. <dd><p>The symbol is a unique global symbol. This is a GNU extension to the
  928. standard set of ELF symbol bindings. For such a symbol the dynamic linker
  929. will make sure that in the entire process there is just one symbol with
  930. this name and type in use.
  931. </p>
  932. </dd>
  933. <dt><code>V</code></dt>
  934. <dt><code>v</code></dt>
  935. <dd><p>The symbol is a weak object. When a weak defined symbol is linked with
  936. a normal defined symbol, the normal defined symbol is used with no error.
  937. When a weak undefined symbol is linked and the symbol is not defined,
  938. the value of the weak symbol becomes zero with no error. On some
  939. systems, uppercase indicates that a default value has been specified.
  940. </p>
  941. </dd>
  942. <dt><code>W</code></dt>
  943. <dt><code>w</code></dt>
  944. <dd><p>The symbol is a weak symbol that has not been specifically tagged as a
  945. weak object symbol. When a weak defined symbol is linked with a normal
  946. defined symbol, the normal defined symbol is used with no error.
  947. When a weak undefined symbol is linked and the symbol is not defined,
  948. the value of the symbol is determined in a system-specific manner without
  949. error. On some systems, uppercase indicates that a default value has been
  950. specified.
  951. </p>
  952. </dd>
  953. <dt><code>-</code></dt>
  954. <dd><p>The symbol is a stabs symbol in an a.out object file. In this case, the
  955. next values printed are the stabs other field, the stabs desc field, and
  956. the stab type. Stabs symbols are used to hold debugging information.
  957. </p>
  958. </dd>
  959. <dt><code>?</code></dt>
  960. <dd><p>The symbol type is unknown, or object file format specific.
  961. </p></dd>
  962. </dl>
  963. </li><li> The symbol name. If a symbol has version information associated with it,
  964. then the version information is displayed as well. If the versioned
  965. symbol is undefined or hidden from linker, the version string is displayed
  966. as a suffix to the symbol name, preceded by an @ character. For example
  967. &lsquo;<samp>foo@VER_1</samp>&rsquo;. If the version is the default version to be used when
  968. resolving unversioned references to the symbol, then it is displayed as a
  969. suffix preceded by two @ characters. For example &lsquo;<samp>foo@@VER_2</samp>&rsquo;.
  970. </li></ul>
  971. <p>The long and short forms of options, shown here as alternatives, are
  972. equivalent.
  973. </p>
  974. <dl compact="compact">
  975. <dt><code>-A</code></dt>
  976. <dt><code>-o</code></dt>
  977. <dt><code>--print-file-name</code></dt>
  978. <dd><span id="index-input-file-name"></span>
  979. <span id="index-file-name"></span>
  980. <span id="index-source-file-name"></span>
  981. <p>Precede each symbol by the name of the input file (or archive member)
  982. in which it was found, rather than identifying the input file once only,
  983. before all of its symbols.
  984. </p>
  985. </dd>
  986. <dt><code>-a</code></dt>
  987. <dt><code>--debug-syms</code></dt>
  988. <dd><span id="index-debugging-symbols"></span>
  989. <p>Display all symbols, even debugger-only symbols; normally these are not
  990. listed.
  991. </p>
  992. </dd>
  993. <dt><code>-B</code></dt>
  994. <dd><span id="index-nm-format"></span>
  995. <span id="index-nm-compatibility"></span>
  996. <p>The same as <samp>--format=bsd</samp> (for compatibility with the MIPS <code>nm</code>).
  997. </p>
  998. </dd>
  999. <dt><code>-C</code></dt>
  1000. <dt><code>--demangle[=<var>style</var>]</code></dt>
  1001. <dd><span id="index-demangling-in-nm"></span>
  1002. <p>Decode (<em>demangle</em>) low-level symbol names into user-level names.
  1003. Besides removing any initial underscore prepended by the system, this
  1004. makes C++ function names readable. Different compilers have different
  1005. mangling styles. The optional demangling style argument can be used to
  1006. choose an appropriate demangling style for your compiler. See <a href="#c_002b_002bfilt">c++filt</a>,
  1007. for more information on demangling.
  1008. </p>
  1009. </dd>
  1010. <dt><code>--no-demangle</code></dt>
  1011. <dd><p>Do not demangle low-level symbol names. This is the default.
  1012. </p>
  1013. </dd>
  1014. <dt><code>--recurse-limit</code></dt>
  1015. <dt><code>--no-recurse-limit</code></dt>
  1016. <dt><code>--recursion-limit</code></dt>
  1017. <dt><code>--no-recursion-limit</code></dt>
  1018. <dd><p>Enables or disables a limit on the amount of recursion performed
  1019. whilst demangling strings. Since the name mangling formats allow for
  1020. an infinite level of recursion it is possible to create strings whose
  1021. decoding will exhaust the amount of stack space available on the host
  1022. machine, triggering a memory fault. The limit tries to prevent this
  1023. from happening by restricting recursion to 2048 levels of nesting.
  1024. </p>
  1025. <p>The default is for this limit to be enabled, but disabling it may be
  1026. necessary in order to demangle truly complicated names. Note however
  1027. that if the recursion limit is disabled then stack exhaustion is
  1028. possible and any bug reports about such an event will be rejected.
  1029. </p>
  1030. </dd>
  1031. <dt><code>-D</code></dt>
  1032. <dt><code>--dynamic</code></dt>
  1033. <dd><span id="index-dynamic-symbols"></span>
  1034. <p>Display the dynamic symbols rather than the normal symbols. This is
  1035. only meaningful for dynamic objects, such as certain types of shared
  1036. libraries.
  1037. </p>
  1038. </dd>
  1039. <dt><code>-f <var>format</var></code></dt>
  1040. <dt><code>--format=<var>format</var></code></dt>
  1041. <dd><span id="index-nm-format-1"></span>
  1042. <span id="index-nm-compatibility-1"></span>
  1043. <p>Use the output format <var>format</var>, which can be <code>bsd</code>,
  1044. <code>sysv</code>, <code>posix</code> or <code>just-symbols</code>. The default is <code>bsd</code>.
  1045. Only the first character of <var>format</var> is significant; it can be
  1046. either upper or lower case.
  1047. </p>
  1048. </dd>
  1049. <dt><code>-g</code></dt>
  1050. <dt><code>--extern-only</code></dt>
  1051. <dd><span id="index-external-symbols"></span>
  1052. <p>Display only external symbols.
  1053. </p>
  1054. </dd>
  1055. <dt><code>-h</code></dt>
  1056. <dt><code>--help</code></dt>
  1057. <dd><p>Show a summary of the options to <code>nm</code> and exit.
  1058. </p>
  1059. </dd>
  1060. <dt><code>--ifunc-chars=<var>CHARS</var></code></dt>
  1061. <dd><p>When display GNU indirect function symbols <code>nm</code> will default
  1062. to using the <code>i</code> character for both local indirect functions and
  1063. global indirect functions. The <samp>--ifunc-chars</samp> option allows
  1064. the user to specify a string containing one or two characters. The
  1065. first character will be used for global indirect function symbols and
  1066. the second character, if present, will be used for local indirect
  1067. function symbols.
  1068. </p>
  1069. </dd>
  1070. <dt><code>j</code></dt>
  1071. <dd><p>The same as <samp>--format=just-symbols</samp>.
  1072. </p>
  1073. </dd>
  1074. <dt><code>-l</code></dt>
  1075. <dt><code>--line-numbers</code></dt>
  1076. <dd><span id="index-symbol-line-numbers"></span>
  1077. <p>For each symbol, use debugging information to try to find a filename and
  1078. line number. For a defined symbol, look for the line number of the
  1079. address of the symbol. For an undefined symbol, look for the line
  1080. number of a relocation entry which refers to the symbol. If line number
  1081. information can be found, print it after the other symbol information.
  1082. </p>
  1083. </dd>
  1084. <dt><code>--inlines</code></dt>
  1085. <dd><span id="index-objdump-inlines"></span>
  1086. <p>When option <samp>-l</samp> is active, if the address belongs to a
  1087. function that was inlined, then this option causes the source
  1088. information for all enclosing scopes back to the first non-inlined
  1089. function to be printed as well. For example, if <code>main</code> inlines
  1090. <code>callee1</code> which inlines <code>callee2</code>, and address is from
  1091. <code>callee2</code>, the source information for <code>callee1</code> and <code>main</code>
  1092. will also be printed.
  1093. </p>
  1094. </dd>
  1095. <dt><code>-n</code></dt>
  1096. <dt><code>-v</code></dt>
  1097. <dt><code>--numeric-sort</code></dt>
  1098. <dd><p>Sort symbols numerically by their addresses, rather than alphabetically
  1099. by their names.
  1100. </p>
  1101. </dd>
  1102. <dt><code>-p</code></dt>
  1103. <dt><code>--no-sort</code></dt>
  1104. <dd><span id="index-sorting-symbols"></span>
  1105. <p>Do not bother to sort the symbols in any order; print them in the order
  1106. encountered.
  1107. </p>
  1108. </dd>
  1109. <dt><code>-P</code></dt>
  1110. <dt><code>--portability</code></dt>
  1111. <dd><p>Use the POSIX.2 standard output format instead of the default format.
  1112. Equivalent to &lsquo;<samp>-f posix</samp>&rsquo;.
  1113. </p>
  1114. </dd>
  1115. <dt><code>-r</code></dt>
  1116. <dt><code>--reverse-sort</code></dt>
  1117. <dd><p>Reverse the order of the sort (whether numeric or alphabetic); let the
  1118. last come first.
  1119. </p>
  1120. </dd>
  1121. <dt><code>-S</code></dt>
  1122. <dt><code>--print-size</code></dt>
  1123. <dd><p>Print both value and size of defined symbols for the <code>bsd</code> output style.
  1124. This option has no effect for object formats that do not record symbol
  1125. sizes, unless &lsquo;<samp>--size-sort</samp>&rsquo; is also used in which case a
  1126. calculated size is displayed.
  1127. </p>
  1128. </dd>
  1129. <dt><code>-s</code></dt>
  1130. <dt><code>--print-armap</code></dt>
  1131. <dd><span id="index-symbol-index_002c-listing"></span>
  1132. <p>When listing symbols from archive members, include the index: a mapping
  1133. (stored in the archive by <code>ar</code> or <code>ranlib</code>) of which modules
  1134. contain definitions for which names.
  1135. </p>
  1136. </dd>
  1137. <dt><code>-t <var>radix</var></code></dt>
  1138. <dt><code>--radix=<var>radix</var></code></dt>
  1139. <dd><p>Use <var>radix</var> as the radix for printing the symbol values. It must be
  1140. &lsquo;<samp>d</samp>&rsquo; for decimal, &lsquo;<samp>o</samp>&rsquo; for octal, or &lsquo;<samp>x</samp>&rsquo; for hexadecimal.
  1141. </p>
  1142. </dd>
  1143. <dt><code>-u</code></dt>
  1144. <dt><code>--undefined-only</code></dt>
  1145. <dd><span id="index-external-symbols-1"></span>
  1146. <span id="index-undefined-symbols"></span>
  1147. <p>Display only undefined symbols (those external to each object file).
  1148. By default both defined and undefined symbols are displayed.
  1149. </p>
  1150. </dd>
  1151. <dt><code>-U</code></dt>
  1152. <dt><code>--defined-only</code></dt>
  1153. <dd><span id="index-external-symbols-2"></span>
  1154. <span id="index-undefined-symbols-1"></span>
  1155. <p>Display only defined symbols for each object file.
  1156. By default both defined and undefined symbols are displayed.
  1157. </p>
  1158. </dd>
  1159. <dt><code>-V</code></dt>
  1160. <dt><code>--version</code></dt>
  1161. <dd><p>Show the version number of <code>nm</code> and exit.
  1162. </p>
  1163. </dd>
  1164. <dt><code>-X</code></dt>
  1165. <dd><p>This option is ignored for compatibility with the AIX version of
  1166. <code>nm</code>. It takes one parameter which must be the string
  1167. <samp>32_64</samp>. The default mode of AIX <code>nm</code> corresponds
  1168. to <samp>-X 32</samp>, which is not supported by <small>GNU</small> <code>nm</code>.
  1169. </p>
  1170. </dd>
  1171. <dt><code>--plugin <var>name</var></code></dt>
  1172. <dd><span id="index-plugins-1"></span>
  1173. <p>Load the plugin called <var>name</var> to add support for extra target
  1174. types. This option is only available if the toolchain has been built
  1175. with plugin support enabled.
  1176. </p>
  1177. <p>If <samp>--plugin</samp> is not provided, but plugin support has been
  1178. enabled then <code>nm</code> iterates over the files in
  1179. <samp>${libdir}/bfd-plugins</samp> in alphabetic order and the first
  1180. plugin that claims the object in question is used.
  1181. </p>
  1182. <p>Please note that this plugin search directory is <em>not</em> the one
  1183. used by <code>ld</code>&rsquo;s <samp>-plugin</samp> option. In order to make
  1184. <code>nm</code> use the linker plugin it must be copied into the
  1185. <samp>${libdir}/bfd-plugins</samp> directory. For GCC based compilations
  1186. the linker plugin is called <samp>liblto_plugin.so.0.0.0</samp>. For Clang
  1187. based compilations it is called <samp>LLVMgold.so</samp>. The GCC plugin
  1188. is always backwards compatible with earlier versions, so it is
  1189. sufficient to just copy the newest one.
  1190. </p>
  1191. </dd>
  1192. <dt><code>--size-sort</code></dt>
  1193. <dd><p>Sort symbols by size. For ELF objects symbol sizes are read from the
  1194. ELF, for other object types the symbol sizes are computed as the
  1195. difference between the value of the symbol and the value of the symbol
  1196. with the next higher value. If the <code>bsd</code> output format is used
  1197. the size of the symbol is printed, rather than the value, and
  1198. &lsquo;<samp>-S</samp>&rsquo; must be used in order both size and value to be printed.
  1199. </p>
  1200. <p>Note - this option does not work if <samp>--undefined-only</samp> has been
  1201. enabled as undefined symbols have no size.
  1202. </p>
  1203. </dd>
  1204. <dt><code>--special-syms</code></dt>
  1205. <dd><p>Display symbols which have a target-specific special meaning. These
  1206. symbols are usually used by the target for some special processing and
  1207. are not normally helpful when included in the normal symbol lists.
  1208. For example for ARM targets this option would skip the mapping symbols
  1209. used to mark transitions between ARM code, THUMB code and data.
  1210. </p>
  1211. </dd>
  1212. <dt><code>--synthetic</code></dt>
  1213. <dd><p>Include synthetic symbols in the output. These are special symbols
  1214. created by the linker for various purposes. They are not shown by
  1215. default since they are not part of the binary&rsquo;s original source code.
  1216. </p>
  1217. </dd>
  1218. <dt><code>--unicode=<var>[default|invalid|locale|escape|hex|highlight]</var></code></dt>
  1219. <dd><p>Controls the display of UTF-8 encoded multibyte characters in strings.
  1220. The default (<samp>--unicode=default</samp>) is to give them no special
  1221. treatment. The <samp>--unicode=locale</samp> option displays the sequence
  1222. in the current locale, which may or may not support them. The options
  1223. <samp>--unicode=hex</samp> and <samp>--unicode=invalid</samp> display them as
  1224. hex byte sequences enclosed by either angle brackets or curly braces.
  1225. </p>
  1226. <p>The <samp>--unicode=escape</samp> option displays them as escape sequences
  1227. (<var>\uxxxx</var>) and the <samp>--unicode=highlight</samp> option displays
  1228. them as escape sequences highlighted in red (if supported by the
  1229. output device). The colouring is intended to draw attention to the
  1230. presence of unicode sequences where they might not be expected.
  1231. </p>
  1232. </dd>
  1233. <dt><code>-W</code></dt>
  1234. <dt><code>--no-weak</code></dt>
  1235. <dd><p>Do not display weak symbols.
  1236. </p>
  1237. </dd>
  1238. <dt><code>--with-symbol-versions</code></dt>
  1239. <dt><code>--without-symbol-versions</code></dt>
  1240. <dd><p>Enables or disables the display of symbol version information. The
  1241. version string is displayed as a suffix to the symbol name, preceded
  1242. by an @ character. For example &lsquo;<samp>foo@VER_1</samp>&rsquo;. If the version is
  1243. the default version to be used when resolving unversioned references
  1244. to the symbol then it is displayed as a suffix preceded by two @
  1245. characters. For example &lsquo;<samp>foo@@VER_2</samp>&rsquo;. By default, symbol
  1246. version information is displayed.
  1247. </p>
  1248. </dd>
  1249. <dt><code>--target=<var>bfdname</var></code></dt>
  1250. <dd><span id="index-object-code-format"></span>
  1251. <p>Specify an object code format other than your system&rsquo;s default format.
  1252. See <a href="#Target-Selection">Target Selection</a>, for more information.
  1253. </p>
  1254. </dd>
  1255. </dl>
  1256. <hr>
  1257. <span id="objcopy"></span><div class="header">
  1258. <p>
  1259. Next: <a href="#objdump" accesskey="n" rel="next">objdump</a>, Previous: <a href="#nm" accesskey="p" rel="prev">nm</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  1260. </div>
  1261. <span id="objcopy-1"></span><h2 class="chapter">3 objcopy</h2>
  1262. <div class="example">
  1263. <pre class="example">objcopy [<samp>-F</samp> <var>bfdname</var>|<samp>--target=</samp><var>bfdname</var>]
  1264. [<samp>-I</samp> <var>bfdname</var>|<samp>--input-target=</samp><var>bfdname</var>]
  1265. [<samp>-O</samp> <var>bfdname</var>|<samp>--output-target=</samp><var>bfdname</var>]
  1266. [<samp>-B</samp> <var>bfdarch</var>|<samp>--binary-architecture=</samp><var>bfdarch</var>]
  1267. [<samp>-S</samp>|<samp>--strip-all</samp>]
  1268. [<samp>-g</samp>|<samp>--strip-debug</samp>]
  1269. [<samp>--strip-unneeded</samp>]
  1270. [<samp>-K</samp> <var>symbolname</var>|<samp>--keep-symbol=</samp><var>symbolname</var>]
  1271. [<samp>--keep-file-symbols</samp>]
  1272. [<samp>--keep-section-symbols</samp>]
  1273. [<samp>-N</samp> <var>symbolname</var>|<samp>--strip-symbol=</samp><var>symbolname</var>]
  1274. [<samp>--strip-unneeded-symbol=</samp><var>symbolname</var>]
  1275. [<samp>-G</samp> <var>symbolname</var>|<samp>--keep-global-symbol=</samp><var>symbolname</var>]
  1276. [<samp>--localize-hidden</samp>]
  1277. [<samp>-L</samp> <var>symbolname</var>|<samp>--localize-symbol=</samp><var>symbolname</var>]
  1278. [<samp>--globalize-symbol=</samp><var>symbolname</var>]
  1279. [<samp>--globalize-symbols=</samp><var>filename</var>]
  1280. [<samp>-W</samp> <var>symbolname</var>|<samp>--weaken-symbol=</samp><var>symbolname</var>]
  1281. [<samp>-w</samp>|<samp>--wildcard</samp>]
  1282. [<samp>-x</samp>|<samp>--discard-all</samp>]
  1283. [<samp>-X</samp>|<samp>--discard-locals</samp>]
  1284. [<samp>-b</samp> <var>byte</var>|<samp>--byte=</samp><var>byte</var>]
  1285. [<samp>-i</samp> [<var>breadth</var>]|<samp>--interleave</samp>[=<var>breadth</var>]]
  1286. [<samp>--interleave-width=</samp><var>width</var>]
  1287. [<samp>-j</samp> <var>sectionpattern</var>|<samp>--only-section=</samp><var>sectionpattern</var>]
  1288. [<samp>-R</samp> <var>sectionpattern</var>|<samp>--remove-section=</samp><var>sectionpattern</var>]
  1289. [<samp>--keep-section=</samp><var>sectionpattern</var>]
  1290. [<samp>--remove-relocations=</samp><var>sectionpattern</var>]
  1291. [<samp>--strip-section-headers</samp>]
  1292. [<samp>-p</samp>|<samp>--preserve-dates</samp>]
  1293. [<samp>-D</samp>|<samp>--enable-deterministic-archives</samp>]
  1294. [<samp>-U</samp>|<samp>--disable-deterministic-archives</samp>]
  1295. [<samp>--debugging</samp>]
  1296. [<samp>--gap-fill=</samp><var>val</var>]
  1297. [<samp>--pad-to=</samp><var>address</var>]
  1298. [<samp>--set-start=</samp><var>val</var>]
  1299. [<samp>--adjust-start=</samp><var>incr</var>]
  1300. [<samp>--change-addresses=</samp><var>incr</var>]
  1301. [<samp>--change-section-address</samp> <var>sectionpattern</var>{=,+,-}<var>val</var>]
  1302. [<samp>--change-section-lma</samp> <var>sectionpattern</var>{=,+,-}<var>val</var>]
  1303. [<samp>--change-section-vma</samp> <var>sectionpattern</var>{=,+,-}<var>val</var>]
  1304. [<samp>--change-warnings</samp>] [<samp>--no-change-warnings</samp>]
  1305. [<samp>--set-section-flags</samp> <var>sectionpattern</var>=<var>flags</var>]
  1306. [<samp>--set-section-alignment</samp> <var>sectionpattern</var>=<var>align</var>]
  1307. [<samp>--add-section</samp> <var>sectionname</var>=<var>filename</var>]
  1308. [<samp>--dump-section</samp> <var>sectionname</var>=<var>filename</var>]
  1309. [<samp>--update-section</samp> <var>sectionname</var>=<var>filename</var>]
  1310. [<samp>--rename-section</samp> <var>oldname</var>=<var>newname</var>[,<var>flags</var>]]
  1311. [<samp>--long-section-names</samp> {enable,disable,keep}]
  1312. [<samp>--change-leading-char</samp>] [<samp>--remove-leading-char</samp>]
  1313. [<samp>--reverse-bytes=</samp><var>num</var>]
  1314. [<samp>--srec-len=</samp><var>ival</var>] [<samp>--srec-forceS3</samp>]
  1315. [<samp>--redefine-sym</samp> <var>old</var>=<var>new</var>]
  1316. [<samp>--redefine-syms=</samp><var>filename</var>]
  1317. [<samp>--weaken</samp>]
  1318. [<samp>--keep-symbols=</samp><var>filename</var>]
  1319. [<samp>--strip-symbols=</samp><var>filename</var>]
  1320. [<samp>--strip-unneeded-symbols=</samp><var>filename</var>]
  1321. [<samp>--keep-global-symbols=</samp><var>filename</var>]
  1322. [<samp>--localize-symbols=</samp><var>filename</var>]
  1323. [<samp>--weaken-symbols=</samp><var>filename</var>]
  1324. [<samp>--add-symbol</samp> <var>name</var>=[<var>section</var>:]<var>value</var>[,<var>flags</var>]]
  1325. [<samp>--alt-machine-code=</samp><var>index</var>]
  1326. [<samp>--prefix-symbols=</samp><var>string</var>]
  1327. [<samp>--prefix-sections=</samp><var>string</var>]
  1328. [<samp>--prefix-alloc-sections=</samp><var>string</var>]
  1329. [<samp>--add-gnu-debuglink=</samp><var>path-to-file</var>]
  1330. [<samp>--only-keep-debug</samp>]
  1331. [<samp>--strip-dwo</samp>]
  1332. [<samp>--extract-dwo</samp>]
  1333. [<samp>--extract-symbol</samp>]
  1334. [<samp>--writable-text</samp>]
  1335. [<samp>--readonly-text</samp>]
  1336. [<samp>--pure</samp>]
  1337. [<samp>--impure</samp>]
  1338. [<samp>--file-alignment=</samp><var>num</var>]
  1339. [<samp>--heap=</samp><var>reserve</var>[,<var>commit</var>]]
  1340. [<samp>--image-base=</samp><var>address</var>]
  1341. [<samp>--section-alignment=</samp><var>num</var>]
  1342. [<samp>--stack=</samp><var>reserve</var>[,<var>commit</var>]]
  1343. [<samp>--subsystem=</samp><var>which</var>:<var>major</var>.<var>minor</var>]
  1344. [<samp>--compress-debug-sections</samp>]
  1345. [<samp>--decompress-debug-sections</samp>]
  1346. [<samp>--elf-stt-common=<var>val</var></samp>]
  1347. [<samp>--merge-notes</samp>]
  1348. [<samp>--no-merge-notes</samp>]
  1349. [<samp>--verilog-data-width=<var>val</var></samp>]
  1350. [<samp>-v</samp>|<samp>--verbose</samp>]
  1351. [<samp>-V</samp>|<samp>--version</samp>]
  1352. [<samp>--help</samp>] [<samp>--info</samp>]
  1353. <var>infile</var> [<var>outfile</var>]
  1354. </pre></div>
  1355. <p>The <small>GNU</small> <code>objcopy</code> utility copies the contents of an object
  1356. file to another. <code>objcopy</code> uses the <small>GNU</small> <small>BFD</small> Library to
  1357. read and write the object files. It can write the destination object
  1358. file in a format different from that of the source object file. The
  1359. exact behavior of <code>objcopy</code> is controlled by command-line options.
  1360. Note that <code>objcopy</code> should be able to copy a fully linked file
  1361. between any two formats. However, copying a relocatable object file
  1362. between any two formats may not work as expected.
  1363. </p>
  1364. <p><code>objcopy</code> creates temporary files to do its translations and
  1365. deletes them afterward. <code>objcopy</code> uses <small>BFD</small> to do all its
  1366. translation work; it has access to all the formats described in <small>BFD</small>
  1367. and thus is able to recognize most formats without being told
  1368. explicitly. See <a href="https://sourceware.org/binutils/docs/ld/BFD.html#BFD">BFD</a> in <cite>Using LD</cite>.
  1369. </p>
  1370. <p><code>objcopy</code> can be used to generate S-records by using an output
  1371. target of &lsquo;<samp>srec</samp>&rsquo; (e.g., use &lsquo;<samp>-O srec</samp>&rsquo;).
  1372. </p>
  1373. <p><code>objcopy</code> can be used to generate a raw binary file by using an
  1374. output target of &lsquo;<samp>binary</samp>&rsquo; (e.g., use <samp>-O binary</samp>). When
  1375. <code>objcopy</code> generates a raw binary file, it will essentially produce
  1376. a memory dump of the contents of the input object file. All symbols and
  1377. relocation information will be discarded. The memory dump will start at
  1378. the load address of the lowest section copied into the output file.
  1379. </p>
  1380. <p>When generating an S-record or a raw binary file, it may be helpful to
  1381. use <samp>-S</samp> to remove sections containing debugging information. In
  1382. some cases <samp>-R</samp> will be useful to remove sections which contain
  1383. information that is not needed by the binary file.
  1384. </p>
  1385. <p>Note&mdash;<code>objcopy</code> is not able to change the endianness of its input
  1386. files. If the input format has an endianness (some formats do not),
  1387. <code>objcopy</code> can only copy the inputs into file formats that have the
  1388. same endianness or which have no endianness (e.g., &lsquo;<samp>srec</samp>&rsquo;).
  1389. (However, see the <samp>--reverse-bytes</samp> option.)
  1390. </p>
  1391. <dl compact="compact">
  1392. <dt><code><var>infile</var></code></dt>
  1393. <dt><code><var>outfile</var></code></dt>
  1394. <dd><p>The input and output files, respectively.
  1395. If you do not specify <var>outfile</var>, <code>objcopy</code> creates a
  1396. temporary file and destructively renames the result with
  1397. the name of <var>infile</var>.
  1398. </p>
  1399. </dd>
  1400. <dt><code>-I <var>bfdname</var></code></dt>
  1401. <dt><code>--input-target=<var>bfdname</var></code></dt>
  1402. <dd><p>Consider the source file&rsquo;s object format to be <var>bfdname</var>, rather than
  1403. attempting to deduce it. See <a href="#Target-Selection">Target Selection</a>, for more information.
  1404. </p>
  1405. </dd>
  1406. <dt><code>-O <var>bfdname</var></code></dt>
  1407. <dt><code>--output-target=<var>bfdname</var></code></dt>
  1408. <dd><p>Write the output file using the object format <var>bfdname</var>.
  1409. See <a href="#Target-Selection">Target Selection</a>, for more information.
  1410. </p>
  1411. </dd>
  1412. <dt><code>-F <var>bfdname</var></code></dt>
  1413. <dt><code>--target=<var>bfdname</var></code></dt>
  1414. <dd><p>Use <var>bfdname</var> as the object format for both the input and the output
  1415. file; i.e., simply transfer data from source to destination with no
  1416. translation. See <a href="#Target-Selection">Target Selection</a>, for more information.
  1417. </p>
  1418. </dd>
  1419. <dt><code>-B <var>bfdarch</var></code></dt>
  1420. <dt><code>--binary-architecture=<var>bfdarch</var></code></dt>
  1421. <dd><p>Useful when transforming a architecture-less input file into an object file.
  1422. In this case the output architecture can be set to <var>bfdarch</var>. This
  1423. option will be ignored if the input file has a known <var>bfdarch</var>. You
  1424. can access this binary data inside a program by referencing the special
  1425. symbols that are created by the conversion process. These symbols are
  1426. called _binary_<var>objfile</var>_start, _binary_<var>objfile</var>_end and
  1427. _binary_<var>objfile</var>_size. e.g. you can transform a picture file into
  1428. an object file and then access it in your code using these symbols.
  1429. </p>
  1430. </dd>
  1431. <dt><code>-j <var>sectionpattern</var></code></dt>
  1432. <dt><code>--only-section=<var>sectionpattern</var></code></dt>
  1433. <dd><p>Copy only the indicated sections from the input file to the output file.
  1434. This option may be given more than once. Note that using this option
  1435. inappropriately may make the output file unusable. Wildcard
  1436. characters are accepted in <var>sectionpattern</var>.
  1437. </p>
  1438. <p>If the first character of <var>sectionpattern</var> is the exclamation
  1439. point (!) then matching sections will not be copied, even if earlier
  1440. use of <samp>--only-section</samp> on the same command line would
  1441. otherwise copy it. For example:
  1442. </p>
  1443. <div class="example">
  1444. <pre class="example"> --only-section=.text.* --only-section=!.text.foo
  1445. </pre></div>
  1446. <p>will copy all sectinos matching &rsquo;.text.*&rsquo; but not the section
  1447. &rsquo;.text.foo&rsquo;.
  1448. </p>
  1449. </dd>
  1450. <dt><code>-R <var>sectionpattern</var></code></dt>
  1451. <dt><code>--remove-section=<var>sectionpattern</var></code></dt>
  1452. <dd><p>Remove any section matching <var>sectionpattern</var> from the output file.
  1453. This option may be given more than once. Note that using this option
  1454. inappropriately may make the output file unusable. Wildcard
  1455. characters are accepted in <var>sectionpattern</var>. Using both the
  1456. <samp>-j</samp> and <samp>-R</samp> options together results in undefined
  1457. behaviour.
  1458. </p>
  1459. <p>If the first character of <var>sectionpattern</var> is the exclamation
  1460. point (!) then matching sections will not be removed even if an
  1461. earlier use of <samp>--remove-section</samp> on the same command line
  1462. would otherwise remove it. For example:
  1463. </p>
  1464. <div class="example">
  1465. <pre class="example"> --remove-section=.text.* --remove-section=!.text.foo
  1466. </pre></div>
  1467. <p>will remove all sections matching the pattern &rsquo;.text.*&rsquo;, but will not
  1468. remove the section &rsquo;.text.foo&rsquo;.
  1469. </p>
  1470. </dd>
  1471. <dt><code>--keep-section=<var>sectionpattern</var></code></dt>
  1472. <dd><p>When removing sections from the output file, keep sections that match
  1473. <var>sectionpattern</var>.
  1474. </p>
  1475. </dd>
  1476. <dt><code>--remove-relocations=<var>sectionpattern</var></code></dt>
  1477. <dd><p>Remove non-dynamic relocations from the output file for any section
  1478. matching <var>sectionpattern</var>. This option may be given more than
  1479. once. Note that using this option inappropriately may make the output
  1480. file unusable, and attempting to remove a dynamic relocation section
  1481. such as &lsquo;<samp>.rela.plt</samp>&rsquo; from an executable or shared library with
  1482. <samp>--remove-relocations=.plt</samp> will not work. Wildcard characters
  1483. are accepted in <var>sectionpattern</var>.
  1484. For example:
  1485. </p>
  1486. <div class="example">
  1487. <pre class="example"> --remove-relocations=.text.*
  1488. </pre></div>
  1489. <p>will remove the relocations for all sections matching the pattern
  1490. &rsquo;.text.*&rsquo;.
  1491. </p>
  1492. <p>If the first character of <var>sectionpattern</var> is the exclamation
  1493. point (!) then matching sections will not have their relocation
  1494. removed even if an earlier use of <samp>--remove-relocations</samp> on the
  1495. same command line would otherwise cause the relocations to be removed.
  1496. For example:
  1497. </p>
  1498. <div class="example">
  1499. <pre class="example"> --remove-relocations=.text.* --remove-relocations=!.text.foo
  1500. </pre></div>
  1501. <p>will remove all relocations for sections matching the pattern
  1502. &rsquo;.text.*&rsquo;, but will not remove relocations for the section
  1503. &rsquo;.text.foo&rsquo;.
  1504. </p>
  1505. </dd>
  1506. <dt><code>--strip-section-headers</code></dt>
  1507. <dd><p>Strip section header This option is specific to ELF files.
  1508. Implies <samp>--strip-all</samp> and <samp>--merge-notes</samp>.
  1509. </p>
  1510. </dd>
  1511. <dt><code>-S</code></dt>
  1512. <dt><code>--strip-all</code></dt>
  1513. <dd><p>Do not copy relocation and symbol information from the source file.
  1514. Also deletes debug sections.
  1515. </p>
  1516. </dd>
  1517. <dt><code>-g</code></dt>
  1518. <dt><code>--strip-debug</code></dt>
  1519. <dd><p>Do not copy debugging symbols or sections from the source file.
  1520. </p>
  1521. </dd>
  1522. <dt><code>--strip-unneeded</code></dt>
  1523. <dd><p>Remove all symbols that are not needed for relocation processing in
  1524. addition to debugging symbols and sections stripped by
  1525. <samp>--strip-debug</samp>.
  1526. </p>
  1527. </dd>
  1528. <dt><code>-K <var>symbolname</var></code></dt>
  1529. <dt><code>--keep-symbol=<var>symbolname</var></code></dt>
  1530. <dd><p>When stripping symbols, keep symbol <var>symbolname</var> even if it would
  1531. normally be stripped. This option may be given more than once.
  1532. </p>
  1533. </dd>
  1534. <dt><code>-N <var>symbolname</var></code></dt>
  1535. <dt><code>--strip-symbol=<var>symbolname</var></code></dt>
  1536. <dd><p>Do not copy symbol <var>symbolname</var> from the source file. This option
  1537. may be given more than once.
  1538. </p>
  1539. </dd>
  1540. <dt><code>--strip-unneeded-symbol=<var>symbolname</var></code></dt>
  1541. <dd><p>Do not copy symbol <var>symbolname</var> from the source file unless it is needed
  1542. by a relocation. This option may be given more than once.
  1543. </p>
  1544. </dd>
  1545. <dt><code>-G <var>symbolname</var></code></dt>
  1546. <dt><code>--keep-global-symbol=<var>symbolname</var></code></dt>
  1547. <dd><p>Keep only symbol <var>symbolname</var> global. Make all other symbols local
  1548. to the file, so that they are not visible externally. This option may
  1549. be given more than once. Note: this option cannot be used in
  1550. conjunction with the <samp>--globalize-symbol</samp> or
  1551. <samp>--globalize-symbols</samp> options.
  1552. </p>
  1553. </dd>
  1554. <dt><code>--localize-hidden</code></dt>
  1555. <dd><p>In an ELF object, mark all symbols that have hidden or internal visibility
  1556. as local. This option applies on top of symbol-specific localization options
  1557. such as <samp>-L</samp>.
  1558. </p>
  1559. </dd>
  1560. <dt><code>-L <var>symbolname</var></code></dt>
  1561. <dt><code>--localize-symbol=<var>symbolname</var></code></dt>
  1562. <dd><p>Convert a global or weak symbol called <var>symbolname</var> into a local
  1563. symbol, so that it is not visible externally. This option may be
  1564. given more than once. Note - unique symbols are not converted.
  1565. </p>
  1566. </dd>
  1567. <dt><code>-W <var>symbolname</var></code></dt>
  1568. <dt><code>--weaken-symbol=<var>symbolname</var></code></dt>
  1569. <dd><p>Make symbol <var>symbolname</var> weak. This option may be given more than once.
  1570. </p>
  1571. </dd>
  1572. <dt><code>--globalize-symbol=<var>symbolname</var></code></dt>
  1573. <dd><p>Give symbol <var>symbolname</var> global scoping so that it is visible
  1574. outside of the file in which it is defined. This option may be given
  1575. more than once. Note: this option cannot be used in conjunction with
  1576. the <samp>-G</samp> or <samp>--keep-global-symbol</samp> options.
  1577. </p>
  1578. </dd>
  1579. <dt><code>-w</code></dt>
  1580. <dt><code>--wildcard</code></dt>
  1581. <dd><p>Permit regular expressions in <var>symbolname</var>s used in other command
  1582. line options. The question mark (?), asterisk (*), backslash (\) and
  1583. square brackets ([]) operators can be used anywhere in the symbol
  1584. name. If the first character of the symbol name is the exclamation
  1585. point (!) then the sense of the switch is reversed for that symbol.
  1586. For example:
  1587. </p>
  1588. <div class="example">
  1589. <pre class="example"> -w -W !foo -W fo*
  1590. </pre></div>
  1591. <p>would cause objcopy to weaken all symbols that start with &ldquo;fo&rdquo;
  1592. except for the symbol &ldquo;foo&rdquo;.
  1593. </p>
  1594. </dd>
  1595. <dt><code>-x</code></dt>
  1596. <dt><code>--discard-all</code></dt>
  1597. <dd><p>Do not copy non-global symbols from the source file.
  1598. </p>
  1599. </dd>
  1600. <dt><code>-X</code></dt>
  1601. <dt><code>--discard-locals</code></dt>
  1602. <dd><p>Do not copy compiler-generated local symbols.
  1603. (These usually start with &lsquo;<samp>L</samp>&rsquo; or &lsquo;<samp>.</samp>&rsquo;.)
  1604. </p>
  1605. </dd>
  1606. <dt><code>-b <var>byte</var></code></dt>
  1607. <dt><code>--byte=<var>byte</var></code></dt>
  1608. <dd><p>If interleaving has been enabled via the <samp>--interleave</samp> option
  1609. then start the range of bytes to keep at the <var>byte</var>th byte.
  1610. <var>byte</var> can be in the range from 0 to <var>breadth</var>-1, where
  1611. <var>breadth</var> is the value given by the <samp>--interleave</samp> option.
  1612. </p>
  1613. </dd>
  1614. <dt><code>-i [<var>breadth</var>]</code></dt>
  1615. <dt><code>--interleave[=<var>breadth</var>]</code></dt>
  1616. <dd><p>Only copy a range out of every <var>breadth</var> bytes. (Header data is
  1617. not affected). Select which byte in the range begins the copy with
  1618. the <samp>--byte</samp> option. Select the width of the range with the
  1619. <samp>--interleave-width</samp> option.
  1620. </p>
  1621. <p>This option is useful for creating files to program <small>ROM</small>. It is
  1622. typically used with an <code>srec</code> output target. Note that
  1623. <code>objcopy</code> will complain if you do not specify the
  1624. <samp>--byte</samp> option as well.
  1625. </p>
  1626. <p>The default interleave breadth is 4, so with <samp>--byte</samp> set to 0,
  1627. <code>objcopy</code> would copy the first byte out of every four bytes
  1628. from the input to the output.
  1629. </p>
  1630. </dd>
  1631. <dt><code>--interleave-width=<var>width</var></code></dt>
  1632. <dd><p>When used with the <samp>--interleave</samp> option, copy <var>width</var>
  1633. bytes at a time. The start of the range of bytes to be copied is set
  1634. by the <samp>--byte</samp> option, and the extent of the range is set with
  1635. the <samp>--interleave</samp> option.
  1636. </p>
  1637. <p>The default value for this option is 1. The value of <var>width</var> plus
  1638. the <var>byte</var> value set by the <samp>--byte</samp> option must not exceed
  1639. the interleave breadth set by the <samp>--interleave</samp> option.
  1640. </p>
  1641. <p>This option can be used to create images for two 16-bit flashes interleaved
  1642. in a 32-bit bus by passing <samp>-b 0 -i 4 --interleave-width=2</samp>
  1643. and <samp>-b 2 -i 4 --interleave-width=2</samp> to two <code>objcopy</code>
  1644. commands. If the input was &rsquo;12345678&rsquo; then the outputs would be
  1645. &rsquo;1256&rsquo; and &rsquo;3478&rsquo; respectively.
  1646. </p>
  1647. </dd>
  1648. <dt><code>-p</code></dt>
  1649. <dt><code>--preserve-dates</code></dt>
  1650. <dd><p>Set the access and modification dates of the output file to be the same
  1651. as those of the input file.
  1652. </p>
  1653. <p>This option also copies the date stored in a PE format file&rsquo;s header,
  1654. unless the SOURCE_DATE_EPOCH environment variable is defined. If it
  1655. is defined then this variable will be used as the date stored in the
  1656. header, interpreted as the number of seconds since the Unix epoch.
  1657. </p>
  1658. </dd>
  1659. <dt><code>-D</code></dt>
  1660. <dt><code>--enable-deterministic-archives</code></dt>
  1661. <dd><span id="index-deterministic-archives-2"></span>
  1662. <span id="index-_002d_002denable_002ddeterministic_002darchives-2"></span>
  1663. <p>Operate in <em>deterministic</em> mode. When copying archive members
  1664. and writing the archive index, use zero for UIDs, GIDs, timestamps,
  1665. and use consistent file modes for all files.
  1666. </p>
  1667. <p>If <samp>binutils</samp> was configured with
  1668. <samp>--enable-deterministic-archives</samp>, then this mode is on by default.
  1669. It can be disabled with the &lsquo;<samp>-U</samp>&rsquo; option, below.
  1670. </p>
  1671. </dd>
  1672. <dt><code>-U</code></dt>
  1673. <dt><code>--disable-deterministic-archives</code></dt>
  1674. <dd><span id="index-deterministic-archives-3"></span>
  1675. <span id="index-_002d_002denable_002ddeterministic_002darchives-3"></span>
  1676. <p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the
  1677. inverse of the <samp>-D</samp> option, above: when copying archive members
  1678. and writing the archive index, use their actual UID, GID, timestamp,
  1679. and file mode values.
  1680. </p>
  1681. <p>This is the default unless <samp>binutils</samp> was configured with
  1682. <samp>--enable-deterministic-archives</samp>.
  1683. </p>
  1684. </dd>
  1685. <dt><code>--debugging</code></dt>
  1686. <dd><p>Convert debugging information, if possible. This is not the default
  1687. because only certain debugging formats are supported, and the
  1688. conversion process can be time consuming.
  1689. </p>
  1690. </dd>
  1691. <dt><code>--gap-fill <var>val</var></code></dt>
  1692. <dd><p>Fill gaps between sections with <var>val</var>. This operation applies to
  1693. the <em>load address</em> (LMA) of the sections. It is done by increasing
  1694. the size of the section with the lower address, and filling in the extra
  1695. space created with <var>val</var>.
  1696. </p>
  1697. </dd>
  1698. <dt><code>--pad-to <var>address</var></code></dt>
  1699. <dd><p>Pad the output file up to the load address <var>address</var>. This is
  1700. done by increasing the size of the last section. The extra space is
  1701. filled in with the value specified by <samp>--gap-fill</samp> (default zero).
  1702. </p>
  1703. </dd>
  1704. <dt><code>--set-start <var>val</var></code></dt>
  1705. <dd><p>Set the start address (also known as the entry address) of the new
  1706. file to <var>val</var>. Not all object file formats support setting the
  1707. start address.
  1708. </p>
  1709. </dd>
  1710. <dt><code>--change-start <var>incr</var></code></dt>
  1711. <dt><code>--adjust-start <var>incr</var></code></dt>
  1712. <dd><span id="index-changing-start-address"></span>
  1713. <p>Change the start address (also known as the entry address) by adding
  1714. <var>incr</var>. Not all object file formats support setting the start
  1715. address.
  1716. </p>
  1717. </dd>
  1718. <dt><code>--change-addresses <var>incr</var></code></dt>
  1719. <dt><code>--adjust-vma <var>incr</var></code></dt>
  1720. <dd><span id="index-changing-object-addresses"></span>
  1721. <p>Change the VMA and LMA addresses of all sections, as well as the start
  1722. address, by adding <var>incr</var>. Some object file formats do not permit
  1723. section addresses to be changed arbitrarily. Note that this does not
  1724. relocate the sections; if the program expects sections to be loaded at a
  1725. certain address, and this option is used to change the sections such
  1726. that they are loaded at a different address, the program may fail.
  1727. </p>
  1728. </dd>
  1729. <dt><code>--change-section-address <var>sectionpattern</var>{=,+,-}<var>val</var></code></dt>
  1730. <dt><code>--adjust-section-vma <var>sectionpattern</var>{=,+,-}<var>val</var></code></dt>
  1731. <dd><span id="index-changing-section-address"></span>
  1732. <p>Set or change both the VMA address and the LMA address of any section
  1733. matching <var>sectionpattern</var>. If &lsquo;<samp>=</samp>&rsquo; is used, the section
  1734. address is set to <var>val</var>. Otherwise, <var>val</var> is added to or
  1735. subtracted from the section address. See the comments under
  1736. <samp>--change-addresses</samp>, above. If <var>sectionpattern</var> does not
  1737. match any sections in the input file, a warning will be issued, unless
  1738. <samp>--no-change-warnings</samp> is used.
  1739. </p>
  1740. </dd>
  1741. <dt><code>--change-section-lma <var>sectionpattern</var>{=,+,-}<var>val</var></code></dt>
  1742. <dd><span id="index-changing-section-LMA"></span>
  1743. <p>Set or change the LMA address of any sections matching
  1744. <var>sectionpattern</var>. The LMA address is the address where the
  1745. section will be loaded into memory at program load time. Normally
  1746. this is the same as the VMA address, which is the address of the
  1747. section at program run time, but on some systems, especially those
  1748. where a program is held in ROM, the two can be different. If &lsquo;<samp>=</samp>&rsquo;
  1749. is used, the section address is set to <var>val</var>. Otherwise,
  1750. <var>val</var> is added to or subtracted from the section address. See the
  1751. comments under <samp>--change-addresses</samp>, above. If
  1752. <var>sectionpattern</var> does not match any sections in the input file, a
  1753. warning will be issued, unless <samp>--no-change-warnings</samp> is used.
  1754. </p>
  1755. </dd>
  1756. <dt><code>--change-section-vma <var>sectionpattern</var>{=,+,-}<var>val</var></code></dt>
  1757. <dd><span id="index-changing-section-VMA"></span>
  1758. <p>Set or change the VMA address of any section matching
  1759. <var>sectionpattern</var>. The VMA address is the address where the
  1760. section will be located once the program has started executing.
  1761. Normally this is the same as the LMA address, which is the address
  1762. where the section will be loaded into memory, but on some systems,
  1763. especially those where a program is held in ROM, the two can be
  1764. different. If &lsquo;<samp>=</samp>&rsquo; is used, the section address is set to
  1765. <var>val</var>. Otherwise, <var>val</var> is added to or subtracted from the
  1766. section address. See the comments under <samp>--change-addresses</samp>,
  1767. above. If <var>sectionpattern</var> does not match any sections in the
  1768. input file, a warning will be issued, unless
  1769. <samp>--no-change-warnings</samp> is used.
  1770. </p>
  1771. </dd>
  1772. <dt><code>--change-warnings</code></dt>
  1773. <dt><code>--adjust-warnings</code></dt>
  1774. <dd><p>If <samp>--change-section-address</samp> or <samp>--change-section-lma</samp> or
  1775. <samp>--change-section-vma</samp> is used, and the section pattern does not
  1776. match any sections, issue a warning. This is the default.
  1777. </p>
  1778. </dd>
  1779. <dt><code>--no-change-warnings</code></dt>
  1780. <dt><code>--no-adjust-warnings</code></dt>
  1781. <dd><p>Do not issue a warning if <samp>--change-section-address</samp> or
  1782. <samp>--adjust-section-lma</samp> or <samp>--adjust-section-vma</samp> is used, even
  1783. if the section pattern does not match any sections.
  1784. </p>
  1785. </dd>
  1786. <dt><code>--set-section-flags <var>sectionpattern</var>=<var>flags</var></code></dt>
  1787. <dd><p>Set the flags for any sections matching <var>sectionpattern</var>. The
  1788. <var>flags</var> argument is a comma separated string of flag names. The
  1789. recognized names are &lsquo;<samp>alloc</samp>&rsquo;, &lsquo;<samp>contents</samp>&rsquo;, &lsquo;<samp>load</samp>&rsquo;,
  1790. &lsquo;<samp>noload</samp>&rsquo;, &lsquo;<samp>readonly</samp>&rsquo;, &lsquo;<samp>code</samp>&rsquo;, &lsquo;<samp>data</samp>&rsquo;, &lsquo;<samp>rom</samp>&rsquo;,
  1791. &lsquo;<samp>exclude</samp>&rsquo;, &lsquo;<samp>share</samp>&rsquo;, &lsquo;<samp>debug</samp>&rsquo;, and &lsquo;<samp>large</samp>&rsquo;.
  1792. You can set the &lsquo;<samp>contents</samp>&rsquo; flag for a section which does not have
  1793. contents, but it is not meaningful to clear the &lsquo;<samp>contents</samp>&rsquo; flag of a
  1794. section which does have contents&ndash;just remove the section instead. Not all
  1795. flags are meaningful for all object file formats. In particular the
  1796. &lsquo;<samp>share</samp>&rsquo; flag is only meaningful for COFF format files and not for ELF
  1797. format files. The ELF x86-64 specific flag &lsquo;<samp>large</samp>&rsquo; corresponds to
  1798. SHF_X86_64_LARGE.
  1799. </p>
  1800. </dd>
  1801. <dt><code>--set-section-alignment <var>sectionpattern</var>=<var>align</var></code></dt>
  1802. <dd><p>Set the alignment for any sections matching <var>sectionpattern</var>.
  1803. <var>align</var> specifies the alignment in bytes and must be a power of
  1804. two, i.e. 1, 2, 4, 8&hellip;.
  1805. </p>
  1806. </dd>
  1807. <dt><code>--add-section <var>sectionname</var>=<var>filename</var></code></dt>
  1808. <dd><p>Add a new section named <var>sectionname</var> while copying the file. The
  1809. contents of the new section are taken from the file <var>filename</var>. The
  1810. size of the section will be the size of the file. This option only
  1811. works on file formats which can support sections with arbitrary names.
  1812. Note - it may be necessary to use the <samp>--set-section-flags</samp>
  1813. option to set the attributes of the newly created section.
  1814. </p>
  1815. </dd>
  1816. <dt><code>--dump-section <var>sectionname</var>=<var>filename</var></code></dt>
  1817. <dd><p>Place the contents of section named <var>sectionname</var> into the file
  1818. <var>filename</var>, overwriting any contents that may have been there
  1819. previously. This option is the inverse of <samp>--add-section</samp>.
  1820. This option is similar to the <samp>--only-section</samp> option except
  1821. that it does not create a formatted file, it just dumps the contents
  1822. as raw binary data, without applying any relocations. The option can
  1823. be specified more than once.
  1824. </p>
  1825. </dd>
  1826. <dt><code>--update-section <var>sectionname</var>=<var>filename</var></code></dt>
  1827. <dd><p>Replace the existing contents of a section named <var>sectionname</var>
  1828. with the contents of file <var>filename</var>. The size of the section
  1829. will be adjusted to the size of the file. The section flags for
  1830. <var>sectionname</var> will be unchanged. For ELF format files the section
  1831. to segment mapping will also remain unchanged, something which is not
  1832. possible using <samp>--remove-section</samp> followed by
  1833. <samp>--add-section</samp>. The option can be specified more than once.
  1834. </p>
  1835. <p>Note - it is possible to use <samp>--rename-section</samp> and
  1836. <samp>--update-section</samp> to both update and rename a section from one
  1837. command line. In this case, pass the original section name to
  1838. <samp>--update-section</samp>, and the original and new section names to
  1839. <samp>--rename-section</samp>.
  1840. </p>
  1841. </dd>
  1842. <dt><code>--add-symbol <var>name</var>=[<var>section</var>:]<var>value</var>[,<var>flags</var>]</code></dt>
  1843. <dd><p>Add a new symbol named <var>name</var> while copying the file. This option may be
  1844. specified multiple times. If the <var>section</var> is given, the symbol will be
  1845. associated with and relative to that section, otherwise it will be an ABS
  1846. symbol. Specifying an undefined section will result in a fatal error. There
  1847. is no check for the value, it will be taken as specified. Symbol flags can
  1848. be specified and not all flags will be meaningful for all object file
  1849. formats. By default, the symbol will be global. The special flag
  1850. &rsquo;before=<var>othersym</var>&rsquo; will insert the new symbol in front of the specified
  1851. <var>othersym</var>, otherwise the symbol(s) will be added at the end of the
  1852. symbol table in the order they appear.
  1853. </p>
  1854. </dd>
  1855. <dt><code>--rename-section <var>oldname</var>=<var>newname</var>[,<var>flags</var>]</code></dt>
  1856. <dd><p>Rename a section from <var>oldname</var> to <var>newname</var>, optionally
  1857. changing the section&rsquo;s flags to <var>flags</var> in the process. This has
  1858. the advantage over using a linker script to perform the rename in that
  1859. the output stays as an object file and does not become a linked
  1860. executable. This option accepts the same set of flags as the
  1861. <samp>--set-section-flags</samp> option.
  1862. </p>
  1863. <p>This option is particularly helpful when the input format is binary,
  1864. since this will always create a section called .data. If for example,
  1865. you wanted instead to create a section called .rodata containing binary
  1866. data you could use the following command line to achieve it:
  1867. </p>
  1868. <div class="example">
  1869. <pre class="example"> objcopy -I binary -O &lt;output_format&gt; -B &lt;architecture&gt; \
  1870. --rename-section .data=.rodata,alloc,load,readonly,data,contents \
  1871. &lt;input_binary_file&gt; &lt;output_object_file&gt;
  1872. </pre></div>
  1873. </dd>
  1874. <dt><code>--long-section-names {enable,disable,keep}</code></dt>
  1875. <dd><p>Controls the handling of long section names when processing <code>COFF</code>
  1876. and <code>PE-COFF</code> object formats. The default behaviour, &lsquo;<samp>keep</samp>&rsquo;,
  1877. is to preserve long section names if any are present in the input file.
  1878. The &lsquo;<samp>enable</samp>&rsquo; and &lsquo;<samp>disable</samp>&rsquo; options forcibly enable or disable
  1879. the use of long section names in the output object; when &lsquo;<samp>disable</samp>&rsquo;
  1880. is in effect, any long section names in the input object will be truncated.
  1881. The &lsquo;<samp>enable</samp>&rsquo; option will only emit long section names if any are
  1882. present in the inputs; this is mostly the same as &lsquo;<samp>keep</samp>&rsquo;, but it
  1883. is left undefined whether the &lsquo;<samp>enable</samp>&rsquo; option might force the
  1884. creation of an empty string table in the output file.
  1885. </p>
  1886. </dd>
  1887. <dt><code>--change-leading-char</code></dt>
  1888. <dd><p>Some object file formats use special characters at the start of
  1889. symbols. The most common such character is underscore, which compilers
  1890. often add before every symbol. This option tells <code>objcopy</code> to
  1891. change the leading character of every symbol when it converts between
  1892. object file formats. If the object file formats use the same leading
  1893. character, this option has no effect. Otherwise, it will add a
  1894. character, or remove a character, or change a character, as
  1895. appropriate.
  1896. </p>
  1897. </dd>
  1898. <dt><code>--remove-leading-char</code></dt>
  1899. <dd><p>If the first character of a global symbol is a special symbol leading
  1900. character used by the object file format, remove the character. The
  1901. most common symbol leading character is underscore. This option will
  1902. remove a leading underscore from all global symbols. This can be useful
  1903. if you want to link together objects of different file formats with
  1904. different conventions for symbol names. This is different from
  1905. <samp>--change-leading-char</samp> because it always changes the symbol name
  1906. when appropriate, regardless of the object file format of the output
  1907. file.
  1908. </p>
  1909. </dd>
  1910. <dt><code>--reverse-bytes=<var>num</var></code></dt>
  1911. <dd><p>Reverse the bytes in a section with output contents. A section length must
  1912. be evenly divisible by the value given in order for the swap to be able to
  1913. take place. Reversing takes place before the interleaving is performed.
  1914. </p>
  1915. <p>This option is used typically in generating ROM images for problematic
  1916. target systems. For example, on some target boards, the 32-bit words
  1917. fetched from 8-bit ROMs are re-assembled in little-endian byte order
  1918. regardless of the CPU byte order. Depending on the programming model, the
  1919. endianness of the ROM may need to be modified.
  1920. </p>
  1921. <p>Consider a simple file with a section containing the following eight
  1922. bytes: <code>12345678</code>.
  1923. </p>
  1924. <p>Using &lsquo;<samp>--reverse-bytes=2</samp>&rsquo; for the above example, the bytes in the
  1925. output file would be ordered <code>21436587</code>.
  1926. </p>
  1927. <p>Using &lsquo;<samp>--reverse-bytes=4</samp>&rsquo; for the above example, the bytes in the
  1928. output file would be ordered <code>43218765</code>.
  1929. </p>
  1930. <p>By using &lsquo;<samp>--reverse-bytes=2</samp>&rsquo; for the above example, followed by
  1931. &lsquo;<samp>--reverse-bytes=4</samp>&rsquo; on the output file, the bytes in the second
  1932. output file would be ordered <code>34127856</code>.
  1933. </p>
  1934. </dd>
  1935. <dt><code>--srec-len=<var>ival</var></code></dt>
  1936. <dd><p>Meaningful only for srec output. Set the maximum length of the Srecords
  1937. being produced to <var>ival</var>. This length covers both address, data and
  1938. crc fields.
  1939. </p>
  1940. </dd>
  1941. <dt><code>--srec-forceS3</code></dt>
  1942. <dd><p>Meaningful only for srec output. Avoid generation of S1/S2 records,
  1943. creating S3-only record format.
  1944. </p>
  1945. </dd>
  1946. <dt><code>--redefine-sym <var>old</var>=<var>new</var></code></dt>
  1947. <dd><p>Change the name of a symbol <var>old</var>, to <var>new</var>. This can be useful
  1948. when one is trying link two things together for which you have no
  1949. source, and there are name collisions.
  1950. </p>
  1951. </dd>
  1952. <dt><code>--redefine-syms=<var>filename</var></code></dt>
  1953. <dd><p>Apply <samp>--redefine-sym</samp> to each symbol pair &quot;<var>old</var> <var>new</var>&quot;
  1954. listed in the file <var>filename</var>. <var>filename</var> is simply a flat file,
  1955. with one symbol pair per line. Line comments may be introduced by the hash
  1956. character. This option may be given more than once.
  1957. </p>
  1958. </dd>
  1959. <dt><code>--weaken</code></dt>
  1960. <dd><p>Change all global symbols in the file to be weak. This can be useful
  1961. when building an object which will be linked against other objects using
  1962. the <samp>-R</samp> option to the linker. This option is only effective when
  1963. using an object file format which supports weak symbols.
  1964. </p>
  1965. </dd>
  1966. <dt><code>--keep-symbols=<var>filename</var></code></dt>
  1967. <dd><p>Apply <samp>--keep-symbol</samp> option to each symbol listed in the file
  1968. <var>filename</var>. <var>filename</var> is simply a flat file, with one symbol
  1969. name per line. Line comments may be introduced by the hash character.
  1970. This option may be given more than once.
  1971. </p>
  1972. </dd>
  1973. <dt><code>--strip-symbols=<var>filename</var></code></dt>
  1974. <dd><p>Apply <samp>--strip-symbol</samp> option to each symbol listed in the file
  1975. <var>filename</var>. <var>filename</var> is simply a flat file, with one symbol
  1976. name per line. Line comments may be introduced by the hash character.
  1977. This option may be given more than once.
  1978. </p>
  1979. </dd>
  1980. <dt><code>--strip-unneeded-symbols=<var>filename</var></code></dt>
  1981. <dd><p>Apply <samp>--strip-unneeded-symbol</samp> option to each symbol listed in
  1982. the file <var>filename</var>. <var>filename</var> is simply a flat file, with one
  1983. symbol name per line. Line comments may be introduced by the hash
  1984. character. This option may be given more than once.
  1985. </p>
  1986. </dd>
  1987. <dt><code>--keep-global-symbols=<var>filename</var></code></dt>
  1988. <dd><p>Apply <samp>--keep-global-symbol</samp> option to each symbol listed in the
  1989. file <var>filename</var>. <var>filename</var> is simply a flat file, with one
  1990. symbol name per line. Line comments may be introduced by the hash
  1991. character. This option may be given more than once.
  1992. </p>
  1993. </dd>
  1994. <dt><code>--localize-symbols=<var>filename</var></code></dt>
  1995. <dd><p>Apply <samp>--localize-symbol</samp> option to each symbol listed in the file
  1996. <var>filename</var>. <var>filename</var> is simply a flat file, with one symbol
  1997. name per line. Line comments may be introduced by the hash character.
  1998. This option may be given more than once.
  1999. </p>
  2000. </dd>
  2001. <dt><code>--globalize-symbols=<var>filename</var></code></dt>
  2002. <dd><p>Apply <samp>--globalize-symbol</samp> option to each symbol listed in the file
  2003. <var>filename</var>. <var>filename</var> is simply a flat file, with one symbol
  2004. name per line. Line comments may be introduced by the hash character.
  2005. This option may be given more than once. Note: this option cannot be
  2006. used in conjunction with the <samp>-G</samp> or <samp>--keep-global-symbol</samp>
  2007. options.
  2008. </p>
  2009. </dd>
  2010. <dt><code>--weaken-symbols=<var>filename</var></code></dt>
  2011. <dd><p>Apply <samp>--weaken-symbol</samp> option to each symbol listed in the file
  2012. <var>filename</var>. <var>filename</var> is simply a flat file, with one symbol
  2013. name per line. Line comments may be introduced by the hash character.
  2014. This option may be given more than once.
  2015. </p>
  2016. </dd>
  2017. <dt><code>--alt-machine-code=<var>index</var></code></dt>
  2018. <dd><p>If the output architecture has alternate machine codes, use the
  2019. <var>index</var>th code instead of the default one. This is useful in case
  2020. a machine is assigned an official code and the tool-chain adopts the
  2021. new code, but other applications still depend on the original code
  2022. being used. For ELF based architectures if the <var>index</var>
  2023. alternative does not exist then the value is treated as an absolute
  2024. number to be stored in the e_machine field of the ELF header.
  2025. </p>
  2026. </dd>
  2027. <dt><code>--writable-text</code></dt>
  2028. <dd><p>Mark the output text as writable. This option isn&rsquo;t meaningful for all
  2029. object file formats.
  2030. </p>
  2031. </dd>
  2032. <dt><code>--readonly-text</code></dt>
  2033. <dd><p>Make the output text write protected. This option isn&rsquo;t meaningful for all
  2034. object file formats.
  2035. </p>
  2036. </dd>
  2037. <dt><code>--pure</code></dt>
  2038. <dd><p>Mark the output file as demand paged. This option isn&rsquo;t meaningful for all
  2039. object file formats.
  2040. </p>
  2041. </dd>
  2042. <dt><code>--impure</code></dt>
  2043. <dd><p>Mark the output file as impure. This option isn&rsquo;t meaningful for all
  2044. object file formats.
  2045. </p>
  2046. </dd>
  2047. <dt><code>--prefix-symbols=<var>string</var></code></dt>
  2048. <dd><p>Prefix all symbols in the output file with <var>string</var>.
  2049. </p>
  2050. </dd>
  2051. <dt><code>--prefix-sections=<var>string</var></code></dt>
  2052. <dd><p>Prefix all section names in the output file with <var>string</var>.
  2053. </p>
  2054. </dd>
  2055. <dt><code>--prefix-alloc-sections=<var>string</var></code></dt>
  2056. <dd><p>Prefix all the names of all allocated sections in the output file with
  2057. <var>string</var>.
  2058. </p>
  2059. </dd>
  2060. <dt><code>--add-gnu-debuglink=<var>path-to-file</var></code></dt>
  2061. <dd><p>Creates a .gnu_debuglink section which contains a reference to
  2062. <var>path-to-file</var> and adds it to the output file. Note: the file at
  2063. <var>path-to-file</var> must exist. Part of the process of adding the
  2064. .gnu_debuglink section involves embedding a checksum of the contents
  2065. of the debug info file into the section.
  2066. </p>
  2067. <p>If the debug info file is built in one location but it is going to be
  2068. installed at a later time into a different location then do not use
  2069. the path to the installed location. The <samp>--add-gnu-debuglink</samp>
  2070. option will fail because the installed file does not exist yet.
  2071. Instead put the debug info file in the current directory and use the
  2072. <samp>--add-gnu-debuglink</samp> option without any directory components,
  2073. like this:
  2074. </p>
  2075. <div class="example">
  2076. <pre class="example"> objcopy --add-gnu-debuglink=foo.debug
  2077. </pre></div>
  2078. <p>At debug time the debugger will attempt to look for the separate debug
  2079. info file in a set of known locations. The exact set of these
  2080. locations varies depending upon the distribution being used, but it
  2081. typically includes:
  2082. </p>
  2083. <dl compact="compact">
  2084. <dt><code>* The same directory as the executable.</code></dt>
  2085. <dt><code>* A sub-directory of the directory containing the executable</code></dt>
  2086. <dd><p>called .debug
  2087. </p>
  2088. </dd>
  2089. <dt><code>* A global debug directory such as /usr/lib/debug.</code></dt>
  2090. </dl>
  2091. <p>As long as the debug info file has been installed into one of these
  2092. locations before the debugger is run everything should work
  2093. correctly.
  2094. </p>
  2095. </dd>
  2096. <dt><code>--keep-section-symbils</code></dt>
  2097. <dd><p>When stripping a file, perhaps with <samp>--strip-debug</samp> or
  2098. <samp>--strip-unneeded</samp>, retain any symbols specifying section names,
  2099. which would otherwise get stripped.
  2100. </p>
  2101. </dd>
  2102. <dt><code>--keep-file-symbols</code></dt>
  2103. <dd><p>When stripping a file, perhaps with <samp>--strip-debug</samp> or
  2104. <samp>--strip-unneeded</samp>, retain any symbols specifying source file names,
  2105. which would otherwise get stripped.
  2106. </p>
  2107. </dd>
  2108. <dt><code>--only-keep-debug</code></dt>
  2109. <dd><p>Strip a file, removing contents of any sections that would not be
  2110. stripped by <samp>--strip-debug</samp> and leaving the debugging sections
  2111. intact. In ELF files, this preserves all note sections in the output.
  2112. </p>
  2113. <p>Note - the section headers of the stripped sections are preserved,
  2114. including their sizes, but the contents of the section are discarded.
  2115. The section headers are preserved so that other tools can match up the
  2116. debuginfo file with the real executable, even if that executable has
  2117. been relocated to a different address space.
  2118. </p>
  2119. <p>The intention is that this option will be used in conjunction with
  2120. <samp>--add-gnu-debuglink</samp> to create a two part executable. One a
  2121. stripped binary which will occupy less space in RAM and in a
  2122. distribution and the second a debugging information file which is only
  2123. needed if debugging abilities are required. The suggested procedure
  2124. to create these files is as follows:
  2125. </p>
  2126. <ol>
  2127. <li> Link the executable as normal. Assuming that it is called
  2128. <code>foo</code> then...
  2129. </li><li> Run <code>objcopy --only-keep-debug foo foo.dbg</code> to
  2130. create a file containing the debugging info.
  2131. </li><li> Run <code>objcopy --strip-debug foo</code> to create a
  2132. stripped executable.
  2133. </li><li> Run <code>objcopy --add-gnu-debuglink=foo.dbg foo</code>
  2134. to add a link to the debugging info into the stripped executable.
  2135. </li></ol>
  2136. <p>Note&mdash;the choice of <code>.dbg</code> as an extension for the debug info
  2137. file is arbitrary. Also the <code>--only-keep-debug</code> step is
  2138. optional. You could instead do this:
  2139. </p>
  2140. <ol>
  2141. <li> Link the executable as normal.
  2142. </li><li> Copy <code>foo</code> to <code>foo.full</code>
  2143. </li><li> Run <code>objcopy --strip-debug foo</code>
  2144. </li><li> Run <code>objcopy --add-gnu-debuglink=foo.full foo</code>
  2145. </li></ol>
  2146. <p>i.e., the file pointed to by the <samp>--add-gnu-debuglink</samp> can be the
  2147. full executable. It does not have to be a file created by the
  2148. <samp>--only-keep-debug</samp> switch.
  2149. </p>
  2150. <p>Note&mdash;this switch is only intended for use on fully linked files. It
  2151. does not make sense to use it on object files where the debugging
  2152. information may be incomplete. Besides the gnu_debuglink feature
  2153. currently only supports the presence of one filename containing
  2154. debugging information, not multiple filenames on a one-per-object-file
  2155. basis.
  2156. </p>
  2157. </dd>
  2158. <dt><code>--strip-dwo</code></dt>
  2159. <dd><p>Remove the contents of all DWARF .dwo sections, leaving the
  2160. remaining debugging sections and all symbols intact.
  2161. This option is intended for use by the compiler as part of
  2162. the <samp>-gsplit-dwarf</samp> option, which splits debug information
  2163. between the .o file and a separate .dwo file. The compiler
  2164. generates all debug information in the same file, then uses
  2165. the <samp>--extract-dwo</samp> option to copy the .dwo sections to
  2166. the .dwo file, then the <samp>--strip-dwo</samp> option to remove
  2167. those sections from the original .o file.
  2168. </p>
  2169. </dd>
  2170. <dt><code>--extract-dwo</code></dt>
  2171. <dd><p>Extract the contents of all DWARF .dwo sections. See the
  2172. <samp>--strip-dwo</samp> option for more information.
  2173. </p>
  2174. </dd>
  2175. <dt><code>--file-alignment <var>num</var></code></dt>
  2176. <dd><p>Specify the file alignment. Sections in the file will always begin at
  2177. file offsets which are multiples of this number. This defaults to
  2178. 512.
  2179. [This option is specific to PE targets.]
  2180. </p>
  2181. </dd>
  2182. <dt><code>--heap <var>reserve</var></code></dt>
  2183. <dt><code>--heap <var>reserve</var>,<var>commit</var></code></dt>
  2184. <dd><p>Specify the number of bytes of memory to reserve (and optionally commit)
  2185. to be used as heap for this program.
  2186. [This option is specific to PE targets.]
  2187. </p>
  2188. </dd>
  2189. <dt><code>--image-base <var>value</var></code></dt>
  2190. <dd><p>Use <var>value</var> as the base address of your program or dll. This is
  2191. the lowest memory location that will be used when your program or dll
  2192. is loaded. To reduce the need to relocate and improve performance of
  2193. your dlls, each should have a unique base address and not overlap any
  2194. other dlls. The default is 0x400000 for executables, and 0x10000000
  2195. for dlls.
  2196. [This option is specific to PE targets.]
  2197. </p>
  2198. </dd>
  2199. <dt><code>--section-alignment <var>num</var></code></dt>
  2200. <dd><p>Sets the section alignment field in the PE header. Sections in memory
  2201. will always begin at addresses which are a multiple of this number.
  2202. Defaults to 0x1000.
  2203. [This option is specific to PE targets.]
  2204. </p>
  2205. </dd>
  2206. <dt><code>--stack <var>reserve</var></code></dt>
  2207. <dt><code>--stack <var>reserve</var>,<var>commit</var></code></dt>
  2208. <dd><p>Specify the number of bytes of memory to reserve (and optionally commit)
  2209. to be used as stack for this program.
  2210. [This option is specific to PE targets.]
  2211. </p>
  2212. </dd>
  2213. <dt><code>--subsystem <var>which</var></code></dt>
  2214. <dt><code>--subsystem <var>which</var>:<var>major</var></code></dt>
  2215. <dt><code>--subsystem <var>which</var>:<var>major</var>.<var>minor</var></code></dt>
  2216. <dd><p>Specifies the subsystem under which your program will execute. The
  2217. legal values for <var>which</var> are <code>native</code>, <code>windows</code>,
  2218. <code>console</code>, <code>posix</code>, <code>efi-app</code>, <code>efi-bsd</code>,
  2219. <code>efi-rtd</code>, <code>sal-rtd</code>, and <code>xbox</code>. You may optionally set
  2220. the subsystem version also. Numeric values are also accepted for
  2221. <var>which</var>.
  2222. [This option is specific to PE targets.]
  2223. </p>
  2224. </dd>
  2225. <dt><code>--extract-symbol</code></dt>
  2226. <dd><p>Keep the file&rsquo;s section flags and symbols but remove all section data.
  2227. Specifically, the option:
  2228. </p>
  2229. <ul>
  2230. <li> removes the contents of all sections;
  2231. </li><li> sets the size of every section to zero; and
  2232. </li><li> sets the file&rsquo;s start address to zero.
  2233. </li></ul>
  2234. <p>This option is used to build a <samp>.sym</samp> file for a VxWorks kernel.
  2235. It can also be a useful way of reducing the size of a <samp>--just-symbols</samp>
  2236. linker input file.
  2237. </p>
  2238. </dd>
  2239. <dt><code>--compress-debug-sections</code></dt>
  2240. <dd><p>Compress DWARF debug sections using zlib with SHF_COMPRESSED from the
  2241. ELF ABI. Note - if compression would actually make a section
  2242. <em>larger</em>, then it is not compressed.
  2243. </p>
  2244. </dd>
  2245. <dt><code>--compress-debug-sections=none</code></dt>
  2246. <dt><code>--compress-debug-sections=zlib</code></dt>
  2247. <dt><code>--compress-debug-sections=zlib-gnu</code></dt>
  2248. <dt><code>--compress-debug-sections=zlib-gabi</code></dt>
  2249. <dt><code>--compress-debug-sections=zstd</code></dt>
  2250. <dd><p>For ELF files, these options control how DWARF debug sections are
  2251. compressed. <samp>--compress-debug-sections=none</samp> is equivalent
  2252. to <samp>--decompress-debug-sections</samp>.
  2253. <samp>--compress-debug-sections=zlib</samp> and
  2254. <samp>--compress-debug-sections=zlib-gabi</samp> are equivalent to
  2255. <samp>--compress-debug-sections</samp>.
  2256. <samp>--compress-debug-sections=zlib-gnu</samp> compresses DWARF debug sections
  2257. using the obsoleted zlib-gnu format. The debug sections are renamed to begin
  2258. with &lsquo;<samp>.zdebug</samp>&rsquo;.
  2259. <samp>--compress-debug-sections=zstd</samp> compresses DWARF debug
  2260. sections using zstd. Note - if compression would actually make a section
  2261. <em>larger</em>, then it is not compressed nor renamed.
  2262. </p>
  2263. </dd>
  2264. <dt><code>--decompress-debug-sections</code></dt>
  2265. <dd><p>Decompress DWARF debug sections. For a &lsquo;<samp>.zdebug</samp>&rsquo; section, the original
  2266. name is restored.
  2267. </p>
  2268. </dd>
  2269. <dt><code>--elf-stt-common=yes</code></dt>
  2270. <dt><code>--elf-stt-common=no</code></dt>
  2271. <dd><p>For ELF files, these options control whether common symbols should be
  2272. converted to the <code>STT_COMMON</code> or <code>STT_OBJECT</code> type.
  2273. <samp>--elf-stt-common=yes</samp> converts common symbol type to
  2274. <code>STT_COMMON</code>. <samp>--elf-stt-common=no</samp> converts common symbol
  2275. type to <code>STT_OBJECT</code>.
  2276. </p>
  2277. </dd>
  2278. <dt><code>--merge-notes</code></dt>
  2279. <dt><code>--no-merge-notes</code></dt>
  2280. <dd><p>For ELF files, attempt (or do not attempt) to reduce the size of any
  2281. SHT_NOTE type sections by removing duplicate notes.
  2282. </p>
  2283. </dd>
  2284. <dt><code>-V</code></dt>
  2285. <dt><code>--version</code></dt>
  2286. <dd><p>Show the version number of <code>objcopy</code>.
  2287. </p>
  2288. </dd>
  2289. <dt><code>--verilog-data-width=<var>bytes</var></code></dt>
  2290. <dd><p>For Verilog output, this options controls the number of bytes
  2291. converted for each output data element. The input target controls the
  2292. endianness of the conversion.
  2293. </p>
  2294. </dd>
  2295. <dt><code>-v</code></dt>
  2296. <dt><code>--verbose</code></dt>
  2297. <dd><p>Verbose output: list all object files modified. In the case of
  2298. archives, &lsquo;<samp>objcopy -V</samp>&rsquo; lists all members of the archive.
  2299. </p>
  2300. </dd>
  2301. <dt><code>--help</code></dt>
  2302. <dd><p>Show a summary of the options to <code>objcopy</code>.
  2303. </p>
  2304. </dd>
  2305. <dt><code>--info</code></dt>
  2306. <dd><p>Display a list showing all architectures and object formats available.
  2307. </p></dd>
  2308. </dl>
  2309. <hr>
  2310. <span id="objdump"></span><div class="header">
  2311. <p>
  2312. Next: <a href="#ranlib" accesskey="n" rel="next">ranlib</a>, Previous: <a href="#objcopy" accesskey="p" rel="prev">objcopy</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  2313. </div>
  2314. <span id="objdump-1"></span><h2 class="chapter">4 objdump</h2>
  2315. <span id="index-object-file-information"></span>
  2316. <span id="index-objdump"></span>
  2317. <div class="example">
  2318. <pre class="example">objdump [<samp>-a</samp>|<samp>--archive-headers</samp>]
  2319. [<samp>-b</samp> <var>bfdname</var>|<samp>--target=<var>bfdname</var></samp>]
  2320. [<samp>-C</samp>|<samp>--demangle</samp>[=<var>style</var>] ]
  2321. [<samp>-d</samp>|<samp>--disassemble</samp>[=<var>symbol</var>]]
  2322. [<samp>-D</samp>|<samp>--disassemble-all</samp>]
  2323. [<samp>-z</samp>|<samp>--disassemble-zeroes</samp>]
  2324. [<samp>-EB</samp>|<samp>-EL</samp>|<samp>--endian=</samp>{big | little }]
  2325. [<samp>-f</samp>|<samp>--file-headers</samp>]
  2326. [<samp>-F</samp>|<samp>--file-offsets</samp>]
  2327. [<samp>--file-start-context</samp>]
  2328. [<samp>-g</samp>|<samp>--debugging</samp>]
  2329. [<samp>-e</samp>|<samp>--debugging-tags</samp>]
  2330. [<samp>-h</samp>|<samp>--section-headers</samp>|<samp>--headers</samp>]
  2331. [<samp>-i</samp>|<samp>--info</samp>]
  2332. [<samp>-j</samp> <var>section</var>|<samp>--section=</samp><var>section</var>]
  2333. [<samp>-l</samp>|<samp>--line-numbers</samp>]
  2334. [<samp>-S</samp>|<samp>--source</samp>]
  2335. [<samp>--source-comment</samp>[=<var>text</var>]]
  2336. [<samp>-m</samp> <var>machine</var>|<samp>--architecture=</samp><var>machine</var>]
  2337. [<samp>-M</samp> <var>options</var>|<samp>--disassembler-options=</samp><var>options</var>]
  2338. [<samp>-p</samp>|<samp>--private-headers</samp>]
  2339. [<samp>-P</samp> <var>options</var>|<samp>--private=</samp><var>options</var>]
  2340. [<samp>-r</samp>|<samp>--reloc</samp>]
  2341. [<samp>-R</samp>|<samp>--dynamic-reloc</samp>]
  2342. [<samp>-s</samp>|<samp>--full-contents</samp>]
  2343. [<samp>-Z</samp>|<samp>--decompress</samp>]
  2344. [<samp>-W[lLiaprmfFsoORtUuTgAck]</samp>|
  2345. <samp>--dwarf</samp>[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
  2346. [<samp>-WK</samp>|<samp>--dwarf=follow-links</samp>]
  2347. [<samp>-WN</samp>|<samp>--dwarf=no-follow-links</samp>]
  2348. [<samp>-wD</samp>|<samp>--dwarf=use-debuginfod</samp>]
  2349. [<samp>-wE</samp>|<samp>--dwarf=do-not-use-debuginfod</samp>]
  2350. [<samp>-L</samp>|<samp>--process-links</samp>]
  2351. [<samp>--ctf=</samp><var>section</var>]
  2352. [<samp>--sframe=</samp><var>section</var>]
  2353. [<samp>-G</samp>|<samp>--stabs</samp>]
  2354. [<samp>-t</samp>|<samp>--syms</samp>]
  2355. [<samp>-T</samp>|<samp>--dynamic-syms</samp>]
  2356. [<samp>-x</samp>|<samp>--all-headers</samp>]
  2357. [<samp>-w</samp>|<samp>--wide</samp>]
  2358. [<samp>--start-address=</samp><var>address</var>]
  2359. [<samp>--stop-address=</samp><var>address</var>]
  2360. [<samp>--no-addresses</samp>]
  2361. [<samp>--prefix-addresses</samp>]
  2362. [<samp>--[no-]show-raw-insn</samp>]
  2363. [<samp>--adjust-vma=</samp><var>offset</var>]
  2364. [<samp>--show-all-symbols</samp>]
  2365. [<samp>--dwarf-depth=<var>n</var></samp>]
  2366. [<samp>--dwarf-start=<var>n</var></samp>]
  2367. [<samp>--ctf-parent=</samp><var>section</var>]
  2368. [<samp>--no-recurse-limit</samp>|<samp>--recurse-limit</samp>]
  2369. [<samp>--special-syms</samp>]
  2370. [<samp>--prefix=</samp><var>prefix</var>]
  2371. [<samp>--prefix-strip=</samp><var>level</var>]
  2372. [<samp>--insn-width=</samp><var>width</var>]
  2373. [<samp>--visualize-jumps[=color|=extended-color|=off]</samp>
  2374. [<samp>--disassembler-color=[off|terminal|on|extended]</samp>
  2375. [<samp>-U</samp> <var>method</var>] [<samp>--unicode=</samp><var>method</var>]
  2376. [<samp>-V</samp>|<samp>--version</samp>]
  2377. [<samp>-H</samp>|<samp>--help</samp>]
  2378. <var>objfile</var>&hellip;
  2379. </pre></div>
  2380. <p><code>objdump</code> displays information about one or more object files.
  2381. The options control what particular information to display. This
  2382. information is mostly useful to programmers who are working on the
  2383. compilation tools, as opposed to programmers who just want their
  2384. program to compile and work.
  2385. </p>
  2386. <p><var>objfile</var>&hellip; are the object files to be examined. When you
  2387. specify archives, <code>objdump</code> shows information on each of the member
  2388. object files.
  2389. </p>
  2390. <p>The long and short forms of options, shown here as alternatives, are
  2391. equivalent. At least one option from the list
  2392. <samp>-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-P,-r,-R,-s,-S,-t,-T,-V,-x</samp> must be given.
  2393. </p>
  2394. <dl compact="compact">
  2395. <dt><code>-a</code></dt>
  2396. <dt><code>--archive-header</code></dt>
  2397. <dd><span id="index-archive-headers"></span>
  2398. <p>If any of the <var>objfile</var> files are archives, display the archive
  2399. header information (in a format similar to &lsquo;<samp>ls -l</samp>&rsquo;). Besides the
  2400. information you could list with &lsquo;<samp>ar tv</samp>&rsquo;, &lsquo;<samp>objdump -a</samp>&rsquo; shows
  2401. the object file format of each archive member.
  2402. </p>
  2403. </dd>
  2404. <dt><code>--adjust-vma=<var>offset</var></code></dt>
  2405. <dd><span id="index-section-addresses-in-objdump"></span>
  2406. <span id="index-VMA-in-objdump"></span>
  2407. <p>When dumping information, first add <var>offset</var> to all the section
  2408. addresses. This is useful if the section addresses do not correspond to
  2409. the symbol table, which can happen when putting sections at particular
  2410. addresses when using a format which can not represent section addresses,
  2411. such as a.out.
  2412. </p>
  2413. </dd>
  2414. <dt><code>-b <var>bfdname</var></code></dt>
  2415. <dt><code>--target=<var>bfdname</var></code></dt>
  2416. <dd><span id="index-object-code-format-1"></span>
  2417. <p>Specify that the object-code format for the object files is
  2418. <var>bfdname</var>. This option may not be necessary; <var>objdump</var> can
  2419. automatically recognize many formats.
  2420. </p>
  2421. <p>For example,
  2422. </p><div class="example">
  2423. <pre class="example">objdump -b oasys -m vax -h fu.o
  2424. </pre></div>
  2425. <p>displays summary information from the section headers (<samp>-h</samp>) of
  2426. <samp>fu.o</samp>, which is explicitly identified (<samp>-m</samp>) as a VAX object
  2427. file in the format produced by Oasys compilers. You can list the
  2428. formats available with the <samp>-i</samp> option.
  2429. See <a href="#Target-Selection">Target Selection</a>, for more information.
  2430. </p>
  2431. </dd>
  2432. <dt><code>-C</code></dt>
  2433. <dt><code>--demangle[=<var>style</var>]</code></dt>
  2434. <dd><span id="index-demangling-in-objdump"></span>
  2435. <p>Decode (<em>demangle</em>) low-level symbol names into user-level names.
  2436. Besides removing any initial underscore prepended by the system, this
  2437. makes C++ function names readable. Different compilers have different
  2438. mangling styles. The optional demangling style argument can be used to
  2439. choose an appropriate demangling style for your compiler. See <a href="#c_002b_002bfilt">c++filt</a>,
  2440. for more information on demangling.
  2441. </p>
  2442. </dd>
  2443. <dt><code>--recurse-limit</code></dt>
  2444. <dt><code>--no-recurse-limit</code></dt>
  2445. <dt><code>--recursion-limit</code></dt>
  2446. <dt><code>--no-recursion-limit</code></dt>
  2447. <dd><p>Enables or disables a limit on the amount of recursion performed
  2448. whilst demangling strings. Since the name mangling formats allow for
  2449. an infinite level of recursion it is possible to create strings whose
  2450. decoding will exhaust the amount of stack space available on the host
  2451. machine, triggering a memory fault. The limit tries to prevent this
  2452. from happening by restricting recursion to 2048 levels of nesting.
  2453. </p>
  2454. <p>The default is for this limit to be enabled, but disabling it may be
  2455. necessary in order to demangle truly complicated names. Note however
  2456. that if the recursion limit is disabled then stack exhaustion is
  2457. possible and any bug reports about such an event will be rejected.
  2458. </p>
  2459. </dd>
  2460. <dt><code>-g</code></dt>
  2461. <dt><code>--debugging</code></dt>
  2462. <dd><p>Display debugging information. This attempts to parse STABS
  2463. debugging format information stored in the file and print it out using
  2464. a C like syntax. If no STABS debugging was found this option
  2465. falls back on the <samp>-W</samp> option to print any DWARF information in
  2466. the file.
  2467. </p>
  2468. </dd>
  2469. <dt><code>-e</code></dt>
  2470. <dt><code>--debugging-tags</code></dt>
  2471. <dd><p>Like <samp>-g</samp>, but the information is generated in a format compatible
  2472. with ctags tool.
  2473. </p>
  2474. </dd>
  2475. <dt><code>-d</code></dt>
  2476. <dt><code>--disassemble</code></dt>
  2477. <dt><code>--disassemble=<var>symbol</var></code></dt>
  2478. <dd><span id="index-disassembling-object-code"></span>
  2479. <span id="index-machine-instructions"></span>
  2480. <p>Display the assembler mnemonics for the machine instructions from the
  2481. input file. This option only disassembles those sections which are
  2482. expected to contain instructions. If the optional <var>symbol</var>
  2483. argument is given, then display the assembler mnemonics starting at
  2484. <var>symbol</var>. If <var>symbol</var> is a function name then disassembly
  2485. will stop at the end of the function, otherwise it will stop when the
  2486. next symbol is encountered. If there are no matches for <var>symbol</var>
  2487. then nothing will be displayed.
  2488. </p>
  2489. <p>Note if the <samp>--dwarf=follow-links</samp> option is enabled
  2490. then any symbol tables in linked debug info files will be read in and
  2491. used when disassembling.
  2492. </p>
  2493. </dd>
  2494. <dt><code>-D</code></dt>
  2495. <dt><code>--disassemble-all</code></dt>
  2496. <dd><p>Like <samp>-d</samp>, but disassemble the contents of all non-empty
  2497. non-bss sections, not just those expected to contain instructions.
  2498. <samp>-j</samp> may be used to select specific sections.
  2499. </p>
  2500. <p>This option also has a subtle effect on the disassembly of
  2501. instructions in code sections. When option <samp>-d</samp> is in effect
  2502. objdump will assume that any symbols present in a code section occur
  2503. on the boundary between instructions and it will refuse to disassemble
  2504. across such a boundary. When option <samp>-D</samp> is in effect however
  2505. this assumption is supressed. This means that it is possible for the
  2506. output of <samp>-d</samp> and <samp>-D</samp> to differ if, for example, data
  2507. is stored in code sections.
  2508. </p>
  2509. <p>If the target is an ARM architecture this switch also has the effect
  2510. of forcing the disassembler to decode pieces of data found in code
  2511. sections as if they were instructions.
  2512. </p>
  2513. <p>Note if the <samp>--dwarf=follow-links</samp> option is enabled
  2514. then any symbol tables in linked debug info files will be read in and
  2515. used when disassembling.
  2516. </p>
  2517. </dd>
  2518. <dt><code>--no-addresses</code></dt>
  2519. <dd><p>When disassembling, don&rsquo;t print addresses on each line or for symbols
  2520. and relocation offsets. In combination with <samp>--no-show-raw-insn</samp>
  2521. this may be useful for comparing compiler output.
  2522. </p>
  2523. </dd>
  2524. <dt><code>--prefix-addresses</code></dt>
  2525. <dd><p>When disassembling, print the complete address on each line. This is
  2526. the older disassembly format.
  2527. </p>
  2528. </dd>
  2529. <dt><code>-EB</code></dt>
  2530. <dt><code>-EL</code></dt>
  2531. <dt><code>--endian={big|little}</code></dt>
  2532. <dd><span id="index-endianness"></span>
  2533. <span id="index-disassembly-endianness"></span>
  2534. <p>Specify the endianness of the object files. This only affects
  2535. disassembly. This can be useful when disassembling a file format which
  2536. does not describe endianness information, such as S-records.
  2537. </p>
  2538. </dd>
  2539. <dt><code>-f</code></dt>
  2540. <dt><code>--file-headers</code></dt>
  2541. <dd><span id="index-object-file-header"></span>
  2542. <p>Display summary information from the overall header of
  2543. each of the <var>objfile</var> files.
  2544. </p>
  2545. </dd>
  2546. <dt><code>-F</code></dt>
  2547. <dt><code>--file-offsets</code></dt>
  2548. <dd><span id="index-object-file-offsets"></span>
  2549. <p>When disassembling sections, whenever a symbol is displayed, also
  2550. display the file offset of the region of data that is about to be
  2551. dumped. If zeroes are being skipped, then when disassembly resumes,
  2552. tell the user how many zeroes were skipped and the file offset of the
  2553. location from where the disassembly resumes. When dumping sections,
  2554. display the file offset of the location from where the dump starts.
  2555. </p>
  2556. </dd>
  2557. <dt><code>--file-start-context</code></dt>
  2558. <dd><span id="index-source-code-context"></span>
  2559. <p>Specify that when displaying interlisted source code/disassembly
  2560. (assumes <samp>-S</samp>) from a file that has not yet been displayed, extend the
  2561. context to the start of the file.
  2562. </p>
  2563. </dd>
  2564. <dt><code>-h</code></dt>
  2565. <dt><code>--section-headers</code></dt>
  2566. <dt><code>--headers</code></dt>
  2567. <dd><span id="index-section-headers"></span>
  2568. <p>Display summary information from the section headers of the
  2569. object file.
  2570. </p>
  2571. <p>File segments may be relocated to nonstandard addresses, for example by
  2572. using the <samp>-Ttext</samp>, <samp>-Tdata</samp>, or <samp>-Tbss</samp> options to
  2573. <code>ld</code>. However, some object file formats, such as a.out, do not
  2574. store the starting address of the file segments. In those situations,
  2575. although <code>ld</code> relocates the sections correctly, using &lsquo;<samp>objdump
  2576. -h</samp>&rsquo; to list the file section headers cannot show the correct addresses.
  2577. Instead, it shows the usual addresses, which are implicit for the
  2578. target.
  2579. </p>
  2580. <p>Note, in some cases it is possible for a section to have both the
  2581. READONLY and the NOREAD attributes set. In such cases the NOREAD
  2582. attribute takes precedence, but <code>objdump</code> will report both
  2583. since the exact setting of the flag bits might be important.
  2584. </p>
  2585. </dd>
  2586. <dt><code>-H</code></dt>
  2587. <dt><code>--help</code></dt>
  2588. <dd><p>Print a summary of the options to <code>objdump</code> and exit.
  2589. </p>
  2590. </dd>
  2591. <dt><code>-i</code></dt>
  2592. <dt><code>--info</code></dt>
  2593. <dd><span id="index-architectures-available"></span>
  2594. <span id="index-object-formats-available"></span>
  2595. <p>Display a list showing all architectures and object formats available
  2596. for specification with <samp>-b</samp> or <samp>-m</samp>.
  2597. </p>
  2598. </dd>
  2599. <dt><code>-j <var>name</var></code></dt>
  2600. <dt><code>--section=<var>name</var></code></dt>
  2601. <dd><span id="index-section-information"></span>
  2602. <p>Display information for section <var>name</var>. This option may be
  2603. specified multiple times.
  2604. </p>
  2605. </dd>
  2606. <dt><code>-L</code></dt>
  2607. <dt><code>--process-links</code></dt>
  2608. <dd><p>Display the contents of non-debug sections found in separate debuginfo
  2609. files that are linked to the main file. This option automatically
  2610. implies the <samp>-WK</samp> option, and only sections requested by other
  2611. command line options will be displayed.
  2612. </p>
  2613. </dd>
  2614. <dt><code>-l</code></dt>
  2615. <dt><code>--line-numbers</code></dt>
  2616. <dd><span id="index-source-filenames-for-object-files"></span>
  2617. <p>Label the display (using debugging information) with the filename and
  2618. source line numbers corresponding to the object code or relocs shown.
  2619. Only useful with <samp>-d</samp>, <samp>-D</samp>, or <samp>-r</samp>.
  2620. </p>
  2621. </dd>
  2622. <dt><code>-m <var>machine</var></code></dt>
  2623. <dt><code>--architecture=<var>machine</var></code></dt>
  2624. <dd><span id="index-architecture"></span>
  2625. <span id="index-disassembly-architecture"></span>
  2626. <p>Specify the architecture to use when disassembling object files. This
  2627. can be useful when disassembling object files which do not describe
  2628. architecture information, such as S-records. You can list the available
  2629. architectures with the <samp>-i</samp> option.
  2630. </p>
  2631. <p>For most architectures it is possible to supply an architecture
  2632. name and a machine name, separated by a colon. For example
  2633. &lsquo;<samp>foo:bar</samp>&rsquo; would refer to the &lsquo;<samp>bar</samp>&rsquo; machine type in the
  2634. &lsquo;<samp>foo</samp>&rsquo; architecture. This can be helpful if objdump has been
  2635. configured to support multiple architectures.
  2636. </p>
  2637. <p>If the target is an ARM architecture then this switch has an
  2638. additional effect. It restricts the disassembly to only those
  2639. instructions supported by the architecture specified by <var>machine</var>.
  2640. If it is necessary to use this switch because the input file does not
  2641. contain any architecture information, but it is also desired to
  2642. disassemble all the instructions use <samp>-marm</samp>.
  2643. </p>
  2644. </dd>
  2645. <dt><code>-M <var>options</var></code></dt>
  2646. <dt><code>--disassembler-options=<var>options</var></code></dt>
  2647. <dd><p>Pass target specific information to the disassembler. Only supported on
  2648. some targets. If it is necessary to specify more than one
  2649. disassembler option then multiple <samp>-M</samp> options can be used or
  2650. can be placed together into a comma separated list.
  2651. </p>
  2652. <p>For ARC, <samp>dsp</samp> controls the printing of DSP instructions,
  2653. <samp>spfp</samp> selects the printing of FPX single precision FP
  2654. instructions, <samp>dpfp</samp> selects the printing of FPX double
  2655. precision FP instructions, <samp>quarkse_em</samp> selects the printing of
  2656. special QuarkSE-EM instructions, <samp>fpuda</samp> selects the printing
  2657. of double precision assist instructions, <samp>fpus</samp> selects the
  2658. printing of FPU single precision FP instructions, while <samp>fpud</samp>
  2659. selects the printing of FPU double precision FP instructions.
  2660. Additionally, one can choose to have all the immediates printed in
  2661. hexadecimal using <samp>hex</samp>. By default, the short immediates are
  2662. printed using the decimal representation, while the long immediate
  2663. values are printed as hexadecimal.
  2664. </p>
  2665. <p><samp>cpu=...</samp> allows one to enforce a particular ISA when disassembling
  2666. instructions, overriding the <samp>-m</samp> value or whatever is in the ELF file.
  2667. This might be useful to select ARC EM or HS ISA, because architecture is same
  2668. for those and disassembler relies on private ELF header data to decide if code
  2669. is for EM or HS. This option might be specified multiple times - only the
  2670. latest value will be used. Valid values are same as for the assembler
  2671. <samp>-mcpu=...</samp> option.
  2672. </p>
  2673. <p>If the target is an ARM architecture then this switch can be used to
  2674. select which register name set is used during disassembler. Specifying
  2675. <samp>-M reg-names-std</samp> (the default) will select the register names as
  2676. used in ARM&rsquo;s instruction set documentation, but with register 13 called
  2677. &rsquo;sp&rsquo;, register 14 called &rsquo;lr&rsquo; and register 15 called &rsquo;pc&rsquo;. Specifying
  2678. <samp>-M reg-names-apcs</samp> will select the name set used by the ARM
  2679. Procedure Call Standard, whilst specifying <samp>-M reg-names-raw</samp> will
  2680. just use &lsquo;<samp>r</samp>&rsquo; followed by the register number.
  2681. </p>
  2682. <p>There are also two variants on the APCS register naming scheme enabled
  2683. by <samp>-M reg-names-atpcs</samp> and <samp>-M reg-names-special-atpcs</samp> which
  2684. use the ARM/Thumb Procedure Call Standard naming conventions. (Either
  2685. with the normal register names or the special register names).
  2686. </p>
  2687. <p>This option can also be used for ARM architectures to force the
  2688. disassembler to interpret all instructions as Thumb instructions by
  2689. using the switch <samp>--disassembler-options=force-thumb</samp>. This can be
  2690. useful when attempting to disassemble thumb code produced by other
  2691. compilers.
  2692. </p>
  2693. <p>For AArch64 targets this switch can be used to set whether instructions are
  2694. disassembled as the most general instruction using the <samp>-M no-aliases</samp>
  2695. option or whether instruction notes should be generated as comments in the
  2696. disasssembly using <samp>-M notes</samp>.
  2697. </p>
  2698. <p>For the x86, some of the options duplicate functions of the <samp>-m</samp>
  2699. switch, but allow finer grained control.
  2700. </p><dl compact="compact">
  2701. <dt><code>x86-64</code></dt>
  2702. <dt><code>i386</code></dt>
  2703. <dt><code>i8086</code></dt>
  2704. <dd><p>Select disassembly for the given architecture.
  2705. </p>
  2706. </dd>
  2707. <dt><code>intel</code></dt>
  2708. <dt><code>att</code></dt>
  2709. <dd><p>Select between intel syntax mode and AT&amp;T syntax mode.
  2710. </p>
  2711. </dd>
  2712. <dt><code>amd64</code></dt>
  2713. <dt><code>intel64</code></dt>
  2714. <dd><p>Select between AMD64 ISA and Intel64 ISA.
  2715. </p>
  2716. </dd>
  2717. <dt><code>intel-mnemonic</code></dt>
  2718. <dt><code>att-mnemonic</code></dt>
  2719. <dd><p>Select between intel mnemonic mode and AT&amp;T mnemonic mode.
  2720. Note: <code>intel-mnemonic</code> implies <code>intel</code> and
  2721. <code>att-mnemonic</code> implies <code>att</code>.
  2722. </p>
  2723. </dd>
  2724. <dt><code>addr64</code></dt>
  2725. <dt><code>addr32</code></dt>
  2726. <dt><code>addr16</code></dt>
  2727. <dt><code>data32</code></dt>
  2728. <dt><code>data16</code></dt>
  2729. <dd><p>Specify the default address size and operand size. These five options
  2730. will be overridden if <code>x86-64</code>, <code>i386</code> or <code>i8086</code>
  2731. appear later in the option string.
  2732. </p>
  2733. </dd>
  2734. <dt><code>suffix</code></dt>
  2735. <dd><p>When in AT&amp;T mode and also for a limited set of instructions when in Intel
  2736. mode, instructs the disassembler to print a mnemonic suffix even when the
  2737. suffix could be inferred by the operands or, for certain instructions, the
  2738. execution mode&rsquo;s defaults.
  2739. </p></dd>
  2740. </dl>
  2741. <p>For PowerPC, the <samp>-M</samp> argument <samp>raw</samp> selects
  2742. disasssembly of hardware insns rather than aliases. For example, you
  2743. will see <code>rlwinm</code> rather than <code>clrlwi</code>, and <code>addi</code>
  2744. rather than <code>li</code>. All of the <samp>-m</samp> arguments for
  2745. <code>gas</code> that select a CPU are supported. These are:
  2746. <samp>403</samp>, <samp>405</samp>, <samp>440</samp>, <samp>464</samp>, <samp>476</samp>,
  2747. <samp>601</samp>, <samp>603</samp>, <samp>604</samp>, <samp>620</samp>, <samp>7400</samp>,
  2748. <samp>7410</samp>, <samp>7450</samp>, <samp>7455</samp>, <samp>750cl</samp>,
  2749. <samp>821</samp>, <samp>850</samp>, <samp>860</samp>, <samp>a2</samp>, <samp>booke</samp>,
  2750. <samp>booke32</samp>, <samp>cell</samp>, <samp>com</samp>, <samp>e200z2</samp>, <samp>e200z4</samp>,
  2751. <samp>e300</samp>, <samp>e500</samp>, <samp>e500mc</samp>, <samp>e500mc64</samp>,
  2752. <samp>e500x2</samp>, <samp>e5500</samp>, <samp>e6500</samp>, <samp>efs</samp>,
  2753. <samp>power4</samp>, <samp>power5</samp>, <samp>power6</samp>, <samp>power7</samp>,
  2754. <samp>power8</samp>, <samp>power9</samp>, <samp>power10</samp>, <samp>power11</samp>,
  2755. <samp>ppc</samp>, <samp>ppc32</samp>, <samp>ppc64</samp>, <samp>ppc64bridge</samp>,
  2756. <samp>ppcps</samp>, <samp>pwr</samp>, <samp>pwr2</samp>, <samp>pwr4</samp>, <samp>pwr5</samp>,
  2757. <samp>pwr5x</samp>, <samp>pwr6</samp>, <samp>pwr7</samp>, <samp>pwr8</samp>, <samp>pwr9</samp>,
  2758. <samp>pwr10</samp>, <samp>pwr11</samp>, <samp>pwrx</samp>, <samp>titan</samp>, <samp>vle</samp>,
  2759. and <samp>future</samp>.
  2760. <samp>32</samp> and <samp>64</samp> modify the default or a prior CPU
  2761. selection, disabling and enabling 64-bit insns respectively. In
  2762. addition, <samp>altivec</samp>, <samp>any</samp>, <samp>lsp</samp>, <samp>htm</samp>,
  2763. <samp>vsx</samp>, <samp>spe</samp> and <samp>spe2</samp> add capabilities to a
  2764. previous <em>or later</em> CPU selection.
  2765. <samp>any</samp> will disassemble any opcode known to
  2766. binutils, but in cases where an opcode has two different meanings or
  2767. different arguments, you may not see the disassembly you expect.
  2768. If you disassemble without giving a CPU selection, a default will be
  2769. chosen from information gleaned by BFD from the object files headers,
  2770. but the result again may not be as you expect.
  2771. </p>
  2772. <p>For MIPS, this option controls the printing of instruction mnemonic
  2773. names and register names in disassembled instructions. Multiple
  2774. selections from the following may be specified as a comma separated
  2775. string, and invalid options are ignored:
  2776. </p>
  2777. <dl compact="compact">
  2778. <dt><code>no-aliases</code></dt>
  2779. <dd><p>Print the &rsquo;raw&rsquo; instruction mnemonic instead of some pseudo
  2780. instruction mnemonic. I.e., print &rsquo;daddu&rsquo; or &rsquo;or&rsquo; instead of &rsquo;move&rsquo;,
  2781. &rsquo;sll&rsquo; instead of &rsquo;nop&rsquo;, etc.
  2782. </p>
  2783. </dd>
  2784. <dt><code>msa</code></dt>
  2785. <dd><p>Disassemble MSA instructions.
  2786. </p>
  2787. </dd>
  2788. <dt><code>virt</code></dt>
  2789. <dd><p>Disassemble the virtualization ASE instructions.
  2790. </p>
  2791. </dd>
  2792. <dt><code>xpa</code></dt>
  2793. <dd><p>Disassemble the eXtended Physical Address (XPA) ASE instructions.
  2794. </p>
  2795. </dd>
  2796. <dt><code>gpr-names=<var>ABI</var></code></dt>
  2797. <dd><p>Print GPR (general-purpose register) names as appropriate
  2798. for the specified ABI. By default, GPR names are selected according to
  2799. the ABI of the binary being disassembled.
  2800. </p>
  2801. </dd>
  2802. <dt><code>fpr-names=<var>ABI</var></code></dt>
  2803. <dd><p>Print FPR (floating-point register) names as
  2804. appropriate for the specified ABI. By default, FPR numbers are printed
  2805. rather than names.
  2806. </p>
  2807. </dd>
  2808. <dt><code>cp0-names=<var>ARCH</var></code></dt>
  2809. <dd><p>Print CP0 (system control coprocessor; coprocessor 0) register names
  2810. as appropriate for the CPU or architecture specified by
  2811. <var>ARCH</var>. By default, CP0 register names are selected according to
  2812. the architecture and CPU of the binary being disassembled.
  2813. </p>
  2814. </dd>
  2815. <dt><code>hwr-names=<var>ARCH</var></code></dt>
  2816. <dd><p>Print HWR (hardware register, used by the <code>rdhwr</code> instruction) names
  2817. as appropriate for the CPU or architecture specified by
  2818. <var>ARCH</var>. By default, HWR names are selected according to
  2819. the architecture and CPU of the binary being disassembled.
  2820. </p>
  2821. </dd>
  2822. <dt><code>reg-names=<var>ABI</var></code></dt>
  2823. <dd><p>Print GPR and FPR names as appropriate for the selected ABI.
  2824. </p>
  2825. </dd>
  2826. <dt><code>reg-names=<var>ARCH</var></code></dt>
  2827. <dd><p>Print CPU-specific register names (CP0 register and HWR names)
  2828. as appropriate for the selected CPU or architecture.
  2829. </p></dd>
  2830. </dl>
  2831. <p>For any of the options listed above, <var>ABI</var> or
  2832. <var>ARCH</var> may be specified as &lsquo;<samp>numeric</samp>&rsquo; to have numbers printed
  2833. rather than names, for the selected types of registers.
  2834. You can list the available values of <var>ABI</var> and <var>ARCH</var> using
  2835. the <samp>--help</samp> option.
  2836. </p>
  2837. <p>For VAX, you can specify function entry addresses with <samp>-M
  2838. entry:0xf00ba</samp>. You can use this multiple times to properly
  2839. disassemble VAX binary files that don&rsquo;t contain symbol tables (like
  2840. ROM dumps). In these cases, the function entry mask would otherwise
  2841. be decoded as VAX instructions, which would probably lead the rest
  2842. of the function being wrongly disassembled.
  2843. </p>
  2844. </dd>
  2845. <dt><code>-p</code></dt>
  2846. <dt><code>--private-headers</code></dt>
  2847. <dd><p>Print information that is specific to the object file format. The exact
  2848. information printed depends upon the object file format. For some
  2849. object file formats, no additional information is printed.
  2850. </p>
  2851. </dd>
  2852. <dt><code>-P <var>options</var></code></dt>
  2853. <dt><code>--private=<var>options</var></code></dt>
  2854. <dd><p>Print information that is specific to the object file format. The
  2855. argument <var>options</var> is a comma separated list that depends on the
  2856. format (the lists of options is displayed with the help).
  2857. </p>
  2858. <p>For XCOFF, the available options are:
  2859. </p><dl compact="compact">
  2860. <dt><code>header</code></dt>
  2861. <dt><code>aout</code></dt>
  2862. <dt><code>sections</code></dt>
  2863. <dt><code>syms</code></dt>
  2864. <dt><code>relocs</code></dt>
  2865. <dt><code>lineno,</code></dt>
  2866. <dt><code>loader</code></dt>
  2867. <dt><code>except</code></dt>
  2868. <dt><code>typchk</code></dt>
  2869. <dt><code>traceback</code></dt>
  2870. <dt><code>toc</code></dt>
  2871. <dt><code>ldinfo</code></dt>
  2872. </dl>
  2873. <p>For PE, the available options are:
  2874. </p><dl compact="compact">
  2875. <dt><code>header</code></dt>
  2876. <dt><code>sections</code></dt>
  2877. </dl>
  2878. <p>Not all object formats support this option. In particular the ELF
  2879. format does not use it.
  2880. </p>
  2881. </dd>
  2882. <dt><code>-r</code></dt>
  2883. <dt><code>--reloc</code></dt>
  2884. <dd><span id="index-relocation-entries_002c-in-object-file"></span>
  2885. <p>Print the relocation entries of the file. If used with <samp>-d</samp> or
  2886. <samp>-D</samp>, the relocations are printed interspersed with the
  2887. disassembly.
  2888. </p>
  2889. </dd>
  2890. <dt><code>-R</code></dt>
  2891. <dt><code>--dynamic-reloc</code></dt>
  2892. <dd><span id="index-dynamic-relocation-entries_002c-in-object-file"></span>
  2893. <p>Print the dynamic relocation entries of the file. This is only
  2894. meaningful for dynamic objects, such as certain types of shared
  2895. libraries. As for <samp>-r</samp>, if used with <samp>-d</samp> or
  2896. <samp>-D</samp>, the relocations are printed interspersed with the
  2897. disassembly.
  2898. </p>
  2899. </dd>
  2900. <dt><code>-s</code></dt>
  2901. <dt><code>--full-contents</code></dt>
  2902. <dd><span id="index-sections_002c-full-contents"></span>
  2903. <span id="index-object-file-sections"></span>
  2904. <p>Display the full contents of sections, often used in combination with
  2905. <samp>-j</samp> to request specific sections. By default all non-empty
  2906. non-bss sections are displayed. By default any compressed section
  2907. will be displayed in its compressed form. In order to see the
  2908. contents in a decompressed form add the <samp>-Z</samp> option to the
  2909. command line.
  2910. </p>
  2911. </dd>
  2912. <dt><code>-S</code></dt>
  2913. <dt><code>--source</code></dt>
  2914. <dd><span id="index-source-disassembly"></span>
  2915. <span id="index-disassembly_002c-with-source"></span>
  2916. <p>Display source code intermixed with disassembly, if possible. Implies
  2917. <samp>-d</samp>.
  2918. </p>
  2919. </dd>
  2920. <dt><code>--show-all-symbols</code></dt>
  2921. <dd><p>When disassembling, show all the symbols that match a given address,
  2922. not just the first one.
  2923. </p>
  2924. </dd>
  2925. <dt><code>--source-comment[=<var>txt</var>]</code></dt>
  2926. <dd><span id="index-source-disassembly-1"></span>
  2927. <span id="index-disassembly_002c-with-source-1"></span>
  2928. <p>Like the <samp>-S</samp> option, but all source code lines are displayed
  2929. with a prefix of <var>txt</var>. Typically <var>txt</var> will be a comment
  2930. string which can be used to distinguish the assembler code from the
  2931. source code. If <var>txt</var> is not provided then a default string of
  2932. <var>&ldquo;# &ldquo;</var> (hash followed by a space), will be used.
  2933. </p>
  2934. </dd>
  2935. <dt><code>--prefix=<var>prefix</var></code></dt>
  2936. <dd><span id="index-Add-prefix-to-absolute-paths"></span>
  2937. <p>Specify <var>prefix</var> to add to the absolute paths when used with
  2938. <samp>-S</samp>.
  2939. </p>
  2940. </dd>
  2941. <dt><code>--prefix-strip=<var>level</var></code></dt>
  2942. <dd><span id="index-Strip-absolute-paths"></span>
  2943. <p>Indicate how many initial directory names to strip off the hardwired
  2944. absolute paths. It has no effect without <samp>--prefix=</samp><var>prefix</var>.
  2945. </p>
  2946. </dd>
  2947. <dt><code>--show-raw-insn</code></dt>
  2948. <dd><p>When disassembling instructions, print the instruction in hex as well as
  2949. in symbolic form. This is the default except when
  2950. <samp>--prefix-addresses</samp> is used.
  2951. </p>
  2952. </dd>
  2953. <dt><code>--no-show-raw-insn</code></dt>
  2954. <dd><p>When disassembling instructions, do not print the instruction bytes.
  2955. This is the default when <samp>--prefix-addresses</samp> is used.
  2956. </p>
  2957. </dd>
  2958. <dt><code>--insn-width=<var>width</var></code></dt>
  2959. <dd><span id="index-Instruction-width"></span>
  2960. <p>Display <var>width</var> bytes on a single line when disassembling
  2961. instructions.
  2962. </p>
  2963. </dd>
  2964. <dt><code>--visualize-jumps[=color|=extended-color|=off]</code></dt>
  2965. <dd><p>Visualize jumps that stay inside a function by drawing ASCII art between
  2966. the start and target addresses. The optional <samp>=color</samp> argument
  2967. adds color to the output using simple terminal colors. Alternatively
  2968. the <samp>=extended-color</samp> argument will add color using 8bit
  2969. colors, but these might not work on all terminals.
  2970. </p>
  2971. <p>If it is necessary to disable the <samp>visualize-jumps</samp> option
  2972. after it has previously been enabled then use
  2973. <samp>visualize-jumps=off</samp>.
  2974. </p>
  2975. </dd>
  2976. <dt><code>--disassembler-color=off</code></dt>
  2977. <dt><code>--disassembler-color=terminal</code></dt>
  2978. <dt><code>--disassembler-color=on|color|colour</code></dt>
  2979. <dt><code>--disassembler-color=extened|extended-color|extened-colour</code></dt>
  2980. <dd><p>Enables or disables the use of colored syntax highlighting in
  2981. disassembly output. The default behaviour is determined via a
  2982. configure time option. Note, not all architectures support colored
  2983. syntax highlighting, and depending upon the terminal used, colored
  2984. output may not actually be legible.
  2985. </p>
  2986. <p>The <samp>on</samp> argument adds colors using simple terminal colors.
  2987. </p>
  2988. <p>The <samp>terminal</samp> argument does the same, but only if the output
  2989. device is a terminal.
  2990. </p>
  2991. <p>The <samp>extended-color</samp> argument is similar to the <samp>on</samp>
  2992. argument, but it uses 8-bit colors. These may not work on all
  2993. terminals.
  2994. </p>
  2995. <p>The <samp>off</samp> argument disables colored disassembly.
  2996. </p>
  2997. </dd>
  2998. <dt><code>-W[lLiaprmfFsoORtUuTgAckK]</code></dt>
  2999. <dt><code>--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]</code></dt>
  3000. <dd>
  3001. <p>Displays the contents of the DWARF debug sections in the file, if any
  3002. are present. Compressed debug sections are automatically decompressed
  3003. (temporarily) before they are displayed. If one or more of the
  3004. optional letters or words follows the switch then only those type(s)
  3005. of data will be dumped. The letters and words refer to the following
  3006. information:
  3007. </p>
  3008. <dl compact="compact">
  3009. <dt><code>a</code></dt>
  3010. <dt><code>=abbrev</code></dt>
  3011. <dd><p>Displays the contents of the &lsquo;<samp>.debug_abbrev</samp>&rsquo; section.
  3012. </p>
  3013. </dd>
  3014. <dt><code>A</code></dt>
  3015. <dt><code>=addr</code></dt>
  3016. <dd><p>Displays the contents of the &lsquo;<samp>.debug_addr</samp>&rsquo; section.
  3017. </p>
  3018. </dd>
  3019. <dt><code>c</code></dt>
  3020. <dt><code>=cu_index</code></dt>
  3021. <dd><p>Displays the contents of the &lsquo;<samp>.debug_cu_index</samp>&rsquo; and/or
  3022. &lsquo;<samp>.debug_tu_index</samp>&rsquo; sections.
  3023. </p>
  3024. </dd>
  3025. <dt><code>f</code></dt>
  3026. <dt><code>=frames</code></dt>
  3027. <dd><p>Display the raw contents of a &lsquo;<samp>.debug_frame</samp>&rsquo; section.
  3028. </p>
  3029. </dd>
  3030. <dt><code>F</code></dt>
  3031. <dt><code>=frames-interp</code></dt>
  3032. <dd><p>Display the interpreted contents of a &lsquo;<samp>.debug_frame</samp>&rsquo; section.
  3033. </p>
  3034. </dd>
  3035. <dt><code>g</code></dt>
  3036. <dt><code>=gdb_index</code></dt>
  3037. <dd><p>Displays the contents of the &lsquo;<samp>.gdb_index</samp>&rsquo; and/or
  3038. &lsquo;<samp>.debug_names</samp>&rsquo; sections.
  3039. </p>
  3040. </dd>
  3041. <dt><code>i</code></dt>
  3042. <dt><code>=info</code></dt>
  3043. <dd><p>Displays the contents of the &lsquo;<samp>.debug_info</samp>&rsquo; section. Note: the
  3044. output from this option can also be restricted by the use of the
  3045. <samp>--dwarf-depth</samp> and <samp>--dwarf-start</samp> options.
  3046. </p>
  3047. </dd>
  3048. <dt><code>k</code></dt>
  3049. <dt><code>=links</code></dt>
  3050. <dd><p>Displays the contents of the &lsquo;<samp>.gnu_debuglink</samp>&rsquo;,
  3051. &lsquo;<samp>.gnu_debugaltlink</samp>&rsquo; and &lsquo;<samp>.debug_sup</samp>&rsquo; sections, if any of
  3052. them are present. Also displays any links to separate dwarf object
  3053. files (dwo), if they are specified by the DW_AT_GNU_dwo_name or
  3054. DW_AT_dwo_name attributes in the &lsquo;<samp>.debug_info</samp>&rsquo; section.
  3055. </p>
  3056. </dd>
  3057. <dt><code>K</code></dt>
  3058. <dt><code>=follow-links</code></dt>
  3059. <dd><p>Display the contents of any selected debug sections that are found in
  3060. linked, separate debug info file(s). This can result in multiple
  3061. versions of the same debug section being displayed if it exists in
  3062. more than one file.
  3063. </p>
  3064. <p>In addition, when displaying DWARF attributes, if a form is found that
  3065. references the separate debug info file, then the referenced contents
  3066. will also be displayed.
  3067. </p>
  3068. <p>Note - in some distributions this option is enabled by default. It
  3069. can be disabled via the <samp>N</samp> debug option. The default can be
  3070. chosen when configuring the binutils via the
  3071. <samp>--enable-follow-debug-links=yes</samp> or
  3072. <samp>--enable-follow-debug-links=no</samp> options. If these are not
  3073. used then the default is to enable the following of debug links.
  3074. </p>
  3075. <p>Note - if support for the debuginfod protocol was enabled when the
  3076. binutils were built then this option will also include an attempt to
  3077. contact any debuginfod servers mentioned in the <var>DEBUGINFOD_URLS</var>
  3078. environment variable. This could take some time to resolve. This
  3079. behaviour can be disabled via the <samp>=do-not-use-debuginfod</samp> debug
  3080. option.
  3081. </p>
  3082. </dd>
  3083. <dt><code>N</code></dt>
  3084. <dt><code>=no-follow-links</code></dt>
  3085. <dd><p>Disables the following of links to separate debug info files.
  3086. </p>
  3087. </dd>
  3088. <dt><code>D</code></dt>
  3089. <dt><code>=use-debuginfod</code></dt>
  3090. <dd><p>Enables contacting debuginfod servers if there is a need to follow
  3091. debug links. This is the default behaviour.
  3092. </p>
  3093. </dd>
  3094. <dt><code>E</code></dt>
  3095. <dt><code>=do-not-use-debuginfod</code></dt>
  3096. <dd><p>Disables contacting debuginfod servers when there is a need to follow
  3097. debug links.
  3098. </p>
  3099. </dd>
  3100. <dt><code>l</code></dt>
  3101. <dt><code>=rawline</code></dt>
  3102. <dd><p>Displays the contents of the &lsquo;<samp>.debug_line</samp>&rsquo; section in a raw
  3103. format.
  3104. </p>
  3105. </dd>
  3106. <dt><code>L</code></dt>
  3107. <dt><code>=decodedline</code></dt>
  3108. <dd><p>Displays the interpreted contents of the &lsquo;<samp>.debug_line</samp>&rsquo; section.
  3109. </p>
  3110. </dd>
  3111. <dt><code>m</code></dt>
  3112. <dt><code>=macro</code></dt>
  3113. <dd><p>Displays the contents of the &lsquo;<samp>.debug_macro</samp>&rsquo; and/or
  3114. &lsquo;<samp>.debug_macinfo</samp>&rsquo; sections.
  3115. </p>
  3116. </dd>
  3117. <dt><code>o</code></dt>
  3118. <dt><code>=loc</code></dt>
  3119. <dd><p>Displays the contents of the &lsquo;<samp>.debug_loc</samp>&rsquo; and/or
  3120. &lsquo;<samp>.debug_loclists</samp>&rsquo; sections.
  3121. </p>
  3122. </dd>
  3123. <dt><code>O</code></dt>
  3124. <dt><code>=str-offsets</code></dt>
  3125. <dd><p>Displays the contents of the &lsquo;<samp>.debug_str_offsets</samp>&rsquo; section.
  3126. </p>
  3127. </dd>
  3128. <dt><code>p</code></dt>
  3129. <dt><code>=pubnames</code></dt>
  3130. <dd><p>Displays the contents of the &lsquo;<samp>.debug_pubnames</samp>&rsquo; and/or
  3131. &lsquo;<samp>.debug_gnu_pubnames</samp>&rsquo; sections.
  3132. </p>
  3133. </dd>
  3134. <dt><code>r</code></dt>
  3135. <dt><code>=aranges</code></dt>
  3136. <dd><p>Displays the contents of the &lsquo;<samp>.debug_aranges</samp>&rsquo; section.
  3137. </p>
  3138. </dd>
  3139. <dt><code>R</code></dt>
  3140. <dt><code>=Ranges</code></dt>
  3141. <dd><p>Displays the contents of the &lsquo;<samp>.debug_ranges</samp>&rsquo; and/or
  3142. &lsquo;<samp>.debug_rnglists</samp>&rsquo; sections.
  3143. </p>
  3144. </dd>
  3145. <dt><code>s</code></dt>
  3146. <dt><code>=str</code></dt>
  3147. <dd><p>Displays the contents of the &lsquo;<samp>.debug_str</samp>&rsquo;, &lsquo;<samp>.debug_line_str</samp>&rsquo;
  3148. and/or &lsquo;<samp>.debug_str_offsets</samp>&rsquo; sections.
  3149. </p>
  3150. </dd>
  3151. <dt><code>t</code></dt>
  3152. <dt><code>=pubtype</code></dt>
  3153. <dd><p>Displays the contents of the &lsquo;<samp>.debug_pubtypes</samp>&rsquo; and/or
  3154. &lsquo;<samp>.debug_gnu_pubtypes</samp>&rsquo; sections.
  3155. </p>
  3156. </dd>
  3157. <dt><code>T</code></dt>
  3158. <dt><code>=trace_aranges</code></dt>
  3159. <dd><p>Displays the contents of the &lsquo;<samp>.trace_aranges</samp>&rsquo; section.
  3160. </p>
  3161. </dd>
  3162. <dt><code>u</code></dt>
  3163. <dt><code>=trace_abbrev</code></dt>
  3164. <dd><p>Displays the contents of the &lsquo;<samp>.trace_abbrev</samp>&rsquo; section.
  3165. </p>
  3166. </dd>
  3167. <dt><code>U</code></dt>
  3168. <dt><code>=trace_info</code></dt>
  3169. <dd><p>Displays the contents of the &lsquo;<samp>.trace_info</samp>&rsquo; section.
  3170. </p>
  3171. </dd>
  3172. </dl>
  3173. <p>Note: displaying the contents of &lsquo;<samp>.debug_static_funcs</samp>&rsquo;,
  3174. &lsquo;<samp>.debug_static_vars</samp>&rsquo; and &lsquo;<samp>debug_weaknames</samp>&rsquo; sections is not
  3175. currently supported.
  3176. </p>
  3177. </dd>
  3178. <dt><code>--dwarf-depth=<var>n</var></code></dt>
  3179. <dd><p>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children.
  3180. This is only useful with <samp>--debug-dump=info</samp>. The default is
  3181. to print all DIEs; the special value 0 for <var>n</var> will also have this
  3182. effect.
  3183. </p>
  3184. <p>With a non-zero value for <var>n</var>, DIEs at or deeper than <var>n</var>
  3185. levels will not be printed. The range for <var>n</var> is zero-based.
  3186. </p>
  3187. </dd>
  3188. <dt><code>--dwarf-start=<var>n</var></code></dt>
  3189. <dd><p>Print only DIEs beginning with the DIE numbered <var>n</var>. This is only
  3190. useful with <samp>--debug-dump=info</samp>.
  3191. </p>
  3192. <p>If specified, this option will suppress printing of any header
  3193. information and all DIEs before the DIE numbered <var>n</var>. Only
  3194. siblings and children of the specified DIE will be printed.
  3195. </p>
  3196. <p>This can be used in conjunction with <samp>--dwarf-depth</samp>.
  3197. </p>
  3198. </dd>
  3199. <dt><code>--dwarf-check</code></dt>
  3200. <dd><p>Enable additional checks for consistency of Dwarf information.
  3201. </p>
  3202. </dd>
  3203. <dt><code>--ctf[=<var>section</var>]</code></dt>
  3204. <dd><span id="index-CTF"></span>
  3205. <span id="index-Compact-Type-Format"></span>
  3206. <p>Display the contents of the specified CTF section. CTF sections themselves
  3207. contain many subsections, all of which are displayed in order.
  3208. </p>
  3209. <p>By default, display the name of the section named <var>.ctf</var>, which is the
  3210. name emitted by <code>ld</code>.
  3211. </p>
  3212. </dd>
  3213. <dt><code>--ctf-parent=<var>member</var></code></dt>
  3214. <dd>
  3215. <p>If the CTF section contains ambiguously-defined types, it will consist
  3216. of an archive of many CTF dictionaries, all inheriting from one
  3217. dictionary containing unambiguous types. This member is by default
  3218. named <var>.ctf</var>, like the section containing it, but it is possible to
  3219. change this name using the <code>ctf_link_set_memb_name_changer</code>
  3220. function at link time. When looking at CTF archives that have been
  3221. created by a linker that uses the name changer to rename the parent
  3222. archive member, <samp>--ctf-parent</samp> can be used to specify the name
  3223. used for the parent.
  3224. </p>
  3225. </dd>
  3226. <dt><code>--sframe[=<var>section</var>]</code></dt>
  3227. <dd><span id="index-SFrame"></span>
  3228. <p>Display the contents of the specified SFrame section.
  3229. </p>
  3230. <p>By default, display the name of the section named <var>.sframe</var>, which is the
  3231. name emitted by <code>ld</code>.
  3232. </p>
  3233. </dd>
  3234. <dt><code>-G</code></dt>
  3235. <dt><code>--stabs</code></dt>
  3236. <dd><span id="index-stab"></span>
  3237. <span id="index-_002estab"></span>
  3238. <span id="index-debug-symbols"></span>
  3239. <span id="index-ELF-object-file-format"></span>
  3240. <p>Display the full contents of any sections requested. Display the
  3241. contents of the .stab and .stab.index and .stab.excl sections from an
  3242. ELF file. This is only useful on systems (such as Solaris 2.0) in which
  3243. <code>.stab</code> debugging symbol-table entries are carried in an ELF
  3244. section. In most other file formats, debugging symbol-table entries are
  3245. interleaved with linkage symbols, and are visible in the <samp>--syms</samp>
  3246. output.
  3247. </p>
  3248. </dd>
  3249. <dt><code>--start-address=<var>address</var></code></dt>
  3250. <dd><span id="index-start_002daddress"></span>
  3251. <p>Start displaying data at the specified address. This affects the output
  3252. of the <samp>-d</samp>, <samp>-r</samp> and <samp>-s</samp> options.
  3253. </p>
  3254. </dd>
  3255. <dt><code>--stop-address=<var>address</var></code></dt>
  3256. <dd><span id="index-stop_002daddress"></span>
  3257. <p>Stop displaying data at the specified address. This affects the output
  3258. of the <samp>-d</samp>, <samp>-r</samp> and <samp>-s</samp> options.
  3259. </p>
  3260. </dd>
  3261. <dt><code>-t</code></dt>
  3262. <dt><code>--syms</code></dt>
  3263. <dd><span id="index-symbol-table-entries_002c-printing"></span>
  3264. <p>Print the symbol table entries of the file.
  3265. This is similar to the information provided by the &lsquo;<samp>nm</samp>&rsquo; program,
  3266. although the display format is different. The format of the output
  3267. depends upon the format of the file being dumped, but there are two main
  3268. types. One looks like this:
  3269. </p>
  3270. <div class="example">
  3271. <pre class="example">[ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss
  3272. [ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred
  3273. </pre></div>
  3274. <p>where the number inside the square brackets is the number of the entry
  3275. in the symbol table, the <var>sec</var> number is the section number, the
  3276. <var>fl</var> value are the symbol&rsquo;s flag bits, the <var>ty</var> number is the
  3277. symbol&rsquo;s type, the <var>scl</var> number is the symbol&rsquo;s storage class and
  3278. the <var>nx</var> value is the number of auxiliary entries associated with
  3279. the symbol. The last two fields are the symbol&rsquo;s value and its name.
  3280. </p>
  3281. <p>The other common output format, usually seen with ELF based files,
  3282. looks like this:
  3283. </p>
  3284. <div class="example">
  3285. <pre class="example">00000000 l d .bss 00000000 .bss
  3286. 00000000 g .text 00000000 fred
  3287. </pre></div>
  3288. <p>Here the first number is the symbol&rsquo;s value (sometimes referred to as
  3289. its address). The next field is actually a set of characters and
  3290. spaces indicating the flag bits that are set on the symbol. These
  3291. characters are described below. Next is the section with which the
  3292. symbol is associated or <em>*ABS*</em> if the section is absolute (ie
  3293. not connected with any section), or <em>*UND*</em> if the section is
  3294. referenced in the file being dumped, but not defined there.
  3295. </p>
  3296. <p>After the section name comes another field, a number, which for common
  3297. symbols is the alignment and for other symbol is the size. Finally
  3298. the symbol&rsquo;s name is displayed.
  3299. </p>
  3300. <p>The flag characters are divided into 7 groups as follows:
  3301. </p><dl compact="compact">
  3302. <dt><code>l</code></dt>
  3303. <dt><code>g</code></dt>
  3304. <dt><code>u</code></dt>
  3305. <dt><code>!</code></dt>
  3306. <dd><p>The symbol is a local (l), global (g), unique global (u), neither
  3307. global nor local (a space) or both global and local (!). A
  3308. symbol can be neither local or global for a variety of reasons, e.g.,
  3309. because it is used for debugging, but it is probably an indication of
  3310. a bug if it is ever both local and global. Unique global symbols are
  3311. a GNU extension to the standard set of ELF symbol bindings. For such
  3312. a symbol the dynamic linker will make sure that in the entire process
  3313. there is just one symbol with this name and type in use.
  3314. </p>
  3315. </dd>
  3316. <dt><code>w</code></dt>
  3317. <dd><p>The symbol is weak (w) or strong (a space).
  3318. </p>
  3319. </dd>
  3320. <dt><code>C</code></dt>
  3321. <dd><p>The symbol denotes a constructor (C) or an ordinary symbol (a space).
  3322. </p>
  3323. </dd>
  3324. <dt><code>W</code></dt>
  3325. <dd><p>The symbol is a warning (W) or a normal symbol (a space). A warning
  3326. symbol&rsquo;s name is a message to be displayed if the symbol following the
  3327. warning symbol is ever referenced.
  3328. </p>
  3329. </dd>
  3330. <dt><code>I</code></dt>
  3331. <dt><code>i</code></dt>
  3332. <dd><p>The symbol is an indirect reference to another symbol (I), a function
  3333. to be evaluated during reloc processing (i) or a normal symbol (a
  3334. space).
  3335. </p>
  3336. </dd>
  3337. <dt><code>d</code></dt>
  3338. <dt><code>D</code></dt>
  3339. <dd><p>The symbol is a debugging symbol (d) or a dynamic symbol (D) or a
  3340. normal symbol (a space).
  3341. </p>
  3342. </dd>
  3343. <dt><code>F</code></dt>
  3344. <dt><code>f</code></dt>
  3345. <dt><code>O</code></dt>
  3346. <dd><p>The symbol is the name of a function (F) or a file (f) or an object
  3347. (O) or just a normal symbol (a space).
  3348. </p></dd>
  3349. </dl>
  3350. </dd>
  3351. <dt><code>-T</code></dt>
  3352. <dt><code>--dynamic-syms</code></dt>
  3353. <dd><span id="index-dynamic-symbol-table-entries_002c-printing"></span>
  3354. <p>Print the dynamic symbol table entries of the file. This is only
  3355. meaningful for dynamic objects, such as certain types of shared
  3356. libraries. This is similar to the information provided by the &lsquo;<samp>nm</samp>&rsquo;
  3357. program when given the <samp>-D</samp> (<samp>--dynamic</samp>) option.
  3358. </p>
  3359. <p>The output format is similar to that produced by the <samp>--syms</samp>
  3360. option, except that an extra field is inserted before the symbol&rsquo;s
  3361. name, giving the version information associated with the symbol.
  3362. If the version is the default version to be used when resolving
  3363. unversioned references to the symbol then it&rsquo;s displayed as is,
  3364. otherwise it&rsquo;s put into parentheses.
  3365. </p>
  3366. </dd>
  3367. <dt><code>--special-syms</code></dt>
  3368. <dd><p>When displaying symbols include those which the target considers to be
  3369. special in some way and which would not normally be of interest to the
  3370. user.
  3371. </p>
  3372. </dd>
  3373. <dt><code>-U <var>[d|i|l|e|x|h]</var></code></dt>
  3374. <dt><code>--unicode=<var>[default|invalid|locale|escape|hex|highlight]</var></code></dt>
  3375. <dd><p>Controls the display of UTF-8 encoded multibyte characters in strings.
  3376. The default (<samp>--unicode=default</samp>) is to give them no special
  3377. treatment. The <samp>--unicode=locale</samp> option displays the sequence
  3378. in the current locale, which may or may not support them. The options
  3379. <samp>--unicode=hex</samp> and <samp>--unicode=invalid</samp> display them as
  3380. hex byte sequences enclosed by either angle brackets or curly braces.
  3381. </p>
  3382. <p>The <samp>--unicode=escape</samp> option displays them as escape sequences
  3383. (<var>\uxxxx</var>) and the <samp>--unicode=highlight</samp> option displays
  3384. them as escape sequences highlighted in red (if supported by the
  3385. output device). The colouring is intended to draw attention to the
  3386. presence of unicode sequences where they might not be expected.
  3387. </p>
  3388. </dd>
  3389. <dt><code>-V</code></dt>
  3390. <dt><code>--version</code></dt>
  3391. <dd><p>Print the version number of <code>objdump</code> and exit.
  3392. </p>
  3393. </dd>
  3394. <dt><code>-x</code></dt>
  3395. <dt><code>--all-headers</code></dt>
  3396. <dd><span id="index-all-header-information_002c-object-file"></span>
  3397. <span id="index-header-information_002c-all"></span>
  3398. <p>Display all available header information, including the symbol table and
  3399. relocation entries. Using <samp>-x</samp> is equivalent to specifying all of
  3400. <samp>-a -f -h -p -r -t</samp>.
  3401. </p>
  3402. </dd>
  3403. <dt><code>-w</code></dt>
  3404. <dt><code>--wide</code></dt>
  3405. <dd><span id="index-wide-output_002c-printing"></span>
  3406. <p>Format some lines for output devices that have more than 80 columns.
  3407. Also do not truncate symbol names when they are displayed.
  3408. </p>
  3409. </dd>
  3410. <dt><code>-z</code></dt>
  3411. <dt><code>--disassemble-zeroes</code></dt>
  3412. <dd><p>Normally the disassembly output will skip blocks of zeroes. This
  3413. option directs the disassembler to disassemble those blocks, just like
  3414. any other data.
  3415. </p>
  3416. </dd>
  3417. <dt><code>-Z</code></dt>
  3418. <dt><code>--decompress</code></dt>
  3419. <dd><span id="index-sections_002c-full-contents-1"></span>
  3420. <span id="index-object-file-sections-1"></span>
  3421. <span id="index-compressed-section-contents"></span>
  3422. <p>The <samp>-Z</samp> option is meant to be used in conunction with the
  3423. <samp>-s</samp> option. It instructs <code>objdump</code> to decompress any
  3424. compressed sections before displaying their contents.
  3425. </p></dd>
  3426. </dl>
  3427. <hr>
  3428. <span id="ranlib"></span><div class="header">
  3429. <p>
  3430. Next: <a href="#size" accesskey="n" rel="next">size</a>, Previous: <a href="#objdump" accesskey="p" rel="prev">objdump</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  3431. </div>
  3432. <span id="ranlib-1"></span><h2 class="chapter">5 ranlib</h2>
  3433. <span id="index-ranlib-1"></span>
  3434. <span id="index-archive-contents"></span>
  3435. <span id="index-symbol-index-1"></span>
  3436. <div class="example">
  3437. <pre class="example">ranlib [<samp>--plugin</samp> <var>name</var>] [<samp>-DhHvVt</samp>] <var>archive</var>
  3438. </pre></div>
  3439. <p><code>ranlib</code> generates an index to the contents of an archive and
  3440. stores it in the archive. The index lists each symbol defined by a
  3441. member of an archive that is a relocatable object file.
  3442. </p>
  3443. <p>You may use &lsquo;<samp>nm -s</samp>&rsquo; or &lsquo;<samp>nm --print-armap</samp>&rsquo; to list this index.
  3444. </p>
  3445. <p>An archive with such an index speeds up linking to the library and
  3446. allows routines in the library to call each other without regard to
  3447. their placement in the archive.
  3448. </p>
  3449. <p>The <small>GNU</small> <code>ranlib</code> program is another form of <small>GNU</small> <code>ar</code>; running
  3450. <code>ranlib</code> is completely equivalent to executing &lsquo;<samp>ar -s</samp>&rsquo;.
  3451. See <a href="#ar">ar</a>.
  3452. </p>
  3453. <dl compact="compact">
  3454. <dt><code>-h</code></dt>
  3455. <dt><code>-H</code></dt>
  3456. <dt><code>--help</code></dt>
  3457. <dd><p>Show usage information for <code>ranlib</code>.
  3458. </p>
  3459. </dd>
  3460. <dt><code>-v</code></dt>
  3461. <dt><code>-V</code></dt>
  3462. <dt><code>--version</code></dt>
  3463. <dd><p>Show the version number of <code>ranlib</code>.
  3464. </p>
  3465. </dd>
  3466. <dt><code>-D</code></dt>
  3467. <dd><span id="index-deterministic-archives-4"></span>
  3468. <span id="index-_002d_002denable_002ddeterministic_002darchives-4"></span>
  3469. <p>Operate in <em>deterministic</em> mode. The symbol map archive member&rsquo;s
  3470. header will show zero for the UID, GID, and timestamp. When this
  3471. option is used, multiple runs will produce identical output files.
  3472. </p>
  3473. <p>If <samp>binutils</samp> was configured with
  3474. <samp>--enable-deterministic-archives</samp>, then this mode is on by
  3475. default. It can be disabled with the &lsquo;<samp>-U</samp>&rsquo; option, described
  3476. below.
  3477. </p>
  3478. </dd>
  3479. <dt><code>-t</code></dt>
  3480. <dd><p>Update the timestamp of the symbol map of an archive.
  3481. </p>
  3482. </dd>
  3483. <dt><code>-U</code></dt>
  3484. <dd><span id="index-deterministic-archives-5"></span>
  3485. <span id="index-_002d_002denable_002ddeterministic_002darchives-5"></span>
  3486. <p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the
  3487. inverse of the &lsquo;<samp>-D</samp>&rsquo; option, above: the archive index will get
  3488. actual UID, GID, timestamp, and file mode values.
  3489. </p>
  3490. <p>If <samp>binutils</samp> was configured <em>without</em>
  3491. <samp>--enable-deterministic-archives</samp>, then this mode is on by
  3492. default.
  3493. </p>
  3494. </dd>
  3495. </dl>
  3496. <hr>
  3497. <span id="size"></span><div class="header">
  3498. <p>
  3499. Next: <a href="#strings" accesskey="n" rel="next">strings</a>, Previous: <a href="#ranlib" accesskey="p" rel="prev">ranlib</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  3500. </div>
  3501. <span id="size-1"></span><h2 class="chapter">6 size</h2>
  3502. <span id="index-size"></span>
  3503. <span id="index-section-sizes"></span>
  3504. <div class="example">
  3505. <pre class="example">size [<samp>-A</samp>|<samp>-B</samp>|<samp>-G</samp>|<samp>--format=</samp><var>compatibility</var>]
  3506. [<samp>--help</samp>]
  3507. [<samp>-d</samp>|<samp>-o</samp>|<samp>-x</samp>|<samp>--radix=</samp><var>number</var>]
  3508. [<samp>--common</samp>]
  3509. [<samp>-t</samp>|<samp>--totals</samp>]
  3510. [<samp>--target=</samp><var>bfdname</var>] [<samp>-V</samp>|<samp>--version</samp>]
  3511. [<samp>-f</samp>]
  3512. [<var>objfile</var>&hellip;]
  3513. </pre></div>
  3514. <p>The <small>GNU</small> <code>size</code> utility lists the section sizes and the total
  3515. size for each of the binary files <var>objfile</var> on its argument list.
  3516. By default, one line of output is generated for each file or each
  3517. module if the file is an archive.
  3518. </p>
  3519. <p><var>objfile</var>&hellip; are the files to be examined. If none are
  3520. specified, the file <code>a.out</code> will be used instead.
  3521. </p>
  3522. <p>The command-line options have the following meanings:
  3523. </p>
  3524. <dl compact="compact">
  3525. <dt><code>-A</code></dt>
  3526. <dt><code>-B</code></dt>
  3527. <dt><code>-G</code></dt>
  3528. <dt><code>--format=<var>compatibility</var></code></dt>
  3529. <dd><span id="index-size-display-format"></span>
  3530. <p>Using one of these options, you can choose whether the output from <small>GNU</small>
  3531. <code>size</code> resembles output from System V <code>size</code> (using <samp>-A</samp>,
  3532. or <samp>--format=sysv</samp>), or Berkeley <code>size</code> (using <samp>-B</samp>, or
  3533. <samp>--format=berkeley</samp>). The default is the one-line format similar to
  3534. Berkeley&rsquo;s. Alternatively, you can choose the GNU format output
  3535. (using <samp>-G</samp>, or <samp>--format=gnu</samp>), this is similar to
  3536. Berkeley&rsquo;s output format, but sizes are counted differently.
  3537. </p>
  3538. <p>Here is an example of the Berkeley (default) format of output from
  3539. <code>size</code>:
  3540. </p><div class="example">
  3541. <pre class="example">$ size --format=Berkeley ranlib size
  3542. text data bss dec hex filename
  3543. 294880 81920 11592 388392 5ed28 ranlib
  3544. 294880 81920 11888 388688 5ee50 size
  3545. </pre></div>
  3546. <p>The Berkeley style output counts read only data in the <code>text</code>
  3547. column, not in the <code>data</code> column, the <code>dec</code> and <code>hex</code>
  3548. columns both display the sum of the <code>text</code>, <code>data</code>, and
  3549. <code>bss</code> columns in decimal and hexadecimal respectively.
  3550. </p>
  3551. <p>The GNU format counts read only data in the <code>data</code> column, not
  3552. the <code>text</code> column, and only displays the sum of the <code>text</code>,
  3553. <code>data</code>, and <code>bss</code> columns once, in the <code>total</code> column.
  3554. The <samp>--radix</samp> option can be used to change the number base for
  3555. all columns. Here is the same data displayed with GNU conventions:
  3556. </p>
  3557. <div class="example">
  3558. <pre class="example">$ size --format=GNU ranlib size
  3559. text data bss total filename
  3560. 279880 96920 11592 388392 ranlib
  3561. 279880 96920 11888 388688 size
  3562. </pre></div>
  3563. <p>This is the same data, but displayed closer to System V conventions:
  3564. </p>
  3565. <div class="example">
  3566. <pre class="example">$ size --format=SysV ranlib size
  3567. ranlib :
  3568. section size addr
  3569. .text 294880 8192
  3570. .data 81920 303104
  3571. .bss 11592 385024
  3572. Total 388392
  3573. size :
  3574. section size addr
  3575. .text 294880 8192
  3576. .data 81920 303104
  3577. .bss 11888 385024
  3578. Total 388688
  3579. </pre></div>
  3580. </dd>
  3581. <dt><code>--help</code></dt>
  3582. <dt><code>-h</code></dt>
  3583. <dt><code>-H</code></dt>
  3584. <dt><code>-?</code></dt>
  3585. <dd><p>Show a summary of acceptable arguments and options.
  3586. </p>
  3587. </dd>
  3588. <dt><code>-d</code></dt>
  3589. <dt><code>-o</code></dt>
  3590. <dt><code>-x</code></dt>
  3591. <dt><code>--radix=<var>number</var></code></dt>
  3592. <dd><span id="index-size-number-format"></span>
  3593. <span id="index-radix-for-section-sizes"></span>
  3594. <p>Using one of these options, you can control whether the size of each
  3595. section is given in decimal (<samp>-d</samp>, or <samp>--radix=10</samp>); octal
  3596. (<samp>-o</samp>, or <samp>--radix=8</samp>); or hexadecimal (<samp>-x</samp>, or
  3597. <samp>--radix=16</samp>). In <samp>--radix=<var>number</var></samp>, only the three
  3598. values (8, 10, 16) are supported. The total size is always given in two
  3599. radices; decimal and hexadecimal for <samp>-d</samp> or <samp>-x</samp> output, or
  3600. octal and hexadecimal if you&rsquo;re using <samp>-o</samp>.
  3601. </p>
  3602. </dd>
  3603. <dt><code>--common</code></dt>
  3604. <dd><p>Print total size of common symbols in each file. When using Berkeley
  3605. or GNU format these are included in the bss size.
  3606. </p>
  3607. </dd>
  3608. <dt><code>-t</code></dt>
  3609. <dt><code>--totals</code></dt>
  3610. <dd><p>Show totals of all objects listed (Berkeley or GNU format mode only).
  3611. </p>
  3612. </dd>
  3613. <dt><code>--target=<var>bfdname</var></code></dt>
  3614. <dd><span id="index-object-code-format-2"></span>
  3615. <p>Specify that the object-code format for <var>objfile</var> is
  3616. <var>bfdname</var>. This option may not be necessary; <code>size</code> can
  3617. automatically recognize many formats.
  3618. See <a href="#Target-Selection">Target Selection</a>, for more information.
  3619. </p>
  3620. </dd>
  3621. <dt><code>-v</code></dt>
  3622. <dt><code>-V</code></dt>
  3623. <dt><code>--version</code></dt>
  3624. <dd><p>Display the version number of <code>size</code>.
  3625. </p>
  3626. </dd>
  3627. <dt><code>-f</code></dt>
  3628. <dd><p>Ignored. This option is used by other versions of the <code>size</code>
  3629. program, but it is not supported by the GNU Binutils version.
  3630. </p>
  3631. </dd>
  3632. </dl>
  3633. <hr>
  3634. <span id="strings"></span><div class="header">
  3635. <p>
  3636. Next: <a href="#strip" accesskey="n" rel="next">strip</a>, Previous: <a href="#size" accesskey="p" rel="prev">size</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  3637. </div>
  3638. <span id="strings-1"></span><h2 class="chapter">7 strings</h2>
  3639. <span id="index-strings"></span>
  3640. <span id="index-listings-strings"></span>
  3641. <span id="index-printing-strings"></span>
  3642. <span id="index-strings_002c-printing"></span>
  3643. <div class="example">
  3644. <pre class="example">strings [<samp>-afovV</samp>] [<samp>-</samp><var>min-len</var>]
  3645. [<samp>-n</samp> <var>min-len</var>] [<samp>--bytes=</samp><var>min-len</var>]
  3646. [<samp>-t</samp> <var>radix</var>] [<samp>--radix=</samp><var>radix</var>]
  3647. [<samp>-e</samp> <var>encoding</var>] [<samp>--encoding=</samp><var>encoding</var>]
  3648. [<samp>-U</samp> <var>method</var>] [<samp>--unicode=</samp><var>method</var>]
  3649. [<samp>-</samp>] [<samp>--all</samp>] [<samp>--print-file-name</samp>]
  3650. [<samp>-T</samp> <var>bfdname</var>] [<samp>--target=</samp><var>bfdname</var>]
  3651. [<samp>-w</samp>] [<samp>--include-all-whitespace</samp>]
  3652. [<samp>-s</samp>] [<samp>--output-separator</samp> <var>sep_string</var>]
  3653. [<samp>--help</samp>] [<samp>--version</samp>] <var>file</var>&hellip;
  3654. </pre></div>
  3655. <p>For each <var>file</var> given, <small>GNU</small> <code>strings</code> prints the
  3656. printable character sequences that are at least 4 characters long (or
  3657. the number given with the options below) and are followed by an
  3658. unprintable character.
  3659. </p>
  3660. <p>Depending upon how the strings program was configured it will default
  3661. to either displaying all the printable sequences that it can find in
  3662. each file, or only those sequences that are in loadable, initialized
  3663. data sections. If the file type is unrecognizable, or if strings is
  3664. reading from stdin then it will always display all of the printable
  3665. sequences that it can find.
  3666. </p>
  3667. <p>For backwards compatibility any file that occurs after a command-line
  3668. option of just <samp>-</samp> will also be scanned in full, regardless of
  3669. the presence of any <samp>-d</samp> option.
  3670. </p>
  3671. <p><code>strings</code> is mainly useful for determining the contents of
  3672. non-text files.
  3673. </p>
  3674. <dl compact="compact">
  3675. <dt><code>-a</code></dt>
  3676. <dt><code>--all</code></dt>
  3677. <dt><code>-</code></dt>
  3678. <dd><p>Scan the whole file, regardless of what sections it contains or
  3679. whether those sections are loaded or initialized. Normally this is
  3680. the default behaviour, but strings can be configured so that the
  3681. <samp>-d</samp> is the default instead.
  3682. </p>
  3683. <p>The <samp>-</samp> option is position dependent and forces strings to
  3684. perform full scans of any file that is mentioned after the <samp>-</samp>
  3685. on the command line, even if the <samp>-d</samp> option has been
  3686. specified.
  3687. </p>
  3688. </dd>
  3689. <dt><code>-d</code></dt>
  3690. <dt><code>--data</code></dt>
  3691. <dd><p>Only print strings from initialized, loaded data sections in the
  3692. file. This may reduce the amount of garbage in the output, but it
  3693. also exposes the strings program to any security flaws that may be
  3694. present in the BFD library used to scan and load sections. Strings
  3695. can be configured so that this option is the default behaviour. In
  3696. such cases the <samp>-a</samp> option can be used to avoid using the BFD
  3697. library and instead just print all of the strings found in the file.
  3698. </p>
  3699. </dd>
  3700. <dt><code>-f</code></dt>
  3701. <dt><code>--print-file-name</code></dt>
  3702. <dd><p>Print the name of the file before each string.
  3703. </p>
  3704. </dd>
  3705. <dt><code>--help</code></dt>
  3706. <dd><p>Print a summary of the program usage on the standard output and exit.
  3707. </p>
  3708. </dd>
  3709. <dt><code>-<var>min-len</var></code></dt>
  3710. <dt><code>-n <var>min-len</var></code></dt>
  3711. <dt><code>--bytes=<var>min-len</var></code></dt>
  3712. <dd><p>Print sequences of displayable characters that are at least
  3713. <var>min-len</var> characters long. If not specified a default minimum
  3714. length of 4 is used. The distinction between displayable and
  3715. non-displayable characters depends upon the setting of the
  3716. <samp>-e</samp> and <samp>-U</samp> options. Sequences are always terminated
  3717. at control characters such as new-line and carriage-return, but not
  3718. the tab character.
  3719. </p>
  3720. </dd>
  3721. <dt><code>-o</code></dt>
  3722. <dd><p>Like &lsquo;<samp>-t o</samp>&rsquo;. Some other versions of <code>strings</code> have <samp>-o</samp>
  3723. act like &lsquo;<samp>-t d</samp>&rsquo; instead. Since we can not be compatible with both
  3724. ways, we simply chose one.
  3725. </p>
  3726. </dd>
  3727. <dt><code>-t <var>radix</var></code></dt>
  3728. <dt><code>--radix=<var>radix</var></code></dt>
  3729. <dd><p>Print the offset within the file before each string. The single
  3730. character argument specifies the radix of the offset&mdash;&lsquo;<samp>o</samp>&rsquo; for
  3731. octal, &lsquo;<samp>x</samp>&rsquo; for hexadecimal, or &lsquo;<samp>d</samp>&rsquo; for decimal.
  3732. </p>
  3733. </dd>
  3734. <dt><code>-e <var>encoding</var></code></dt>
  3735. <dt><code>--encoding=<var>encoding</var></code></dt>
  3736. <dd><p>Select the character encoding of the strings that are to be found.
  3737. Possible values for <var>encoding</var> are: &lsquo;<samp>s</samp>&rsquo; = single-7-bit-byte
  3738. characters (default), &lsquo;<samp>S</samp>&rsquo; =
  3739. single-8-bit-byte characters, &lsquo;<samp>b</samp>&rsquo; = 16-bit bigendian, &lsquo;<samp>l</samp>&rsquo; =
  3740. 16-bit littleendian, &lsquo;<samp>B</samp>&rsquo; = 32-bit bigendian, &lsquo;<samp>L</samp>&rsquo; = 32-bit
  3741. littleendian. Useful for finding wide character strings. (&lsquo;<samp>l</samp>&rsquo;
  3742. and &lsquo;<samp>b</samp>&rsquo; apply to, for example, Unicode UTF-16/UCS-2 encodings).
  3743. </p>
  3744. </dd>
  3745. <dt><code>-U <var>[d|i|l|e|x|h]</var></code></dt>
  3746. <dt><code>--unicode=<var>[default|invalid|locale|escape|hex|highlight]</var></code></dt>
  3747. <dd><p>Controls the display of UTF-8 encoded multibyte characters in strings.
  3748. The default (<samp>--unicode=default</samp>) is to give them no special
  3749. treatment, and instead rely upon the setting of the
  3750. <samp>--encoding</samp> option. The other values for this option
  3751. automatically enable <samp>--encoding=S</samp>.
  3752. </p>
  3753. <p>The <samp>--unicode=invalid</samp> option treats them as non-graphic
  3754. characters and hence not part of a valid string. All the remaining
  3755. options treat them as valid string characters.
  3756. </p>
  3757. <p>The <samp>--unicode=locale</samp> option displays them in the current
  3758. locale, which may or may not support UTF-8 encoding. The
  3759. <samp>--unicode=hex</samp> option displays them as hex byte sequences
  3760. enclosed between <var>&lt;&gt;</var> characters. The <samp>--unicode=escape</samp>
  3761. option displays them as escape sequences (<var>\uxxxx</var>) and the
  3762. <samp>--unicode=highlight</samp> option displays them as escape sequences
  3763. highlighted in red (if supported by the output device). The colouring
  3764. is intended to draw attention to the presence of unicode sequences
  3765. where they might not be expected.
  3766. </p>
  3767. </dd>
  3768. <dt><code>-T <var>bfdname</var></code></dt>
  3769. <dt><code>--target=<var>bfdname</var></code></dt>
  3770. <dd><span id="index-object-code-format-3"></span>
  3771. <p>Specify an object code format other than your system&rsquo;s default format.
  3772. See <a href="#Target-Selection">Target Selection</a>, for more information.
  3773. </p>
  3774. </dd>
  3775. <dt><code>-v</code></dt>
  3776. <dt><code>-V</code></dt>
  3777. <dt><code>--version</code></dt>
  3778. <dd><p>Print the program version number on the standard output and exit.
  3779. </p>
  3780. </dd>
  3781. <dt><code>-w</code></dt>
  3782. <dt><code>--include-all-whitespace</code></dt>
  3783. <dd><p>By default tab and space characters are included in the strings that
  3784. are displayed, but other whitespace characters, such a newlines and
  3785. carriage returns, are not. The <samp>-w</samp> option changes this so
  3786. that all whitespace characters are considered to be part of a string.
  3787. </p>
  3788. </dd>
  3789. <dt><code>-s</code></dt>
  3790. <dt><code>--output-separator</code></dt>
  3791. <dd><p>By default, output strings are delimited by a new-line. This option
  3792. allows you to supply any string to be used as the output record
  3793. separator. Useful with &ndash;include-all-whitespace where strings
  3794. may contain new-lines internally.
  3795. </p></dd>
  3796. </dl>
  3797. <hr>
  3798. <span id="strip"></span><div class="header">
  3799. <p>
  3800. Next: <a href="#c_002b_002bfilt" accesskey="n" rel="next">c++filt</a>, Previous: <a href="#strings" accesskey="p" rel="prev">strings</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  3801. </div>
  3802. <span id="strip-1"></span><h2 class="chapter">8 strip</h2>
  3803. <span id="index-strip"></span>
  3804. <span id="index-removing-symbols"></span>
  3805. <span id="index-discarding-symbols"></span>
  3806. <span id="index-symbols_002c-discarding"></span>
  3807. <div class="example">
  3808. <pre class="example">strip [<samp>-F</samp> <var>bfdname</var> |<samp>--target=</samp><var>bfdname</var>]
  3809. [<samp>-I</samp> <var>bfdname</var> |<samp>--input-target=</samp><var>bfdname</var>]
  3810. [<samp>-O</samp> <var>bfdname</var> |<samp>--output-target=</samp><var>bfdname</var>]
  3811. [<samp>-s</samp>|<samp>--strip-all</samp>]
  3812. [<samp>-S</samp>|<samp>-g</samp>|<samp>-d</samp>|<samp>--strip-debug</samp>]
  3813. [<samp>--strip-dwo</samp>]
  3814. [<samp>-K</samp> <var>symbolname</var>|<samp>--keep-symbol=</samp><var>symbolname</var>]
  3815. [<samp>-M</samp>|<samp>--merge-notes</samp>][<samp>--no-merge-notes</samp>]
  3816. [<samp>-N</samp> <var>symbolname</var> |<samp>--strip-symbol=</samp><var>symbolname</var>]
  3817. [<samp>-w</samp>|<samp>--wildcard</samp>]
  3818. [<samp>-x</samp>|<samp>--discard-all</samp>] [<samp>-X</samp> |<samp>--discard-locals</samp>]
  3819. [<samp>-R</samp> <var>sectionname</var> |<samp>--remove-section=</samp><var>sectionname</var>]
  3820. [<samp>--keep-section=</samp><var>sectionpattern</var>]
  3821. [<samp>--remove-relocations=</samp><var>sectionpattern</var>]
  3822. [<samp>--strip-section-headers</samp>]
  3823. [<samp>-o</samp> <var>file</var>] [<samp>-p</samp>|<samp>--preserve-dates</samp>]
  3824. [<samp>-D</samp>|<samp>--enable-deterministic-archives</samp>]
  3825. [<samp>-U</samp>|<samp>--disable-deterministic-archives</samp>]
  3826. [<samp>--keep-section-symbols</samp>]
  3827. [<samp>--keep-file-symbols</samp>]
  3828. [<samp>--only-keep-debug</samp>]
  3829. [<samp>-v</samp> |<samp>--verbose</samp>] [<samp>-V</samp>|<samp>--version</samp>]
  3830. [<samp>--help</samp>] [<samp>--info</samp>]
  3831. <var>objfile</var>&hellip;
  3832. </pre></div>
  3833. <p><small>GNU</small> <code>strip</code> discards all symbols from object files
  3834. <var>objfile</var>. The list of object files may include archives.
  3835. At least one object file must be given.
  3836. </p>
  3837. <p><code>strip</code> modifies the files named in its argument,
  3838. rather than writing modified copies under different names.
  3839. </p>
  3840. <dl compact="compact">
  3841. <dt><code>-F <var>bfdname</var></code></dt>
  3842. <dt><code>--target=<var>bfdname</var></code></dt>
  3843. <dd><p>Treat the original <var>objfile</var> as a file with the object
  3844. code format <var>bfdname</var>, and rewrite it in the same format.
  3845. See <a href="#Target-Selection">Target Selection</a>, for more information.
  3846. </p>
  3847. </dd>
  3848. <dt><code>--help</code></dt>
  3849. <dd><p>Show a summary of the options to <code>strip</code> and exit.
  3850. </p>
  3851. </dd>
  3852. <dt><code>--info</code></dt>
  3853. <dd><p>Display a list showing all architectures and object formats available.
  3854. </p>
  3855. </dd>
  3856. <dt><code>-I <var>bfdname</var></code></dt>
  3857. <dt><code>--input-target=<var>bfdname</var></code></dt>
  3858. <dd><p>Treat the original <var>objfile</var> as a file with the object
  3859. code format <var>bfdname</var>.
  3860. See <a href="#Target-Selection">Target Selection</a>, for more information.
  3861. </p>
  3862. </dd>
  3863. <dt><code>-O <var>bfdname</var></code></dt>
  3864. <dt><code>--output-target=<var>bfdname</var></code></dt>
  3865. <dd><p>Replace <var>objfile</var> with a file in the output format <var>bfdname</var>.
  3866. See <a href="#Target-Selection">Target Selection</a>, for more information.
  3867. </p>
  3868. </dd>
  3869. <dt><code>-R <var>sectionname</var></code></dt>
  3870. <dt><code>--remove-section=<var>sectionname</var></code></dt>
  3871. <dd><p>Remove any section named <var>sectionname</var> from the output file, in
  3872. addition to whatever sections would otherwise be removed. This
  3873. option may be given more than once. Note that using this option
  3874. inappropriately may make the output file unusable. The wildcard
  3875. character &lsquo;<samp>*</samp>&rsquo; may be given at the end of <var>sectionname</var>. If
  3876. so, then any section starting with <var>sectionname</var> will be removed.
  3877. </p>
  3878. <p>If the first character of <var>sectionpattern</var> is the exclamation
  3879. point (!) then matching sections will not be removed even if an
  3880. earlier use of <samp>--remove-section</samp> on the same command line
  3881. would otherwise remove it. For example:
  3882. </p>
  3883. <div class="example">
  3884. <pre class="example"> --remove-section=.text.* --remove-section=!.text.foo
  3885. </pre></div>
  3886. <p>will remove all sections matching the pattern &rsquo;.text.*&rsquo;, but will not
  3887. remove the section &rsquo;.text.foo&rsquo;.
  3888. </p>
  3889. </dd>
  3890. <dt><code>--keep-section=<var>sectionpattern</var></code></dt>
  3891. <dd><p>When removing sections from the output file, keep sections that match
  3892. <var>sectionpattern</var>.
  3893. </p>
  3894. </dd>
  3895. <dt><code>--remove-relocations=<var>sectionpattern</var></code></dt>
  3896. <dd><p>Remove relocations from the output file for any section matching
  3897. <var>sectionpattern</var>. This option may be given more than once. Note
  3898. that using this option inappropriately may make the output file
  3899. unusable. Wildcard characters are accepted in <var>sectionpattern</var>.
  3900. For example:
  3901. </p>
  3902. <div class="example">
  3903. <pre class="example"> --remove-relocations=.text.*
  3904. </pre></div>
  3905. <p>will remove the relocations for all sections matching the patter
  3906. &rsquo;.text.*&rsquo;.
  3907. </p>
  3908. <p>If the first character of <var>sectionpattern</var> is the exclamation
  3909. point (!) then matching sections will not have their relocation
  3910. removed even if an earlier use of <samp>--remove-relocations</samp> on the
  3911. same command line would otherwise cause the relocations to be removed.
  3912. For example:
  3913. </p>
  3914. <div class="example">
  3915. <pre class="example"> --remove-relocations=.text.* --remove-relocations=!.text.foo
  3916. </pre></div>
  3917. <p>will remove all relocations for sections matching the pattern
  3918. &rsquo;.text.*&rsquo;, but will not remove relocations for the section
  3919. &rsquo;.text.foo&rsquo;.
  3920. </p>
  3921. </dd>
  3922. <dt><code>--strip-section-headers</code></dt>
  3923. <dd><p>Strip section headers. This option is specific to ELF files. Implies
  3924. <samp>--strip-all</samp> and <samp>--merge-notes</samp>.
  3925. </p>
  3926. </dd>
  3927. <dt><code>-s</code></dt>
  3928. <dt><code>--strip-all</code></dt>
  3929. <dd><p>Remove all symbols.
  3930. </p>
  3931. </dd>
  3932. <dt><code>-g</code></dt>
  3933. <dt><code>-S</code></dt>
  3934. <dt><code>-d</code></dt>
  3935. <dt><code>--strip-debug</code></dt>
  3936. <dd><p>Remove debugging symbols only.
  3937. </p>
  3938. </dd>
  3939. <dt><code>--strip-dwo</code></dt>
  3940. <dd><p>Remove the contents of all DWARF .dwo sections, leaving the
  3941. remaining debugging sections and all symbols intact.
  3942. See the description of this option in the <code>objcopy</code> section
  3943. for more information.
  3944. </p>
  3945. </dd>
  3946. <dt><code>--strip-unneeded</code></dt>
  3947. <dd><p>Remove all symbols that are not needed for relocation processing in
  3948. addition to debugging symbols and sections stripped by
  3949. <samp>--strip-debug</samp>.
  3950. </p>
  3951. </dd>
  3952. <dt><code>-K <var>symbolname</var></code></dt>
  3953. <dt><code>--keep-symbol=<var>symbolname</var></code></dt>
  3954. <dd><p>When stripping symbols, keep symbol <var>symbolname</var> even if it would
  3955. normally be stripped. This option may be given more than once.
  3956. </p>
  3957. </dd>
  3958. <dt><code>-M</code></dt>
  3959. <dt><code>--merge-notes</code></dt>
  3960. <dt><code>--no-merge-notes</code></dt>
  3961. <dd><p>For ELF files, attempt (or do not attempt) to reduce the size of any
  3962. SHT_NOTE type sections by removing duplicate notes. The default is to
  3963. attempt this reduction unless stripping debug or DWO information.
  3964. </p>
  3965. </dd>
  3966. <dt><code>-N <var>symbolname</var></code></dt>
  3967. <dt><code>--strip-symbol=<var>symbolname</var></code></dt>
  3968. <dd><p>Remove symbol <var>symbolname</var> from the source file. This option may be
  3969. given more than once, and may be combined with strip options other than
  3970. <samp>-K</samp>.
  3971. </p>
  3972. </dd>
  3973. <dt><code>-o <var>file</var></code></dt>
  3974. <dd><p>Put the stripped output in <var>file</var>, rather than replacing the
  3975. existing file. When this argument is used, only one <var>objfile</var>
  3976. argument may be specified.
  3977. </p>
  3978. </dd>
  3979. <dt><code>-p</code></dt>
  3980. <dt><code>--preserve-dates</code></dt>
  3981. <dd><p>Preserve the access and modification dates of the file.
  3982. </p>
  3983. </dd>
  3984. <dt><code>-D</code></dt>
  3985. <dt><code>--enable-deterministic-archives</code></dt>
  3986. <dd><span id="index-deterministic-archives-6"></span>
  3987. <span id="index-_002d_002denable_002ddeterministic_002darchives-6"></span>
  3988. <p>Operate in <em>deterministic</em> mode. When copying archive members
  3989. and writing the archive index, use zero for UIDs, GIDs, timestamps,
  3990. and use consistent file modes for all files.
  3991. </p>
  3992. <p>If <samp>binutils</samp> was configured with
  3993. <samp>--enable-deterministic-archives</samp>, then this mode is on by default.
  3994. It can be disabled with the &lsquo;<samp>-U</samp>&rsquo; option, below.
  3995. </p>
  3996. </dd>
  3997. <dt><code>-U</code></dt>
  3998. <dt><code>--disable-deterministic-archives</code></dt>
  3999. <dd><span id="index-deterministic-archives-7"></span>
  4000. <span id="index-_002d_002denable_002ddeterministic_002darchives-7"></span>
  4001. <p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the
  4002. inverse of the <samp>-D</samp> option, above: when copying archive members
  4003. and writing the archive index, use their actual UID, GID, timestamp,
  4004. and file mode values.
  4005. </p>
  4006. <p>This is the default unless <samp>binutils</samp> was configured with
  4007. <samp>--enable-deterministic-archives</samp>.
  4008. </p>
  4009. </dd>
  4010. <dt><code>-w</code></dt>
  4011. <dt><code>--wildcard</code></dt>
  4012. <dd><p>Permit regular expressions in <var>symbolname</var>s used in other command
  4013. line options. The question mark (?), asterisk (*), backslash (\) and
  4014. square brackets ([]) operators can be used anywhere in the symbol
  4015. name. If the first character of the symbol name is the exclamation
  4016. point (!) then the sense of the switch is reversed for that symbol.
  4017. For example:
  4018. </p>
  4019. <div class="example">
  4020. <pre class="example"> -w -K !foo -K fo*
  4021. </pre></div>
  4022. <p>would cause strip to only keep symbols that start with the letters
  4023. &ldquo;fo&rdquo;, but to discard the symbol &ldquo;foo&rdquo;.
  4024. </p>
  4025. </dd>
  4026. <dt><code>-x</code></dt>
  4027. <dt><code>--discard-all</code></dt>
  4028. <dd><p>Remove non-global symbols.
  4029. </p>
  4030. </dd>
  4031. <dt><code>-X</code></dt>
  4032. <dt><code>--discard-locals</code></dt>
  4033. <dd><p>Remove compiler-generated local symbols.
  4034. (These usually start with &lsquo;<samp>L</samp>&rsquo; or &lsquo;<samp>.</samp>&rsquo;.)
  4035. </p>
  4036. </dd>
  4037. <dt><code>--keep-section-symbols</code></dt>
  4038. <dd><p>When stripping a file, perhaps with <samp>--strip-debug</samp> or
  4039. <samp>--strip-unneeded</samp>, retain any symbols specifying section names,
  4040. which would otherwise get stripped.
  4041. </p>
  4042. </dd>
  4043. <dt><code>--keep-file-symbols</code></dt>
  4044. <dd><p>When stripping a file, perhaps with <samp>--strip-debug</samp> or
  4045. <samp>--strip-unneeded</samp>, retain any symbols specifying source file names,
  4046. which would otherwise get stripped.
  4047. </p>
  4048. </dd>
  4049. <dt><code>--only-keep-debug</code></dt>
  4050. <dd><p>Strip a file, emptying the contents of any sections that would not be
  4051. stripped by <samp>--strip-debug</samp> and leaving the debugging sections
  4052. intact. In ELF files, this preserves all the note sections in the
  4053. output as well.
  4054. </p>
  4055. <p>Note - the section headers of the stripped sections are preserved,
  4056. including their sizes, but the contents of the section are discarded.
  4057. The section headers are preserved so that other tools can match up the
  4058. debuginfo file with the real executable, even if that executable has
  4059. been relocated to a different address space.
  4060. </p>
  4061. <p>The intention is that this option will be used in conjunction with
  4062. <samp>--add-gnu-debuglink</samp> to create a two part executable. One a
  4063. stripped binary which will occupy less space in RAM and in a
  4064. distribution and the second a debugging information file which is only
  4065. needed if debugging abilities are required. The suggested procedure
  4066. to create these files is as follows:
  4067. </p>
  4068. <ol>
  4069. <li> Link the executable as normal. Assuming that it is called
  4070. <code>foo</code> then...
  4071. </li><li> Run <code>objcopy --only-keep-debug foo foo.dbg</code> to
  4072. create a file containing the debugging info.
  4073. </li><li> Run <code>objcopy --strip-debug foo</code> to create a
  4074. stripped executable.
  4075. </li><li> Run <code>objcopy --add-gnu-debuglink=foo.dbg foo</code>
  4076. to add a link to the debugging info into the stripped executable.
  4077. </li></ol>
  4078. <p>Note&mdash;the choice of <code>.dbg</code> as an extension for the debug info
  4079. file is arbitrary. Also the <code>--only-keep-debug</code> step is
  4080. optional. You could instead do this:
  4081. </p>
  4082. <ol>
  4083. <li> Link the executable as normal.
  4084. </li><li> Copy <code>foo</code> to <code>foo.full</code>
  4085. </li><li> Run <code>strip --strip-debug foo</code>
  4086. </li><li> Run <code>objcopy --add-gnu-debuglink=foo.full foo</code>
  4087. </li></ol>
  4088. <p>i.e., the file pointed to by the <samp>--add-gnu-debuglink</samp> can be the
  4089. full executable. It does not have to be a file created by the
  4090. <samp>--only-keep-debug</samp> switch.
  4091. </p>
  4092. <p>Note&mdash;this switch is only intended for use on fully linked files. It
  4093. does not make sense to use it on object files where the debugging
  4094. information may be incomplete. Besides the gnu_debuglink feature
  4095. currently only supports the presence of one filename containing
  4096. debugging information, not multiple filenames on a one-per-object-file
  4097. basis.
  4098. </p>
  4099. </dd>
  4100. <dt><code>-V</code></dt>
  4101. <dt><code>--version</code></dt>
  4102. <dd><p>Show the version number for <code>strip</code>.
  4103. </p>
  4104. </dd>
  4105. <dt><code>-v</code></dt>
  4106. <dt><code>--verbose</code></dt>
  4107. <dd><p>Verbose output: list all object files modified. In the case of
  4108. archives, &lsquo;<samp>strip -v</samp>&rsquo; lists all members of the archive.
  4109. </p></dd>
  4110. </dl>
  4111. <hr>
  4112. <span id="c_002b_002bfilt"></span><div class="header">
  4113. <p>
  4114. Next: <a href="#addr2line" accesskey="n" rel="next">addr2line</a>, Previous: <a href="#strip" accesskey="p" rel="prev">strip</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  4115. </div>
  4116. <span id="c_002b_002bfilt-1"></span><h2 class="chapter">9 c++filt</h2>
  4117. <span id="index-c_002b_002bfilt"></span>
  4118. <span id="index-demangling-C_002b_002b-symbols"></span>
  4119. <div class="example">
  4120. <pre class="example">c++filt [<samp>-_</samp>|<samp>--strip-underscore</samp>]
  4121. [<samp>-n</samp>|<samp>--no-strip-underscore</samp>]
  4122. [<samp>-p</samp>|<samp>--no-params</samp>]
  4123. [<samp>-t</samp>|<samp>--types</samp>]
  4124. [<samp>-i</samp>|<samp>--no-verbose</samp>]
  4125. [<samp>-r</samp>|<samp>--no-recurse-limit</samp>]
  4126. [<samp>-R</samp>|<samp>--recurse-limit</samp>]
  4127. [<samp>-s</samp> <var>format</var>|<samp>--format=</samp><var>format</var>]
  4128. [<samp>--help</samp>] [<samp>--version</samp>] [<var>symbol</var>&hellip;]
  4129. </pre></div>
  4130. <span id="index-cxxfilt"></span>
  4131. <p>The C++ and Java languages provide function overloading, which means
  4132. that you can write many functions with the same name, providing that
  4133. each function takes parameters of different types. In order to be
  4134. able to distinguish these similarly named functions C++ and Java
  4135. encode them into a low-level assembler name which uniquely identifies
  4136. each different version. This process is known as <em>mangling</em>. The
  4137. <code>c++filt</code>
  4138. <a id="DOCF1" href="#FOOT1"><sup>1</sup></a>
  4139. program does the inverse mapping: it decodes (<em>demangles</em>) low-level
  4140. names into user-level names so that they can be read.
  4141. </p>
  4142. <p>Every alphanumeric word (consisting of letters, digits, underscores,
  4143. dollars, or periods) seen in the input is a potential mangled name.
  4144. If the name decodes into a C++ name, the C++ name replaces the
  4145. low-level name in the output, otherwise the original word is output.
  4146. In this way you can pass an entire assembler source file, containing
  4147. mangled names, through <code>c++filt</code> and see the same source file
  4148. containing demangled names.
  4149. </p>
  4150. <p>You can also use <code>c++filt</code> to decipher individual symbols by
  4151. passing them on the command line:
  4152. </p>
  4153. <div class="example">
  4154. <pre class="example">c++filt <var>symbol</var>
  4155. </pre></div>
  4156. <p>If no <var>symbol</var> arguments are given, <code>c++filt</code> reads symbol
  4157. names from the standard input instead. All the results are printed on
  4158. the standard output. The difference between reading names from the
  4159. command line versus reading names from the standard input is that
  4160. command-line arguments are expected to be just mangled names and no
  4161. checking is performed to separate them from surrounding text. Thus
  4162. for example:
  4163. </p>
  4164. <div class="example">
  4165. <pre class="example">c++filt -n _Z1fv
  4166. </pre></div>
  4167. <p>will work and demangle the name to &ldquo;f()&rdquo; whereas:
  4168. </p>
  4169. <div class="example">
  4170. <pre class="example">c++filt -n _Z1fv,
  4171. </pre></div>
  4172. <p>will not work. (Note the extra comma at the end of the mangled
  4173. name which makes it invalid). This command however will work:
  4174. </p>
  4175. <div class="example">
  4176. <pre class="example">echo _Z1fv, | c++filt -n
  4177. </pre></div>
  4178. <p>and will display &ldquo;f(),&rdquo;, i.e., the demangled name followed by a
  4179. trailing comma. This behaviour is because when the names are read
  4180. from the standard input it is expected that they might be part of an
  4181. assembler source file where there might be extra, extraneous
  4182. characters trailing after a mangled name. For example:
  4183. </p>
  4184. <div class="example">
  4185. <pre class="example"> .type _Z1fv, @function
  4186. </pre></div>
  4187. <dl compact="compact">
  4188. <dt><code>-_</code></dt>
  4189. <dt><code>--strip-underscore</code></dt>
  4190. <dd><p>On some systems, both the C and C++ compilers put an underscore in front
  4191. of every name. For example, the C name <code>foo</code> gets the low-level
  4192. name <code>_foo</code>. This option removes the initial underscore. Whether
  4193. <code>c++filt</code> removes the underscore by default is target dependent.
  4194. </p>
  4195. </dd>
  4196. <dt><code>-n</code></dt>
  4197. <dt><code>--no-strip-underscore</code></dt>
  4198. <dd><p>Do not remove the initial underscore.
  4199. </p>
  4200. </dd>
  4201. <dt><code>-p</code></dt>
  4202. <dt><code>--no-params</code></dt>
  4203. <dd><p>When demangling the name of a function, do not display the types of
  4204. the function&rsquo;s parameters.
  4205. </p>
  4206. </dd>
  4207. <dt><code>-t</code></dt>
  4208. <dt><code>--types</code></dt>
  4209. <dd><p>Attempt to demangle types as well as function names. This is disabled
  4210. by default since mangled types are normally only used internally in
  4211. the compiler, and they can be confused with non-mangled names. For example,
  4212. a function called &ldquo;a&rdquo; treated as a mangled type name would be
  4213. demangled to &ldquo;signed char&rdquo;.
  4214. </p>
  4215. </dd>
  4216. <dt><code>-i</code></dt>
  4217. <dt><code>--no-verbose</code></dt>
  4218. <dd><p>Do not include implementation details (if any) in the demangled
  4219. output.
  4220. </p>
  4221. </dd>
  4222. <dt><code>-r</code></dt>
  4223. <dt><code>-R</code></dt>
  4224. <dt><code>--recurse-limit</code></dt>
  4225. <dt><code>--no-recurse-limit</code></dt>
  4226. <dt><code>--recursion-limit</code></dt>
  4227. <dt><code>--no-recursion-limit</code></dt>
  4228. <dd><p>Enables or disables a limit on the amount of recursion performed
  4229. whilst demangling strings. Since the name mangling formats allow for
  4230. an infinite level of recursion it is possible to create strings whose
  4231. decoding will exhaust the amount of stack space available on the host
  4232. machine, triggering a memory fault. The limit tries to prevent this
  4233. from happening by restricting recursion to 2048 levels of nesting.
  4234. </p>
  4235. <p>The default is for this limit to be enabled, but disabling it may be
  4236. necessary in order to demangle truly complicated names. Note however
  4237. that if the recursion limit is disabled then stack exhaustion is
  4238. possible and any bug reports about such an event will be rejected.
  4239. </p>
  4240. <p>The <samp>-r</samp> option is a synonym for the
  4241. <samp>--no-recurse-limit</samp> option. The <samp>-R</samp> option is a
  4242. synonym for the <samp>--recurse-limit</samp> option.
  4243. </p>
  4244. </dd>
  4245. <dt><code>-s <var>format</var></code></dt>
  4246. <dt><code>--format=<var>format</var></code></dt>
  4247. <dd><p><code>c++filt</code> can decode various methods of mangling, used by
  4248. different compilers. The argument to this option selects which
  4249. method it uses:
  4250. </p>
  4251. <dl compact="compact">
  4252. <dt><code>auto</code></dt>
  4253. <dd><p>Automatic selection based on executable (the default method)
  4254. </p></dd>
  4255. <dt><code>gnu</code></dt>
  4256. <dd><p>the one used by the <small>GNU</small> C++ compiler (g++)
  4257. </p></dd>
  4258. <dt><code>lucid</code></dt>
  4259. <dd><p>the one used by the Lucid compiler (lcc)
  4260. </p></dd>
  4261. <dt><code>arm</code></dt>
  4262. <dd><p>the one specified by the C++ Annotated Reference Manual
  4263. </p></dd>
  4264. <dt><code>hp</code></dt>
  4265. <dd><p>the one used by the HP compiler (aCC)
  4266. </p></dd>
  4267. <dt><code>edg</code></dt>
  4268. <dd><p>the one used by the EDG compiler
  4269. </p></dd>
  4270. <dt><code>gnu-v3</code></dt>
  4271. <dd><p>the one used by the <small>GNU</small> C++ compiler (g++) with the V3 ABI.
  4272. </p></dd>
  4273. <dt><code>java</code></dt>
  4274. <dd><p>the one used by the <small>GNU</small> Java compiler (gcj)
  4275. </p></dd>
  4276. <dt><code>gnat</code></dt>
  4277. <dd><p>the one used by the <small>GNU</small> Ada compiler (GNAT).
  4278. </p></dd>
  4279. </dl>
  4280. </dd>
  4281. <dt><code>--help</code></dt>
  4282. <dd><p>Print a summary of the options to <code>c++filt</code> and exit.
  4283. </p>
  4284. </dd>
  4285. <dt><code>--version</code></dt>
  4286. <dd><p>Print the version number of <code>c++filt</code> and exit.
  4287. </p></dd>
  4288. </dl>
  4289. <blockquote>
  4290. <p><em>Warning:</em> <code>c++filt</code> is a new utility, and the details of its
  4291. user interface are subject to change in future releases. In particular,
  4292. a command-line option may be required in the future to decode a name
  4293. passed as an argument on the command line; in other words,
  4294. </p>
  4295. <div class="example">
  4296. <pre class="example">c++filt <var>symbol</var>
  4297. </pre></div>
  4298. <p>may in a future release become
  4299. </p>
  4300. <div class="example">
  4301. <pre class="example">c++filt <var>option</var> <var>symbol</var>
  4302. </pre></div>
  4303. </blockquote>
  4304. <hr>
  4305. <span id="addr2line"></span><div class="header">
  4306. <p>
  4307. Next: <a href="#windmc" accesskey="n" rel="next">windmc</a>, Previous: <a href="#c_002b_002bfilt" accesskey="p" rel="prev">c++filt</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  4308. </div>
  4309. <span id="addr2line-1"></span><h2 class="chapter">10 addr2line</h2>
  4310. <span id="index-addr2line"></span>
  4311. <span id="index-address-to-file-name-and-line-number"></span>
  4312. <div class="example">
  4313. <pre class="example">addr2line [<samp>-a</samp>|<samp>--addresses</samp>]
  4314. [<samp>-b</samp> <var>bfdname</var>|<samp>--target=</samp><var>bfdname</var>]
  4315. [<samp>-C</samp>|<samp>--demangle</samp>[=<var>style</var>]]
  4316. [<samp>-r</samp>|<samp>--no-recurse-limit</samp>]
  4317. [<samp>-R</samp>|<samp>--recurse-limit</samp>]
  4318. [<samp>-e</samp> <var>filename</var>|<samp>--exe=</samp><var>filename</var>]
  4319. [<samp>-f</samp>|<samp>--functions</samp>] [<samp>-s</samp>|<samp>--basename</samp>]
  4320. [<samp>-i</samp>|<samp>--inlines</samp>]
  4321. [<samp>-p</samp>|<samp>--pretty-print</samp>]
  4322. [<samp>-j</samp>|<samp>--section=</samp><var>name</var>]
  4323. [<samp>-H</samp>|<samp>--help</samp>] [<samp>-V</samp>|<samp>--version</samp>]
  4324. [addr addr &hellip;]
  4325. </pre></div>
  4326. <p><code>addr2line</code> translates addresses or symbol+offset into file names and line numbers.
  4327. Given an address or symbol+offset in an executable or an offset in a section of a relocatable
  4328. object, it uses the debugging information to figure out which file name and
  4329. line number are associated with it.
  4330. </p>
  4331. <p>The executable or relocatable object to use is specified with the <samp>-e</samp>
  4332. option. The default is the file <samp>a.out</samp>. The section in the relocatable
  4333. object to use is specified with the <samp>-j</samp> option.
  4334. </p>
  4335. <p><code>addr2line</code> has two modes of operation.
  4336. </p>
  4337. <p>In the first, hexadecimal addresses or symbol+offset are specified on the command line,
  4338. and <code>addr2line</code> displays the file name and line number for each
  4339. address.
  4340. </p>
  4341. <p>In the second, <code>addr2line</code> reads hexadecimal addresses or symbol+offset from
  4342. standard input, and prints the file name and line number for each
  4343. address on standard output. In this mode, <code>addr2line</code> may be used
  4344. in a pipe to convert dynamically chosen addresses.
  4345. </p>
  4346. <p>The format of the output is &lsquo;<samp>FILENAME:LINENO</samp>&rsquo;. By default
  4347. each input address generates one line of output.
  4348. </p>
  4349. <p>Two options can generate additional lines before each
  4350. &lsquo;<samp>FILENAME:LINENO</samp>&rsquo; line (in that order).
  4351. </p>
  4352. <p>If the <samp>-a</samp> option is used then a line with the input address
  4353. is displayed.
  4354. </p>
  4355. <p>If the <samp>-f</samp> option is used, then a line with the
  4356. &lsquo;<samp>FUNCTIONNAME</samp>&rsquo; is displayed. This is the name of the function
  4357. containing the address.
  4358. </p>
  4359. <p>One option can generate additional lines after the
  4360. &lsquo;<samp>FILENAME:LINENO</samp>&rsquo; line.
  4361. </p>
  4362. <p>If the <samp>-i</samp> option is used and the code at the given address is
  4363. present there because of inlining by the compiler then additional
  4364. lines are displayed afterwards. One or two extra lines (if the
  4365. <samp>-f</samp> option is used) are displayed for each inlined function.
  4366. </p>
  4367. <p>Alternatively if the <samp>-p</samp> option is used then each input
  4368. address generates a single, long, output line containing the address,
  4369. the function name, the file name and the line number. If the
  4370. <samp>-i</samp> option has also been used then any inlined functions will
  4371. be displayed in the same manner, but on separate lines, and prefixed
  4372. by the text &lsquo;<samp>(inlined by)</samp>&rsquo;.
  4373. </p>
  4374. <p>If the file name or function name can not be determined,
  4375. <code>addr2line</code> will print two question marks in their place. If the
  4376. line number can not be determined, <code>addr2line</code> will print 0.
  4377. </p>
  4378. <p>When symbol+offset is used, +offset is optional, except when the symbol
  4379. is ambigious with a hex number. The resolved symbols can be mangled
  4380. or unmangled, except unmangled symbols with + are not allowed.
  4381. </p>
  4382. <p>The long and short forms of options, shown here as alternatives, are
  4383. equivalent.
  4384. </p>
  4385. <dl compact="compact">
  4386. <dt><code>-a</code></dt>
  4387. <dt><code>--addresses</code></dt>
  4388. <dd><p>Display the address before the function name, file and line number
  4389. information. The address is printed with a &lsquo;<samp>0x</samp>&rsquo; prefix to easily
  4390. identify it.
  4391. </p>
  4392. </dd>
  4393. <dt><code>-b <var>bfdname</var></code></dt>
  4394. <dt><code>--target=<var>bfdname</var></code></dt>
  4395. <dd><span id="index-object-code-format-4"></span>
  4396. <p>Specify that the object-code format for the object files is
  4397. <var>bfdname</var>.
  4398. </p>
  4399. </dd>
  4400. <dt><code>-C</code></dt>
  4401. <dt><code>--demangle[=<var>style</var>]</code></dt>
  4402. <dd><span id="index-demangling-in-objdump-1"></span>
  4403. <p>Decode (<em>demangle</em>) low-level symbol names into user-level names.
  4404. Besides removing any initial underscore prepended by the system, this
  4405. makes C++ function names readable. Different compilers have different
  4406. mangling styles. The optional demangling style argument can be used to
  4407. choose an appropriate demangling style for your compiler. See <a href="#c_002b_002bfilt">c++filt</a>,
  4408. for more information on demangling.
  4409. </p>
  4410. </dd>
  4411. <dt><code>-e <var>filename</var></code></dt>
  4412. <dt><code>--exe=<var>filename</var></code></dt>
  4413. <dd><p>Specify the name of the executable for which addresses should be
  4414. translated. The default file is <samp>a.out</samp>.
  4415. </p>
  4416. </dd>
  4417. <dt><code>-f</code></dt>
  4418. <dt><code>--functions</code></dt>
  4419. <dd><p>Display function names as well as file and line number information.
  4420. </p>
  4421. </dd>
  4422. <dt><code>-s</code></dt>
  4423. <dt><code>--basenames</code></dt>
  4424. <dd><p>Display only the base of each file name.
  4425. </p>
  4426. </dd>
  4427. <dt><code>-i</code></dt>
  4428. <dt><code>--inlines</code></dt>
  4429. <dd><p>If the address belongs to a function that was inlined, the source
  4430. information for all enclosing scopes back to the first non-inlined
  4431. function will also be printed. For example, if <code>main</code> inlines
  4432. <code>callee1</code> which inlines <code>callee2</code>, and address is from
  4433. <code>callee2</code>, the source information for <code>callee1</code> and <code>main</code>
  4434. will also be printed.
  4435. </p>
  4436. </dd>
  4437. <dt><code>-j</code></dt>
  4438. <dt><code>--section</code></dt>
  4439. <dd><p>Read offsets relative to the specified section instead of absolute addresses.
  4440. </p>
  4441. </dd>
  4442. <dt><code>-p</code></dt>
  4443. <dt><code>--pretty-print</code></dt>
  4444. <dd><p>Make the output more human friendly: each location are printed on one line.
  4445. If option <samp>-i</samp> is specified, lines for all enclosing scopes are
  4446. prefixed with &lsquo;<samp>(inlined by)</samp>&rsquo;.
  4447. </p>
  4448. </dd>
  4449. <dt><code>-r</code></dt>
  4450. <dt><code>-R</code></dt>
  4451. <dt><code>--recurse-limit</code></dt>
  4452. <dt><code>--no-recurse-limit</code></dt>
  4453. <dt><code>--recursion-limit</code></dt>
  4454. <dt><code>--no-recursion-limit</code></dt>
  4455. <dd><p>Enables or disables a limit on the amount of recursion performed
  4456. whilst demangling strings. Since the name mangling formats allow for
  4457. an infinite level of recursion it is possible to create strings whose
  4458. decoding will exhaust the amount of stack space available on the host
  4459. machine, triggering a memory fault. The limit tries to prevent this
  4460. from happening by restricting recursion to 2048 levels of nesting.
  4461. </p>
  4462. <p>The default is for this limit to be enabled, but disabling it may be
  4463. necessary in order to demangle truly complicated names. Note however
  4464. that if the recursion limit is disabled then stack exhaustion is
  4465. possible and any bug reports about such an event will be rejected.
  4466. </p>
  4467. <p>The <samp>-r</samp> option is a synonym for the
  4468. <samp>--no-recurse-limit</samp> option. The <samp>-R</samp> option is a
  4469. synonym for the <samp>--recurse-limit</samp> option.
  4470. </p>
  4471. <p>Note this option is only effective if the <samp>-C</samp> or
  4472. <samp>--demangle</samp> option has been enabled.
  4473. </p>
  4474. </dd>
  4475. </dl>
  4476. <hr>
  4477. <span id="windmc"></span><div class="header">
  4478. <p>
  4479. Next: <a href="#windres" accesskey="n" rel="next">windres</a>, Previous: <a href="#addr2line" accesskey="p" rel="prev">addr2line</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  4480. </div>
  4481. <span id="windmc-1"></span><h2 class="chapter">11 windmc</h2>
  4482. <p><code>windmc</code> may be used to generator Windows message resources.
  4483. </p>
  4484. <blockquote>
  4485. <p><em>Warning:</em> <code>windmc</code> is not always built as part of the binary
  4486. utilities, since it is only useful for Windows targets.
  4487. </p></blockquote>
  4488. <div class="example">
  4489. <pre class="example">windmc [options] input-file
  4490. </pre></div>
  4491. <p><code>windmc</code> reads message definitions from an input file (.mc) and
  4492. translate them into a set of output files. The output files may be of
  4493. four kinds:
  4494. </p>
  4495. <dl compact="compact">
  4496. <dt><code>h</code></dt>
  4497. <dd><p>A C header file containing the message definitions.
  4498. </p>
  4499. </dd>
  4500. <dt><code>rc</code></dt>
  4501. <dd><p>A resource file compilable by the <code>windres</code> tool.
  4502. </p>
  4503. </dd>
  4504. <dt><code>bin</code></dt>
  4505. <dd><p>One or more binary files containing the resource data for a specific
  4506. message language.
  4507. </p>
  4508. </dd>
  4509. <dt><code>dbg</code></dt>
  4510. <dd><p>A C include file that maps message id&rsquo;s to their symbolic name.
  4511. </p></dd>
  4512. </dl>
  4513. <p>The exact description of these different formats is available in
  4514. documentation from Microsoft.
  4515. </p>
  4516. <p>When <code>windmc</code> converts from the <code>mc</code> format to the <code>bin</code>
  4517. format, <code>rc</code>, <code>h</code>, and optional <code>dbg</code> it is acting like the
  4518. Windows Message Compiler.
  4519. </p>
  4520. <dl compact="compact">
  4521. <dt><code>-a</code></dt>
  4522. <dt><code>--ascii_in</code></dt>
  4523. <dd><p>Specifies that the input file specified is ASCII. This is the default
  4524. behaviour.
  4525. </p>
  4526. </dd>
  4527. <dt><code>-A</code></dt>
  4528. <dt><code>--ascii_out</code></dt>
  4529. <dd><p>Specifies that messages in the output <code>bin</code> files should be in ASCII
  4530. format.
  4531. </p>
  4532. </dd>
  4533. <dt><code>-b</code></dt>
  4534. <dt><code>--binprefix</code></dt>
  4535. <dd><p>Specifies that <code>bin</code> filenames should have to be prefixed by the
  4536. basename of the source file.
  4537. </p>
  4538. </dd>
  4539. <dt><code>-c</code></dt>
  4540. <dt><code>--customflag</code></dt>
  4541. <dd><p>Sets the customer bit in all message id&rsquo;s.
  4542. </p>
  4543. </dd>
  4544. <dt><code>-C <var>codepage</var></code></dt>
  4545. <dt><code>--codepage_in <var>codepage</var></code></dt>
  4546. <dd><p>Sets the default codepage to be used to convert input file to UTF16. The
  4547. default is ocdepage 1252.
  4548. </p>
  4549. </dd>
  4550. <dt><code>-d</code></dt>
  4551. <dt><code>--decimal_values</code></dt>
  4552. <dd><p>Outputs the constants in the header file in decimal. Default is using
  4553. hexadecimal output.
  4554. </p>
  4555. </dd>
  4556. <dt><code>-e <var>ext</var></code></dt>
  4557. <dt><code>--extension <var>ext</var></code></dt>
  4558. <dd><p>The extension for the header file. The default is .h extension.
  4559. </p>
  4560. </dd>
  4561. <dt><code>-F <var>target</var></code></dt>
  4562. <dt><code>--target <var>target</var></code></dt>
  4563. <dd><p>Specify the BFD format to use for a bin file as output. This
  4564. is a BFD target name; you can use the <samp>--help</samp> option to see a list
  4565. of supported targets. Normally <code>windmc</code> will use the default
  4566. format, which is the first one listed by the <samp>--help</samp> option.
  4567. <a href="#Target-Selection">Target Selection</a>.
  4568. </p>
  4569. </dd>
  4570. <dt><code>-h <var>path</var></code></dt>
  4571. <dt><code>--headerdir <var>path</var></code></dt>
  4572. <dd><p>The target directory of the generated header file. The default is the
  4573. current directory.
  4574. </p>
  4575. </dd>
  4576. <dt><code>-H</code></dt>
  4577. <dt><code>--help</code></dt>
  4578. <dd><p>Displays a list of command-line options and then exits.
  4579. </p>
  4580. </dd>
  4581. <dt><code>-m <var>characters</var></code></dt>
  4582. <dt><code>--maxlength <var>characters</var></code></dt>
  4583. <dd><p>Instructs <code>windmc</code> to generate a warning if the length
  4584. of any message exceeds the number specified.
  4585. </p>
  4586. </dd>
  4587. <dt><code>-n</code></dt>
  4588. <dt><code>--nullterminate</code></dt>
  4589. <dd><p>Terminate message text in <code>bin</code> files by zero. By default they are
  4590. terminated by CR/LF.
  4591. </p>
  4592. </dd>
  4593. <dt><code>-o</code></dt>
  4594. <dt><code>--hresult_use</code></dt>
  4595. <dd><p>Not yet implemented. Instructs <code>windmc</code> to generate an OLE2 header
  4596. file, using HRESULT definitions. Status codes are used if the flag is not
  4597. specified.
  4598. </p>
  4599. </dd>
  4600. <dt><code>-O <var>codepage</var></code></dt>
  4601. <dt><code>--codepage_out <var>codepage</var></code></dt>
  4602. <dd><p>Sets the default codepage to be used to output text files. The default
  4603. is ocdepage 1252.
  4604. </p>
  4605. </dd>
  4606. <dt><code>-r <var>path</var></code></dt>
  4607. <dt><code>--rcdir <var>path</var></code></dt>
  4608. <dd><p>The target directory for the generated <code>rc</code> script and the generated
  4609. <code>bin</code> files that the resource compiler script includes. The default
  4610. is the current directory.
  4611. </p>
  4612. </dd>
  4613. <dt><code>-u</code></dt>
  4614. <dt><code>--unicode_in</code></dt>
  4615. <dd><p>Specifies that the input file is UTF16.
  4616. </p>
  4617. </dd>
  4618. <dt><code>-U</code></dt>
  4619. <dt><code>--unicode_out</code></dt>
  4620. <dd><p>Specifies that messages in the output <code>bin</code> file should be in UTF16
  4621. format. This is the default behaviour.
  4622. </p>
  4623. </dd>
  4624. <dt><code>-v</code></dt>
  4625. <dt><code>--verbose</code></dt>
  4626. <dd><p>Enable verbose mode.
  4627. </p>
  4628. </dd>
  4629. <dt><code>-V</code></dt>
  4630. <dt><code>--version</code></dt>
  4631. <dd><p>Prints the version number for <code>windmc</code>.
  4632. </p>
  4633. </dd>
  4634. <dt><code>-x <var>path</var></code></dt>
  4635. <dt><code>--xdgb <var>path</var></code></dt>
  4636. <dd><p>The path of the <code>dbg</code> C include file that maps message id&rsquo;s to the
  4637. symbolic name. No such file is generated without specifying the switch.
  4638. </p></dd>
  4639. </dl>
  4640. <hr>
  4641. <span id="windres"></span><div class="header">
  4642. <p>
  4643. Next: <a href="#dlltool" accesskey="n" rel="next">dlltool</a>, Previous: <a href="#windmc" accesskey="p" rel="prev">windmc</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  4644. </div>
  4645. <span id="windres-1"></span><h2 class="chapter">12 windres</h2>
  4646. <p><code>windres</code> may be used to manipulate Windows resources.
  4647. </p>
  4648. <blockquote>
  4649. <p><em>Warning:</em> <code>windres</code> is not always built as part of the binary
  4650. utilities, since it is only useful for Windows targets.
  4651. </p></blockquote>
  4652. <div class="example">
  4653. <pre class="example">windres [options] [input-file] [output-file]
  4654. </pre></div>
  4655. <p><code>windres</code> reads resources from an input file and copies them into
  4656. an output file. Either file may be in one of three formats:
  4657. </p>
  4658. <dl compact="compact">
  4659. <dt><code>rc</code></dt>
  4660. <dd><p>A text format read by the Resource Compiler.
  4661. </p>
  4662. </dd>
  4663. <dt><code>res</code></dt>
  4664. <dd><p>A binary format generated by the Resource Compiler.
  4665. </p>
  4666. </dd>
  4667. <dt><code>coff</code></dt>
  4668. <dd><p>A COFF object or executable.
  4669. </p></dd>
  4670. </dl>
  4671. <p>The exact description of these different formats is available in
  4672. documentation from Microsoft.
  4673. </p>
  4674. <p>When <code>windres</code> converts from the <code>rc</code> format to the <code>res</code>
  4675. format, it is acting like the Windows Resource Compiler. When
  4676. <code>windres</code> converts from the <code>res</code> format to the <code>coff</code>
  4677. format, it is acting like the Windows <code>CVTRES</code> program.
  4678. </p>
  4679. <p>When <code>windres</code> generates an <code>rc</code> file, the output is similar
  4680. but not identical to the format expected for the input. When an input
  4681. <code>rc</code> file refers to an external filename, an output <code>rc</code> file
  4682. will instead include the file contents.
  4683. </p>
  4684. <p>If the input or output format is not specified, <code>windres</code> will
  4685. guess based on the file name, or, for the input file, the file contents.
  4686. A file with an extension of <samp>.rc</samp> will be treated as an <code>rc</code>
  4687. file, a file with an extension of <samp>.res</samp> will be treated as a
  4688. <code>res</code> file, and a file with an extension of <samp>.o</samp> or
  4689. <samp>.exe</samp> will be treated as a <code>coff</code> file.
  4690. </p>
  4691. <p>If no output file is specified, <code>windres</code> will print the resources
  4692. in <code>rc</code> format to standard output.
  4693. </p>
  4694. <p>The normal use is for you to write an <code>rc</code> file, use <code>windres</code>
  4695. to convert it to a COFF object file, and then link the COFF file into
  4696. your application. This will make the resources described in the
  4697. <code>rc</code> file available to Windows.
  4698. </p>
  4699. <dl compact="compact">
  4700. <dt><code>-i <var>filename</var></code></dt>
  4701. <dt><code>--input <var>filename</var></code></dt>
  4702. <dd><p>The name of the input file. If this option is not used, then
  4703. <code>windres</code> will use the first non-option argument as the input file
  4704. name. If there are no non-option arguments, then <code>windres</code> will
  4705. read from standard input. <code>windres</code> can not read a COFF file from
  4706. standard input.
  4707. </p>
  4708. </dd>
  4709. <dt><code>-o <var>filename</var></code></dt>
  4710. <dt><code>--output <var>filename</var></code></dt>
  4711. <dd><p>The name of the output file. If this option is not used, then
  4712. <code>windres</code> will use the first non-option argument, after any used
  4713. for the input file name, as the output file name. If there is no
  4714. non-option argument, then <code>windres</code> will write to standard output.
  4715. <code>windres</code> can not write a COFF file to standard output. Note,
  4716. for compatibility with <code>rc</code> the option <samp>-fo</samp> is also
  4717. accepted, but its use is not recommended.
  4718. </p>
  4719. </dd>
  4720. <dt><code>-J <var>format</var></code></dt>
  4721. <dt><code>--input-format <var>format</var></code></dt>
  4722. <dd><p>The input format to read. <var>format</var> may be &lsquo;<samp>res</samp>&rsquo;, &lsquo;<samp>rc</samp>&rsquo;, or
  4723. &lsquo;<samp>coff</samp>&rsquo;. If no input format is specified, <code>windres</code> will
  4724. guess, as described above.
  4725. </p>
  4726. </dd>
  4727. <dt><code>-O <var>format</var></code></dt>
  4728. <dt><code>--output-format <var>format</var></code></dt>
  4729. <dd><p>The output format to generate. <var>format</var> may be &lsquo;<samp>res</samp>&rsquo;,
  4730. &lsquo;<samp>rc</samp>&rsquo;, or &lsquo;<samp>coff</samp>&rsquo;. If no output format is specified,
  4731. <code>windres</code> will guess, as described above.
  4732. </p>
  4733. </dd>
  4734. <dt><code>-F <var>target</var></code></dt>
  4735. <dt><code>--target <var>target</var></code></dt>
  4736. <dd><p>Specify the BFD format to use for a COFF file as input or output. This
  4737. is a BFD target name; you can use the <samp>--help</samp> option to see a list
  4738. of supported targets. Normally <code>windres</code> will use the default
  4739. format, which is the first one listed by the <samp>--help</samp> option.
  4740. <a href="#Target-Selection">Target Selection</a>.
  4741. </p>
  4742. </dd>
  4743. <dt><code>--preprocessor <var>program</var></code></dt>
  4744. <dd><p>When <code>windres</code> reads an <code>rc</code> file, it runs it through the C
  4745. preprocessor first. This option may be used to specify the preprocessor
  4746. to use. The default preprocessor is <code>gcc</code>.
  4747. </p>
  4748. </dd>
  4749. <dt><code>--preprocessor-arg <var>option</var></code></dt>
  4750. <dd><p>When <code>windres</code> reads an <code>rc</code> file, it runs it through
  4751. the C preprocessor first. This option may be used to specify additional
  4752. text to be passed to preprocessor on its command line.
  4753. This option can be used multiple times to add multiple options to the
  4754. preprocessor command line.
  4755. If the <samp>--preprocessor</samp> option has not been specified then a
  4756. default set of preprocessor arguments will be used, with any
  4757. <samp>--preprocessor-arg</samp> options being placed after them on the
  4758. command line. These default arguments are <code>-E</code>,
  4759. <code>-xc-header</code> and <code>-DRC_INVOKED</code>.
  4760. </p>
  4761. </dd>
  4762. <dt><code>-I <var>directory</var></code></dt>
  4763. <dt><code>--include-dir <var>directory</var></code></dt>
  4764. <dd><p>Specify an include directory to use when reading an <code>rc</code> file.
  4765. <code>windres</code> will pass this to the preprocessor as an <samp>-I</samp>
  4766. option. <code>windres</code> will also search this directory when looking for
  4767. files named in the <code>rc</code> file. If the argument passed to this command
  4768. matches any of the supported <var>formats</var> (as described in the <samp>-J</samp>
  4769. option), it will issue a deprecation warning, and behave just like the
  4770. <samp>-J</samp> option. New programs should not use this behaviour. If a
  4771. directory happens to match a <var>format</var>, simple prefix it with &lsquo;<samp>./</samp>&rsquo;
  4772. to disable the backward compatibility.
  4773. </p>
  4774. </dd>
  4775. <dt><code>-D <var>target</var></code></dt>
  4776. <dt><code>--define <var>sym</var>[=<var>val</var>]</code></dt>
  4777. <dd><p>Specify a <samp>-D</samp> option to pass to the preprocessor when reading an
  4778. <code>rc</code> file.
  4779. </p>
  4780. </dd>
  4781. <dt><code>-U <var>target</var></code></dt>
  4782. <dt><code>--undefine <var>sym</var></code></dt>
  4783. <dd><p>Specify a <samp>-U</samp> option to pass to the preprocessor when reading an
  4784. <code>rc</code> file.
  4785. </p>
  4786. </dd>
  4787. <dt><code>-r</code></dt>
  4788. <dd><p>Ignored for compatibility with rc.
  4789. </p>
  4790. </dd>
  4791. <dt><code>-v</code></dt>
  4792. <dd><p>Enable verbose mode. This tells you what the preprocessor is if you
  4793. didn&rsquo;t specify one.
  4794. </p>
  4795. </dd>
  4796. <dt><code>-c <var>val</var></code></dt>
  4797. <dt><code>--codepage <var>val</var></code></dt>
  4798. <dd><p>Specify the default codepage to use when reading an <code>rc</code> file.
  4799. <var>val</var> should be a hexadecimal prefixed by &lsquo;<samp>0x</samp>&rsquo; or decimal
  4800. codepage code. The valid range is from zero up to 0xffff, but the
  4801. validity of the codepage is host and configuration dependent.
  4802. </p>
  4803. </dd>
  4804. <dt><code>-l <var>val</var></code></dt>
  4805. <dt><code>--language <var>val</var></code></dt>
  4806. <dd><p>Specify the default language to use when reading an <code>rc</code> file.
  4807. <var>val</var> should be a hexadecimal language code. The low eight bits are
  4808. the language, and the high eight bits are the sublanguage.
  4809. </p>
  4810. </dd>
  4811. <dt><code>--use-temp-file</code></dt>
  4812. <dd><p>Use a temporary file to instead of using popen to read the output of
  4813. the preprocessor. Use this option if the popen implementation is buggy
  4814. on the host (eg., certain non-English language versions of Windows 95 and
  4815. Windows 98 are known to have buggy popen where the output will instead
  4816. go the console).
  4817. </p>
  4818. </dd>
  4819. <dt><code>--no-use-temp-file</code></dt>
  4820. <dd><p>Use popen, not a temporary file, to read the output of the preprocessor.
  4821. This is the default behaviour.
  4822. </p>
  4823. </dd>
  4824. <dt><code>-h</code></dt>
  4825. <dt><code>--help</code></dt>
  4826. <dd><p>Prints a usage summary.
  4827. </p>
  4828. </dd>
  4829. <dt><code>-V</code></dt>
  4830. <dt><code>--version</code></dt>
  4831. <dd><p>Prints the version number for <code>windres</code>.
  4832. </p>
  4833. </dd>
  4834. <dt><code>--yydebug</code></dt>
  4835. <dd><p>If <code>windres</code> is compiled with <code>YYDEBUG</code> defined as <code>1</code>,
  4836. this will turn on parser debugging.
  4837. </p></dd>
  4838. </dl>
  4839. <hr>
  4840. <span id="dlltool"></span><div class="header">
  4841. <p>
  4842. Next: <a href="#readelf" accesskey="n" rel="next">readelf</a>, Previous: <a href="#windres" accesskey="p" rel="prev">windres</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  4843. </div>
  4844. <span id="dlltool-1"></span><h2 class="chapter">13 dlltool</h2>
  4845. <span id="index-DLL"></span>
  4846. <span id="index-dlltool"></span>
  4847. <p><code>dlltool</code> is used to create the files needed to create dynamic
  4848. link libraries (DLLs) on systems which understand PE format image
  4849. files such as Windows. A DLL contains an export table which contains
  4850. information that the runtime loader needs to resolve references from a
  4851. referencing program.
  4852. </p>
  4853. <p>The export table is generated by this program by reading in a
  4854. <samp>.def</samp> file or scanning the <samp>.a</samp> and <samp>.o</samp> files which
  4855. will be in the DLL. A <samp>.o</samp> file can contain information in
  4856. special &lsquo;<samp>.drectve</samp>&rsquo; sections with export information.
  4857. </p>
  4858. <blockquote>
  4859. <p><em>Note:</em> <code>dlltool</code> is not always built as part of the
  4860. binary utilities, since it is only useful for those targets which
  4861. support DLLs.
  4862. </p></blockquote>
  4863. <div class="example">
  4864. <pre class="example">dlltool [<samp>-d</samp>|<samp>--input-def</samp> <var>def-file-name</var>]
  4865. [<samp>-b</samp>|<samp>--base-file</samp> <var>base-file-name</var>]
  4866. [<samp>-e</samp>|<samp>--output-exp</samp> <var>exports-file-name</var>]
  4867. [<samp>-z</samp>|<samp>--output-def</samp> <var>def-file-name</var>]
  4868. [<samp>-l</samp>|<samp>--output-lib</samp> <var>library-file-name</var>]
  4869. [<samp>-y</samp>|<samp>--output-delaylib</samp> <var>library-file-name</var>]
  4870. [<samp>--export-all-symbols</samp>] [<samp>--no-export-all-symbols</samp>]
  4871. [<samp>--exclude-symbols</samp> <var>list</var>]
  4872. [<samp>--no-default-excludes</samp>]
  4873. [<samp>-S</samp>|<samp>--as</samp> <var>path-to-assembler</var>] [<samp>-f</samp>|<samp>--as-flags</samp> <var>options</var>]
  4874. [<samp>-D</samp>|<samp>--dllname</samp> <var>name</var>] [<samp>-m</samp>|<samp>--machine</samp> <var>machine</var>]
  4875. [<samp>-a</samp>|<samp>--add-indirect</samp>]
  4876. [<samp>-U</samp>|<samp>--add-underscore</samp>] [<samp>--add-stdcall-underscore</samp>]
  4877. [<samp>-k</samp>|<samp>--kill-at</samp>] [<samp>-A</samp>|<samp>--add-stdcall-alias</samp>]
  4878. [<samp>-p</samp>|<samp>--ext-prefix-alias</samp> <var>prefix</var>]
  4879. [<samp>-x</samp>|<samp>--no-idata4</samp>] [<samp>-c</samp>|<samp>--no-idata5</samp>]
  4880. [<samp>--use-nul-prefixed-import-tables</samp>]
  4881. [<samp>-I</samp>|<samp>--identify</samp> <var>library-file-name</var>] [<samp>--identify-strict</samp>]
  4882. [<samp>-i</samp>|<samp>--interwork</samp>]
  4883. [<samp>-n</samp>|<samp>--nodelete</samp>] [<samp>-t</samp>|<samp>--temp-prefix</samp> <var>prefix</var>]
  4884. [<samp>-v</samp>|<samp>--verbose</samp>]
  4885. [<samp>-h</samp>|<samp>--help</samp>] [<samp>-V</samp>|<samp>--version</samp>]
  4886. [<samp>--no-leading-underscore</samp>] [<samp>--leading-underscore</samp>]
  4887. [<samp>--deterministic-libraries</samp>] [<samp>--non-deterministic-libraries</samp>]
  4888. [object-file &hellip;]
  4889. </pre></div>
  4890. <p><code>dlltool</code> reads its inputs, which can come from the <samp>-d</samp> and
  4891. <samp>-b</samp> options as well as object files specified on the command
  4892. line. It then processes these inputs and if the <samp>-e</samp> option has
  4893. been specified it creates a exports file. If the <samp>-l</samp> option
  4894. has been specified it creates a library file and if the <samp>-z</samp> option
  4895. has been specified it creates a def file. Any or all of the <samp>-e</samp>,
  4896. <samp>-l</samp> and <samp>-z</samp> options can be present in one invocation of
  4897. dlltool.
  4898. </p>
  4899. <p>When creating a DLL, along with the source for the DLL, it is necessary
  4900. to have three other files. <code>dlltool</code> can help with the creation of
  4901. these files.
  4902. </p>
  4903. <p>The first file is a <samp>.def</samp> file which specifies which functions are
  4904. exported from the DLL, which functions the DLL imports, and so on. This
  4905. is a text file and can be created by hand, or <code>dlltool</code> can be used
  4906. to create it using the <samp>-z</samp> option. In this case <code>dlltool</code>
  4907. will scan the object files specified on its command line looking for
  4908. those functions which have been specially marked as being exported and
  4909. put entries for them in the <samp>.def</samp> file it creates.
  4910. </p>
  4911. <p>In order to mark a function as being exported from a DLL, it needs to
  4912. have an <samp>-export:&lt;name_of_function&gt;</samp> entry in the &lsquo;<samp>.drectve</samp>&rsquo;
  4913. section of the object file. This can be done in C by using the
  4914. asm() operator:
  4915. </p>
  4916. <div class="example">
  4917. <pre class="example"> asm (&quot;.section .drectve&quot;);
  4918. asm (&quot;.ascii \&quot;-export:my_func\&quot;&quot;);
  4919. int my_func (void) { &hellip; }
  4920. </pre></div>
  4921. <p>The second file needed for DLL creation is an exports file. This file
  4922. is linked with the object files that make up the body of the DLL and it
  4923. handles the interface between the DLL and the outside world. This is a
  4924. binary file and it can be created by giving the <samp>-e</samp> option to
  4925. <code>dlltool</code> when it is creating or reading in a <samp>.def</samp> file.
  4926. </p>
  4927. <p>The third file needed for DLL creation is the library file that programs
  4928. will link with in order to access the functions in the DLL (an &lsquo;import
  4929. library&rsquo;). This file can be created by giving the <samp>-l</samp> option to
  4930. dlltool when it is creating or reading in a <samp>.def</samp> file.
  4931. </p>
  4932. <p>If the <samp>-y</samp> option is specified, dlltool generates a delay-import
  4933. library that can be used instead of the normal import library to allow
  4934. a program to link to the dll only as soon as an imported function is
  4935. called for the first time. The resulting executable will need to be
  4936. linked to the static delayimp library containing __delayLoadHelper2(),
  4937. which in turn will import LoadLibraryA and GetProcAddress from kernel32.
  4938. </p>
  4939. <p><code>dlltool</code> builds the library file by hand, but it builds the
  4940. exports file by creating temporary files containing assembler statements
  4941. and then assembling these. The <samp>-S</samp> command-line option can be
  4942. used to specify the path to the assembler that dlltool will use,
  4943. and the <samp>-f</samp> option can be used to pass specific flags to that
  4944. assembler. The <samp>-n</samp> can be used to prevent dlltool from deleting
  4945. these temporary assembler files when it is done, and if <samp>-n</samp> is
  4946. specified twice then this will prevent dlltool from deleting the
  4947. temporary object files it used to build the library.
  4948. </p>
  4949. <p>Here is an example of creating a DLL from a source file &lsquo;<samp>dll.c</samp>&rsquo; and
  4950. also creating a program (from an object file called &lsquo;<samp>program.o</samp>&rsquo;)
  4951. that uses that DLL:
  4952. </p>
  4953. <div class="example">
  4954. <pre class="example"> gcc -c dll.c
  4955. dlltool -e exports.o -l dll.lib dll.o
  4956. gcc dll.o exports.o -o dll.dll
  4957. gcc program.o dll.lib -o program
  4958. </pre></div>
  4959. <p><code>dlltool</code> may also be used to query an existing import library
  4960. to determine the name of the DLL to which it is associated. See the
  4961. description of the <samp>-I</samp> or <samp>--identify</samp> option.
  4962. </p>
  4963. <p>The command-line options have the following meanings:
  4964. </p>
  4965. <dl compact="compact">
  4966. <dt><code>-d <var>filename</var></code></dt>
  4967. <dt><code>--input-def <var>filename</var></code></dt>
  4968. <dd><span id="index-input-_002edef-file"></span>
  4969. <p>Specifies the name of a <samp>.def</samp> file to be read in and processed.
  4970. </p>
  4971. </dd>
  4972. <dt><code>-b <var>filename</var></code></dt>
  4973. <dt><code>--base-file <var>filename</var></code></dt>
  4974. <dd><span id="index-base-files"></span>
  4975. <p>Specifies the name of a base file to be read in and processed. The
  4976. contents of this file will be added to the relocation section in the
  4977. exports file generated by dlltool.
  4978. </p>
  4979. </dd>
  4980. <dt><code>-e <var>filename</var></code></dt>
  4981. <dt><code>--output-exp <var>filename</var></code></dt>
  4982. <dd><p>Specifies the name of the export file to be created by dlltool.
  4983. </p>
  4984. </dd>
  4985. <dt><code>-z <var>filename</var></code></dt>
  4986. <dt><code>--output-def <var>filename</var></code></dt>
  4987. <dd><p>Specifies the name of the <samp>.def</samp> file to be created by dlltool.
  4988. </p>
  4989. </dd>
  4990. <dt><code>-l <var>filename</var></code></dt>
  4991. <dt><code>--output-lib <var>filename</var></code></dt>
  4992. <dd><p>Specifies the name of the library file to be created by dlltool.
  4993. </p>
  4994. </dd>
  4995. <dt><code>-y <var>filename</var></code></dt>
  4996. <dt><code>--output-delaylib <var>filename</var></code></dt>
  4997. <dd><p>Specifies the name of the delay-import library file to be created by dlltool.
  4998. </p>
  4999. </dd>
  5000. <dt><code>--deterministic-libraries</code></dt>
  5001. <dt><code>--non-deterministic-libraries</code></dt>
  5002. <dd><p>When creating output libraries in response to either the
  5003. <samp>--output-lib</samp> or <samp>--output-delaylib</samp> options either use
  5004. the value of zero for any timestamps, user ids and group ids created
  5005. (<samp>--deterministic-libraries</samp>) or the actual timestamps, user
  5006. ids and group ids (<samp>--non-deterministic-libraries</samp>).
  5007. </p>
  5008. </dd>
  5009. <dt><code>--export-all-symbols</code></dt>
  5010. <dd><p>Treat all global and weak defined symbols found in the input object
  5011. files as symbols to be exported. There is a small list of symbols which
  5012. are not exported by default; see the <samp>--no-default-excludes</samp>
  5013. option. You may add to the list of symbols to not export by using the
  5014. <samp>--exclude-symbols</samp> option.
  5015. </p>
  5016. </dd>
  5017. <dt><code>--no-export-all-symbols</code></dt>
  5018. <dd><p>Only export symbols explicitly listed in an input <samp>.def</samp> file or in
  5019. &lsquo;<samp>.drectve</samp>&rsquo; sections in the input object files. This is the default
  5020. behaviour. The &lsquo;<samp>.drectve</samp>&rsquo; sections are created by &lsquo;<samp>dllexport</samp>&rsquo;
  5021. attributes in the source code.
  5022. </p>
  5023. </dd>
  5024. <dt><code>--exclude-symbols <var>list</var></code></dt>
  5025. <dd><p>Do not export the symbols in <var>list</var>. This is a list of symbol names
  5026. separated by comma or colon characters. The symbol names should not
  5027. contain a leading underscore. This is only meaningful when
  5028. <samp>--export-all-symbols</samp> is used.
  5029. </p>
  5030. </dd>
  5031. <dt><code>--no-default-excludes</code></dt>
  5032. <dd><p>When <samp>--export-all-symbols</samp> is used, it will by default avoid
  5033. exporting certain special symbols. The current list of symbols to avoid
  5034. exporting is &lsquo;<samp>DllMain@12</samp>&rsquo;, &lsquo;<samp>DllEntryPoint@0</samp>&rsquo;,
  5035. &lsquo;<samp>impure_ptr</samp>&rsquo;. You may use the <samp>--no-default-excludes</samp> option
  5036. to go ahead and export these special symbols. This is only meaningful
  5037. when <samp>--export-all-symbols</samp> is used.
  5038. </p>
  5039. </dd>
  5040. <dt><code>-S <var>path</var></code></dt>
  5041. <dt><code>--as <var>path</var></code></dt>
  5042. <dd><p>Specifies the path, including the filename, of the assembler to be used
  5043. to create the exports file.
  5044. </p>
  5045. </dd>
  5046. <dt><code>-f <var>options</var></code></dt>
  5047. <dt><code>--as-flags <var>options</var></code></dt>
  5048. <dd><p>Specifies any specific command-line options to be passed to the
  5049. assembler when building the exports file. This option will work even if
  5050. the <samp>-S</samp> option is not used. This option only takes one argument,
  5051. and if it occurs more than once on the command line, then later
  5052. occurrences will override earlier occurrences. So if it is necessary to
  5053. pass multiple options to the assembler they should be enclosed in
  5054. double quotes.
  5055. </p>
  5056. </dd>
  5057. <dt><code>-D <var>name</var></code></dt>
  5058. <dt><code>--dll-name <var>name</var></code></dt>
  5059. <dd><p>Specifies the name to be stored in the <samp>.def</samp> file as the name of
  5060. the DLL when the <samp>-e</samp> option is used. If this option is not
  5061. present, then the filename given to the <samp>-e</samp> option will be
  5062. used as the name of the DLL.
  5063. </p>
  5064. </dd>
  5065. <dt><code>-m <var>machine</var></code></dt>
  5066. <dt><code>-machine <var>machine</var></code></dt>
  5067. <dd><p>Specifies the type of machine for which the library file should be
  5068. built. <code>dlltool</code> has a built in default type, depending upon how
  5069. it was created, but this option can be used to override that. This is
  5070. normally only useful when creating DLLs for an ARM processor, when the
  5071. contents of the DLL are actually encode using Thumb instructions.
  5072. </p>
  5073. </dd>
  5074. <dt><code>-a</code></dt>
  5075. <dt><code>--add-indirect</code></dt>
  5076. <dd><p>Specifies that when <code>dlltool</code> is creating the exports file it
  5077. should add a section which allows the exported functions to be
  5078. referenced without using the import library. Whatever the hell that
  5079. means!
  5080. </p>
  5081. </dd>
  5082. <dt><code>-U</code></dt>
  5083. <dt><code>--add-underscore</code></dt>
  5084. <dd><p>Specifies that when <code>dlltool</code> is creating the exports file it
  5085. should prepend an underscore to the names of <em>all</em> exported symbols.
  5086. </p>
  5087. </dd>
  5088. <dt><code>--no-leading-underscore</code></dt>
  5089. <dt><code>--leading-underscore</code></dt>
  5090. <dd><p>Specifies whether standard symbol should be forced to be prefixed, or
  5091. not.
  5092. </p>
  5093. </dd>
  5094. <dt><code>--add-stdcall-underscore</code></dt>
  5095. <dd><p>Specifies that when <code>dlltool</code> is creating the exports file it
  5096. should prepend an underscore to the names of exported <em>stdcall</em>
  5097. functions. Variable names and non-stdcall function names are not modified.
  5098. This option is useful when creating GNU-compatible import libs for third
  5099. party DLLs that were built with MS-Windows tools.
  5100. </p>
  5101. </dd>
  5102. <dt><code>-k</code></dt>
  5103. <dt><code>--kill-at</code></dt>
  5104. <dd><p>Specifies that &lsquo;<samp>@&lt;number&gt;</samp>&rsquo; suffixes should be omitted from the names
  5105. of stdcall functions that will be imported from the DLL. This is
  5106. useful when creating an import library for a DLL which exports stdcall
  5107. functions but without the usual &lsquo;<samp>@&lt;number&gt;</samp>&rsquo; symbol name suffix.
  5108. </p>
  5109. <p>This does not change the naming of symbols provided by the import library
  5110. to programs linked against it, but only the entries in the import table
  5111. (ie the .idata section).
  5112. </p>
  5113. </dd>
  5114. <dt><code>-A</code></dt>
  5115. <dt><code>--add-stdcall-alias</code></dt>
  5116. <dd><p>Specifies that when <code>dlltool</code> is creating the exports file it
  5117. should add aliases for stdcall symbols without &lsquo;<samp>@ &lt;number&gt;</samp>&rsquo;
  5118. in addition to the symbols with &lsquo;<samp>@ &lt;number&gt;</samp>&rsquo;.
  5119. </p>
  5120. </dd>
  5121. <dt><code>-p</code></dt>
  5122. <dt><code>--ext-prefix-alias <var>prefix</var></code></dt>
  5123. <dd><p>Causes <code>dlltool</code> to create external aliases for all DLL
  5124. imports with the specified prefix. The aliases are created for both
  5125. external and import symbols with no leading underscore.
  5126. </p>
  5127. </dd>
  5128. <dt><code>-x</code></dt>
  5129. <dt><code>--no-idata4</code></dt>
  5130. <dd><p>Specifies that when <code>dlltool</code> is creating the exports and library
  5131. files it should omit the <code>.idata4</code> section. This is for compatibility
  5132. with certain operating systems.
  5133. </p>
  5134. </dd>
  5135. <dt><code>--use-nul-prefixed-import-tables</code></dt>
  5136. <dd><p>Specifies that when <code>dlltool</code> is creating the exports and library
  5137. files it should prefix the <code>.idata4</code> and <code>.idata5</code> by zero an
  5138. element. This emulates old gnu import library generation of
  5139. <code>dlltool</code>. By default this option is turned off.
  5140. </p>
  5141. </dd>
  5142. <dt><code>-c</code></dt>
  5143. <dt><code>--no-idata5</code></dt>
  5144. <dd><p>Specifies that when <code>dlltool</code> is creating the exports and library
  5145. files it should omit the <code>.idata5</code> section. This is for compatibility
  5146. with certain operating systems.
  5147. </p>
  5148. </dd>
  5149. <dt><code>-I <var>filename</var></code></dt>
  5150. <dt><code>--identify <var>filename</var></code></dt>
  5151. <dd><p>Specifies that <code>dlltool</code> should inspect the import library
  5152. indicated by <var>filename</var> and report, on <code>stdout</code>, the name(s)
  5153. of the associated DLL(s). This can be performed in addition to any
  5154. other operations indicated by the other options and arguments.
  5155. <code>dlltool</code> fails if the import library does not exist or is not
  5156. actually an import library. See also <samp>--identify-strict</samp>.
  5157. </p>
  5158. </dd>
  5159. <dt><code>--identify-strict</code></dt>
  5160. <dd><p>Modifies the behavior of the <samp>--identify</samp> option, such
  5161. that an error is reported if <var>filename</var> is associated with
  5162. more than one DLL.
  5163. </p>
  5164. </dd>
  5165. <dt><code>-i</code></dt>
  5166. <dt><code>--interwork</code></dt>
  5167. <dd><p>Specifies that <code>dlltool</code> should mark the objects in the library
  5168. file and exports file that it produces as supporting interworking
  5169. between ARM and Thumb code.
  5170. </p>
  5171. </dd>
  5172. <dt><code>-n</code></dt>
  5173. <dt><code>--nodelete</code></dt>
  5174. <dd><p>Makes <code>dlltool</code> preserve the temporary assembler files it used to
  5175. create the exports file. If this option is repeated then dlltool will
  5176. also preserve the temporary object files it uses to create the library
  5177. file.
  5178. </p>
  5179. </dd>
  5180. <dt><code>-t <var>prefix</var></code></dt>
  5181. <dt><code>--temp-prefix <var>prefix</var></code></dt>
  5182. <dd><p>Makes <code>dlltool</code> use <var>prefix</var> when constructing the names of
  5183. temporary assembler and object files. By default, the temp file prefix
  5184. is generated from the pid.
  5185. </p>
  5186. </dd>
  5187. <dt><code>-v</code></dt>
  5188. <dt><code>--verbose</code></dt>
  5189. <dd><p>Make dlltool describe what it is doing.
  5190. </p>
  5191. </dd>
  5192. <dt><code>-h</code></dt>
  5193. <dt><code>--help</code></dt>
  5194. <dd><p>Displays a list of command-line options and then exits.
  5195. </p>
  5196. </dd>
  5197. <dt><code>-V</code></dt>
  5198. <dt><code>--version</code></dt>
  5199. <dd><p>Displays dlltool&rsquo;s version number and then exits.
  5200. </p>
  5201. </dd>
  5202. </dl>
  5203. <table class="menu" border="0" cellspacing="0">
  5204. <tr><td align="left" valign="top">&bull; <a href="#def-file-format" accesskey="1">def file format</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The format of the dlltool <samp>.def</samp> file
  5205. </td></tr>
  5206. </table>
  5207. <hr>
  5208. <span id="def-file-format"></span><div class="header">
  5209. <p>
  5210. Up: <a href="#dlltool" accesskey="u" rel="up">dlltool</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  5211. </div>
  5212. <span id="The-format-of-the-dlltool-_002edef-file"></span><h3 class="section">13.1 The format of the <code>dlltool</code> <samp>.def</samp> file</h3>
  5213. <p>A <samp>.def</samp> file contains any number of the following commands:
  5214. </p>
  5215. <dl compact="compact">
  5216. <dt><code>NAME</code> <var>name</var> <code>[ ,</code> <var>base</var> <code>]</code></dt>
  5217. <dd><p>The result is going to be named <var>name</var><code>.exe</code>.
  5218. </p>
  5219. </dd>
  5220. <dt><code>LIBRARY</code> <var>name</var> <code>[ ,</code> <var>base</var> <code>]</code></dt>
  5221. <dd><p>The result is going to be named <var>name</var><code>.dll</code>.
  5222. Note: If you want to use LIBRARY as name then you need to quote. Otherwise
  5223. this will fail due a necessary hack for libtool (see PR binutils/13710 for more
  5224. details).
  5225. </p>
  5226. </dd>
  5227. <dt><code>EXPORTS ( ( (</code> <var>name1</var> <code>[ = </code> <var>name2</var> <code>] ) | ( </code> <var>name1</var> <code>=</code> <var>module-name</var> <code>.</code> <var>external-name</var> <code>) ) [ == </code> <var>its_name</var> <code>]</code></dt>
  5228. <dt><code>[</code> <var>integer</var> <code>] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *</code></dt>
  5229. <dd><p>Declares <var>name1</var> as an exported symbol from the DLL, with optional
  5230. ordinal number <var>integer</var>, or declares <var>name1</var> as an alias
  5231. (forward) of the function <var>external-name</var> in the DLL.
  5232. If <var>its_name</var> is specified, this name is used as string in export table.
  5233. <var>module-name</var>.
  5234. Note: The <code>EXPORTS</code> has to be the last command in .def file, as keywords
  5235. are treated - beside <code>LIBRARY</code> - as simple name-identifiers.
  5236. If you want to use LIBRARY as name then you need to quote it.
  5237. </p>
  5238. </dd>
  5239. <dt><code>IMPORTS ( (</code> <var>internal-name</var> <code>=</code> <var>module-name</var> <code>.</code> <var>integer</var> <code>) | [</code> <var>internal-name</var> <code>= ]</code> <var>module-name</var> <code>.</code> <var>external-name</var> <code>) [ == ) <var>its_name</var> <code>]</code> *</code></dt>
  5240. <dd><p>Declares that <var>external-name</var> or the exported function whose
  5241. ordinal number is <var>integer</var> is to be imported from the file
  5242. <var>module-name</var>. If <var>internal-name</var> is specified then this is
  5243. the name that the imported function will be referred to in the body of
  5244. the DLL.
  5245. If <var>its_name</var> is specified, this name is used as string in import table.
  5246. Note: The <code>IMPORTS</code> has to be the last command in .def file, as keywords
  5247. are treated - beside <code>LIBRARY</code> - as simple name-identifiers.
  5248. If you want to use LIBRARY as name then you need to quote it.
  5249. </p>
  5250. </dd>
  5251. <dt><code>DESCRIPTION</code> <var>string</var></dt>
  5252. <dd><p>Puts <var>string</var> into the output <samp>.exp</samp> file in the
  5253. <code>.rdata</code> section.
  5254. </p>
  5255. </dd>
  5256. <dt><code>STACKSIZE</code> <var>number-reserve</var> <code>[, </code> <var>number-commit</var> <code>]</code></dt>
  5257. <dt><code>HEAPSIZE</code> <var>number-reserve</var> <code>[, </code> <var>number-commit</var> <code>]</code></dt>
  5258. <dd><p>Generates <code>--stack</code> or <code>--heap</code>
  5259. <var>number-reserve</var>,<var>number-commit</var> in the output <code>.drectve</code>
  5260. section. The linker will see this and act upon it.
  5261. </p>
  5262. </dd>
  5263. <dt><code>CODE</code> <var>attr</var> <code>+</code></dt>
  5264. <dt><code>DATA</code> <var>attr</var> <code>+</code></dt>
  5265. <dt><code>SECTIONS (</code> <var>section-name</var> <var>attr</var><code> + ) *</code></dt>
  5266. <dd><p>Generates <code>--attr</code> <var>section-name</var> <var>attr</var> in the output
  5267. <code>.drectve</code> section, where <var>attr</var> is one of <code>READ</code>,
  5268. <code>WRITE</code>, <code>EXECUTE</code> or <code>SHARED</code>. The linker will see
  5269. this and act upon it.
  5270. </p>
  5271. </dd>
  5272. </dl>
  5273. <hr>
  5274. <span id="readelf"></span><div class="header">
  5275. <p>
  5276. Next: <a href="#elfedit" accesskey="n" rel="next">elfedit</a>, Previous: <a href="#dlltool" accesskey="p" rel="prev">dlltool</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  5277. </div>
  5278. <span id="readelf-1"></span><h2 class="chapter">14 readelf</h2>
  5279. <span id="index-ELF-file-information"></span>
  5280. <span id="index-readelf"></span>
  5281. <div class="example">
  5282. <pre class="example">readelf [<samp>-a</samp>|<samp>--all</samp>]
  5283. [<samp>-h</samp>|<samp>--file-header</samp>]
  5284. [<samp>-l</samp>|<samp>--program-headers</samp>|<samp>--segments</samp>]
  5285. [<samp>-S</samp>|<samp>--section-headers</samp>|<samp>--sections</samp>]
  5286. [<samp>-g</samp>|<samp>--section-groups</samp>]
  5287. [<samp>-t</samp>|<samp>--section-details</samp>]
  5288. [<samp>-e</samp>|<samp>--headers</samp>]
  5289. [<samp>-s</samp>|<samp>--syms</samp>|<samp>--symbols</samp>]
  5290. [<samp>--dyn-syms</samp>|<samp>--lto-syms</samp>]
  5291. [<samp>--sym-base=[0|8|10|16]</samp>]
  5292. [<samp>--demangle<var>=style</var></samp>|<samp>--no-demangle</samp>]
  5293. [<samp>--quiet</samp>]
  5294. [<samp>--recurse-limit</samp>|<samp>--no-recurse-limit</samp>]
  5295. [<samp>-U</samp> <var>method</var>|<samp>--unicode=</samp><var>method</var>]
  5296. [<samp>-X</samp>|<samp>--extra-sym-info</samp>|<samp>--no-extra-sym-info</samp>]
  5297. [<samp>-n</samp>|<samp>--notes</samp>]
  5298. [<samp>-r</samp>|<samp>--relocs</samp>]
  5299. [<samp>-u</samp>|<samp>--unwind</samp>]
  5300. [<samp>-d</samp>|<samp>--dynamic</samp>]
  5301. [<samp>-V</samp>|<samp>--version-info</samp>]
  5302. [<samp>-A</samp>|<samp>--arch-specific</samp>]
  5303. [<samp>-D</samp>|<samp>--use-dynamic</samp>]
  5304. [<samp>-L</samp>|<samp>--lint</samp>|<samp>--enable-checks</samp>]
  5305. [<samp>-x</samp> &lt;number or name&gt;|<samp>--hex-dump=</samp>&lt;number or name&gt;]
  5306. [<samp>-p</samp> &lt;number or name&gt;|<samp>--string-dump=</samp>&lt;number or name&gt;]
  5307. [<samp>-R</samp> &lt;number or name&gt;|<samp>--relocated-dump=</samp>&lt;number or name&gt;]
  5308. [<samp>-z</samp>|<samp>--decompress</samp>]
  5309. [<samp>-c</samp>|<samp>--archive-index</samp>]
  5310. [<samp>-w[lLiaprmfFsoORtUuTgAck]</samp>|
  5311. <samp>--debug-dump</samp>[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
  5312. [<samp>-wK</samp>|<samp>--debug-dump=follow-links</samp>]
  5313. [<samp>-wN</samp>|<samp>--debug-dump=no-follow-links</samp>]
  5314. [<samp>-wD</samp>|<samp>--debug-dump=use-debuginfod</samp>]
  5315. [<samp>-wE</samp>|<samp>--debug-dump=do-not-use-debuginfod</samp>]
  5316. [<samp>-P</samp>|<samp>--process-links</samp>]
  5317. [<samp>--dwarf-depth=<var>n</var></samp>]
  5318. [<samp>--dwarf-start=<var>n</var></samp>]
  5319. [<samp>--ctf=</samp><var>section</var>]
  5320. [<samp>--ctf-parent=</samp><var>section</var>]
  5321. [<samp>--ctf-symbols=</samp><var>section</var>]
  5322. [<samp>--ctf-strings=</samp><var>section</var>]
  5323. [<samp>--sframe=</samp><var>section</var>]
  5324. [<samp>-I</samp>|<samp>--histogram</samp>]
  5325. [<samp>-v</samp>|<samp>--version</samp>]
  5326. [<samp>-W</samp>|<samp>--wide</samp>]
  5327. [<samp>-T</samp>|<samp>--silent-truncation</samp>]
  5328. [<samp>-H</samp>|<samp>--help</samp>]
  5329. <var>elffile</var>&hellip;
  5330. </pre></div>
  5331. <p><code>readelf</code> displays information about one or more ELF format object
  5332. files. The options control what particular information to display.
  5333. </p>
  5334. <p><var>elffile</var>&hellip; are the object files to be examined. 32-bit and
  5335. 64-bit ELF files are supported, as are archives containing ELF files.
  5336. </p>
  5337. <p>This program performs a similar function to <code>objdump</code> but it
  5338. goes into more detail and it exists independently of the <small>BFD</small>
  5339. library, so if there is a bug in <small>BFD</small> then readelf will not be
  5340. affected.
  5341. </p>
  5342. <p>The long and short forms of options, shown here as alternatives, are
  5343. equivalent. At least one option besides &lsquo;<samp>-v</samp>&rsquo; or &lsquo;<samp>-H</samp>&rsquo; must be
  5344. given.
  5345. </p>
  5346. <dl compact="compact">
  5347. <dt><code>-a</code></dt>
  5348. <dt><code>--all</code></dt>
  5349. <dd><p>Equivalent to specifying <samp>--file-header</samp>,
  5350. <samp>--program-headers</samp>, <samp>--sections</samp>, <samp>--symbols</samp>,
  5351. <samp>--relocs</samp>, <samp>--dynamic</samp>, <samp>--notes</samp>,
  5352. <samp>--version-info</samp>, <samp>--arch-specific</samp>, <samp>--unwind</samp>,
  5353. <samp>--section-groups</samp> and <samp>--histogram</samp>.
  5354. </p>
  5355. <p>Note - this option does not enable <samp>--use-dynamic</samp> itself, so
  5356. if that option is not present on the command line then dynamic symbols
  5357. and dynamic relocs will not be displayed.
  5358. </p>
  5359. </dd>
  5360. <dt><code>-h</code></dt>
  5361. <dt><code>--file-header</code></dt>
  5362. <dd><span id="index-ELF-file-header-information"></span>
  5363. <p>Displays the information contained in the ELF header at the start of the
  5364. file.
  5365. </p>
  5366. </dd>
  5367. <dt><code>-l</code></dt>
  5368. <dt><code>--program-headers</code></dt>
  5369. <dt><code>--segments</code></dt>
  5370. <dd><span id="index-ELF-program-header-information"></span>
  5371. <span id="index-ELF-segment-information"></span>
  5372. <p>Displays the information contained in the file&rsquo;s segment headers, if it
  5373. has any.
  5374. </p>
  5375. </dd>
  5376. <dt><code>--quiet</code></dt>
  5377. <dd><span id="index-quiet"></span>
  5378. <p>Suppress &quot;no symbols&quot; diagnostic.
  5379. </p>
  5380. </dd>
  5381. <dt><code>-S</code></dt>
  5382. <dt><code>--sections</code></dt>
  5383. <dt><code>--section-headers</code></dt>
  5384. <dd><span id="index-ELF-section-information"></span>
  5385. <p>Displays the information contained in the file&rsquo;s section headers, if it
  5386. has any.
  5387. </p>
  5388. </dd>
  5389. <dt><code>-g</code></dt>
  5390. <dt><code>--section-groups</code></dt>
  5391. <dd><span id="index-ELF-section-group-information"></span>
  5392. <p>Displays the information contained in the file&rsquo;s section groups, if it
  5393. has any.
  5394. </p>
  5395. </dd>
  5396. <dt><code>-t</code></dt>
  5397. <dt><code>--section-details</code></dt>
  5398. <dd><span id="index-ELF-section-information-1"></span>
  5399. <p>Displays the detailed section information. Implies <samp>-S</samp>.
  5400. </p>
  5401. </dd>
  5402. <dt><code>-s</code></dt>
  5403. <dt><code>--symbols</code></dt>
  5404. <dt><code>--syms</code></dt>
  5405. <dd><span id="index-ELF-symbol-table-information"></span>
  5406. <p>Displays the entries in symbol table section of the file, if it has one.
  5407. If a symbol has version information associated with it then this is
  5408. displayed as well. The version string is displayed as a suffix to the
  5409. symbol name, preceded by an @ character. For example
  5410. &lsquo;<samp>foo@VER_1</samp>&rsquo;. If the version is the default version to be used
  5411. when resolving unversioned references to the symbol then it is
  5412. displayed as a suffix preceded by two @ characters. For example
  5413. &lsquo;<samp>foo@@VER_2</samp>&rsquo;.
  5414. </p>
  5415. </dd>
  5416. <dt><code>--dyn-syms</code></dt>
  5417. <dd><span id="index-ELF-dynamic-symbol-table-information"></span>
  5418. <p>Displays the entries in dynamic symbol table section of the file, if it
  5419. has one. The output format is the same as the format used by the
  5420. <samp>--syms</samp> option.
  5421. </p>
  5422. </dd>
  5423. <dt><code>--lto-syms</code></dt>
  5424. <dd><span id="index-LTO-symbol-table"></span>
  5425. <p>Displays the contents of any LTO symbol tables in the file.
  5426. </p>
  5427. </dd>
  5428. <dt><code>--sym-base=[0|8|10|16]</code></dt>
  5429. <dd><span id="index-symbol-table-size-base"></span>
  5430. <p>Forces the size field of the symbol table to use the given base. Any
  5431. unrecognized options will be treated as &lsquo;<samp>0</samp>&rsquo;. <samp>--sym-base=0</samp>
  5432. represents the default and legacy behaviour. This will output sizes as decimal
  5433. for numbers less than 100000. For sizes 100000 and greater hexadecimal notation
  5434. will be used with a 0x prefix.
  5435. <samp>--sym-base=8</samp> will give the symbol sizes in octal.
  5436. <samp>--sym-base=10</samp> will always give the symbol sizes in decimal.
  5437. <samp>--sym-base=16</samp> will always give the symbol sizes in hexadecimal with a
  5438. 0x prefix.
  5439. </p>
  5440. </dd>
  5441. <dt><code>-C</code></dt>
  5442. <dt><code>--demangle[=<var>style</var>]</code></dt>
  5443. <dd><span id="index-demangling-in-nm-1"></span>
  5444. <p>Decode (<em>demangle</em>) low-level symbol names into user-level names.
  5445. This makes C++ function names readable. Different compilers have
  5446. different mangling styles. The optional demangling style argument can
  5447. be used to choose an appropriate demangling style for your
  5448. compiler. See <a href="#c_002b_002bfilt">c++filt</a>, for more information on demangling.
  5449. </p>
  5450. </dd>
  5451. <dt><code>--no-demangle</code></dt>
  5452. <dd><p>Do not demangle low-level symbol names. This is the default.
  5453. </p>
  5454. </dd>
  5455. <dt><code>--recurse-limit</code></dt>
  5456. <dt><code>--no-recurse-limit</code></dt>
  5457. <dt><code>--recursion-limit</code></dt>
  5458. <dt><code>--no-recursion-limit</code></dt>
  5459. <dd><p>Enables or disables a limit on the amount of recursion performed
  5460. whilst demangling strings. Since the name mangling formats allow for
  5461. an infinite level of recursion it is possible to create strings whose
  5462. decoding will exhaust the amount of stack space available on the host
  5463. machine, triggering a memory fault. The limit tries to prevent this
  5464. from happening by restricting recursion to 2048 levels of nesting.
  5465. </p>
  5466. <p>The default is for this limit to be enabled, but disabling it may be
  5467. necessary in order to demangle truly complicated names. Note however
  5468. that if the recursion limit is disabled then stack exhaustion is
  5469. possible and any bug reports about such an event will be rejected.
  5470. </p>
  5471. </dd>
  5472. <dt><code>-U <var>[d|i|l|e|x|h]</var></code></dt>
  5473. <dt><code>--unicode=[default|invalid|locale|escape|hex|highlight]</code></dt>
  5474. <dd><p>Controls the display of non-ASCII characters in identifier names.
  5475. The default (<samp>--unicode=locale</samp> or <samp>--unicode=default</samp>) is
  5476. to treat them as multibyte characters and display them in the current
  5477. locale. All other versions of this option treat the bytes as UTF-8
  5478. encoded values and attempt to interpret them. If they cannot be
  5479. interpreted or if the <samp>--unicode=invalid</samp> option is used then
  5480. they are displayed as a sequence of hex bytes, encloses in curly
  5481. parethesis characters.
  5482. </p>
  5483. <p>Using the <samp>--unicode=escape</samp> option will display the characters
  5484. as as unicode escape sequences (<var>\uxxxx</var>). Using the
  5485. <samp>--unicode=hex</samp> will display the characters as hex byte
  5486. sequences enclosed between angle brackets.
  5487. </p>
  5488. <p>Using the <samp>--unicode=highlight</samp> will display the characters as
  5489. unicode escape sequences but it will also highlighted them in red,
  5490. assuming that colouring is supported by the output device. The
  5491. colouring is intended to draw attention to the presence of unicode
  5492. sequences when they might not be expected.
  5493. </p>
  5494. </dd>
  5495. <dt><code>-X</code></dt>
  5496. <dt><code>--extra-sym-info</code></dt>
  5497. <dd><p>When displaying details of symbols, include extra information not
  5498. normally presented. Currently this just adds the name of the section
  5499. referenced by the symbol&rsquo;s index field, if there is one. In the
  5500. future more information may be displayed when this option is enabled.
  5501. </p>
  5502. <p>Enabling this option effectively enables the <samp>--wide</samp> option as
  5503. well, at least when displaying symbol information.
  5504. </p>
  5505. </dd>
  5506. <dt><code>--no-extra-sym-info</code></dt>
  5507. <dd><p>Disables the effect of the <samp>--extra-sym-info</samp> option. This
  5508. is the default.
  5509. </p>
  5510. </dd>
  5511. <dt><code>-e</code></dt>
  5512. <dt><code>--headers</code></dt>
  5513. <dd><p>Display all the headers in the file. Equivalent to <samp>-h -l -S</samp>.
  5514. </p>
  5515. </dd>
  5516. <dt><code>-n</code></dt>
  5517. <dt><code>--notes</code></dt>
  5518. <dd><span id="index-ELF-notes"></span>
  5519. <p>Displays the contents of the NOTE segments and/or sections, if any.
  5520. </p>
  5521. </dd>
  5522. <dt><code>-r</code></dt>
  5523. <dt><code>--relocs</code></dt>
  5524. <dd><span id="index-ELF-reloc-information"></span>
  5525. <p>Displays the contents of the file&rsquo;s relocation section, if it has one.
  5526. </p>
  5527. </dd>
  5528. <dt><code>-u</code></dt>
  5529. <dt><code>--unwind</code></dt>
  5530. <dd><span id="index-unwind-information"></span>
  5531. <p>Displays the contents of the file&rsquo;s unwind section, if it has one. Only
  5532. the unwind sections for IA64 ELF files, as well as ARM unwind tables
  5533. (<code>.ARM.exidx</code> / <code>.ARM.extab</code>) are currently supported. If
  5534. support is not yet implemented for your architecture you could try
  5535. dumping the contents of the <var>.eh_frames</var> section using the
  5536. <samp>--debug-dump=frames</samp> or <samp>--debug-dump=frames-interp</samp>
  5537. options.
  5538. </p>
  5539. </dd>
  5540. <dt><code>-d</code></dt>
  5541. <dt><code>--dynamic</code></dt>
  5542. <dd><span id="index-ELF-dynamic-section-information"></span>
  5543. <p>Displays the contents of the file&rsquo;s dynamic section, if it has one.
  5544. </p>
  5545. </dd>
  5546. <dt><code>-V</code></dt>
  5547. <dt><code>--version-info</code></dt>
  5548. <dd><span id="index-ELF-version-sections-information"></span>
  5549. <p>Displays the contents of the version sections in the file, it they
  5550. exist.
  5551. </p>
  5552. </dd>
  5553. <dt><code>-A</code></dt>
  5554. <dt><code>--arch-specific</code></dt>
  5555. <dd><p>Displays architecture-specific information in the file, if there
  5556. is any.
  5557. </p>
  5558. </dd>
  5559. <dt><code>-D</code></dt>
  5560. <dt><code>--use-dynamic</code></dt>
  5561. <dd><p>When displaying symbols, this option makes <code>readelf</code> use the
  5562. symbol hash tables in the file&rsquo;s dynamic section, rather than the
  5563. symbol table sections.
  5564. </p>
  5565. <p>When displaying relocations, this option makes <code>readelf</code>
  5566. display the dynamic relocations rather than the static relocations.
  5567. </p>
  5568. </dd>
  5569. <dt><code>-L</code></dt>
  5570. <dt><code>--lint</code></dt>
  5571. <dt><code>--enable-checks</code></dt>
  5572. <dd><p>Displays warning messages about possible problems with the file(s)
  5573. being examined. If used on its own then all of the contents of the
  5574. file(s) will be examined. If used with one of the dumping options
  5575. then the warning messages will only be produced for the things being
  5576. displayed.
  5577. </p>
  5578. </dd>
  5579. <dt><code>-x &lt;number or name&gt;</code></dt>
  5580. <dt><code>--hex-dump=&lt;number or name&gt;</code></dt>
  5581. <dd><p>Displays the contents of the indicated section as a hexadecimal bytes.
  5582. A number identifies a particular section by index in the section table;
  5583. any other string identifies all sections with that name in the object file.
  5584. </p>
  5585. </dd>
  5586. <dt><code>-R &lt;number or name&gt;</code></dt>
  5587. <dt><code>--relocated-dump=&lt;number or name&gt;</code></dt>
  5588. <dd><p>Displays the contents of the indicated section as a hexadecimal
  5589. bytes. A number identifies a particular section by index in the
  5590. section table; any other string identifies all sections with that name
  5591. in the object file. The contents of the section will be relocated
  5592. before they are displayed.
  5593. </p>
  5594. </dd>
  5595. <dt><code>-p &lt;number or name&gt;</code></dt>
  5596. <dt><code>--string-dump=&lt;number or name&gt;</code></dt>
  5597. <dd><p>Displays the contents of the indicated section as printable strings.
  5598. A number identifies a particular section by index in the section table;
  5599. any other string identifies all sections with that name in the object file.
  5600. </p>
  5601. </dd>
  5602. <dt><code>-z</code></dt>
  5603. <dt><code>--decompress</code></dt>
  5604. <dd><p>Requests that the section(s) being dumped by <samp>x</samp>, <samp>R</samp> or
  5605. <samp>p</samp> options are decompressed before being displayed. If the
  5606. section(s) are not compressed then they are displayed as is.
  5607. </p>
  5608. </dd>
  5609. <dt><code>-c</code></dt>
  5610. <dt><code>--archive-index</code></dt>
  5611. <dd><span id="index-Archive-file-symbol-index-information"></span>
  5612. <p>Displays the file symbol index information contained in the header part
  5613. of binary archives. Performs the same function as the <samp>t</samp>
  5614. command to <code>ar</code>, but without using the BFD library. See <a href="#ar">ar</a>.
  5615. </p>
  5616. </dd>
  5617. <dt><code>-w[lLiaprmfFsOoRtUuTgAckK]</code></dt>
  5618. <dt><code>--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]</code></dt>
  5619. <dd>
  5620. <p>Displays the contents of the DWARF debug sections in the file, if any
  5621. are present. Compressed debug sections are automatically decompressed
  5622. (temporarily) before they are displayed. If one or more of the
  5623. optional letters or words follows the switch then only those type(s)
  5624. of data will be dumped. The letters and words refer to the following
  5625. information:
  5626. </p>
  5627. <dl compact="compact">
  5628. <dt><code>a</code></dt>
  5629. <dt><code>=abbrev</code></dt>
  5630. <dd><p>Displays the contents of the &lsquo;<samp>.debug_abbrev</samp>&rsquo; section.
  5631. </p>
  5632. </dd>
  5633. <dt><code>A</code></dt>
  5634. <dt><code>=addr</code></dt>
  5635. <dd><p>Displays the contents of the &lsquo;<samp>.debug_addr</samp>&rsquo; section.
  5636. </p>
  5637. </dd>
  5638. <dt><code>c</code></dt>
  5639. <dt><code>=cu_index</code></dt>
  5640. <dd><p>Displays the contents of the &lsquo;<samp>.debug_cu_index</samp>&rsquo; and/or
  5641. &lsquo;<samp>.debug_tu_index</samp>&rsquo; sections.
  5642. </p>
  5643. </dd>
  5644. <dt><code>f</code></dt>
  5645. <dt><code>=frames</code></dt>
  5646. <dd><p>Display the raw contents of a &lsquo;<samp>.debug_frame</samp>&rsquo; section.
  5647. </p>
  5648. </dd>
  5649. <dt><code>F</code></dt>
  5650. <dt><code>=frames-interp</code></dt>
  5651. <dd><p>Display the interpreted contents of a &lsquo;<samp>.debug_frame</samp>&rsquo; section.
  5652. </p>
  5653. </dd>
  5654. <dt><code>g</code></dt>
  5655. <dt><code>=gdb_index</code></dt>
  5656. <dd><p>Displays the contents of the &lsquo;<samp>.gdb_index</samp>&rsquo; and/or
  5657. &lsquo;<samp>.debug_names</samp>&rsquo; sections.
  5658. </p>
  5659. </dd>
  5660. <dt><code>i</code></dt>
  5661. <dt><code>=info</code></dt>
  5662. <dd><p>Displays the contents of the &lsquo;<samp>.debug_info</samp>&rsquo; section. Note: the
  5663. output from this option can also be restricted by the use of the
  5664. <samp>--dwarf-depth</samp> and <samp>--dwarf-start</samp> options.
  5665. </p>
  5666. </dd>
  5667. <dt><code>k</code></dt>
  5668. <dt><code>=links</code></dt>
  5669. <dd><p>Displays the contents of the &lsquo;<samp>.gnu_debuglink</samp>&rsquo;,
  5670. &lsquo;<samp>.gnu_debugaltlink</samp>&rsquo; and &lsquo;<samp>.debug_sup</samp>&rsquo; sections, if any of
  5671. them are present. Also displays any links to separate dwarf object
  5672. files (dwo), if they are specified by the DW_AT_GNU_dwo_name or
  5673. DW_AT_dwo_name attributes in the &lsquo;<samp>.debug_info</samp>&rsquo; section.
  5674. </p>
  5675. </dd>
  5676. <dt><code>K</code></dt>
  5677. <dt><code>=follow-links</code></dt>
  5678. <dd><p>Display the contents of any selected debug sections that are found in
  5679. linked, separate debug info file(s). This can result in multiple
  5680. versions of the same debug section being displayed if it exists in
  5681. more than one file.
  5682. </p>
  5683. <p>In addition, when displaying DWARF attributes, if a form is found that
  5684. references the separate debug info file, then the referenced contents
  5685. will also be displayed.
  5686. </p>
  5687. <p>Note - in some distributions this option is enabled by default. It
  5688. can be disabled via the <samp>N</samp> debug option. The default can be
  5689. chosen when configuring the binutils via the
  5690. <samp>--enable-follow-debug-links=yes</samp> or
  5691. <samp>--enable-follow-debug-links=no</samp> options. If these are not
  5692. used then the default is to enable the following of debug links.
  5693. </p>
  5694. <p>Note - if support for the debuginfod protocol was enabled when the
  5695. binutils were built then this option will also include an attempt to
  5696. contact any debuginfod servers mentioned in the <var>DEBUGINFOD_URLS</var>
  5697. environment variable. This could take some time to resolve. This
  5698. behaviour can be disabled via the <samp>=do-not-use-debuginfod</samp> debug
  5699. option.
  5700. </p>
  5701. </dd>
  5702. <dt><code>N</code></dt>
  5703. <dt><code>=no-follow-links</code></dt>
  5704. <dd><p>Disables the following of links to separate debug info files.
  5705. </p>
  5706. </dd>
  5707. <dt><code>D</code></dt>
  5708. <dt><code>=use-debuginfod</code></dt>
  5709. <dd><p>Enables contacting debuginfod servers if there is a need to follow
  5710. debug links. This is the default behaviour.
  5711. </p>
  5712. </dd>
  5713. <dt><code>E</code></dt>
  5714. <dt><code>=do-not-use-debuginfod</code></dt>
  5715. <dd><p>Disables contacting debuginfod servers when there is a need to follow
  5716. debug links.
  5717. </p>
  5718. </dd>
  5719. <dt><code>l</code></dt>
  5720. <dt><code>=rawline</code></dt>
  5721. <dd><p>Displays the contents of the &lsquo;<samp>.debug_line</samp>&rsquo; section in a raw
  5722. format.
  5723. </p>
  5724. </dd>
  5725. <dt><code>L</code></dt>
  5726. <dt><code>=decodedline</code></dt>
  5727. <dd><p>Displays the interpreted contents of the &lsquo;<samp>.debug_line</samp>&rsquo; section.
  5728. </p>
  5729. </dd>
  5730. <dt><code>m</code></dt>
  5731. <dt><code>=macro</code></dt>
  5732. <dd><p>Displays the contents of the &lsquo;<samp>.debug_macro</samp>&rsquo; and/or
  5733. &lsquo;<samp>.debug_macinfo</samp>&rsquo; sections.
  5734. </p>
  5735. </dd>
  5736. <dt><code>o</code></dt>
  5737. <dt><code>=loc</code></dt>
  5738. <dd><p>Displays the contents of the &lsquo;<samp>.debug_loc</samp>&rsquo; and/or
  5739. &lsquo;<samp>.debug_loclists</samp>&rsquo; sections.
  5740. </p>
  5741. </dd>
  5742. <dt><code>O</code></dt>
  5743. <dt><code>=str-offsets</code></dt>
  5744. <dd><p>Displays the contents of the &lsquo;<samp>.debug_str_offsets</samp>&rsquo; section.
  5745. </p>
  5746. </dd>
  5747. <dt><code>p</code></dt>
  5748. <dt><code>=pubnames</code></dt>
  5749. <dd><p>Displays the contents of the &lsquo;<samp>.debug_pubnames</samp>&rsquo; and/or
  5750. &lsquo;<samp>.debug_gnu_pubnames</samp>&rsquo; sections.
  5751. </p>
  5752. </dd>
  5753. <dt><code>r</code></dt>
  5754. <dt><code>=aranges</code></dt>
  5755. <dd><p>Displays the contents of the &lsquo;<samp>.debug_aranges</samp>&rsquo; section.
  5756. </p>
  5757. </dd>
  5758. <dt><code>R</code></dt>
  5759. <dt><code>=Ranges</code></dt>
  5760. <dd><p>Displays the contents of the &lsquo;<samp>.debug_ranges</samp>&rsquo; and/or
  5761. &lsquo;<samp>.debug_rnglists</samp>&rsquo; sections.
  5762. </p>
  5763. </dd>
  5764. <dt><code>s</code></dt>
  5765. <dt><code>=str</code></dt>
  5766. <dd><p>Displays the contents of the &lsquo;<samp>.debug_str</samp>&rsquo;, &lsquo;<samp>.debug_line_str</samp>&rsquo;
  5767. and/or &lsquo;<samp>.debug_str_offsets</samp>&rsquo; sections.
  5768. </p>
  5769. </dd>
  5770. <dt><code>t</code></dt>
  5771. <dt><code>=pubtype</code></dt>
  5772. <dd><p>Displays the contents of the &lsquo;<samp>.debug_pubtypes</samp>&rsquo; and/or
  5773. &lsquo;<samp>.debug_gnu_pubtypes</samp>&rsquo; sections.
  5774. </p>
  5775. </dd>
  5776. <dt><code>T</code></dt>
  5777. <dt><code>=trace_aranges</code></dt>
  5778. <dd><p>Displays the contents of the &lsquo;<samp>.trace_aranges</samp>&rsquo; section.
  5779. </p>
  5780. </dd>
  5781. <dt><code>u</code></dt>
  5782. <dt><code>=trace_abbrev</code></dt>
  5783. <dd><p>Displays the contents of the &lsquo;<samp>.trace_abbrev</samp>&rsquo; section.
  5784. </p>
  5785. </dd>
  5786. <dt><code>U</code></dt>
  5787. <dt><code>=trace_info</code></dt>
  5788. <dd><p>Displays the contents of the &lsquo;<samp>.trace_info</samp>&rsquo; section.
  5789. </p>
  5790. </dd>
  5791. </dl>
  5792. <p>Note: displaying the contents of &lsquo;<samp>.debug_static_funcs</samp>&rsquo;,
  5793. &lsquo;<samp>.debug_static_vars</samp>&rsquo; and &lsquo;<samp>debug_weaknames</samp>&rsquo; sections is not
  5794. currently supported.
  5795. </p>
  5796. </dd>
  5797. <dt><code>--dwarf-depth=<var>n</var></code></dt>
  5798. <dd><p>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children.
  5799. This is only useful with <samp>--debug-dump=info</samp>. The default is
  5800. to print all DIEs; the special value 0 for <var>n</var> will also have this
  5801. effect.
  5802. </p>
  5803. <p>With a non-zero value for <var>n</var>, DIEs at or deeper than <var>n</var>
  5804. levels will not be printed. The range for <var>n</var> is zero-based.
  5805. </p>
  5806. </dd>
  5807. <dt><code>--dwarf-start=<var>n</var></code></dt>
  5808. <dd><p>Print only DIEs beginning with the DIE numbered <var>n</var>. This is only
  5809. useful with <samp>--debug-dump=info</samp>.
  5810. </p>
  5811. <p>If specified, this option will suppress printing of any header
  5812. information and all DIEs before the DIE numbered <var>n</var>. Only
  5813. siblings and children of the specified DIE will be printed.
  5814. </p>
  5815. <p>This can be used in conjunction with <samp>--dwarf-depth</samp>.
  5816. </p>
  5817. </dd>
  5818. <dt><code>-P</code></dt>
  5819. <dt><code>--process-links</code></dt>
  5820. <dd><p>Display the contents of non-debug sections found in separate debuginfo
  5821. files that are linked to the main file. This option automatically
  5822. implies the <samp>-wK</samp> option, and only sections requested by other
  5823. command line options will be displayed.
  5824. </p>
  5825. </dd>
  5826. <dt><code>--ctf[=<var>section</var>]</code></dt>
  5827. <dd><span id="index-CTF-1"></span>
  5828. <span id="index-Compact-Type-Format-1"></span>
  5829. <p>Display the contents of the specified CTF section. CTF sections themselves
  5830. contain many subsections, all of which are displayed in order.
  5831. </p>
  5832. <p>By default, display the name of the section named <var>.ctf</var>, which is the
  5833. name emitted by <code>ld</code>.
  5834. </p>
  5835. </dd>
  5836. <dt><code>--ctf-parent=<var>member</var></code></dt>
  5837. <dd>
  5838. <p>If the CTF section contains ambiguously-defined types, it will consist
  5839. of an archive of many CTF dictionaries, all inheriting from one
  5840. dictionary containing unambiguous types. This member is by default
  5841. named <var>.ctf</var>, like the section containing it, but it is possible to
  5842. change this name using the <code>ctf_link_set_memb_name_changer</code>
  5843. function at link time. When looking at CTF archives that have been
  5844. created by a linker that uses the name changer to rename the parent
  5845. archive member, <samp>--ctf-parent</samp> can be used to specify the name
  5846. used for the parent.
  5847. </p></dd>
  5848. <dt><code>--ctf-symbols=<var>section</var></code></dt>
  5849. <dt><code>--ctf-strings=<var>section</var></code></dt>
  5850. <dd><p>Specify the name of another section from which the CTF file can inherit
  5851. strings and symbols. By default, the <code>.symtab</code> and its linked
  5852. string table are used.
  5853. </p>
  5854. <p>If either of <samp>--ctf-symbols</samp> or <samp>--ctf-strings</samp> is specified, the
  5855. other must be specified as well.
  5856. </p>
  5857. </dd>
  5858. <dt><code>-I</code></dt>
  5859. <dt><code>--histogram</code></dt>
  5860. <dd><p>Display a histogram of bucket list lengths when displaying the contents
  5861. of the symbol tables.
  5862. </p>
  5863. </dd>
  5864. <dt><code>-v</code></dt>
  5865. <dt><code>--version</code></dt>
  5866. <dd><p>Display the version number of readelf.
  5867. </p>
  5868. </dd>
  5869. <dt><code>-W</code></dt>
  5870. <dt><code>--wide</code></dt>
  5871. <dd><p>Don&rsquo;t break output lines to fit into 80 columns. By default
  5872. <code>readelf</code> breaks section header and segment listing lines for
  5873. 64-bit ELF files, so that they fit into 80 columns. This option causes
  5874. <code>readelf</code> to print each section header resp. each segment one a
  5875. single line, which is far more readable on terminals wider than 80 columns.
  5876. </p>
  5877. </dd>
  5878. <dt><code>-T</code></dt>
  5879. <dt><code>--silent-truncation</code></dt>
  5880. <dd><p>Normally when readelf is displaying a symbol name, and it has to
  5881. truncate the name to fit into an 80 column display, it will add a
  5882. suffix of <code>[...]</code> to the name. This command line option
  5883. disables this behaviour, allowing 5 more characters of the name to be
  5884. displayed and restoring the old behaviour of readelf (prior to release
  5885. 2.35).
  5886. </p>
  5887. </dd>
  5888. <dt><code>-H</code></dt>
  5889. <dt><code>--help</code></dt>
  5890. <dd><p>Display the command-line options understood by <code>readelf</code>.
  5891. </p>
  5892. </dd>
  5893. </dl>
  5894. <hr>
  5895. <span id="elfedit"></span><div class="header">
  5896. <p>
  5897. Next: <a href="#Common-Options" accesskey="n" rel="next">Common Options</a>, Previous: <a href="#readelf" accesskey="p" rel="prev">readelf</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  5898. </div>
  5899. <span id="elfedit-1"></span><h2 class="chapter">15 elfedit</h2>
  5900. <span id="index-Update-ELF-header"></span>
  5901. <span id="index-elfedit"></span>
  5902. <div class="example">
  5903. <pre class="example">elfedit [<samp>--input-mach=</samp><var>machine</var>]
  5904. [<samp>--input-type=</samp><var>type</var>]
  5905. [<samp>--input-osabi=</samp><var>osabi</var>]
  5906. [<samp>--input-abiversion=</samp><var>version</var>]
  5907. <samp>--output-mach=</samp><var>machine</var>
  5908. <samp>--output-type=</samp><var>type</var>
  5909. <samp>--output-osabi=</samp><var>osabi</var>
  5910. <samp>--output-abiversion=</samp><var>version</var>
  5911. <samp>--enable-x86-feature=</samp><var>feature</var>
  5912. <samp>--disable-x86-feature=</samp><var>feature</var>
  5913. [<samp>-v</samp>|<samp>--version</samp>]
  5914. [<samp>-h</samp>|<samp>--help</samp>]
  5915. <var>elffile</var>&hellip;
  5916. </pre></div>
  5917. <p><code>elfedit</code> updates the ELF header and program property of ELF
  5918. files which have the matching ELF machine and file types. The options
  5919. control how and which fields in the ELF header and program property
  5920. should be updated.
  5921. </p>
  5922. <p><var>elffile</var>&hellip; are the ELF files to be updated. 32-bit and
  5923. 64-bit ELF files are supported, as are archives containing ELF files.
  5924. </p>
  5925. <p>The long and short forms of options, shown here as alternatives, are
  5926. equivalent. At least one of the <samp>--output-mach</samp>,
  5927. <samp>--output-type</samp>, <samp>--output-osabi</samp>,
  5928. <samp>--output-abiversion</samp>,
  5929. <samp>--enable-x86-feature</samp> and <samp>--disable-x86-feature</samp>
  5930. options must be given.
  5931. </p>
  5932. <dl compact="compact">
  5933. <dt><code>--input-mach=<var>machine</var></code></dt>
  5934. <dd><p>Set the matching input ELF machine type to <var>machine</var>. If
  5935. <samp>--input-mach</samp> isn&rsquo;t specified, it will match any ELF
  5936. machine types.
  5937. </p>
  5938. <p>The supported ELF machine types are, <var>i386</var>, <var>IAMCU</var>, <var>L1OM</var>,
  5939. <var>K1OM</var> and <var>x86-64</var>.
  5940. </p>
  5941. </dd>
  5942. <dt><code>--output-mach=<var>machine</var></code></dt>
  5943. <dd><p>Change the ELF machine type in the ELF header to <var>machine</var>. The
  5944. supported ELF machine types are the same as <samp>--input-mach</samp>.
  5945. </p>
  5946. </dd>
  5947. <dt><code>--input-type=<var>type</var></code></dt>
  5948. <dd><p>Set the matching input ELF file type to <var>type</var>. If
  5949. <samp>--input-type</samp> isn&rsquo;t specified, it will match any ELF file types.
  5950. </p>
  5951. <p>The supported ELF file types are, <var>rel</var>, <var>exec</var> and <var>dyn</var>.
  5952. </p>
  5953. </dd>
  5954. <dt><code>--output-type=<var>type</var></code></dt>
  5955. <dd><p>Change the ELF file type in the ELF header to <var>type</var>. The
  5956. supported ELF types are the same as <samp>--input-type</samp>.
  5957. </p>
  5958. </dd>
  5959. <dt><code>--input-osabi=<var>osabi</var></code></dt>
  5960. <dd><p>Set the matching input ELF file OSABI to <var>osabi</var>. If
  5961. <samp>--input-osabi</samp> isn&rsquo;t specified, it will match any ELF OSABIs.
  5962. </p>
  5963. <p>The supported ELF OSABIs are, <var>none</var>, <var>HPUX</var>, <var>NetBSD</var>,
  5964. <var>GNU</var>, <var>Linux</var> (alias for <var>GNU</var>),
  5965. <var>Solaris</var>, <var>AIX</var>, <var>Irix</var>,
  5966. <var>FreeBSD</var>, <var>TRU64</var>, <var>Modesto</var>, <var>OpenBSD</var>, <var>OpenVMS</var>,
  5967. <var>NSK</var>, <var>AROS</var> and <var>FenixOS</var>.
  5968. </p>
  5969. </dd>
  5970. <dt><code>--output-osabi=<var>osabi</var></code></dt>
  5971. <dd><p>Change the ELF OSABI in the ELF header to <var>osabi</var>. The
  5972. supported ELF OSABI are the same as <samp>--input-osabi</samp>.
  5973. </p>
  5974. </dd>
  5975. <dt><code>--input-abiversion=<var>version</var></code></dt>
  5976. <dd><p>Set the matching input ELF file ABIVERSION to <var>version</var>.
  5977. <var>version</var> must be between 0 and 255. If <samp>--input-abiversion</samp>
  5978. isn&rsquo;t specified, it will match any ELF ABIVERSIONs.
  5979. </p>
  5980. </dd>
  5981. <dt><code>--output-abiversion=<var>version</var></code></dt>
  5982. <dd><p>Change the ELF ABIVERSION in the ELF header to <var>version</var>.
  5983. <var>version</var> must be between 0 and 255.
  5984. </p>
  5985. </dd>
  5986. <dt><code>--enable-x86-feature=<var>feature</var></code></dt>
  5987. <dd><p>Set the <var>feature</var> bit in program property in <var>exec</var> or <var>dyn</var>
  5988. ELF files with machine types of <var>i386</var> or <var>x86-64</var>. The
  5989. supported features are, <var>ibt</var>, <var>shstk</var>, <var>lam_u48</var> and
  5990. <var>lam_u57</var>.
  5991. </p>
  5992. </dd>
  5993. <dt><code>--disable-x86-feature=<var>feature</var></code></dt>
  5994. <dd><p>Clear the <var>feature</var> bit in program property in <var>exec</var> or
  5995. <var>dyn</var> ELF files with machine types of <var>i386</var> or <var>x86-64</var>.
  5996. The supported features are the same as <samp>--enable-x86-feature</samp>.
  5997. </p>
  5998. <p>Note: <samp>--enable-x86-feature</samp> and <samp>--disable-x86-feature</samp>
  5999. are available only on hosts with &lsquo;<samp>mmap</samp>&rsquo; support.
  6000. </p>
  6001. </dd>
  6002. <dt><code>-v</code></dt>
  6003. <dt><code>--version</code></dt>
  6004. <dd><p>Display the version number of <code>elfedit</code>.
  6005. </p>
  6006. </dd>
  6007. <dt><code>-h</code></dt>
  6008. <dt><code>--help</code></dt>
  6009. <dd><p>Display the command-line options understood by <code>elfedit</code>.
  6010. </p>
  6011. </dd>
  6012. </dl>
  6013. <hr>
  6014. <span id="Common-Options"></span><div class="header">
  6015. <p>
  6016. Next: <a href="#Selecting-the-Target-System" accesskey="n" rel="next">Selecting the Target System</a>, Previous: <a href="#elfedit" accesskey="p" rel="prev">elfedit</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6017. </div>
  6018. <span id="Common-Options-1"></span><h2 class="chapter">16 Common Options</h2>
  6019. <p>The following command-line options are supported by all of the
  6020. programs described in this manual.
  6021. </p>
  6022. <dl compact="compact">
  6023. <dt><code>@<var>file</var></code></dt>
  6024. <dd><p>Read command-line options from <var>file</var>. The options read are
  6025. inserted in place of the original @<var>file</var> option. If <var>file</var>
  6026. does not exist, or cannot be read, then the option will be treated
  6027. literally, and not removed.
  6028. </p>
  6029. <p>Options in <var>file</var> are separated by whitespace. A whitespace
  6030. character may be included in an option by surrounding the entire
  6031. option in either single or double quotes. Any character (including a
  6032. backslash) may be included by prefixing the character to be included
  6033. with a backslash. The <var>file</var> may itself contain additional
  6034. @<var>file</var> options; any such options will be processed recursively.
  6035. </p>
  6036. </dd>
  6037. <dt><code>--help</code></dt>
  6038. <dd><p>Display the command-line options supported by the program.
  6039. </p>
  6040. </dd>
  6041. <dt><code>--version</code></dt>
  6042. <dd><p>Display the version number of the program.
  6043. </p>
  6044. </dd>
  6045. </dl>
  6046. <hr>
  6047. <span id="Selecting-the-Target-System"></span><div class="header">
  6048. <p>
  6049. Next: <a href="#debuginfod" accesskey="n" rel="next">debuginfod</a>, Previous: <a href="#Common-Options" accesskey="p" rel="prev">Common Options</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6050. </div>
  6051. <span id="Selecting-the-Target-System-1"></span><h2 class="chapter">17 Selecting the Target System</h2>
  6052. <p>You can specify two aspects of the target system to the <small>GNU</small>
  6053. binary file utilities, each in several ways:
  6054. </p>
  6055. <ul>
  6056. <li> the target
  6057. </li><li> the architecture
  6058. </li></ul>
  6059. <p>In the following summaries, the lists of ways to specify values are in
  6060. order of decreasing precedence. The ways listed first override those
  6061. listed later.
  6062. </p>
  6063. <p>The commands to list valid values only list the values for which the
  6064. programs you are running were configured. If they were configured with
  6065. <samp>--enable-targets=all</samp>, the commands list most of the available
  6066. values, but a few are left out; not all targets can be configured in at
  6067. once because some of them can only be configured <em>native</em> (on hosts
  6068. with the same type as the target system).
  6069. </p>
  6070. <table class="menu" border="0" cellspacing="0">
  6071. <tr><td align="left" valign="top">&bull; <a href="#Target-Selection" accesskey="1">Target Selection</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  6072. </td></tr>
  6073. <tr><td align="left" valign="top">&bull; <a href="#Architecture-Selection" accesskey="2">Architecture Selection</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  6074. </td></tr>
  6075. </table>
  6076. <hr>
  6077. <span id="Target-Selection"></span><div class="header">
  6078. <p>
  6079. Next: <a href="#Architecture-Selection" accesskey="n" rel="next">Architecture Selection</a>, Up: <a href="#Selecting-the-Target-System" accesskey="u" rel="up">Selecting the Target System</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6080. </div>
  6081. <span id="Target-Selection-1"></span><h3 class="section">17.1 Target Selection</h3>
  6082. <p>A <em>target</em> is an object file format. A given target may be
  6083. supported for multiple architectures (see <a href="#Architecture-Selection">Architecture Selection</a>).
  6084. A target selection may also have variations for different operating
  6085. systems or architectures.
  6086. </p>
  6087. <p>The command to list valid target values is &lsquo;<samp>objdump -i</samp>&rsquo;
  6088. (the first column of output contains the relevant information).
  6089. </p>
  6090. <p>Some sample values are: &lsquo;<samp>a.out-hp300bsd</samp>&rsquo;, &lsquo;<samp>ecoff-littlemips</samp>&rsquo;,
  6091. &lsquo;<samp>a.out-sunos-big</samp>&rsquo;.
  6092. </p>
  6093. <p>You can also specify a target using a configuration triplet. This is
  6094. the same sort of name that is passed to <samp>configure</samp> to specify a
  6095. target. When you use a configuration triplet as an argument, it must be
  6096. fully canonicalized. You can see the canonical version of a triplet by
  6097. running the shell script <samp>config.sub</samp> which is included with the
  6098. sources.
  6099. </p>
  6100. <p>Some sample configuration triplets are: &lsquo;<samp>m68k-hp-bsd</samp>&rsquo;,
  6101. &lsquo;<samp>mips-dec-ultrix</samp>&rsquo;, &lsquo;<samp>sparc-sun-sunos</samp>&rsquo;.
  6102. </p>
  6103. <span id="objdump-Target"></span><h4 class="subheading"><code>objdump</code> Target</h4>
  6104. <p>Ways to specify:
  6105. </p>
  6106. <ol>
  6107. <li> command-line option: <samp>-b</samp> or <samp>--target</samp>
  6108. </li><li> environment variable <code>GNUTARGET</code>
  6109. </li><li> deduced from the input file
  6110. </li></ol>
  6111. <span id="objcopy-and-strip-Input-Target"></span><h4 class="subheading"><code>objcopy</code> and <code>strip</code> Input Target</h4>
  6112. <p>Ways to specify:
  6113. </p>
  6114. <ol>
  6115. <li> command-line options: <samp>-I</samp> or <samp>--input-target</samp>, or <samp>-F</samp> or <samp>--target</samp>
  6116. </li><li> environment variable <code>GNUTARGET</code>
  6117. </li><li> deduced from the input file
  6118. </li></ol>
  6119. <span id="objcopy-and-strip-Output-Target"></span><h4 class="subheading"><code>objcopy</code> and <code>strip</code> Output Target</h4>
  6120. <p>Ways to specify:
  6121. </p>
  6122. <ol>
  6123. <li> command-line options: <samp>-O</samp> or <samp>--output-target</samp>, or <samp>-F</samp> or <samp>--target</samp>
  6124. </li><li> the input target (see &ldquo;<code>objcopy</code> and <code>strip</code> Input Target&rdquo; above)
  6125. </li><li> environment variable <code>GNUTARGET</code>
  6126. </li><li> deduced from the input file
  6127. </li></ol>
  6128. <span id="nm_002c-size_002c-and-strings-Target"></span><h4 class="subheading"><code>nm</code>, <code>size</code>, and <code>strings</code> Target</h4>
  6129. <p>Ways to specify:
  6130. </p>
  6131. <ol>
  6132. <li> command-line option: <samp>--target</samp>
  6133. </li><li> environment variable <code>GNUTARGET</code>
  6134. </li><li> deduced from the input file
  6135. </li></ol>
  6136. <hr>
  6137. <span id="Architecture-Selection"></span><div class="header">
  6138. <p>
  6139. Previous: <a href="#Target-Selection" accesskey="p" rel="prev">Target Selection</a>, Up: <a href="#Selecting-the-Target-System" accesskey="u" rel="up">Selecting the Target System</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6140. </div>
  6141. <span id="Architecture-Selection-1"></span><h3 class="section">17.2 Architecture Selection</h3>
  6142. <p>An <em>architecture</em> is a type of <small>CPU</small> on which an object file is
  6143. to run. Its name may contain a colon, separating the name of the
  6144. processor family from the name of the particular <small>CPU</small>.
  6145. </p>
  6146. <p>The command to list valid architecture values is &lsquo;<samp>objdump -i</samp>&rsquo; (the
  6147. second column contains the relevant information).
  6148. </p>
  6149. <p>Sample values: &lsquo;<samp>m68k:68020</samp>&rsquo;, &lsquo;<samp>mips:3000</samp>&rsquo;, &lsquo;<samp>sparc</samp>&rsquo;.
  6150. </p>
  6151. <span id="objdump-Architecture"></span><h4 class="subheading"><code>objdump</code> Architecture</h4>
  6152. <p>Ways to specify:
  6153. </p>
  6154. <ol>
  6155. <li> command-line option: <samp>-m</samp> or <samp>--architecture</samp>
  6156. </li><li> deduced from the input file
  6157. </li></ol>
  6158. <span id="objcopy_002c-nm_002c-size_002c-strings-Architecture"></span><h4 class="subheading"><code>objcopy</code>, <code>nm</code>, <code>size</code>, <code>strings</code> Architecture</h4>
  6159. <p>Ways to specify:
  6160. </p>
  6161. <ol>
  6162. <li> deduced from the input file
  6163. </li></ol>
  6164. <hr>
  6165. <span id="debuginfod"></span><div class="header">
  6166. <p>
  6167. Next: <a href="#Reporting-Bugs" accesskey="n" rel="next">Reporting Bugs</a>, Previous: <a href="#Selecting-the-Target-System" accesskey="p" rel="prev">Selecting the Target System</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6168. </div>
  6169. <span id="debuginfod-1"></span><h2 class="chapter">18 debuginfod</h2>
  6170. <span id="index-separate-debug-files"></span>
  6171. <p>debuginfod is a web service that indexes ELF/DWARF debugging resources
  6172. by build-id and serves them over HTTP. For more information see:
  6173. <em>https://sourceware.org/elfutils/Debuginfod.html</em>
  6174. </p>
  6175. <p>Binutils can be built with the debuginfod client library
  6176. <code>libdebuginfod</code> using the <samp>--with-debuginfod</samp> configure option.
  6177. This option is enabled by default if <code>libdebuginfod</code> is installed
  6178. and found at configure time. This allows <code>objdump</code> and
  6179. <code>readelf</code> to automatically query debuginfod servers for
  6180. separate debug files when the files are otherwise not found.
  6181. </p>
  6182. <p>debuginfod is packaged with elfutils, starting with version 0.178.
  6183. You can get the latest version from &lsquo;https://sourceware.org/elfutils/&rsquo;.
  6184. </p>
  6185. <p>The DWARF info dumping tools (<code>readelf</code> and <code>objdump</code>)
  6186. have options to control when they should access the debuginfod
  6187. servers. By default this access is enabled.
  6188. </p>
  6189. <hr>
  6190. <span id="Reporting-Bugs"></span><div class="header">
  6191. <p>
  6192. Next: <a href="#GNU-Free-Documentation-License" accesskey="n" rel="next">GNU Free Documentation License</a>, Previous: <a href="#debuginfod" accesskey="p" rel="prev">debuginfod</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6193. </div>
  6194. <span id="Reporting-Bugs-1"></span><h2 class="chapter">19 Reporting Bugs</h2>
  6195. <span id="index-bugs"></span>
  6196. <span id="index-reporting-bugs"></span>
  6197. <p>Your bug reports play an essential role in making the binary utilities
  6198. reliable.
  6199. </p>
  6200. <p>Reporting a bug may help you by bringing a solution to your problem, or
  6201. it may not. But in any case the principal function of a bug report is
  6202. to help the entire community by making the next version of the binary
  6203. utilities work better. Bug reports are your contribution to their
  6204. maintenance.
  6205. </p>
  6206. <p>In order for a bug report to serve its purpose, you must include the
  6207. information that enables us to fix the bug.
  6208. </p>
  6209. <table class="menu" border="0" cellspacing="0">
  6210. <tr><td align="left" valign="top">&bull; <a href="#Bug-Criteria" accesskey="1">Bug Criteria</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Have you found a bug?
  6211. </td></tr>
  6212. <tr><td align="left" valign="top">&bull; <a href="#Bug-Reporting" accesskey="2">Bug Reporting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to report bugs
  6213. </td></tr>
  6214. </table>
  6215. <hr>
  6216. <span id="Bug-Criteria"></span><div class="header">
  6217. <p>
  6218. Next: <a href="#Bug-Reporting" accesskey="n" rel="next">Bug Reporting</a>, Up: <a href="#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6219. </div>
  6220. <span id="Have-You-Found-a-Bug_003f"></span><h3 class="section">19.1 Have You Found a Bug?</h3>
  6221. <span id="index-bug-criteria"></span>
  6222. <p>If you are not sure whether you have found a bug, here are some guidelines:
  6223. </p>
  6224. <ul>
  6225. <li> <span id="index-fatal-signal"></span>
  6226. <span id="index-crash"></span>
  6227. If a binary utility gets a fatal signal, for any input whatever, that is
  6228. a bug. Reliable utilities never crash.
  6229. </li><li> <span id="index-error-on-valid-input"></span>
  6230. If a binary utility produces an error message for valid input, that is a
  6231. bug.
  6232. </li><li> If you are an experienced user of binary utilities, your suggestions for
  6233. improvement are welcome in any case.
  6234. </li></ul>
  6235. <hr>
  6236. <span id="Bug-Reporting"></span><div class="header">
  6237. <p>
  6238. Previous: <a href="#Bug-Criteria" accesskey="p" rel="prev">Bug Criteria</a>, Up: <a href="#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6239. </div>
  6240. <span id="How-to-Report-Bugs"></span><h3 class="section">19.2 How to Report Bugs</h3>
  6241. <span id="index-bug-reports"></span>
  6242. <span id="index-bugs_002c-reporting"></span>
  6243. <p>A number of companies and individuals offer support for <small>GNU</small>
  6244. products. If you obtained the binary utilities from a support
  6245. organization, we recommend you contact that organization first.
  6246. </p>
  6247. <p>You can find contact information for many support companies and
  6248. individuals in the file <samp>etc/SERVICE</samp> in the <small>GNU</small> Emacs
  6249. distribution.
  6250. </p>
  6251. <p>In any event, we also recommend that you send bug reports for the binary
  6252. utilities to <a href="https://bugs.linaro.org/">https://bugs.linaro.org/</a>.
  6253. </p>
  6254. <p>The fundamental principle of reporting bugs usefully is this:
  6255. <strong>report all the facts</strong>. If you are not sure whether to state a
  6256. fact or leave it out, state it!
  6257. </p>
  6258. <p>Often people omit facts because they think they know what causes the
  6259. problem and assume that some details do not matter. Thus, you might
  6260. assume that the name of a file you use in an example does not matter.
  6261. Well, probably it does not, but one cannot be sure. Perhaps the bug is
  6262. a stray memory reference which happens to fetch from the location where
  6263. that pathname is stored in memory; perhaps, if the pathname were
  6264. different, the contents of that location would fool the utility into
  6265. doing the right thing despite the bug. Play it safe and give a
  6266. specific, complete example. That is the easiest thing for you to do,
  6267. and the most helpful.
  6268. </p>
  6269. <p>Keep in mind that the purpose of a bug report is to enable us to fix the bug if
  6270. it is new to us. Therefore, always write your bug reports on the assumption
  6271. that the bug has not been reported previously.
  6272. </p>
  6273. <p>Sometimes people give a few sketchy facts and ask, &ldquo;Does this ring a
  6274. bell?&rdquo; This cannot help us fix a bug, so it is basically useless. We
  6275. respond by asking for enough details to enable us to investigate.
  6276. You might as well expedite matters by sending them to begin with.
  6277. </p>
  6278. <p>To enable us to fix the bug, you should include all these things:
  6279. </p>
  6280. <ul>
  6281. <li> The version of the utility. Each utility announces it if you start it
  6282. with the <samp>--version</samp> argument.
  6283. <p>Without this, we will not know whether there is any point in looking for
  6284. the bug in the current version of the binary utilities.
  6285. </p>
  6286. </li><li> Any patches you may have applied to the source, including any patches
  6287. made to the <code>BFD</code> library.
  6288. </li><li> The type of machine you are using, and the operating system name and
  6289. version number.
  6290. </li><li> What compiler (and its version) was used to compile the utilities&mdash;e.g.
  6291. &ldquo;<code>gcc-2.7</code>&rdquo;.
  6292. </li><li> The command arguments you gave the utility to observe the bug. To
  6293. guarantee you will not omit something important, list them all. A copy
  6294. of the Makefile (or the output from make) is sufficient.
  6295. <p>If we were to try to guess the arguments, we would probably guess wrong
  6296. and then we might not encounter the bug.
  6297. </p>
  6298. </li><li> A complete input file, or set of input files, that will reproduce the
  6299. bug. If the utility is reading an object file or files, then it is
  6300. generally most helpful to send the actual object files.
  6301. <p>If the source files were produced exclusively using <small>GNU</small> programs
  6302. (e.g., <code>gcc</code>, <code>gas</code>, and/or the <small>GNU</small> <code>ld</code>), then it
  6303. may be OK to send the source files rather than the object files. In
  6304. this case, be sure to say exactly what version of <code>gcc</code>, or
  6305. whatever, was used to produce the object files. Also say how
  6306. <code>gcc</code>, or whatever, was configured.
  6307. </p>
  6308. </li><li> A description of what behavior you observe that you believe is
  6309. incorrect. For example, &ldquo;It gets a fatal signal.&rdquo;
  6310. <p>Of course, if the bug is that the utility gets a fatal signal, then we
  6311. will certainly notice it. But if the bug is incorrect output, we might
  6312. not notice unless it is glaringly wrong. You might as well not give us
  6313. a chance to make a mistake.
  6314. </p>
  6315. <p>Even if the problem you experience is a fatal signal, you should still
  6316. say so explicitly. Suppose something strange is going on, such as your
  6317. copy of the utility is out of sync, or you have encountered a bug in
  6318. the C library on your system. (This has happened!) Your copy might
  6319. crash and ours would not. If you told us to expect a crash, then when
  6320. ours fails to crash, we would know that the bug was not happening for
  6321. us. If you had not told us to expect a crash, then we would not be able
  6322. to draw any conclusion from our observations.
  6323. </p>
  6324. </li><li> If you wish to suggest changes to the source, send us context diffs, as
  6325. generated by <code>diff</code> with the <samp>-u</samp>, <samp>-c</samp>, or <samp>-p</samp>
  6326. option. Always send diffs from the old file to the new file. If you
  6327. wish to discuss something in the <code>ld</code> source, refer to it by
  6328. context, not by line number.
  6329. <p>The line numbers in our development sources will not match those in your
  6330. sources. Your line numbers would convey no useful information to us.
  6331. </p></li></ul>
  6332. <p>Here are some things that are not necessary:
  6333. </p>
  6334. <ul>
  6335. <li> A description of the envelope of the bug.
  6336. <p>Often people who encounter a bug spend a lot of time investigating
  6337. which changes to the input file will make the bug go away and which
  6338. changes will not affect it.
  6339. </p>
  6340. <p>This is often time consuming and not very useful, because the way we
  6341. will find the bug is by running a single example under the debugger
  6342. with breakpoints, not by pure deduction from a series of examples.
  6343. We recommend that you save your time for something else.
  6344. </p>
  6345. <p>Of course, if you can find a simpler example to report <em>instead</em>
  6346. of the original one, that is a convenience for us. Errors in the
  6347. output will be easier to spot, running under the debugger will take
  6348. less time, and so on.
  6349. </p>
  6350. <p>However, simplification is not vital; if you do not want to do this,
  6351. report the bug anyway and send us the entire test case you used.
  6352. </p>
  6353. </li><li> A patch for the bug.
  6354. <p>A patch for the bug does help us if it is a good one. But do not omit
  6355. the necessary information, such as the test case, on the assumption that
  6356. a patch is all we need. We might see problems with your patch and decide
  6357. to fix the problem another way, or we might not understand it at all.
  6358. </p>
  6359. <p>Sometimes with programs as complicated as the binary utilities it is
  6360. very hard to construct an example that will make the program follow a
  6361. certain path through the code. If you do not send us the example, we
  6362. will not be able to construct one, so we will not be able to verify that
  6363. the bug is fixed.
  6364. </p>
  6365. <p>And if we cannot understand what bug you are trying to fix, or why your
  6366. patch should be an improvement, we will not install it. A test case will
  6367. help us to understand.
  6368. </p>
  6369. </li><li> A guess about what the bug is or what it depends on.
  6370. <p>Such guesses are usually wrong. Even we cannot guess right about such
  6371. things without first using the debugger to find the facts.
  6372. </p></li></ul>
  6373. <hr>
  6374. <span id="GNU-Free-Documentation-License"></span><div class="header">
  6375. <p>
  6376. Next: <a href="#Binutils-Index" accesskey="n" rel="next">Binutils Index</a>, Previous: <a href="#Reporting-Bugs" accesskey="p" rel="prev">Reporting Bugs</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6377. </div>
  6378. <span id="GNU-Free-Documentation-License-1"></span><h2 class="appendix">Appendix A GNU Free Documentation License</h2>
  6379. <div align="center">Version 1.3, 3 November 2008
  6380. </div>
  6381. <div class="display">
  6382. <pre class="display">Copyright &copy; 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
  6383. <a href="http://fsf.org/">http://fsf.org/</a>
  6384. Everyone is permitted to copy and distribute verbatim copies
  6385. of this license document, but changing it is not allowed.
  6386. </pre></div>
  6387. <ol start="0">
  6388. <li> PREAMBLE
  6389. <p>The purpose of this License is to make a manual, textbook, or other
  6390. functional and useful document <em>free</em> in the sense of freedom: to
  6391. assure everyone the effective freedom to copy and redistribute it,
  6392. with or without modifying it, either commercially or noncommercially.
  6393. Secondarily, this License preserves for the author and publisher a way
  6394. to get credit for their work, while not being considered responsible
  6395. for modifications made by others.
  6396. </p>
  6397. <p>This License is a kind of &ldquo;copyleft&rdquo;, which means that derivative
  6398. works of the document must themselves be free in the same sense. It
  6399. complements the GNU General Public License, which is a copyleft
  6400. license designed for free software.
  6401. </p>
  6402. <p>We have designed this License in order to use it for manuals for free
  6403. software, because free software needs free documentation: a free
  6404. program should come with manuals providing the same freedoms that the
  6405. software does. But this License is not limited to software manuals;
  6406. it can be used for any textual work, regardless of subject matter or
  6407. whether it is published as a printed book. We recommend this License
  6408. principally for works whose purpose is instruction or reference.
  6409. </p>
  6410. </li><li> APPLICABILITY AND DEFINITIONS
  6411. <p>This License applies to any manual or other work, in any medium, that
  6412. contains a notice placed by the copyright holder saying it can be
  6413. distributed under the terms of this License. Such a notice grants a
  6414. world-wide, royalty-free license, unlimited in duration, to use that
  6415. work under the conditions stated herein. The &ldquo;Document&rdquo;, below,
  6416. refers to any such manual or work. Any member of the public is a
  6417. licensee, and is addressed as &ldquo;you&rdquo;. You accept the license if you
  6418. copy, modify or distribute the work in a way requiring permission
  6419. under copyright law.
  6420. </p>
  6421. <p>A &ldquo;Modified Version&rdquo; of the Document means any work containing the
  6422. Document or a portion of it, either copied verbatim, or with
  6423. modifications and/or translated into another language.
  6424. </p>
  6425. <p>A &ldquo;Secondary Section&rdquo; is a named appendix or a front-matter section
  6426. of the Document that deals exclusively with the relationship of the
  6427. publishers or authors of the Document to the Document&rsquo;s overall
  6428. subject (or to related matters) and contains nothing that could fall
  6429. directly within that overall subject. (Thus, if the Document is in
  6430. part a textbook of mathematics, a Secondary Section may not explain
  6431. any mathematics.) The relationship could be a matter of historical
  6432. connection with the subject or with related matters, or of legal,
  6433. commercial, philosophical, ethical or political position regarding
  6434. them.
  6435. </p>
  6436. <p>The &ldquo;Invariant Sections&rdquo; are certain Secondary Sections whose titles
  6437. are designated, as being those of Invariant Sections, in the notice
  6438. that says that the Document is released under this License. If a
  6439. section does not fit the above definition of Secondary then it is not
  6440. allowed to be designated as Invariant. The Document may contain zero
  6441. Invariant Sections. If the Document does not identify any Invariant
  6442. Sections then there are none.
  6443. </p>
  6444. <p>The &ldquo;Cover Texts&rdquo; are certain short passages of text that are listed,
  6445. as Front-Cover Texts or Back-Cover Texts, in the notice that says that
  6446. the Document is released under this License. A Front-Cover Text may
  6447. be at most 5 words, and a Back-Cover Text may be at most 25 words.
  6448. </p>
  6449. <p>A &ldquo;Transparent&rdquo; copy of the Document means a machine-readable copy,
  6450. represented in a format whose specification is available to the
  6451. general public, that is suitable for revising the document
  6452. straightforwardly with generic text editors or (for images composed of
  6453. pixels) generic paint programs or (for drawings) some widely available
  6454. drawing editor, and that is suitable for input to text formatters or
  6455. for automatic translation to a variety of formats suitable for input
  6456. to text formatters. A copy made in an otherwise Transparent file
  6457. format whose markup, or absence of markup, has been arranged to thwart
  6458. or discourage subsequent modification by readers is not Transparent.
  6459. An image format is not Transparent if used for any substantial amount
  6460. of text. A copy that is not &ldquo;Transparent&rdquo; is called &ldquo;Opaque&rdquo;.
  6461. </p>
  6462. <p>Examples of suitable formats for Transparent copies include plain
  6463. <small>ASCII</small> without markup, Texinfo input format, LaTeX input
  6464. format, <acronym>SGML</acronym> or <acronym>XML</acronym> using a publicly available
  6465. <acronym>DTD</acronym>, and standard-conforming simple <acronym>HTML</acronym>,
  6466. PostScript or <acronym>PDF</acronym> designed for human modification. Examples
  6467. of transparent image formats include <acronym>PNG</acronym>, <acronym>XCF</acronym> and
  6468. <acronym>JPG</acronym>. Opaque formats include proprietary formats that can be
  6469. read and edited only by proprietary word processors, <acronym>SGML</acronym> or
  6470. <acronym>XML</acronym> for which the <acronym>DTD</acronym> and/or processing tools are
  6471. not generally available, and the machine-generated <acronym>HTML</acronym>,
  6472. PostScript or <acronym>PDF</acronym> produced by some word processors for
  6473. output purposes only.
  6474. </p>
  6475. <p>The &ldquo;Title Page&rdquo; means, for a printed book, the title page itself,
  6476. plus such following pages as are needed to hold, legibly, the material
  6477. this License requires to appear in the title page. For works in
  6478. formats which do not have any title page as such, &ldquo;Title Page&rdquo; means
  6479. the text near the most prominent appearance of the work&rsquo;s title,
  6480. preceding the beginning of the body of the text.
  6481. </p>
  6482. <p>The &ldquo;publisher&rdquo; means any person or entity that distributes copies
  6483. of the Document to the public.
  6484. </p>
  6485. <p>A section &ldquo;Entitled XYZ&rdquo; means a named subunit of the Document whose
  6486. title either is precisely XYZ or contains XYZ in parentheses following
  6487. text that translates XYZ in another language. (Here XYZ stands for a
  6488. specific section name mentioned below, such as &ldquo;Acknowledgements&rdquo;,
  6489. &ldquo;Dedications&rdquo;, &ldquo;Endorsements&rdquo;, or &ldquo;History&rdquo;.) To &ldquo;Preserve the Title&rdquo;
  6490. of such a section when you modify the Document means that it remains a
  6491. section &ldquo;Entitled XYZ&rdquo; according to this definition.
  6492. </p>
  6493. <p>The Document may include Warranty Disclaimers next to the notice which
  6494. states that this License applies to the Document. These Warranty
  6495. Disclaimers are considered to be included by reference in this
  6496. License, but only as regards disclaiming warranties: any other
  6497. implication that these Warranty Disclaimers may have is void and has
  6498. no effect on the meaning of this License.
  6499. </p>
  6500. </li><li> VERBATIM COPYING
  6501. <p>You may copy and distribute the Document in any medium, either
  6502. commercially or noncommercially, provided that this License, the
  6503. copyright notices, and the license notice saying this License applies
  6504. to the Document are reproduced in all copies, and that you add no other
  6505. conditions whatsoever to those of this License. You may not use
  6506. technical measures to obstruct or control the reading or further
  6507. copying of the copies you make or distribute. However, you may accept
  6508. compensation in exchange for copies. If you distribute a large enough
  6509. number of copies you must also follow the conditions in section 3.
  6510. </p>
  6511. <p>You may also lend copies, under the same conditions stated above, and
  6512. you may publicly display copies.
  6513. </p>
  6514. </li><li> COPYING IN QUANTITY
  6515. <p>If you publish printed copies (or copies in media that commonly have
  6516. printed covers) of the Document, numbering more than 100, and the
  6517. Document&rsquo;s license notice requires Cover Texts, you must enclose the
  6518. copies in covers that carry, clearly and legibly, all these Cover
  6519. Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
  6520. the back cover. Both covers must also clearly and legibly identify
  6521. you as the publisher of these copies. The front cover must present
  6522. the full title with all words of the title equally prominent and
  6523. visible. You may add other material on the covers in addition.
  6524. Copying with changes limited to the covers, as long as they preserve
  6525. the title of the Document and satisfy these conditions, can be treated
  6526. as verbatim copying in other respects.
  6527. </p>
  6528. <p>If the required texts for either cover are too voluminous to fit
  6529. legibly, you should put the first ones listed (as many as fit
  6530. reasonably) on the actual cover, and continue the rest onto adjacent
  6531. pages.
  6532. </p>
  6533. <p>If you publish or distribute Opaque copies of the Document numbering
  6534. more than 100, you must either include a machine-readable Transparent
  6535. copy along with each Opaque copy, or state in or with each Opaque copy
  6536. a computer-network location from which the general network-using
  6537. public has access to download using public-standard network protocols
  6538. a complete Transparent copy of the Document, free of added material.
  6539. If you use the latter option, you must take reasonably prudent steps,
  6540. when you begin distribution of Opaque copies in quantity, to ensure
  6541. that this Transparent copy will remain thus accessible at the stated
  6542. location until at least one year after the last time you distribute an
  6543. Opaque copy (directly or through your agents or retailers) of that
  6544. edition to the public.
  6545. </p>
  6546. <p>It is requested, but not required, that you contact the authors of the
  6547. Document well before redistributing any large number of copies, to give
  6548. them a chance to provide you with an updated version of the Document.
  6549. </p>
  6550. </li><li> MODIFICATIONS
  6551. <p>You may copy and distribute a Modified Version of the Document under
  6552. the conditions of sections 2 and 3 above, provided that you release
  6553. the Modified Version under precisely this License, with the Modified
  6554. Version filling the role of the Document, thus licensing distribution
  6555. and modification of the Modified Version to whoever possesses a copy
  6556. of it. In addition, you must do these things in the Modified Version:
  6557. </p>
  6558. <ol type="A" start="1">
  6559. <li> Use in the Title Page (and on the covers, if any) a title distinct
  6560. from that of the Document, and from those of previous versions
  6561. (which should, if there were any, be listed in the History section
  6562. of the Document). You may use the same title as a previous version
  6563. if the original publisher of that version gives permission.
  6564. </li><li> List on the Title Page, as authors, one or more persons or entities
  6565. responsible for authorship of the modifications in the Modified
  6566. Version, together with at least five of the principal authors of the
  6567. Document (all of its principal authors, if it has fewer than five),
  6568. unless they release you from this requirement.
  6569. </li><li> State on the Title page the name of the publisher of the
  6570. Modified Version, as the publisher.
  6571. </li><li> Preserve all the copyright notices of the Document.
  6572. </li><li> Add an appropriate copyright notice for your modifications
  6573. adjacent to the other copyright notices.
  6574. </li><li> Include, immediately after the copyright notices, a license notice
  6575. giving the public permission to use the Modified Version under the
  6576. terms of this License, in the form shown in the Addendum below.
  6577. </li><li> Preserve in that license notice the full lists of Invariant Sections
  6578. and required Cover Texts given in the Document&rsquo;s license notice.
  6579. </li><li> Include an unaltered copy of this License.
  6580. </li><li> Preserve the section Entitled &ldquo;History&rdquo;, Preserve its Title, and add
  6581. to it an item stating at least the title, year, new authors, and
  6582. publisher of the Modified Version as given on the Title Page. If
  6583. there is no section Entitled &ldquo;History&rdquo; in the Document, create one
  6584. stating the title, year, authors, and publisher of the Document as
  6585. given on its Title Page, then add an item describing the Modified
  6586. Version as stated in the previous sentence.
  6587. </li><li> Preserve the network location, if any, given in the Document for
  6588. public access to a Transparent copy of the Document, and likewise
  6589. the network locations given in the Document for previous versions
  6590. it was based on. These may be placed in the &ldquo;History&rdquo; section.
  6591. You may omit a network location for a work that was published at
  6592. least four years before the Document itself, or if the original
  6593. publisher of the version it refers to gives permission.
  6594. </li><li> For any section Entitled &ldquo;Acknowledgements&rdquo; or &ldquo;Dedications&rdquo;, Preserve
  6595. the Title of the section, and preserve in the section all the
  6596. substance and tone of each of the contributor acknowledgements and/or
  6597. dedications given therein.
  6598. </li><li> Preserve all the Invariant Sections of the Document,
  6599. unaltered in their text and in their titles. Section numbers
  6600. or the equivalent are not considered part of the section titles.
  6601. </li><li> Delete any section Entitled &ldquo;Endorsements&rdquo;. Such a section
  6602. may not be included in the Modified Version.
  6603. </li><li> Do not retitle any existing section to be Entitled &ldquo;Endorsements&rdquo; or
  6604. to conflict in title with any Invariant Section.
  6605. </li><li> Preserve any Warranty Disclaimers.
  6606. </li></ol>
  6607. <p>If the Modified Version includes new front-matter sections or
  6608. appendices that qualify as Secondary Sections and contain no material
  6609. copied from the Document, you may at your option designate some or all
  6610. of these sections as invariant. To do this, add their titles to the
  6611. list of Invariant Sections in the Modified Version&rsquo;s license notice.
  6612. These titles must be distinct from any other section titles.
  6613. </p>
  6614. <p>You may add a section Entitled &ldquo;Endorsements&rdquo;, provided it contains
  6615. nothing but endorsements of your Modified Version by various
  6616. parties&mdash;for example, statements of peer review or that the text has
  6617. been approved by an organization as the authoritative definition of a
  6618. standard.
  6619. </p>
  6620. <p>You may add a passage of up to five words as a Front-Cover Text, and a
  6621. passage of up to 25 words as a Back-Cover Text, to the end of the list
  6622. of Cover Texts in the Modified Version. Only one passage of
  6623. Front-Cover Text and one of Back-Cover Text may be added by (or
  6624. through arrangements made by) any one entity. If the Document already
  6625. includes a cover text for the same cover, previously added by you or
  6626. by arrangement made by the same entity you are acting on behalf of,
  6627. you may not add another; but you may replace the old one, on explicit
  6628. permission from the previous publisher that added the old one.
  6629. </p>
  6630. <p>The author(s) and publisher(s) of the Document do not by this License
  6631. give permission to use their names for publicity for or to assert or
  6632. imply endorsement of any Modified Version.
  6633. </p>
  6634. </li><li> COMBINING DOCUMENTS
  6635. <p>You may combine the Document with other documents released under this
  6636. License, under the terms defined in section 4 above for modified
  6637. versions, provided that you include in the combination all of the
  6638. Invariant Sections of all of the original documents, unmodified, and
  6639. list them all as Invariant Sections of your combined work in its
  6640. license notice, and that you preserve all their Warranty Disclaimers.
  6641. </p>
  6642. <p>The combined work need only contain one copy of this License, and
  6643. multiple identical Invariant Sections may be replaced with a single
  6644. copy. If there are multiple Invariant Sections with the same name but
  6645. different contents, make the title of each such section unique by
  6646. adding at the end of it, in parentheses, the name of the original
  6647. author or publisher of that section if known, or else a unique number.
  6648. Make the same adjustment to the section titles in the list of
  6649. Invariant Sections in the license notice of the combined work.
  6650. </p>
  6651. <p>In the combination, you must combine any sections Entitled &ldquo;History&rdquo;
  6652. in the various original documents, forming one section Entitled
  6653. &ldquo;History&rdquo;; likewise combine any sections Entitled &ldquo;Acknowledgements&rdquo;,
  6654. and any sections Entitled &ldquo;Dedications&rdquo;. You must delete all
  6655. sections Entitled &ldquo;Endorsements.&rdquo;
  6656. </p>
  6657. </li><li> COLLECTIONS OF DOCUMENTS
  6658. <p>You may make a collection consisting of the Document and other documents
  6659. released under this License, and replace the individual copies of this
  6660. License in the various documents with a single copy that is included in
  6661. the collection, provided that you follow the rules of this License for
  6662. verbatim copying of each of the documents in all other respects.
  6663. </p>
  6664. <p>You may extract a single document from such a collection, and distribute
  6665. it individually under this License, provided you insert a copy of this
  6666. License into the extracted document, and follow this License in all
  6667. other respects regarding verbatim copying of that document.
  6668. </p>
  6669. </li><li> AGGREGATION WITH INDEPENDENT WORKS
  6670. <p>A compilation of the Document or its derivatives with other separate
  6671. and independent documents or works, in or on a volume of a storage or
  6672. distribution medium, is called an &ldquo;aggregate&rdquo; if the copyright
  6673. resulting from the compilation is not used to limit the legal rights
  6674. of the compilation&rsquo;s users beyond what the individual works permit.
  6675. When the Document is included in an aggregate, this License does not
  6676. apply to the other works in the aggregate which are not themselves
  6677. derivative works of the Document.
  6678. </p>
  6679. <p>If the Cover Text requirement of section 3 is applicable to these
  6680. copies of the Document, then if the Document is less than one half of
  6681. the entire aggregate, the Document&rsquo;s Cover Texts may be placed on
  6682. covers that bracket the Document within the aggregate, or the
  6683. electronic equivalent of covers if the Document is in electronic form.
  6684. Otherwise they must appear on printed covers that bracket the whole
  6685. aggregate.
  6686. </p>
  6687. </li><li> TRANSLATION
  6688. <p>Translation is considered a kind of modification, so you may
  6689. distribute translations of the Document under the terms of section 4.
  6690. Replacing Invariant Sections with translations requires special
  6691. permission from their copyright holders, but you may include
  6692. translations of some or all Invariant Sections in addition to the
  6693. original versions of these Invariant Sections. You may include a
  6694. translation of this License, and all the license notices in the
  6695. Document, and any Warranty Disclaimers, provided that you also include
  6696. the original English version of this License and the original versions
  6697. of those notices and disclaimers. In case of a disagreement between
  6698. the translation and the original version of this License or a notice
  6699. or disclaimer, the original version will prevail.
  6700. </p>
  6701. <p>If a section in the Document is Entitled &ldquo;Acknowledgements&rdquo;,
  6702. &ldquo;Dedications&rdquo;, or &ldquo;History&rdquo;, the requirement (section 4) to Preserve
  6703. its Title (section 1) will typically require changing the actual
  6704. title.
  6705. </p>
  6706. </li><li> TERMINATION
  6707. <p>You may not copy, modify, sublicense, or distribute the Document
  6708. except as expressly provided under this License. Any attempt
  6709. otherwise to copy, modify, sublicense, or distribute it is void, and
  6710. will automatically terminate your rights under this License.
  6711. </p>
  6712. <p>However, if you cease all violation of this License, then your license
  6713. from a particular copyright holder is reinstated (a) provisionally,
  6714. unless and until the copyright holder explicitly and finally
  6715. terminates your license, and (b) permanently, if the copyright holder
  6716. fails to notify you of the violation by some reasonable means prior to
  6717. 60 days after the cessation.
  6718. </p>
  6719. <p>Moreover, your license from a particular copyright holder is
  6720. reinstated permanently if the copyright holder notifies you of the
  6721. violation by some reasonable means, this is the first time you have
  6722. received notice of violation of this License (for any work) from that
  6723. copyright holder, and you cure the violation prior to 30 days after
  6724. your receipt of the notice.
  6725. </p>
  6726. <p>Termination of your rights under this section does not terminate the
  6727. licenses of parties who have received copies or rights from you under
  6728. this License. If your rights have been terminated and not permanently
  6729. reinstated, receipt of a copy of some or all of the same material does
  6730. not give you any rights to use it.
  6731. </p>
  6732. </li><li> FUTURE REVISIONS OF THIS LICENSE
  6733. <p>The Free Software Foundation may publish new, revised versions
  6734. of the GNU Free Documentation License from time to time. Such new
  6735. versions will be similar in spirit to the present version, but may
  6736. differ in detail to address new problems or concerns. See
  6737. <a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
  6738. </p>
  6739. <p>Each version of the License is given a distinguishing version number.
  6740. If the Document specifies that a particular numbered version of this
  6741. License &ldquo;or any later version&rdquo; applies to it, you have the option of
  6742. following the terms and conditions either of that specified version or
  6743. of any later version that has been published (not as a draft) by the
  6744. Free Software Foundation. If the Document does not specify a version
  6745. number of this License, you may choose any version ever published (not
  6746. as a draft) by the Free Software Foundation. If the Document
  6747. specifies that a proxy can decide which future versions of this
  6748. License can be used, that proxy&rsquo;s public statement of acceptance of a
  6749. version permanently authorizes you to choose that version for the
  6750. Document.
  6751. </p>
  6752. </li><li> RELICENSING
  6753. <p>&ldquo;Massive Multiauthor Collaboration Site&rdquo; (or &ldquo;MMC Site&rdquo;) means any
  6754. World Wide Web server that publishes copyrightable works and also
  6755. provides prominent facilities for anybody to edit those works. A
  6756. public wiki that anybody can edit is an example of such a server. A
  6757. &ldquo;Massive Multiauthor Collaboration&rdquo; (or &ldquo;MMC&rdquo;) contained in the
  6758. site means any set of copyrightable works thus published on the MMC
  6759. site.
  6760. </p>
  6761. <p>&ldquo;CC-BY-SA&rdquo; means the Creative Commons Attribution-Share Alike 3.0
  6762. license published by Creative Commons Corporation, a not-for-profit
  6763. corporation with a principal place of business in San Francisco,
  6764. California, as well as future copyleft versions of that license
  6765. published by that same organization.
  6766. </p>
  6767. <p>&ldquo;Incorporate&rdquo; means to publish or republish a Document, in whole or
  6768. in part, as part of another Document.
  6769. </p>
  6770. <p>An MMC is &ldquo;eligible for relicensing&rdquo; if it is licensed under this
  6771. License, and if all works that were first published under this License
  6772. somewhere other than this MMC, and subsequently incorporated in whole
  6773. or in part into the MMC, (1) had no cover texts or invariant sections,
  6774. and (2) were thus incorporated prior to November 1, 2008.
  6775. </p>
  6776. <p>The operator of an MMC Site may republish an MMC contained in the site
  6777. under CC-BY-SA on the same site at any time before August 1, 2009,
  6778. provided the MMC is eligible for relicensing.
  6779. </p>
  6780. </li></ol>
  6781. <span id="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></span><h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
  6782. <p>To use this License in a document you have written, include a copy of
  6783. the License in the document and put the following copyright and
  6784. license notices just after the title page:
  6785. </p>
  6786. <div class="example">
  6787. <pre class="example"> Copyright (C) <var>year</var> <var>your name</var>.
  6788. Permission is granted to copy, distribute and/or modify this document
  6789. under the terms of the GNU Free Documentation License, Version 1.3
  6790. or any later version published by the Free Software Foundation;
  6791. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  6792. Texts. A copy of the license is included in the section entitled ``GNU
  6793. Free Documentation License''.
  6794. </pre></div>
  6795. <p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
  6796. replace the &ldquo;with&hellip;Texts.&rdquo; line with this:
  6797. </p>
  6798. <div class="example">
  6799. <pre class="example"> with the Invariant Sections being <var>list their titles</var>, with
  6800. the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
  6801. being <var>list</var>.
  6802. </pre></div>
  6803. <p>If you have Invariant Sections without Cover Texts, or some other
  6804. combination of the three, merge those two alternatives to suit the
  6805. situation.
  6806. </p>
  6807. <p>If your document contains nontrivial examples of program code, we
  6808. recommend releasing these examples in parallel under your choice of
  6809. free software license, such as the GNU General Public License,
  6810. to permit their use in free software.
  6811. </p>
  6812. <hr>
  6813. <span id="Binutils-Index"></span><div class="header">
  6814. <p>
  6815. Previous: <a href="#GNU-Free-Documentation-License" accesskey="p" rel="prev">GNU Free Documentation License</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  6816. </div>
  6817. <span id="Binutils-Index-1"></span><h2 class="unnumbered">Binutils Index</h2>
  6818. <table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Binutils-Index_cp_symbol-1"><b>-</b></a>
  6819. &nbsp;
  6820. <a class="summary-letter" href="#Binutils-Index_cp_symbol-2"><b>.</b></a>
  6821. &nbsp;
  6822. <br>
  6823. <a class="summary-letter" href="#Binutils-Index_cp_letter-A"><b>A</b></a>
  6824. &nbsp;
  6825. <a class="summary-letter" href="#Binutils-Index_cp_letter-B"><b>B</b></a>
  6826. &nbsp;
  6827. <a class="summary-letter" href="#Binutils-Index_cp_letter-C"><b>C</b></a>
  6828. &nbsp;
  6829. <a class="summary-letter" href="#Binutils-Index_cp_letter-D"><b>D</b></a>
  6830. &nbsp;
  6831. <a class="summary-letter" href="#Binutils-Index_cp_letter-E"><b>E</b></a>
  6832. &nbsp;
  6833. <a class="summary-letter" href="#Binutils-Index_cp_letter-F"><b>F</b></a>
  6834. &nbsp;
  6835. <a class="summary-letter" href="#Binutils-Index_cp_letter-H"><b>H</b></a>
  6836. &nbsp;
  6837. <a class="summary-letter" href="#Binutils-Index_cp_letter-I"><b>I</b></a>
  6838. &nbsp;
  6839. <a class="summary-letter" href="#Binutils-Index_cp_letter-L"><b>L</b></a>
  6840. &nbsp;
  6841. <a class="summary-letter" href="#Binutils-Index_cp_letter-M"><b>M</b></a>
  6842. &nbsp;
  6843. <a class="summary-letter" href="#Binutils-Index_cp_letter-N"><b>N</b></a>
  6844. &nbsp;
  6845. <a class="summary-letter" href="#Binutils-Index_cp_letter-O"><b>O</b></a>
  6846. &nbsp;
  6847. <a class="summary-letter" href="#Binutils-Index_cp_letter-P"><b>P</b></a>
  6848. &nbsp;
  6849. <a class="summary-letter" href="#Binutils-Index_cp_letter-Q"><b>Q</b></a>
  6850. &nbsp;
  6851. <a class="summary-letter" href="#Binutils-Index_cp_letter-R"><b>R</b></a>
  6852. &nbsp;
  6853. <a class="summary-letter" href="#Binutils-Index_cp_letter-S"><b>S</b></a>
  6854. &nbsp;
  6855. <a class="summary-letter" href="#Binutils-Index_cp_letter-T"><b>T</b></a>
  6856. &nbsp;
  6857. <a class="summary-letter" href="#Binutils-Index_cp_letter-U"><b>U</b></a>
  6858. &nbsp;
  6859. <a class="summary-letter" href="#Binutils-Index_cp_letter-V"><b>V</b></a>
  6860. &nbsp;
  6861. <a class="summary-letter" href="#Binutils-Index_cp_letter-W"><b>W</b></a>
  6862. &nbsp;
  6863. </td></tr></table>
  6864. <table class="index-cp" border="0">
  6865. <tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
  6866. <tr><td colspan="4"> <hr></td></tr>
  6867. <tr><th id="Binutils-Index_cp_symbol-1">-</th><td></td><td></td></tr>
  6868. <tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives">&ndash;enable-deterministic-archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6869. <tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-1">&ndash;enable-deterministic-archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6870. <tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-2">&ndash;enable-deterministic-archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6871. <tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-3">&ndash;enable-deterministic-archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6872. <tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-4">&ndash;enable-deterministic-archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ranlib">ranlib</a></td></tr>
  6873. <tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-5">&ndash;enable-deterministic-archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ranlib">ranlib</a></td></tr>
  6874. <tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-6">&ndash;enable-deterministic-archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strip">strip</a></td></tr>
  6875. <tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-7">&ndash;enable-deterministic-archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strip">strip</a></td></tr>
  6876. <tr><td colspan="4"> <hr></td></tr>
  6877. <tr><th id="Binutils-Index_cp_symbol-2">.</th><td></td><td></td></tr>
  6878. <tr><td></td><td valign="top"><a href="#index-_002estab">.stab</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6879. <tr><td colspan="4"> <hr></td></tr>
  6880. <tr><th id="Binutils-Index_cp_letter-A">A</th><td></td><td></td></tr>
  6881. <tr><td></td><td valign="top"><a href="#index-Add-prefix-to-absolute-paths">Add prefix to absolute paths</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6882. <tr><td></td><td valign="top"><a href="#index-addr2line">addr2line</a>:</td><td>&nbsp;</td><td valign="top"><a href="#addr2line">addr2line</a></td></tr>
  6883. <tr><td></td><td valign="top"><a href="#index-address-to-file-name-and-line-number">address to file name and line number</a>:</td><td>&nbsp;</td><td valign="top"><a href="#addr2line">addr2line</a></td></tr>
  6884. <tr><td></td><td valign="top"><a href="#index-all-header-information_002c-object-file">all header information, object file</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6885. <tr><td></td><td valign="top"><a href="#index-ar">ar</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  6886. <tr><td></td><td valign="top"><a href="#index-ar-compatibility"><code>ar</code> compatibility</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  6887. <tr><td></td><td valign="top"><a href="#index-architecture">architecture</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6888. <tr><td></td><td valign="top"><a href="#index-architectures-available">architectures available</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6889. <tr><td></td><td valign="top"><a href="#index-archive-contents">archive contents</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ranlib">ranlib</a></td></tr>
  6890. <tr><td></td><td valign="top"><a href="#index-Archive-file-symbol-index-information">Archive file symbol index information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6891. <tr><td></td><td valign="top"><a href="#index-archive-headers">archive headers</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6892. <tr><td></td><td valign="top"><a href="#index-archives">archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  6893. <tr><td colspan="4"> <hr></td></tr>
  6894. <tr><th id="Binutils-Index_cp_letter-B">B</th><td></td><td></td></tr>
  6895. <tr><td></td><td valign="top"><a href="#index-base-files">base files</a>:</td><td>&nbsp;</td><td valign="top"><a href="#dlltool">dlltool</a></td></tr>
  6896. <tr><td></td><td valign="top"><a href="#index-bug-criteria">bug criteria</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bug-Criteria">Bug Criteria</a></td></tr>
  6897. <tr><td></td><td valign="top"><a href="#index-bug-reports">bug reports</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bug-Reporting">Bug Reporting</a></td></tr>
  6898. <tr><td></td><td valign="top"><a href="#index-bugs">bugs</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Reporting-Bugs">Reporting Bugs</a></td></tr>
  6899. <tr><td></td><td valign="top"><a href="#index-bugs_002c-reporting">bugs, reporting</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bug-Reporting">Bug Reporting</a></td></tr>
  6900. <tr><td colspan="4"> <hr></td></tr>
  6901. <tr><th id="Binutils-Index_cp_letter-C">C</th><td></td><td></td></tr>
  6902. <tr><td></td><td valign="top"><a href="#index-c_002b_002bfilt">c++filt</a>:</td><td>&nbsp;</td><td valign="top"><a href="#c_002b_002bfilt">c++filt</a></td></tr>
  6903. <tr><td></td><td valign="top"><a href="#index-changing-object-addresses">changing object addresses</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6904. <tr><td></td><td valign="top"><a href="#index-changing-section-address">changing section address</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6905. <tr><td></td><td valign="top"><a href="#index-changing-section-LMA">changing section LMA</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6906. <tr><td></td><td valign="top"><a href="#index-changing-section-VMA">changing section VMA</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6907. <tr><td></td><td valign="top"><a href="#index-changing-start-address">changing start address</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6908. <tr><td></td><td valign="top"><a href="#index-collections-of-files">collections of files</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  6909. <tr><td></td><td valign="top"><a href="#index-Compact-Type-Format">Compact Type Format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6910. <tr><td></td><td valign="top"><a href="#index-Compact-Type-Format-1">Compact Type Format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6911. <tr><td></td><td valign="top"><a href="#index-compatibility_002c-ar">compatibility, <code>ar</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  6912. <tr><td></td><td valign="top"><a href="#index-compressed-section-contents">compressed section contents</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6913. <tr><td></td><td valign="top"><a href="#index-contents-of-archive">contents of archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6914. <tr><td></td><td valign="top"><a href="#index-crash">crash</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bug-Criteria">Bug Criteria</a></td></tr>
  6915. <tr><td></td><td valign="top"><a href="#index-creating-archives">creating archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6916. <tr><td></td><td valign="top"><a href="#index-creating-thin-archive">creating thin archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6917. <tr><td></td><td valign="top"><a href="#index-CTF">CTF</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6918. <tr><td></td><td valign="top"><a href="#index-CTF-1">CTF</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6919. <tr><td></td><td valign="top"><a href="#index-cxxfilt">cxxfilt</a>:</td><td>&nbsp;</td><td valign="top"><a href="#c_002b_002bfilt">c++filt</a></td></tr>
  6920. <tr><td colspan="4"> <hr></td></tr>
  6921. <tr><th id="Binutils-Index_cp_letter-D">D</th><td></td><td></td></tr>
  6922. <tr><td></td><td valign="top"><a href="#index-dates-in-archive">dates in archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6923. <tr><td></td><td valign="top"><a href="#index-debug-symbols">debug symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6924. <tr><td></td><td valign="top"><a href="#index-debugging-symbols">debugging symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  6925. <tr><td></td><td valign="top"><a href="#index-deleting-from-archive">deleting from archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6926. <tr><td></td><td valign="top"><a href="#index-demangling-C_002b_002b-symbols">demangling C++ symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#c_002b_002bfilt">c++filt</a></td></tr>
  6927. <tr><td></td><td valign="top"><a href="#index-demangling-in-nm">demangling in nm</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  6928. <tr><td></td><td valign="top"><a href="#index-demangling-in-nm-1">demangling in nm</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6929. <tr><td></td><td valign="top"><a href="#index-demangling-in-objdump">demangling in objdump</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6930. <tr><td></td><td valign="top"><a href="#index-demangling-in-objdump-1">demangling in objdump</a>:</td><td>&nbsp;</td><td valign="top"><a href="#addr2line">addr2line</a></td></tr>
  6931. <tr><td></td><td valign="top"><a href="#index-deterministic-archives">deterministic archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6932. <tr><td></td><td valign="top"><a href="#index-deterministic-archives-1">deterministic archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6933. <tr><td></td><td valign="top"><a href="#index-deterministic-archives-2">deterministic archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6934. <tr><td></td><td valign="top"><a href="#index-deterministic-archives-3">deterministic archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objcopy">objcopy</a></td></tr>
  6935. <tr><td></td><td valign="top"><a href="#index-deterministic-archives-4">deterministic archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ranlib">ranlib</a></td></tr>
  6936. <tr><td></td><td valign="top"><a href="#index-deterministic-archives-5">deterministic archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ranlib">ranlib</a></td></tr>
  6937. <tr><td></td><td valign="top"><a href="#index-deterministic-archives-6">deterministic archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strip">strip</a></td></tr>
  6938. <tr><td></td><td valign="top"><a href="#index-deterministic-archives-7">deterministic archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strip">strip</a></td></tr>
  6939. <tr><td></td><td valign="top"><a href="#index-disassembling-object-code">disassembling object code</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6940. <tr><td></td><td valign="top"><a href="#index-disassembly-architecture">disassembly architecture</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6941. <tr><td></td><td valign="top"><a href="#index-disassembly-endianness">disassembly endianness</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6942. <tr><td></td><td valign="top"><a href="#index-disassembly_002c-with-source">disassembly, with source</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6943. <tr><td></td><td valign="top"><a href="#index-disassembly_002c-with-source-1">disassembly, with source</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6944. <tr><td></td><td valign="top"><a href="#index-discarding-symbols">discarding symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strip">strip</a></td></tr>
  6945. <tr><td></td><td valign="top"><a href="#index-DLL">DLL</a>:</td><td>&nbsp;</td><td valign="top"><a href="#dlltool">dlltool</a></td></tr>
  6946. <tr><td></td><td valign="top"><a href="#index-dlltool">dlltool</a>:</td><td>&nbsp;</td><td valign="top"><a href="#dlltool">dlltool</a></td></tr>
  6947. <tr><td></td><td valign="top"><a href="#index-dynamic-relocation-entries_002c-in-object-file">dynamic relocation entries, in object file</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6948. <tr><td></td><td valign="top"><a href="#index-dynamic-symbol-table-entries_002c-printing">dynamic symbol table entries, printing</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6949. <tr><td></td><td valign="top"><a href="#index-dynamic-symbols">dynamic symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  6950. <tr><td colspan="4"> <hr></td></tr>
  6951. <tr><th id="Binutils-Index_cp_letter-E">E</th><td></td><td></td></tr>
  6952. <tr><td></td><td valign="top"><a href="#index-ELF-dynamic-section-information">ELF dynamic section information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6953. <tr><td></td><td valign="top"><a href="#index-ELF-dynamic-symbol-table-information">ELF dynamic symbol table information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6954. <tr><td></td><td valign="top"><a href="#index-ELF-file-header-information">ELF file header information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6955. <tr><td></td><td valign="top"><a href="#index-ELF-file-information">ELF file information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6956. <tr><td></td><td valign="top"><a href="#index-ELF-notes">ELF notes</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6957. <tr><td></td><td valign="top"><a href="#index-ELF-object-file-format">ELF object file format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6958. <tr><td></td><td valign="top"><a href="#index-ELF-program-header-information">ELF program header information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6959. <tr><td></td><td valign="top"><a href="#index-ELF-reloc-information">ELF reloc information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6960. <tr><td></td><td valign="top"><a href="#index-ELF-section-group-information">ELF section group information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6961. <tr><td></td><td valign="top"><a href="#index-ELF-section-information">ELF section information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6962. <tr><td></td><td valign="top"><a href="#index-ELF-section-information-1">ELF section information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6963. <tr><td></td><td valign="top"><a href="#index-ELF-segment-information">ELF segment information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6964. <tr><td></td><td valign="top"><a href="#index-ELF-symbol-table-information">ELF symbol table information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6965. <tr><td></td><td valign="top"><a href="#index-ELF-version-sections-information">ELF version sections information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6966. <tr><td></td><td valign="top"><a href="#index-elfedit">elfedit</a>:</td><td>&nbsp;</td><td valign="top"><a href="#elfedit">elfedit</a></td></tr>
  6967. <tr><td></td><td valign="top"><a href="#index-endianness">endianness</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6968. <tr><td></td><td valign="top"><a href="#index-error-on-valid-input">error on valid input</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bug-Criteria">Bug Criteria</a></td></tr>
  6969. <tr><td></td><td valign="top"><a href="#index-external-symbols">external symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  6970. <tr><td></td><td valign="top"><a href="#index-external-symbols-1">external symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  6971. <tr><td></td><td valign="top"><a href="#index-external-symbols-2">external symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  6972. <tr><td></td><td valign="top"><a href="#index-extract-from-archive">extract from archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6973. <tr><td colspan="4"> <hr></td></tr>
  6974. <tr><th id="Binutils-Index_cp_letter-F">F</th><td></td><td></td></tr>
  6975. <tr><td></td><td valign="top"><a href="#index-fatal-signal">fatal signal</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bug-Criteria">Bug Criteria</a></td></tr>
  6976. <tr><td></td><td valign="top"><a href="#index-file-name">file name</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  6977. <tr><td colspan="4"> <hr></td></tr>
  6978. <tr><th id="Binutils-Index_cp_letter-H">H</th><td></td><td></td></tr>
  6979. <tr><td></td><td valign="top"><a href="#index-header-information_002c-all">header information, all</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6980. <tr><td colspan="4"> <hr></td></tr>
  6981. <tr><th id="Binutils-Index_cp_letter-I">I</th><td></td><td></td></tr>
  6982. <tr><td></td><td valign="top"><a href="#index-input-_002edef-file">input .def file</a>:</td><td>&nbsp;</td><td valign="top"><a href="#dlltool">dlltool</a></td></tr>
  6983. <tr><td></td><td valign="top"><a href="#index-input-file-name">input file name</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  6984. <tr><td></td><td valign="top"><a href="#index-Instruction-width">Instruction width</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6985. <tr><td colspan="4"> <hr></td></tr>
  6986. <tr><th id="Binutils-Index_cp_letter-L">L</th><td></td><td></td></tr>
  6987. <tr><td></td><td valign="top"><a href="#index-libraries">libraries</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  6988. <tr><td></td><td valign="top"><a href="#index-listings-strings">listings strings</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strings">strings</a></td></tr>
  6989. <tr><td></td><td valign="top"><a href="#index-LTO-symbol-table">LTO symbol table</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  6990. <tr><td colspan="4"> <hr></td></tr>
  6991. <tr><th id="Binutils-Index_cp_letter-M">M</th><td></td><td></td></tr>
  6992. <tr><td></td><td valign="top"><a href="#index-machine-instructions">machine instructions</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  6993. <tr><td></td><td valign="top"><a href="#index-moving-in-archive">moving in archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6994. <tr><td></td><td valign="top"><a href="#index-MRI-compatibility_002c-ar">MRI compatibility, <code>ar</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-scripts">ar scripts</a></td></tr>
  6995. <tr><td colspan="4"> <hr></td></tr>
  6996. <tr><th id="Binutils-Index_cp_letter-N">N</th><td></td><td></td></tr>
  6997. <tr><td></td><td valign="top"><a href="#index-name-duplication-in-archive">name duplication in archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  6998. <tr><td></td><td valign="top"><a href="#index-name-length">name length</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  6999. <tr><td></td><td valign="top"><a href="#index-nm">nm</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7000. <tr><td></td><td valign="top"><a href="#index-nm-compatibility"><code>nm</code> compatibility</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7001. <tr><td></td><td valign="top"><a href="#index-nm-compatibility-1"><code>nm</code> compatibility</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7002. <tr><td></td><td valign="top"><a href="#index-nm-format"><code>nm</code> format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7003. <tr><td></td><td valign="top"><a href="#index-nm-format-1"><code>nm</code> format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7004. <tr><td></td><td valign="top"><a href="#index-not-writing-archive-index">not writing archive index</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7005. <tr><td colspan="4"> <hr></td></tr>
  7006. <tr><th id="Binutils-Index_cp_letter-O">O</th><td></td><td></td></tr>
  7007. <tr><td></td><td valign="top"><a href="#index-objdump">objdump</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7008. <tr><td></td><td valign="top"><a href="#index-objdump-inlines">objdump inlines</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7009. <tr><td></td><td valign="top"><a href="#index-object-code-format">object code format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7010. <tr><td></td><td valign="top"><a href="#index-object-code-format-1">object code format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7011. <tr><td></td><td valign="top"><a href="#index-object-code-format-2">object code format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#size">size</a></td></tr>
  7012. <tr><td></td><td valign="top"><a href="#index-object-code-format-3">object code format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strings">strings</a></td></tr>
  7013. <tr><td></td><td valign="top"><a href="#index-object-code-format-4">object code format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#addr2line">addr2line</a></td></tr>
  7014. <tr><td></td><td valign="top"><a href="#index-object-file-header">object file header</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7015. <tr><td></td><td valign="top"><a href="#index-object-file-information">object file information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7016. <tr><td></td><td valign="top"><a href="#index-object-file-offsets">object file offsets</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7017. <tr><td></td><td valign="top"><a href="#index-object-file-sections">object file sections</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7018. <tr><td></td><td valign="top"><a href="#index-object-file-sections-1">object file sections</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7019. <tr><td></td><td valign="top"><a href="#index-object-formats-available">object formats available</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7020. <tr><td></td><td valign="top"><a href="#index-offsets-of-files">offsets of files</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7021. <tr><td></td><td valign="top"><a href="#index-operations-on-archive">operations on archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7022. <tr><td colspan="4"> <hr></td></tr>
  7023. <tr><th id="Binutils-Index_cp_letter-P">P</th><td></td><td></td></tr>
  7024. <tr><td></td><td valign="top"><a href="#index-plugins">plugins</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7025. <tr><td></td><td valign="top"><a href="#index-plugins-1">plugins</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7026. <tr><td></td><td valign="top"><a href="#index-printing-from-archive">printing from archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7027. <tr><td></td><td valign="top"><a href="#index-printing-strings">printing strings</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strings">strings</a></td></tr>
  7028. <tr><td colspan="4"> <hr></td></tr>
  7029. <tr><th id="Binutils-Index_cp_letter-Q">Q</th><td></td><td></td></tr>
  7030. <tr><td></td><td valign="top"><a href="#index-quick-append-to-archive">quick append to archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7031. <tr><td></td><td valign="top"><a href="#index-quiet">quiet</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  7032. <tr><td colspan="4"> <hr></td></tr>
  7033. <tr><th id="Binutils-Index_cp_letter-R">R</th><td></td><td></td></tr>
  7034. <tr><td></td><td valign="top"><a href="#index-radix-for-section-sizes">radix for section sizes</a>:</td><td>&nbsp;</td><td valign="top"><a href="#size">size</a></td></tr>
  7035. <tr><td></td><td valign="top"><a href="#index-ranlib-1">ranlib</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ranlib">ranlib</a></td></tr>
  7036. <tr><td></td><td valign="top"><a href="#index-ranlib">ranlib</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7037. <tr><td></td><td valign="top"><a href="#index-readelf">readelf</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  7038. <tr><td></td><td valign="top"><a href="#index-relative-placement-in-archive">relative placement in archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7039. <tr><td></td><td valign="top"><a href="#index-relocation-entries_002c-in-object-file">relocation entries, in object file</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7040. <tr><td></td><td valign="top"><a href="#index-removing-symbols">removing symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strip">strip</a></td></tr>
  7041. <tr><td></td><td valign="top"><a href="#index-repeated-names-in-archive">repeated names in archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7042. <tr><td></td><td valign="top"><a href="#index-replacement-in-archive">replacement in archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7043. <tr><td></td><td valign="top"><a href="#index-reporting-bugs">reporting bugs</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Reporting-Bugs">Reporting Bugs</a></td></tr>
  7044. <tr><td colspan="4"> <hr></td></tr>
  7045. <tr><th id="Binutils-Index_cp_letter-S">S</th><td></td><td></td></tr>
  7046. <tr><td></td><td valign="top"><a href="#index-scripts_002c-ar">scripts, <code>ar</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-scripts">ar scripts</a></td></tr>
  7047. <tr><td></td><td valign="top"><a href="#index-section-addresses-in-objdump">section addresses in objdump</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7048. <tr><td></td><td valign="top"><a href="#index-section-headers">section headers</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7049. <tr><td></td><td valign="top"><a href="#index-section-information">section information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7050. <tr><td></td><td valign="top"><a href="#index-section-sizes">section sizes</a>:</td><td>&nbsp;</td><td valign="top"><a href="#size">size</a></td></tr>
  7051. <tr><td></td><td valign="top"><a href="#index-sections_002c-full-contents">sections, full contents</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7052. <tr><td></td><td valign="top"><a href="#index-sections_002c-full-contents-1">sections, full contents</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7053. <tr><td></td><td valign="top"><a href="#index-separate-debug-files">separate debug files</a>:</td><td>&nbsp;</td><td valign="top"><a href="#debuginfod">debuginfod</a></td></tr>
  7054. <tr><td></td><td valign="top"><a href="#index-SFrame">SFrame</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7055. <tr><td></td><td valign="top"><a href="#index-size">size</a>:</td><td>&nbsp;</td><td valign="top"><a href="#size">size</a></td></tr>
  7056. <tr><td></td><td valign="top"><a href="#index-size-display-format"><code>size</code> display format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#size">size</a></td></tr>
  7057. <tr><td></td><td valign="top"><a href="#index-size-number-format"><code>size</code> number format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#size">size</a></td></tr>
  7058. <tr><td></td><td valign="top"><a href="#index-sorting-symbols">sorting symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7059. <tr><td></td><td valign="top"><a href="#index-source-code-context">source code context</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7060. <tr><td></td><td valign="top"><a href="#index-source-disassembly">source disassembly</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7061. <tr><td></td><td valign="top"><a href="#index-source-disassembly-1">source disassembly</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7062. <tr><td></td><td valign="top"><a href="#index-source-file-name">source file name</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7063. <tr><td></td><td valign="top"><a href="#index-source-filenames-for-object-files">source filenames for object files</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7064. <tr><td></td><td valign="top"><a href="#index-stab">stab</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7065. <tr><td></td><td valign="top"><a href="#index-start_002daddress">start-address</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7066. <tr><td></td><td valign="top"><a href="#index-stop_002daddress">stop-address</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7067. <tr><td></td><td valign="top"><a href="#index-strings">strings</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strings">strings</a></td></tr>
  7068. <tr><td></td><td valign="top"><a href="#index-strings_002c-printing">strings, printing</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strings">strings</a></td></tr>
  7069. <tr><td></td><td valign="top"><a href="#index-strip">strip</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strip">strip</a></td></tr>
  7070. <tr><td></td><td valign="top"><a href="#index-Strip-absolute-paths">Strip absolute paths</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7071. <tr><td></td><td valign="top"><a href="#index-symbol-index">symbol index</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  7072. <tr><td></td><td valign="top"><a href="#index-symbol-index-1">symbol index</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ranlib">ranlib</a></td></tr>
  7073. <tr><td></td><td valign="top"><a href="#index-symbol-index_002c-listing">symbol index, listing</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7074. <tr><td></td><td valign="top"><a href="#index-symbol-line-numbers">symbol line numbers</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7075. <tr><td></td><td valign="top"><a href="#index-symbol-table-entries_002c-printing">symbol table entries, printing</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7076. <tr><td></td><td valign="top"><a href="#index-symbol-table-size-base">symbol table size base</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  7077. <tr><td></td><td valign="top"><a href="#index-symbols">symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7078. <tr><td></td><td valign="top"><a href="#index-symbols_002c-discarding">symbols, discarding</a>:</td><td>&nbsp;</td><td valign="top"><a href="#strip">strip</a></td></tr>
  7079. <tr><td colspan="4"> <hr></td></tr>
  7080. <tr><th id="Binutils-Index_cp_letter-T">T</th><td></td><td></td></tr>
  7081. <tr><td></td><td valign="top"><a href="#index-thin-archives">thin archives</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar">ar</a></td></tr>
  7082. <tr><td colspan="4"> <hr></td></tr>
  7083. <tr><th id="Binutils-Index_cp_letter-U">U</th><td></td><td></td></tr>
  7084. <tr><td></td><td valign="top"><a href="#index-undefined-symbols">undefined symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7085. <tr><td></td><td valign="top"><a href="#index-undefined-symbols-1">undefined symbols</a>:</td><td>&nbsp;</td><td valign="top"><a href="#nm">nm</a></td></tr>
  7086. <tr><td></td><td valign="top"><a href="#index-Unix-compatibility_002c-ar">Unix compatibility, <code>ar</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7087. <tr><td></td><td valign="top"><a href="#index-unwind-information">unwind information</a>:</td><td>&nbsp;</td><td valign="top"><a href="#readelf">readelf</a></td></tr>
  7088. <tr><td></td><td valign="top"><a href="#index-Update-ELF-header">Update ELF header</a>:</td><td>&nbsp;</td><td valign="top"><a href="#elfedit">elfedit</a></td></tr>
  7089. <tr><td></td><td valign="top"><a href="#index-updating-an-archive">updating an archive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7090. <tr><td colspan="4"> <hr></td></tr>
  7091. <tr><th id="Binutils-Index_cp_letter-V">V</th><td></td><td></td></tr>
  7092. <tr><td></td><td valign="top"><a href="#index-version">version</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Top">Top</a></td></tr>
  7093. <tr><td></td><td valign="top"><a href="#index-VMA-in-objdump">VMA in objdump</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7094. <tr><td colspan="4"> <hr></td></tr>
  7095. <tr><th id="Binutils-Index_cp_letter-W">W</th><td></td><td></td></tr>
  7096. <tr><td></td><td valign="top"><a href="#index-wide-output_002c-printing">wide output, printing</a>:</td><td>&nbsp;</td><td valign="top"><a href="#objdump">objdump</a></td></tr>
  7097. <tr><td></td><td valign="top"><a href="#index-writing-archive-index">writing archive index</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr>
  7098. <tr><td colspan="4"> <hr></td></tr>
  7099. </table>
  7100. <table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Binutils-Index_cp_symbol-1"><b>-</b></a>
  7101. &nbsp;
  7102. <a class="summary-letter" href="#Binutils-Index_cp_symbol-2"><b>.</b></a>
  7103. &nbsp;
  7104. <br>
  7105. <a class="summary-letter" href="#Binutils-Index_cp_letter-A"><b>A</b></a>
  7106. &nbsp;
  7107. <a class="summary-letter" href="#Binutils-Index_cp_letter-B"><b>B</b></a>
  7108. &nbsp;
  7109. <a class="summary-letter" href="#Binutils-Index_cp_letter-C"><b>C</b></a>
  7110. &nbsp;
  7111. <a class="summary-letter" href="#Binutils-Index_cp_letter-D"><b>D</b></a>
  7112. &nbsp;
  7113. <a class="summary-letter" href="#Binutils-Index_cp_letter-E"><b>E</b></a>
  7114. &nbsp;
  7115. <a class="summary-letter" href="#Binutils-Index_cp_letter-F"><b>F</b></a>
  7116. &nbsp;
  7117. <a class="summary-letter" href="#Binutils-Index_cp_letter-H"><b>H</b></a>
  7118. &nbsp;
  7119. <a class="summary-letter" href="#Binutils-Index_cp_letter-I"><b>I</b></a>
  7120. &nbsp;
  7121. <a class="summary-letter" href="#Binutils-Index_cp_letter-L"><b>L</b></a>
  7122. &nbsp;
  7123. <a class="summary-letter" href="#Binutils-Index_cp_letter-M"><b>M</b></a>
  7124. &nbsp;
  7125. <a class="summary-letter" href="#Binutils-Index_cp_letter-N"><b>N</b></a>
  7126. &nbsp;
  7127. <a class="summary-letter" href="#Binutils-Index_cp_letter-O"><b>O</b></a>
  7128. &nbsp;
  7129. <a class="summary-letter" href="#Binutils-Index_cp_letter-P"><b>P</b></a>
  7130. &nbsp;
  7131. <a class="summary-letter" href="#Binutils-Index_cp_letter-Q"><b>Q</b></a>
  7132. &nbsp;
  7133. <a class="summary-letter" href="#Binutils-Index_cp_letter-R"><b>R</b></a>
  7134. &nbsp;
  7135. <a class="summary-letter" href="#Binutils-Index_cp_letter-S"><b>S</b></a>
  7136. &nbsp;
  7137. <a class="summary-letter" href="#Binutils-Index_cp_letter-T"><b>T</b></a>
  7138. &nbsp;
  7139. <a class="summary-letter" href="#Binutils-Index_cp_letter-U"><b>U</b></a>
  7140. &nbsp;
  7141. <a class="summary-letter" href="#Binutils-Index_cp_letter-V"><b>V</b></a>
  7142. &nbsp;
  7143. <a class="summary-letter" href="#Binutils-Index_cp_letter-W"><b>W</b></a>
  7144. &nbsp;
  7145. </td></tr></table>
  7146. <div class="footnote">
  7147. <hr>
  7148. <h4 class="footnotes-heading">Footnotes</h4>
  7149. <h5><a id="FOOT1" href="#DOCF1">(1)</a></h3>
  7150. <p>MS-DOS does not allow <kbd>+</kbd> characters in file names, so on
  7151. MS-DOS this program is named <code>CXXFILT</code>.</p>
  7152. </div>
  7153. <hr>
  7154. </body>
  7155. </html>