ChangeLog-2017 209 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727
  1. 2017-12-19 Alan Modra <amodra@gmail.com>
  2. PR 22626
  3. * elflink.c (_bfd_elf_link_renumber_dynsyms): Don't set section
  4. dynindx when section_sym_count is NULL.
  5. (bfd_elf_size_dynamic_sections): Pass NULL section_sym_count to
  6. preliminary _bfd_elf_link_renumber_dynsyms call.
  7. 2017-12-15 Nick Clifton <nickc@redhat.com>
  8. PR 22571
  9. * archive.c (bfd_openr_next_archived_file): Extend the
  10. documentation to note that it is necessary to call
  11. bfd_check_format on the rrturned bfd before using it.
  12. 2017-12-14 Nick Clifton <nickc@redhat.com>
  13. * cpu-mt.c: Update address of FSF in copyright notice.
  14. * elf32-m32c.c: Likewise.
  15. * elf32-mt.c: Likewise.
  16. * elf32-rl78.c: Likewise.
  17. * elf32-rx.c: Likewise.
  18. * elf32-rx.h: Likewise.
  19. * elf32-spu.h: Likewise.
  20. * hosts/x86-64linux.h: Likewise.
  21. 2017-12-13 Renlin Li <renlin.li@arm.com>
  22. * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Disallow
  23. BFD_RELOC_AARCH64_16 in shared object const section. Disallow
  24. BFD_RELOC_AARCH64_32 in shared object const section under LP64.
  25. 2017-12-11 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
  26. * bfd.c (bfd_get_sign_extend_vma): Correct typo.
  27. 2017-12-09 Alan Modra <amodra@gmail.com>
  28. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): When emitting
  29. dynamic R_SPARC_RELATIVE for GOT entries, ensure the section
  30. contents are zeroed.
  31. 2017-12-08 Nick Clifton <nickc@redhat.com>
  32. * elfcode.h (elf_write_relocs): Check for an empty howto field.
  33. 2017-12-08 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
  34. * bfd.c (bfd_get_sign_extend_vma): Handle aix5coff64-rs6000.
  35. 2017-12-06 Alan Modra <amodra@gmail.com>
  36. * doc/header.sed: Trim trailing space when splitting lines.
  37. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c,
  38. * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h,
  39. * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c,
  40. * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c,
  41. * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c,
  42. * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c,
  43. * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c,
  44. * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
  45. * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
  46. * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
  47. * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
  48. * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c,
  49. * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c,
  50. * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c,
  51. * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c,
  52. * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c,
  53. * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c,
  54. * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c,
  55. * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c,
  56. * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c,
  57. * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c,
  58. * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c,
  59. * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h,
  60. * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
  61. * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c,
  62. * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c,
  63. * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c,
  64. * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c,
  65. * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c,
  66. * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c,
  67. * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c,
  68. * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
  69. * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c,
  70. * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
  71. * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h,
  72. * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c,
  73. * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c,
  74. * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c,
  75. * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c,
  76. * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
  77. * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
  78. * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
  79. * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h,
  80. * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
  81. * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c,
  82. * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c,
  83. * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c,
  84. * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c,
  85. * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c,
  86. * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h,
  87. * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h,
  88. * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c,
  89. * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c,
  90. * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c,
  91. * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h,
  92. * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c,
  93. * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c,
  94. * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c,
  95. * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c,
  96. * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c,
  97. * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c,
  98. * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h,
  99. * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c,
  100. * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c,
  101. * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c,
  102. * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c,
  103. * xsym.c, * xsym.h: Whitespace fixes.
  104. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
  105. 2017-12-06 Alan Modra <amodra@gmail.com>
  106. * elf32-lm32.c (lm32_elf_check_relocs): Skip non-ALLOC sections.
  107. * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
  108. * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
  109. * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
  110. * elf32-sh.c (sh_elf_check_relocs): Likewise.
  111. 2017-12-06 Alan Modra <amodra@gmail.com>
  112. * elf32-hppa.c (struct elf32_hppa_dyn_reloc_entry): Delete. Use
  113. struct elf_dyn_relocs throughout file instead.
  114. (elf32_hppa_adjust_dynamic_symbol): Comment tidy.
  115. * elf32-lm32.c (struct elf_lm32_dyn_relocs): Delete. Use
  116. struct elf_dyn_relocs throughout file instead.
  117. (lm32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
  118. * elf32-m32r.c (struct elf_m32r_dyn_relocs): Delete. Use
  119. struct elf_dyn_relocs throughout file instead.
  120. (m32r_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
  121. Disable -z no-copyreloc too.
  122. * elf32-metag.c (struct elf_metag_dyn_reloc_entry): Delete. Use
  123. struct elf_dyn_relocs throughout file instead.
  124. (elf_metag_adjust_dynamic_symbol): Use readonly_dynrelocs.
  125. * elf32-microblaze.c (struct elf32_mb_dyn_relocs): Delete. Use
  126. struct elf_dyn_relocs throughout file instead.
  127. (readonly_dynrelocs): New function.
  128. (microblaze_elf_adjust_dynamic_symbol): Use it.
  129. * elf32-nds32.c (struct elf_nds32_dyn_relocs): Delete. Use
  130. struct elf_dyn_relocs throughout file instead.
  131. (nds32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
  132. Disable -z no-copyreloc too.
  133. * elf32-nios2.c (struct elf32_nios2_dyn_relocs): Delete. Use
  134. struct elf_dyn_relocs throughout file instead.
  135. * elf32-or1k.c (struct elf_or1k_dyn_relocs): Delete. Use
  136. struct elf_dyn_relocs throughout file instead.
  137. (or1k_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
  138. * elf32-sh.c (struct elf_sh_dyn_relocs): Delete. Use
  139. struct elf_dyn_relocs throughout file instead.
  140. (sh_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
  141. Disable -z no-copyreloc too.
  142. * elf32-tilepro.c (struct tilepro_elf_dyn_relocs): Delete. Use
  143. struct elf_dyn_relocs throughout file instead.
  144. (tilepro_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
  145. * elfnn-riscv.c (struct riscv_elf_dyn_relocs): Delete. Use
  146. struct elf_dyn_relocs throughout file instead.
  147. (riscv_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
  148. * elfxx-sparc.c (struct _bfd_sparc_elf_dyn_relocs): Delete. Use
  149. struct elf_dyn_relocs throughout file instead.
  150. (_bfd_sparc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
  151. * elfxx-tilegx.c (struct tilegx_elf_dyn_relocs): Delete. Use
  152. struct elf_dyn_relocs throughout file instead.
  153. (tilegx_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
  154. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
  155. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
  156. 2017-12-06 Alan Modra <amodra@gmail.com>
  157. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Comment tidy.
  158. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
  159. * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
  160. 2017-12-04 Alan Modra <amodra@gmail.com>
  161. * elfxx-x86.c (readonly_dynrelocs): New function.
  162. (maybe_set_textrel): New function. Always prints via minfo and
  163. correct "readonly" to "read-only" in warning message., replacing..
  164. (_bfd_x86_elf_readonly_dynrelocs): ..this.
  165. (_bfd_x86_elf_size_dynamic_sections): Correct "readonly" to
  166. "read-only" in warning message. Formatting.
  167. (_bfd_x86_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
  168. * linker.c (bfd_link_hash_traverse): Comment typo fix.
  169. 2017-12-01 H.J. Lu <hongjiu.lu@intel.com>
  170. * elfxx-x86.c (_bfd_x86_elf_readonly_dynrelocs): Print symbol
  171. for map file output.
  172. 2017-12-01 Alan Modra <amodra@gmail.com>
  173. * elf32-hppa.c (maybe_set_textrel): Print symbol for map file output.
  174. * elf32-ppc.c (maybe_set_textrel): Likewise.
  175. * elf64-ppc.c (maybe_set_textrel): Likewise.
  176. * elf32-arm.c (readonly_dynrelocs): New function.
  177. (maybe_set_textrel): New function, replacing..
  178. (elf32_arm_readonly_dynrelocs): ..this.
  179. * elf32-lm32.c (readonly_dynrelocs): New function.
  180. (maybe_set_textrel): New function, replacing old version of..
  181. (readonly_dynrelocs): ..this.
  182. * elf32-m32r.c (readonly_dynrelocs): New function.
  183. (maybe_set_textrel): New function, replacing old version of..
  184. (readonly_dynrelocs): ..this.
  185. * elf32-metag.c (readonly_dynrelocs): New function.
  186. (maybe_set_textrel): New function, replacing old version of..
  187. (readonly_dynrelocs): ..this.
  188. * elf32-nds32.c: Delete unnecessary forward declarations.
  189. (readonly_dynrelocs): New function.
  190. (maybe_set_textrel): New function, replacing old version of..
  191. (readonly_dynrelocs): ..this.
  192. * elf32-or1k.c (readonly_dynrelocs): New function.
  193. (maybe_set_textrel): New function, replacing old version of..
  194. (readonly_dynrelocs): ..this.
  195. * elf32-s390.c (readonly_dynrelocs): New function.
  196. (maybe_set_textrel): New function, replacing old version of..
  197. (readonly_dynrelocs): ..this.
  198. * elf32-sh.c (readonly_dynrelocs): New function.
  199. (maybe_set_textrel): New function, replacing old version of..
  200. (readonly_dynrelocs): ..this.
  201. * elf32-tic6x.c (readonly_dynrelocs): New function.
  202. (maybe_set_textrel): New function, replacing..
  203. (elf32_tic6x_readonly_dynrelocs): ..this.
  204. * elf32-tilepro.c (readonly_dynrelocs): New function.
  205. (maybe_set_textrel): New function, replacing old version of..
  206. (readonly_dynrelocs): ..this.
  207. * elf64-s390.c (readonly_dynrelocs): New function.
  208. (maybe_set_textrel): New function, replacing old version of..
  209. (readonly_dynrelocs): ..this.
  210. * elfnn-aarch64.c (readonly_dynrelocs): New function.
  211. (maybe_set_textrel): New function, replacing..
  212. (aarch64_readonly_readonly_dynrelocs): ..this.
  213. * elfnn-riscv.c (readonly_dynrelocs): New function.
  214. (maybe_set_textrel): New function, replacing old version of..
  215. (readonly_dynrelocs): ..this.
  216. * elfxx-sparc.c (readonly_dynrelocs): New function.
  217. (maybe_set_textrel): New function, replacing old version of..
  218. (readonly_dynrelocs): ..this.
  219. * elfxx-tilegx.c (readonly_dynrelocs): New function.
  220. (maybe_set_textrel): New function, replacing old version of..
  221. (readonly_dynrelocs): ..this.
  222. 2017-12-01 Alan Modra <amodra@gmail.com>
  223. PR 22533
  224. * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Don't do anything
  225. special with non_got_ref for weak aliases.
  226. (elf32_hppa_check_relocs): Tweak setting of non_got_ref.
  227. (elf32_hppa_adjust_dynamic_symbol): When initialising weak aliases,
  228. don't uselessly copy non_got_ref. Clear dyn_relocs instead if
  229. strong symbol is allocated in dynbss. Tidy comments.
  230. (elf32_hppa_relocate_section): Comment fix.
  231. * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't do anything
  232. special with non_got_ref for weak aliases.
  233. (ppc_elf_adjust_dynamic_symbol): When initialising weak aliases,
  234. don't uselessly copy non_got_ref. Clear dyn_relocs instead if
  235. strong symbol is allocated in dynbss. Tidy comments.
  236. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't do anything
  237. special with non_got_ref for weak aliases.
  238. (ppc64_elf_adjust_dynamic_symbol): When initialising weak aliases,
  239. don't uselessly copy non_got_ref. Clear dyn_relocs instead if
  240. strong symbol is allocated in dynbss. Tidy comments.
  241. 2017-11-29 Nick Clifton <nickc@redhat.com>
  242. PR 22509
  243. * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
  244. pointer when processing relocs.
  245. 2017-11-29 Stefan Stroe <stroestefan@gmail.com>
  246. * po/Make-in (datadir): Define as @datadir@.
  247. (localedir): Define as @localedir@.
  248. (gnulocaledir, gettextsrcdir): Use @datarootdir@.
  249. 2017-11-28 Nick Clifton <nickc@redhat.com>
  250. PR 22507
  251. * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
  252. size of the external string table.
  253. 2017-11-28 Nick Clifton <nickc@redhat.com>
  254. PR 22506
  255. * reloc.c (reloc_offset_in_range): Rename to
  256. bfd_reloc_offset_in_range and export.
  257. (bfd_perform_relocation): Rename function invocation.
  258. (bfd_install_relocation): Likewise.
  259. (bfd_final_link_relocate): Likewise.
  260. * bfd-in2.h: Regenerate.
  261. * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
  262. * coff-i386.c (coff_i386_reloc): Likewise.
  263. * coff-i860.c (coff_i860_reloc): Likewise.
  264. * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
  265. * coff-m88k.c (m88k_special_reloc): Likewise.
  266. * coff-mips.c (mips_reflo_reloc): Likewise.
  267. * coff-x86_64.c (coff_amd64_reloc): Likewise.
  268. 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
  269. * elf-m10300.c (mn10300_elf_check_relocs): Don't set
  270. non_ir_ref_regular.
  271. * elf32-arm.c (elf32_arm_check_relocs): Likewise.
  272. * elf32-bfin.c (bfin_check_relocs): Likewise.
  273. * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
  274. * elf32-cris.c (cris_elf_check_relocs): Likewise.
  275. * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
  276. * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
  277. * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
  278. * elf32-frv.c (elf32_frv_check_relocs): Likewise.
  279. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
  280. * elf32-i370.c (i370_elf_check_relocs): Likewise.
  281. * elf32-i386.c (elf_i386_check_relocs): Likewise.
  282. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
  283. * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
  284. * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
  285. * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
  286. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
  287. * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
  288. * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
  289. * elf32-metag.c (elf_metag_check_relocs): Likewise.
  290. * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
  291. * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
  292. * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
  293. * elf32-mt.c (mt_elf_check_relocs): Likewise.
  294. * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
  295. * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
  296. * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
  297. * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
  298. * elf32-s390.c (elf_s390_check_relocs): Likewise.
  299. * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
  300. * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
  301. * elf32-sh.c (sh_elf_check_relocs): Likewise.
  302. * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
  303. * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
  304. * elf32-v850.c (v850_elf_check_relocs): Likewise.
  305. * elf32-vax.c (elf_vax_check_relocs): Likewise.
  306. * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
  307. * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
  308. * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
  309. * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
  310. * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
  311. * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
  312. * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
  313. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
  314. * elf64-s390.c (elf_s390_check_relocs): Likewise.
  315. * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
  316. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  317. * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
  318. * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
  319. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
  320. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
  321. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
  322. * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
  323. 2017-11-28 Alan Modra <amodra@gmail.com>
  324. PR 22471
  325. * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
  326. early passes over linker script symbols.
  327. * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
  328. override early passes over linker script symbols. Clear ldscript_def
  329. on symbol definitions.
  330. 2017-11-28 Alan Modra <amodra@gmail.com>
  331. * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
  332. 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
  333. PR ld/22502
  334. * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
  335. an IR object.
  336. (elf_link_add_object_symbols): If linker plugin is enabled, set
  337. non_ir_ref_regular on symbols referenced in regular objects so
  338. that linker plugin will get the correct symbol resolution.
  339. 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
  340. PR ld/22263
  341. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
  342. bfd_link_executable instead of bfd_link_pic for TLS.
  343. (elfNN_aarch64_allocate_dynrelocs): Likewise.
  344. (aarch64_can_relax_tls): Likewise.
  345. 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
  346. PR ld/22269
  347. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
  348. UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
  349. (elfNN_aarch64_allocate_dynrelocs): Likewise.
  350. 2017-11-24 H.J. Lu <hongjiu.lu@intel.com>
  351. PR binutils/22444
  352. * elf.c (elf_read_notes): Add an argument for note aligment.
  353. (elf_parse_notes): Likewise.
  354. (_bfd_elf_make_section_from_shdr): Pass section aligment to
  355. elf_parse_notes.
  356. (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
  357. (elf_parse_notes): Add an argument for note aligment. Use
  358. ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
  359. Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
  360. entry.
  361. (elf_read_notes): Add an argument for note aligment and pass it
  362. to elf_parse_notes.
  363. 2017-11-23 Alan Modra <amodra@gmail.com>
  364. * elf32-hppa.c (pc_dynrelocs): Define.
  365. (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
  366. (alias_readonly_dynrelocs): New function.
  367. (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
  368. indicate dyn_relocs should be discarded, discard them here.
  369. Use alias_readonly_dynrelocs.
  370. (allocate_dynrelocs): Don't test or clear non_got_ref.
  371. (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
  372. * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
  373. to weakdefs.
  374. (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
  375. (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
  376. indicate dyn_relocs should be discarded, discard them here.
  377. Use alias_readonly_dynrelocs.
  378. (allocate_dynrelocs): Don't test or clear non_got_ref.
  379. (ppc_elf_relocate_section): Simplify test for dynamic relocs.
  380. 2017-11-23 Alan Modra <amodra@gmail.com>
  381. * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
  382. (ppc64_elf_copy_indirect_symbol): Don't set weakref.
  383. (alias_readonly_dynrelocs): Use u.alias rather than weakref.
  384. (ppc64_elf_adjust_dynamic_symbol): Don't use
  385. alias_readonly_dynrelocs for function symbols.
  386. 2017-11-23 Alan Modra <amodra@gmail.com>
  387. * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
  388. Rename u.weakdef to u.alias and update comment.
  389. (weakdef): New static inline function.
  390. * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
  391. rather than u.weakdef != NULL, and use weakdef function.
  392. (_bfd_elf_adjust_dynamic_symbol): Likewise.
  393. (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
  394. all aliases if def has been overridden in a regular object, not
  395. u.weakdef.
  396. (elf_link_add_object_symbols): Delete new_weakdef flag. Test
  397. is_weakalias and use weakdef. Set is_weakalias and circular
  398. u.alias. Update comments.
  399. (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
  400. u.weakdef != NULL and use weakdef function.
  401. * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
  402. is_weakalias rather than u.weakdef != NULL and use weakdef
  403. function. Assert that def is strong defined.
  404. * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
  405. * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
  406. * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
  407. (bfin_adjust_dynamic_symbol): Likewise.
  408. * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
  409. * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
  410. * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
  411. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
  412. * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
  413. * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
  414. * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
  415. * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
  416. * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
  417. * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
  418. * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
  419. * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
  420. * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
  421. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
  422. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
  423. * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
  424. * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
  425. * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
  426. * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
  427. * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
  428. (tilepro_elf_adjust_dynamic_symbol): Likewise.
  429. * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
  430. * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
  431. * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
  432. * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
  433. * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
  434. * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
  435. (ppc64_elf_adjust_dynamic_symbol): Likewise.
  436. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
  437. * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
  438. * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
  439. * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
  440. * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
  441. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
  442. * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
  443. (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
  444. * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
  445. (tilegx_elf_adjust_dynamic_symbol): Likewise.
  446. * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
  447. 2017-11-21 Alan Modra <amodra@gmail.com>
  448. * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
  449. * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
  450. 2017-11-20 Nick Clifton <nickc@redhat.com>
  451. PR 22450
  452. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
  453. objects without a GNU_PROPERTY note section when looking for a bfd
  454. onto which notes can be accumulated.
  455. 2017-11-20 Alan Modra <amodra@gmail.com>
  456. PR 22451
  457. PR 22460
  458. * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
  459. and leave rel_hdr->sh_flags zero. Update calls.
  460. (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
  461. flag when !gas before adding rel/rela section to group. Set
  462. output rel/rela SHF_GROUP flags.
  463. 2017-11-18 Jim Wilson <jimw@sifive.com>
  464. * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
  465. and to in error message.
  466. 2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
  467. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
  468. "%F%P:", instead of "%F:", to linker callback in case of error.
  469. 2017-11-16 Nick Clifton <nickc@redhat.com>
  470. PR 22421
  471. * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
  472. (elfcore_grok_openbsd_procinfo): Likewise.
  473. (elfcore_grok_nto_status): Likewise.
  474. 2017-11-16 Nick Clifton <nickc@redhat.com>
  475. * merge.c (sec_merge_emit): Always create padding buffer. Add
  476. asserts to make sure that the buffer is long enough.
  477. 2017-11-15 Alan Modra <amodra@gmail.com>
  478. * bfd.c (union _bfd_doprnt_args): Add "Bad".
  479. (_bfd_doprnt): Handle more flags.
  480. (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
  481. (error_handler_internal): Init args type to Bad.
  482. 2017-11-14 Alan Modra <amodra@gmail.com>
  483. PR 22431
  484. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
  485. non-empty dynamic section.
  486. (ppc_build_one_stub): Take elf_gp from output bfd, not output
  487. section owner.
  488. (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
  489. 2017-11-14 Alan Modra <amodra@gmail.com>
  490. * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
  491. .eh_frame info.
  492. 2017-11-13 Jan Beulich <jbeulich@suse.com>
  493. * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
  494. Define.
  495. * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
  496. (coff_write_object_contents): Likewise. Issue diagnostic for too
  497. large alignment.
  498. 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
  499. PR ld/22423
  500. * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
  501. PT_PHDR segment.
  502. 2017-11-12 Alan Modra <amodra@gmail.com>
  503. * elflink.c (elf_link_add_object_symbols): Ignore anything but
  504. defined and defweak symbols when setting up weakdefs.
  505. 2017-11-12 Alan Modra <amodra@gmail.com>
  506. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
  507. to keep dyn_relocs, clear to discard. Comment.
  508. (allocate_dynrelocs): Always clear non_got_ref when clearing
  509. dyn_relocs in non-pic case. Invert non_got_ref test. Also test
  510. dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
  511. dyn_relocs on undefined syms to handle for non-pic too.
  512. (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
  513. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
  514. to keep dyn_relocs, clear to discard. Comment.
  515. (allocate_dynrelocs): Always clear non_got_ref when clearing
  516. dyn_relocs in non-pic case. Invert non_got_ref test. Also test
  517. dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
  518. dyn_relocs on undefined syms to handle for non-pic too.
  519. (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
  520. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
  521. dyn_relocs here. Don't bother setting non_got_ref. Comment.
  522. (allocate_dynrelocs): Delete special handling of non-pic ELFv2
  523. ifuncs. Move code deleting dyn_relocs on undefined symbols to
  524. handle for non-pic too. Don't test non_got_ref. Do test
  525. dynamic_adjusted and ELF_COMMON_DEF_P.
  526. 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
  527. * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
  528. * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
  529. * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
  530. 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
  531. * elf32-mips.c (elf32_mips_write_core_note): New function.
  532. (elf_backend_write_core_note): New macro.
  533. * elf64-mips.c (elf64_mips_write_core_note): New function.
  534. (elf_backend_write_core_note): New macro.
  535. * elfn32-mips.c (elf32_mips_write_core_note): New function.
  536. (elf_backend_write_core_note): New macro.
  537. 2017-11-07 Alan Modra <amodra@gmail.com>
  538. * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
  539. statistics message.
  540. 2017-11-07 Alan Modra <amodra@gmail.com>
  541. * sysdep.h: Formatting, comment fixes.
  542. (gettext, ngettext): Redefine when ENABLE_NLS.
  543. (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
  544. (_): Define using gettext.
  545. (textdomain, bindtextdomain): Use safer "do nothing".
  546. * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
  547. (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
  548. 2017-11-05 Alan Modra <amodra@gmail.com>
  549. PR 22397
  550. * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
  551. after.
  552. 2017-11-05 Alan Modra <amodra@gmail.com>
  553. PR 22397
  554. * bfd.c (union _bfd_doprnt_args): New.
  555. (PRINT_TYPE): Add FIELD arg. Take value from args.
  556. (_bfd_doprnt): Replace ap parameter with args. Adjust all
  557. PRINT_TYPE invocations and reading of format args to suit.
  558. Move "%%" handling out of switch handling args. Support
  559. positional parameters.
  560. (_bfd_doprnt_scan): New function.
  561. (error_handler_internal): Call _bfd_doprnt_scan and read args.
  562. 2017-11-04 Alan Modra <amodra@gmail.com>
  563. * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
  564. (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
  565. (ppc_elf_relocate_section): Don't output a dynamic relocation
  566. for IE GOT entries in an executable.
  567. * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
  568. (ppc64_elf_size_dynamic_sections): Likewise.
  569. (ppc64_elf_relocate_section): Likewise.
  570. 2017-11-04 Alan Modra <amodra@gmail.com>
  571. * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
  572. callers. Don't bother with SEC_ALLOC test. Return section pointer.
  573. Move minfo call to..
  574. (maybe_set_textrel): ..here.
  575. * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
  576. (maybe_set_textrel): Call minfo to print textrel warning to map file.
  577. 2017-11-04 Alan Modra <amodra@gmail.com>
  578. * elf32-hppa.c (enum _tls_type): Move.
  579. (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
  580. (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
  581. Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
  582. (got_entries_needed, got_relocs_needed): New functions.
  583. (allocate_dynrelocs): Use them.
  584. (elf32_hppa_size_dynamic_sections): Likewise.
  585. (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
  586. Correct code emitting relocs on GD/IE got entries. Report an
  587. error when a symbol has both normal and TLS GOT relocs.
  588. 2017-11-04 Alan Modra <amodra@gmail.com>
  589. PR 22394
  590. * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
  591. for plabels when non-pic.
  592. (maybe_set_textrel): New function.
  593. (readonly_dynrelocs): Move and rewrite.
  594. (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
  595. relocs when def_regular or -z nocopyreloc. Handle non_got_ref
  596. for functions. Expand non_got_ref comments.
  597. (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
  598. 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
  599. * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
  600. Don't use func_pointer_refcount. Don't set plt.refcount nor
  601. non_got_ref for function pointer reference.
  602. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  603. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
  604. func_pointer_refcount.
  605. (_bfd_x86_elf_copy_indirect_symbol): Don't copy
  606. func_pointer_refcount.
  607. (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
  608. * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
  609. (elf_x86_link_hash_entry): Remove func_pointer_refcount.
  610. 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
  611. Nick Clifton <nickc@redhat.com>
  612. PR 22385
  613. * coffgen.c (_bfd_coff_get_external_symbols): Check for an
  614. overlarge raw syment count.
  615. (coff_get_normalized_symtab): Likewise.
  616. 2017-11-01 James Bowman <james.bowman@ftdichip.com>
  617. * archures.c: Add bfd_mach_ft32b.
  618. * cpu-ft32.c: Add arch_info_struct.
  619. * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
  620. DIFF32.
  621. (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
  622. DIFF32.
  623. (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
  624. (elf32_ft32_adjust_diff_reloc_value)
  625. (elf32_ft32_adjust_reloc_if_spans_insn)
  626. (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
  627. (ft32_elf_relax_section): New function.
  628. * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
  629. * bfd-in2.h: Regenerate.
  630. * libbfd.h: Regenerate.
  631. 2017-11-01 Nick Clifton <nickc@redhat.com>
  632. PR 22376
  633. * coffcode.h (coff_slurp_line_table): Check for an excessively
  634. large line number count.
  635. 2017-11-01 Nick Clifton <nickc@redhat.com>
  636. PR 22373
  637. * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
  638. and offset in light of further possible bogus values.
  639. 2017-11-01 Alan Modra <amodra@gmail.com>
  640. PR 22374
  641. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
  642. entry when just a dynamic reloc can serve. Ensure no dynamic
  643. relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
  644. Expand and move the non_got_ref comment.
  645. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
  646. 2017-11-01 Nick Clifton <nickc@redhat.com>
  647. PR 22369
  648. * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
  649. file.
  650. * cofflink.c (coff_link_check_archive_element): Skip non-COFF
  651. members of an archive.
  652. 2017-10-31 Nick Clifton <nickc@redhat.com>
  653. PR 22373
  654. * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
  655. offset values.
  656. 2017-10-30 Alan Modra <amodra@gmail.com>
  657. * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
  658. elf target.
  659. * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
  660. relocs_compatible.
  661. (bfd_elf_gc_sections): Likewise.
  662. 2017-10-30 Alan Modra <amodra@gmail.com>
  663. PR 22269
  664. * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
  665. ensure non_got_ref is not set due to debug references.
  666. (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
  667. SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
  668. need for a plt entry.
  669. (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
  670. dynamic relocs when pic. Remove bogus code attempting to handle
  671. commons.
  672. (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
  673. and simplify.
  674. (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
  675. and SYMBOL_REFERENCES_LOCAL in GOT handling.
  676. 2017-10-28 Alan Modra <amodra@gmail.com>
  677. PR 22300
  678. * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
  679. * elf32-hppa.c (elf_backend_relocs_compatible): Define.
  680. * elf32-ppc.c (elf_backend_relocs_compatible): Define.
  681. * elf64-ppc.c (elf_backend_relocs_compatible): Define.
  682. 2017-10-25 Alan Modra <amodra@gmail.com>
  683. * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
  684. optionally prefixed with "_".
  685. * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
  686. 2017-10-24 Andrew Waterman <andrew@sifive.com>
  687. * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
  688. when rd is x0.
  689. 2017-10-24 Renlin Li <renlin.li@arm.com>
  690. PR ld/21703
  691. * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
  692. 2017-10-23 Nick Clifton <nickc@redhat.com>
  693. PR 22319
  694. * elflink.c (elf_link_output_extsym): Keep global undefined
  695. symbols if they have been marked as needed.
  696. 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
  697. * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
  698. function.
  699. (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
  700. `_bfd_mips_elf_mkobject'.
  701. 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
  702. PR gas/22304
  703. * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
  704. 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
  705. * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
  706. (riscv_pcgp_lo_reloc): Likewise.
  707. (riscv_pcgp_relocs): Likewise.
  708. (riscv_init_pcgp_relocs): New function.
  709. (riscv_free_pcgp_relocs): Likewise.
  710. (riscv_record_pcgp_hi_reloc): Likewise.
  711. (riscv_record_pcgp_lo_reloc): Likewise.
  712. (riscv_delete_pcgp_hi_reloc): Likewise.
  713. (riscv_use_pcgp_hi_reloc): Likewise.
  714. (riscv_record_pcgp_lo_reloc): Likewise.
  715. (riscv_find_pcgp_lo_reloc): Likewise.
  716. (riscv_delete_pcgp_lo_reloc): Likewise.
  717. (_bfd_riscv_relax_pc): Likewise.
  718. (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
  719. via the new functions above.
  720. 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
  721. * elfnn-riscv.c (R_RISCV_DELETE): New define.
  722. (_bfd_riscv_relax_delete): New function.
  723. (perform_relocation): Handle R_RISCV_DELETE.
  724. (_bfd_riscv_relax_section): Likewise.
  725. 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
  726. PR ld/22263
  727. * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
  728. bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
  729. bfd_link_executable for TLS check.
  730. (tilegx_elf_check_relocs): Likewise.
  731. (allocate_dynrelocs): Likewise.
  732. (tilegx_elf_relocate_section): Likewise.
  733. 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
  734. PR ld/22263
  735. * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
  736. bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
  737. bfd_link_executable for TLS check.
  738. (tilepro_elf_check_relocs): Likewise.
  739. (allocate_dynrelocs): Likewise.
  740. (tilepro_elf_relocate_section): Likewise.
  741. 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
  742. PR ld/22263
  743. * elfxx-sparc.c (sparc_elf_tls_transition): Replace
  744. bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
  745. bfd_link_executable for TLS check.
  746. (_bfd_sparc_elf_check_relocs): Likewise.
  747. (allocate_dynrelocs): Likewise.
  748. (_bfd_sparc_elf_relocate_section): Likewise.
  749. 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
  750. * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
  751. _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
  752. * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
  753. 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
  754. * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
  755. indirect and warning symbols.
  756. 2017-10-17 Alan Modra <amodra@gmail.com>
  757. PR 22307
  758. * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
  759. against size left rather than comparing pointers. Reorganise loop.
  760. 2017-10-17 Alan Modra <amodra@gmail.com>
  761. PR 22306
  762. * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
  763. and error for any other size that doesn't cover the header word.
  764. 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
  765. * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
  766. * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
  767. (elf_backend_gc_sweep_hook): Likewise.
  768. * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
  769. (bfinfdpic_gc_sweep_hook): Likewise.
  770. (elf_backend_gc_sweep_hook): Likewise.
  771. * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
  772. (elf_backend_gc_sweep_hook): Likewise.
  773. * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
  774. (elf_backend_gc_sweep_hook): Likewise.
  775. * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
  776. (elf_backend_gc_sweep_hook): Likewise.
  777. * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
  778. (elf_backend_gc_sweep_hook): Likewise.
  779. * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
  780. (elf_backend_gc_sweep_hook): Likewise.
  781. * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
  782. from comments.
  783. (elf_m68k_remove_got_entry_type): Removed.
  784. (elf_m68k_find_got_entry_ptr): Likewise.
  785. (elf_m68k_remove_got_entry): Likewise.
  786. (elf_m68k_gc_sweep_hook): Likewise.
  787. (elf_backend_gc_sweep_hook): Likewise.
  788. * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
  789. (elf_backend_gc_sweep_hook): Likewise.
  790. * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
  791. (elf_backend_gc_sweep_hook): Likewise.
  792. * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
  793. (elf_backend_gc_sweep_hook): Likewise.
  794. * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
  795. (elf_backend_gc_sweep_hook): Likewise.
  796. * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
  797. (elf_backend_gc_sweep_hook): Likewise.
  798. * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
  799. (elf_backend_gc_sweep_hook): Likewise.
  800. * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
  801. (elf_backend_gc_sweep_hook): Likewise.
  802. * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
  803. (elf_backend_gc_sweep_hook): Likewise.
  804. * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
  805. (elf_backend_gc_sweep_hook): Likewise.
  806. * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
  807. * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
  808. (elf_backend_gc_sweep_hook): Likewise.
  809. * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
  810. * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
  811. (elf_backend_gc_sweep_hook): Likewise.
  812. * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
  813. (elf_backend_gc_sweep_hook): Likewise.
  814. * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
  815. (elf_backend_gc_sweep_hook): Likewise.
  816. * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
  817. (elf_backend_gc_sweep_hook): Likewise.
  818. * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
  819. * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
  820. (elf_backend_gc_sweep_hook): Likewise.
  821. * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
  822. (ppc64_elf_gc_sweep_hook): Likewise.
  823. * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
  824. (elf_backend_gc_sweep_hook): Likewise.
  825. * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
  826. * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
  827. * elflink.c (elf_link_add_object_symbols): Don't call
  828. _bfd_elf_link_check_relocs here.
  829. (gc_sweep_hook_fn): Removed.
  830. (elf_gc_sweep): Remove gc_sweep_hook.
  831. * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
  832. (elf_backend_gc_sweep_hook): Likewise.
  833. * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
  834. (elf_backend_gc_sweep_hook): Likewise.
  835. * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
  836. * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
  837. (elf_backend_gc_sweep_hook): Likewise.
  838. * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
  839. * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
  840. * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
  841. (elfNN_bed): Remove elf_backend_gc_sweep_hook.
  842. * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
  843. * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
  844. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  845. * elf32-i386.c (elf_i386_backend_data): Removed.
  846. (get_elf_i386_backend_data): Likewise.
  847. (elf_i386_arch_bed): Replace elf_i386_backend_data with
  848. elf_x86_backend_data.
  849. (elf_i386_get_synthetic_symtab): Likewise.
  850. (elf_i386_nacl_arch_bed): Likewise.
  851. (elf_i386_vxworks_arch_bed): Likewise.
  852. (elf_i386_relocate_section): Check target_os instead of
  853. is_vxworks.
  854. (elf_i386_finish_dynamic_symbol): Likewise.
  855. (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
  856. Check target_os instead of is_vxworks.
  857. (elf_i386_link_setup_gnu_properties): Remove normal_target and
  858. is_vxworks. Initialize plt0_pad_byte.
  859. * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
  860. (get_elf_x86_64_arch_data): Likewise.
  861. (get_elf_x86_64_backend_data): Likewise.
  862. (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
  863. elf_x86_backend_data.
  864. (elf_x86_64_get_synthetic_symtab): Likewise.
  865. (elf_x86_64_nacl_arch_bed): Likewise.
  866. (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
  867. normal_target. Initialize plt0_pad_byte.
  868. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
  869. instead of is_vxworks.
  870. (_bfd_x86_elf_size_dynamic_sections): Likewise.
  871. (_bfd_x86_elf_finish_dynamic_sections): Likewise.
  872. (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
  873. (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
  874. (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
  875. Update normal_target. Set up plt0_pad_byte. Check target_os
  876. instead of is_vxworks.
  877. * elfxx-x86.h (elf_x86_target_os): New.
  878. (elf_x86_backend_data): Likewise.
  879. (get_elf_x86_backend_data): Likewise.
  880. (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
  881. and target_os.
  882. (elf_x86_init_table): Remove normal_target and is_vxworks. Add
  883. plt0_pad_byte.
  884. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  885. * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
  886. _bfd_x86_elf_finish_dynamic_sections.
  887. * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
  888. * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
  889. function.
  890. * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
  891. prototype.
  892. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  893. PR ld/21384
  894. * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
  895. hide symbol which was forced to be dynamic.
  896. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  897. PR ld/22269
  898. * elf32-cris.c (cris_elf_relocate_section): Don't generate
  899. dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  900. (cris_elf_check_relocs): Don't allocate dynamic relocation
  901. if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  902. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  903. PR ld/22269
  904. * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
  905. if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  906. (sh_elf_relocate_section): Don't generate dynamic relocation if
  907. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  908. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  909. PR ld/22269
  910. * elf32-s390.c (allocate_dynrelocs): Discard dynamic
  911. relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  912. (elf_s390_relocate_section): Don't generate dynamic relocation
  913. if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  914. * elf64-s390.c (allocate_dynrelocs): Discard dynamic
  915. relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  916. (elf_s390_relocate_section): Don't generate dynamic relocation
  917. if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  918. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  919. PR ld/22269
  920. * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
  921. dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  922. (allocate_dynrelocs): Discard dynamic relocations if
  923. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  924. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  925. PR ld/22269
  926. * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
  927. generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
  928. true.
  929. (allocate_dynrelocs): Discard dynamic relocations if
  930. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  931. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  932. PR ld/22269
  933. * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
  934. relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  935. (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
  936. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  937. (elf_m68k_relocate_section): Don't generate dynamic relocation
  938. if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  939. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  940. PR ld/22269
  941. * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
  942. symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  943. (allocate_dynrelocs): Discard dynamic relocations if
  944. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  945. (elf32_hppa_relocate_section): Don't generate dynamic
  946. relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  947. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  948. PR ld/22269
  949. * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
  950. dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  951. (allocate_fptr): Don't allocate function pointer if
  952. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  953. (allocate_dynrel_entries): Don't allocate dynamic relocation
  954. if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  955. (set_got_entry): Don't set GOT entry if
  956. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  957. (set_pltoff_entry): Don't set PLTOFF entry if
  958. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  959. (elfNN_ia64_relocate_section): Don't install dynamic relocation
  960. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  961. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  962. PR ld/22269
  963. * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
  964. dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  965. (allocate_dynrelocs): Don't allocate dynamic relocations if
  966. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  967. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  968. PR ld/22269
  969. * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
  970. dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  971. (allocate_dynrelocs_for_symbol): Discard dynamic relocations
  972. if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  973. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  974. PR ld/22269
  975. * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
  976. relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  977. (tilepro_elf_relocate_section): Don't generate dynamic
  978. relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  979. * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
  980. relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  981. (tilegx_elf_relocate_section): Don't generate dynamic
  982. relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  983. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  984. PR ld/22269
  985. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
  986. generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
  987. true.
  988. (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
  989. if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  990. 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
  991. * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
  992. * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
  993. * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
  994. 2017-10-12 James Bowman <james.bowman@ftdichip.com>
  995. * bfd-in2.h: Regenerate.
  996. * libbfd.h: Regenerate.
  997. * elf32-ft32.c: Add HOWTO R_FT32_15.
  998. * reloc.c: Add BFD_RELOC_FT32_15.
  999. 2017-10-12 Nick Clifton <nickc@redhat.com>
  1000. * reloc.c (enum bfd_reloc_status): Start values at 2.
  1001. * bfd-in2.h: Regenerate.
  1002. * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
  1003. that a TRUE return indicates success. Compare the result of
  1004. calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
  1005. (build_one_stub): Change sense of tests against aarch64_relocate
  1006. return value.
  1007. (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
  1008. than FALSE, when an error is detected.
  1009. (elfNN_aarch64_final_link_relocate): Likewise.
  1010. 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
  1011. * elf32-i386.c (elf_backend_hide_symbol): New.
  1012. * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
  1013. * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
  1014. * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
  1015. 2017-10-12 Alan Modra <amodra@gmail.com>
  1016. * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
  1017. elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
  1018. (bfd_elf_define_start_stop): Likewise.
  1019. 2017-10-12 Alan Modra <amodra@gmail.com>
  1020. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
  1021. when executable rather than non-PIC.
  1022. * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
  1023. * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
  1024. 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
  1025. * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
  1026. member.
  1027. * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
  1028. (elf_external_linux_prpsinfo64_ugid32): ... this.
  1029. (swap_linux_prpsinfo32_out): Rename to...
  1030. (swap_linux_prpsinfo32_ugid32_out): ... this.
  1031. (elf_external_linux_prpsinfo64_ugid16): New structure.
  1032. (swap_linux_prpsinfo64_ugid16_out): New function.
  1033. * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
  1034. (elf_backend_linux_prpsinfo64_ugid16): Define.
  1035. (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
  1036. * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
  1037. of the 64-bit Linux core PRPSINFO note.
  1038. * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
  1039. 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
  1040. * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
  1041. member.
  1042. (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
  1043. * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
  1044. (elf_external_ppc_linux_prpsinfo32)
  1045. (swap_ppc_linux_prpsinfo32_out): Move to...
  1046. * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
  1047. (swap_linux_prpsinfo32_ugid32_out): ... these.
  1048. (elf_external_linux_prpsinfo32): Rename to...
  1049. (elf_external_linux_prpsinfo32_ugid16): ... this.
  1050. (swap_linux_prpsinfo32_out): Rename to...
  1051. (swap_linux_prpsinfo32_ugid16_out): ... this.
  1052. * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
  1053. (elf_backend_linux_prpsinfo32_ugid16): Define.
  1054. (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
  1055. * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
  1056. of the 32-bit Linux core PRPSINFO note.
  1057. * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1058. * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1059. * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1060. * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1061. * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1062. * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1063. * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1064. * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1065. * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1066. * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
  1067. 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
  1068. * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
  1069. `gap' member ahead of `pr_flag'.
  1070. 2017-10-11 Pedro Alves <palves@redhat.com>
  1071. * bfd.c (_doprnt): Rename to ...
  1072. (_bfd_doprnt): ... this.
  1073. (error_handler_internal): Adjust.
  1074. 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
  1075. * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
  1076. instead of incrementing it.
  1077. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  1078. 2017-10-10 Renlin Li <renlin.li@arm.com>
  1079. PR ld/21402
  1080. * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
  1081. symbols into dynamic.
  1082. 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
  1083. PR ld/22274
  1084. * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
  1085. (riscv_elf_link_hash_table_create): Initialize max_alignment to
  1086. (bfd_vma) -1.
  1087. (_bfd_riscv_relax_section): Cache the max alignment of output
  1088. sections if possible.
  1089. 2017-10-10 Alan Modra <amodra@gmail.com>
  1090. * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
  1091. .opd whenever .opd is present and non-zero size. Move code
  1092. setting abiversion to/from output file earlier. Only set
  1093. u.opd.func_sec when --gc-sections. Read relocs and set up
  1094. u.opd.func_sec values here..
  1095. (ppc64_elf_check_relocs): ..rather than here. Simplify opd
  1096. section tests.
  1097. (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
  1098. 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
  1099. * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
  1100. isymbuf.
  1101. 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
  1102. * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
  1103. .interp section with "ld --no-dynamic-linker".
  1104. 2017-10-09 Alan Modra <amodra@gmail.com>
  1105. PR 22212
  1106. * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
  1107. funcinfo_hash_table and varinfo_hash_table.
  1108. 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
  1109. * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
  1110. in read-only section with minfo.
  1111. (sh_elf_size_dynamic_sections): Likewise.
  1112. 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
  1113. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
  1114. a strayed comment.
  1115. 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
  1116. * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
  1117. this_hdr.sh_entsize only if section size > 0.
  1118. 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
  1119. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
  1120. 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
  1121. * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
  1122. in read-only section with minfo.
  1123. (_bfd_sparc_elf_size_dynamic_sections): Likewise.
  1124. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1125. * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
  1126. comments.
  1127. 2017-10-06 John Baldwin <jhb@FreeBSD.org>
  1128. * elf-bfd.h (struct elf_backend_data): Add
  1129. `elf_backend_grok_freebsd_prstatus'.
  1130. * elf.c (elfcore_grok_freebsd_note): Call
  1131. `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
  1132. present.
  1133. * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
  1134. function.
  1135. (elf_backend_grok_freebsd_prstatus): Define.
  1136. * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
  1137. (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
  1138. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1139. * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
  1140. and has_non_got_reloc with zero_undefweak.
  1141. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  1142. * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
  1143. zero_undefweak to 1.
  1144. (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
  1145. has_non_got_reloc with zero_undefweak.
  1146. * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
  1147. has_got_reloc and has_non_got_reloc with zero_undefweak.
  1148. (elf_x86_link_hash_entry): Likewise.
  1149. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1150. * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
  1151. (VERIFY_COPY_RELOC): Likewise.
  1152. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1153. * elfxx-x86.h (VERIFY_COPY_RELOC): New.
  1154. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
  1155. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
  1156. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1157. * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
  1158. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
  1159. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
  1160. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1161. * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
  1162. * elf32-i386.c (elf_i386_relocate_section): Use it.
  1163. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  1164. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1165. * elf32-i386.c (X86_SIZE_TYPE_P): New.
  1166. (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
  1167. * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
  1168. (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
  1169. * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
  1170. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1171. * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
  1172. (PLT_LOCAL_IFUNC_P): Likewise.
  1173. * elf32-i386.c (elf_i386_relocate_section): Use them.
  1174. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  1175. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1176. * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
  1177. * elf32-i386.c (elf_i386_relocate_section): Use it.
  1178. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  1179. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1180. * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
  1181. * elf32-i386.c (elf_i386_relocate_section): Use it.
  1182. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  1183. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1184. * elf32-i386.c (X86_PCREL_TYPE_P): New.
  1185. (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
  1186. * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
  1187. (X86_PCREL_TYPE_P): This.
  1188. (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
  1189. Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
  1190. (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
  1191. X86_PCREL_TYPE_P.
  1192. * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
  1193. 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
  1194. * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
  1195. * elf32-i386.c (elf_i386_tls_transition): Use it.
  1196. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
  1197. 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
  1198. * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
  1199. Dump dynamic relocation in read-only section with minfo if
  1200. needed.
  1201. (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
  1202. (maybe_set_textrel): Likewise.
  1203. (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
  1204. read-only section with minfo.
  1205. 2017-10-05 John Baldwin <jhb@FreeBSD.org>
  1206. * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
  1207. 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
  1208. * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
  1209. in read-only section with minfo.
  1210. (tilepro_elf_size_dynamic_sections): Likewise.
  1211. * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
  1212. (tilegx_elf_size_dynamic_sections): Likewise.
  1213. 2017-10-05 Pedro Alves <palves@redhat.com>
  1214. PR 22245
  1215. * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
  1216. ellipsis parameter. Split out bfd_error_on_input code to..
  1217. (bfd_set_input_error): .. New function.
  1218. * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
  1219. * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
  1220. * bfd-in2.h: Regenerate.
  1221. 2017-10-05 Alan Modra <amodra@gmail.com>
  1222. * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
  1223. fini_array error value.
  1224. 2017-10-05 Alan Modra <amodra@gmail.com>
  1225. PR 21167
  1226. * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
  1227. groups.
  1228. (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
  1229. flag from section.
  1230. (elf_fake_sections): Adjust calls. Exit immediately on failure.
  1231. (bfd_elf_set_group_contents): Add associated reloc section indices
  1232. to group contents.
  1233. 2017-10-04 Alan Modra <amodra@gmail.com>
  1234. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
  1235. classify symbols for ELFv2.
  1236. 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
  1237. PR 22245
  1238. * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
  1239. undergoes default promotion.
  1240. * bfd-in2.h: Regenerate.
  1241. 2017-10-02 Alan Modra <amodra@gmail.com>
  1242. * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
  1243. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
  1244. 2017-10-01 Alan Modra <amodra@gmail.com>
  1245. PR 21957
  1246. * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
  1247. (add_line_info): Always put end_sequence last.
  1248. 2017-10-01 Alan Modra <amodra@gmail.com>
  1249. PR 22047
  1250. * dwarf2.c (read_section): Allocate buffer with extra byte for
  1251. bfd_simple_get_relocated_section_contents rather than copying
  1252. afterwards.
  1253. 2017-09-29 Alan Modra <amodra@gmail.com>
  1254. * merge.c (merge_strings): Return FALSE on malloc failure.
  1255. (_bfd_merge_sections): Return failures from record_section and
  1256. merge_strings.
  1257. 2017-09-28 Alan Modra <amodra@gmail.com>
  1258. PR 22220
  1259. * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
  1260. a case where plugin_notice isn't called.
  1261. 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
  1262. * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
  1263. comparison.
  1264. 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
  1265. PR ld/22199
  1266. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
  1267. output_bfd to info->callbacks->minfo.
  1268. 2017-09-26 Nick Clifton <nickc@redhat.com>
  1269. PR 22172
  1270. * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
  1271. assertion failure if elf_x86_64_rtype_to_howto has already issued
  1272. an error message.
  1273. 2017-09-26 Alan Modra <amodra@gmail.com>
  1274. PR 22210
  1275. * dwarf2.c (read_formatted_entries): Use read_attribute_value to
  1276. read data.
  1277. 2017-09-26 Nick Clifton <nickc@redhat.com>
  1278. PR 22210
  1279. * dwarf2.c (read_formatted_entries): Fail early if we know that
  1280. the loop parsing data entries will overflow the end of the
  1281. section.
  1282. 2017-09-26 Alan Modra <amodra@gmail.com>
  1283. PR 22209
  1284. * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
  1285. (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
  1286. to stash->info_ptr_memory, and check die_ref is within that memory.
  1287. Set info_ptr_end correctly when another CU is refd. Check die_ref
  1288. for DW_FORM_ref4 etc. is within CU.
  1289. 2017-09-26 Alan Modra <amodra@gmail.com>
  1290. PR 22205
  1291. * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
  1292. (read_formatted_entries): Init "fe".
  1293. (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
  1294. 2017-09-26 Alan Modra <amodra@gmail.com>
  1295. PR 22204
  1296. * dwarf2.c (decode_line_info): Ensure line_ptr stays within
  1297. bounds in inner loop.
  1298. 2017-09-25 Alan Modra <amodra@gmail.com>
  1299. PR 22202
  1300. * dwarf1.c (parse_die): Sanity check pointer against section limit
  1301. before dereferencing.
  1302. (parse_line_table): Likewise.
  1303. 2017-09-25 Alan Modra <amodra@gmail.com>
  1304. PR 22201
  1305. * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
  1306. has string form.
  1307. (parse_comp_unit): Likewise.
  1308. 2017-09-25 Alan Modra <amodra@gmail.com>
  1309. PR 22200
  1310. * dwarf2.c (read_formatted_entries): Error on format_count zero.
  1311. 2017-09-24 Alan Modra <amodra@gmail.com>
  1312. PR 22197
  1313. * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
  1314. within section bounds.
  1315. 2017-09-24 Alan Modra <amodra@gmail.com>
  1316. PR 22191
  1317. * dwarf2.c (decode_line_info): Properly free line sequences on error.
  1318. 2017-09-24 Alan Modra <amodra@gmail.com>
  1319. PR 22187
  1320. * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
  1321. pname param. Return status. Make name const. Don't abort,
  1322. return an error. Formatting. Exit if current info_ptr matches
  1323. orig_info_ptr. Update callers.
  1324. (scan_unit_for_symbols): Start at nesting_level of zero. Make
  1325. nested_funcs an array of structs for extensibility. Formatting.
  1326. 2017-09-24 Alan Modra <amodra@gmail.com>
  1327. PR 22186
  1328. * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
  1329. rather than dividing by zero.
  1330. 2017-09-24 Alan Modra <amodra@gmail.com>
  1331. PR 22169
  1332. * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
  1333. 2017-09-24 Alan Modra <amodra@gmail.com>
  1334. PR 22167
  1335. * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
  1336. 2017-09-24 Alan Modra <amodra@gmail.com>
  1337. PR 22166
  1338. * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
  1339. SHT_GNU_verneed section for sanity. Don't zalloc memory for
  1340. verref.
  1341. 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
  1342. PR binutils/22170
  1343. * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
  1344. corrupted PLT.
  1345. 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
  1346. PR binutils/22163
  1347. * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
  1348. -1 if bfd_canonicalize_dynamic_reloc returns 0.
  1349. 2017-09-22 Pedro Alves <palves@redhat.com>
  1350. Alan Modra <amodra@gmail.com>
  1351. * version.h: Add comment.
  1352. 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
  1353. * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
  1354. NT_S390_GS_BC, correct the previously swapped invocations of
  1355. elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
  1356. 2017-09-19 Alan Modra <amodra@gmail.com>
  1357. PR 21441
  1358. * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
  1359. size.
  1360. 2017-09-19 Alan Modra <amodra@gmail.com>
  1361. PR 22150
  1362. * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
  1363. symbols before calculating verrefs. Don't renumber dynsyms
  1364. after gc. Exclude .gnu.version when zero or one dynsym.
  1365. Localize some vars and reindent.
  1366. 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
  1367. PR ld/22148
  1368. * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
  1369. return from bfd_canonicalize_dynamic_reloc.
  1370. 2017-09-15 Alan Modra <amodra@gmail.com>
  1371. PR 22116
  1372. * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
  1373. overflows bfd_size_type.
  1374. 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
  1375. PR ld/22135
  1376. * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
  1377. to indicate if conversion is performed.
  1378. (elf_i386_check_relocs): Cache section contents and relocations
  1379. if conversion is performed.
  1380. * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
  1381. contents and relocations if conversion is performed.
  1382. 2017-09-14 Nick Clifton <nickc@redhat.com>
  1383. PR binutils/22113
  1384. * peXXigen.c (pe_print_idata): Extend check for HintName vector
  1385. entries.
  1386. 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
  1387. * elfxx-x86.h: Fix a typo in comments.
  1388. 2017-09-09 Kamil Rytarowski <n54@gmx.com>
  1389. * elf32-nds32.c: Rename __BIT() to N32_BIT().
  1390. 2017-09-09 Alan Modra <amodra@gmail.com>
  1391. * elf64-ppp.c (plt_stub_pad): Handle positive and negative
  1392. plt_stub_align.
  1393. 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
  1394. * elf32-i386.c (elf_i386_relocate_section): Update usage of
  1395. UNDEFINED_WEAK_RESOLVED_TO_ZERO.
  1396. (elf_i386_finish_dynamic_symbol): Likewise.
  1397. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  1398. (elf_x86_64_finish_dynamic_symbol): Likewise.
  1399. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
  1400. (_bfd_x86_elf_fixup_symbol): Likewise.
  1401. 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
  1402. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
  1403. check has_non_got_reloc.
  1404. 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
  1405. PR ld/22115
  1406. * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
  1407. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
  1408. * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
  1409. linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
  1410. * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
  1411. and linker_def on __ehdr_start if it is referenced and not
  1412. defined.
  1413. (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
  1414. and return TRUE when building executable, if a symbol has
  1415. non-GOT/non-PLT relocations in text section or there is no
  1416. dynamic linker.
  1417. * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
  1418. 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
  1419. * elfxx-x86.h: Update comments.
  1420. 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
  1421. * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
  1422. elf_x86_plt_layout_table with elf_x86_init_table.
  1423. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
  1424. Likewise.
  1425. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
  1426. Likewise.
  1427. * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
  1428. (elf_x86_init_table): This.
  1429. (_bfd_x86_elf_link_setup_gnu_properties): Replace
  1430. elf_x86_plt_layout_table with elf_x86_init_table.
  1431. 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
  1432. * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
  1433. elf64.lo together with elfxx-x86.lo for 64-bit BFD.
  1434. * configure: Regenerated.
  1435. * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
  1436. and r_sym fields of plt_layout.
  1437. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
  1438. Likewise.
  1439. * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
  1440. (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
  1441. r_info nor r_sym fields.
  1442. (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
  1443. fields of htab.
  1444. * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
  1445. 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
  1446. * (_bfd_riscv_relax_align): Call bfd_set_error and
  1447. print an error message when unable to relax a .align directive.
  1448. 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
  1449. * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
  1450. (riscv_record_pcrel_hi_reloc): Add absolute argument.
  1451. (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
  1452. R_RISCV_PCREL_HI20 relocs, and pass the result to
  1453. riscv_record_pcrel_hi_reloc.
  1454. 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
  1455. * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
  1456. r_type_p. Remove the converted argument. Replace
  1457. SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
  1458. the new relocation type via r_type_p.
  1459. (elf_i386_relocate_section): Likewise.
  1460. (elf_i386_finish_dynamic_symbol): Likewise.
  1461. (need_convert_load): Removed.
  1462. (check_relocs_failed): Updated.
  1463. (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
  1464. instead of setting need_convert_load.
  1465. (_bfd_i386_elf_convert_load): Removed.
  1466. * elf64-x86-64.c (need_convert_load): Removed.
  1467. (check_relocs_failed): Updated.
  1468. (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
  1469. Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
  1470. Return the new relocation type via r_type_p.
  1471. (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
  1472. instead of setting need_convert_load.
  1473. (elf_x86_64_check_relocs): Don't check PIC if relocation has
  1474. been converted.
  1475. (_bfd_x86_64_elf_convert_load): Removed.
  1476. (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
  1477. with SYMBOL_REFERENCES_LOCAL_P.
  1478. (elf_x86_64_finish_dynamic_symbol): Likewise.
  1479. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
  1480. set convert_load.
  1481. (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
  1482. (_bfd_x86_elf_link_symbol_references_local): New function.
  1483. * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
  1484. (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
  1485. SYMBOL_REFERENCES_LOCAL_P.
  1486. (elf_x86_link_hash_entry): Add local_ref.
  1487. (elf_x86_link_hash_table): Remove convert_load.
  1488. (_bfd_i386_elf_convert_load): Removed.
  1489. (_bfd_x86_64_elf_convert_load): Likewise.
  1490. (_bfd_x86_elf_link_symbol_references_local): New.
  1491. 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
  1492. * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
  1493. (elf_x86_64_info_to_howto): Get the real relocation type by
  1494. masking out R_X86_64_converted_reloc_bit.
  1495. (elf_x86_64_check_tls_transition): Get the real relocation type
  1496. by masking out R_X86_64_converted_reloc_bit.
  1497. (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
  1498. instead of setting converted_reloc.
  1499. (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
  1500. instead of converted_reloc. Get the real relocation type by
  1501. masking out R_X86_64_converted_reloc_bit.
  1502. (elf_x86_64_link_setup_gnu_properties): Verify that the value of
  1503. R_X86_64_converted_reloc_bit is valid.
  1504. * elfxx-x86.h (converted_reloc): Removed.
  1505. 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
  1506. * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
  1507. when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
  1508. to get the relocation type again.
  1509. * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
  1510. r_type when calling elf_x86_64_tls_transition. Don't use
  1511. ELF32_R_TYPE to get the relocation type again.
  1512. 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
  1513. * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
  1514. converted_reloc.
  1515. 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
  1516. * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
  1517. argument. Don't check relocation overflow. Avoid relocation
  1518. overflow if --no-relax is used. Set converted_reloc on symbol
  1519. if a GOTPCREL relocation is converted.
  1520. (elf_x86_64_relocate_section): Issue a fatal error and suggest
  1521. --no-relax if GOTPCREL relocation conversion leads to relocation
  1522. overflow.
  1523. * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
  1524. 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
  1525. Edmar Wienskoski <edmar.wienskoski@nxp.com
  1526. * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
  1527. (ppc_elf_check_relocs): Handle it.
  1528. (ppc_elf_vle_split20): New function.
  1529. (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
  1530. 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
  1531. PR ld/22071
  1532. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
  1533. for x86-64 if GOT_TLS_GDESC_P is true.
  1534. 2017-09-03 Alan Modra <amodra@gmail.com>
  1535. PR 22067
  1536. * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
  1537. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1538. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
  1539. tls_get_addr for x86-64 in one place.
  1540. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1541. * configure.ac (bfd_backends): Add elf64-x86-64.lo together
  1542. with elfxx-x86.lo for 64-bit BFD.
  1543. * configure: Regenerated.
  1544. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1545. * elf32-i386.c (elf_i386_convert_load): Renamed to ...
  1546. (_bfd_i386_elf_convert_load): This. Remove static.
  1547. (elf_i386_size_dynamic_sections): Removed.
  1548. (elf_backend_size_dynamic_sections): Likewise.
  1549. * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
  1550. (_bfd_x86_64_elf_convert_load): This. Remove static.
  1551. (elf_x86_64_size_dynamic_sections): Removed.
  1552. (elf_backend_size_dynamic_sections): Likewise.
  1553. * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
  1554. (elf_x86_allocate_dynrelocs): This. Make it static.
  1555. (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
  1556. (elf_x86_allocate_local_dynreloc): This. Make it static.
  1557. (elf_i386_is_reloc_section): New function.
  1558. (elf_x86_64_is_reloc_section): Likewise.
  1559. (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
  1560. is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
  1561. Rearrange got_entry_size initialization.
  1562. (_bfd_x86_elf_size_dynamic_sections): New function.
  1563. * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
  1564. is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
  1565. (_bfd_i386_elf_convert_load): New.
  1566. (_bfd_x86_64_elf_convert_load): Likewise.
  1567. (_bfd_x86_elf_size_dynamic_sections): Likewise.
  1568. (elf_backend_size_dynamic_sections): Likewise.
  1569. (_bfd_x86_elf_allocate_dynrelocs): Removed.
  1570. (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
  1571. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1572. * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
  1573. update comments.
  1574. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1575. * elf32-i386.c (elf_i386_size_dynamic_sections): Set
  1576. sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
  1577. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1578. * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
  1579. PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
  1580. * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
  1581. PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
  1582. * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
  1583. PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
  1584. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1585. * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
  1586. (elf_i386_allocate_local_dynrelocs): Likewise.
  1587. (elf_i386_size_dynamic_sections): Replace
  1588. elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
  1589. with _bfd_x86_elf_allocate_dynrelocs and
  1590. _bfd_x86_elf_allocate_local_dynrelocs.
  1591. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
  1592. (elf_x86_64_allocate_local_dynrelocs): Likewise.
  1593. (elf_x86_64_size_dynamic_sections): Replace
  1594. elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
  1595. with _bfd_x86_elf_allocate_dynrelocs and
  1596. _bfd_x86_elf_allocate_local_dynrelocs.
  1597. * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
  1598. (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
  1599. * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
  1600. (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
  1601. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1602. * elf32-i386.c (is_i386_elf): Removed.
  1603. (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
  1604. (elf_i386_size_dynamic_sections): Likewise.
  1605. (elf_i386_relocate_section): Likewise.
  1606. * elf64-x86-64.c (is_x86_64_elf): Removed.
  1607. (elf_x86_64_check_relocs): Replace is_x86_64_elf with
  1608. is_x86_elf.
  1609. (elf_x86_64_size_dynamic_sections): Likewise.
  1610. (elf_x86_64_relocate_section): Likewise.
  1611. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
  1612. target_id.
  1613. * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
  1614. (is_x86_elf): New.
  1615. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1616. * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
  1617. (elf_i386_allocate_dynrelocs): Replace
  1618. elf_i386_compute_jump_table_size with
  1619. elf_x86_compute_jump_table_size.
  1620. (elf_i386_size_dynamic_sections): Likewise.
  1621. * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
  1622. (elf_x86_64_allocate_dynrelocs): Replace
  1623. elf_x86_64_compute_jump_table_size with
  1624. elf_x86_compute_jump_table_size.
  1625. (elf_x86_64_size_dynamic_sections): Likewise.
  1626. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
  1627. got_entry_size.
  1628. * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
  1629. (elf_x86_compute_jump_table_size): New.
  1630. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1631. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
  1632. sizeof_reloc.
  1633. (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
  1634. * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
  1635. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1636. * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
  1637. with htab->is_vxworks.
  1638. (elf_i386_size_dynamic_sections): Likewise.
  1639. (elf_i386_relocate_section): Likewise.
  1640. (elf_i386_finish_dynamic_symbol): Likewise.
  1641. (elf_i386_finish_dynamic_sections): Likewise.
  1642. 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
  1643. * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
  1644. GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
  1645. GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
  1646. * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
  1647. GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
  1648. GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
  1649. * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
  1650. GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
  1651. 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
  1652. PR ld/22064
  1653. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
  1654. ELF_COMMON_DEF_P for common symbols.
  1655. 2017-09-02 Alan Modra <amodra@gmail.com>
  1656. * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
  1657. * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
  1658. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
  1659. 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
  1660. * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
  1661. (elf_backend_gc_mark_hook): Likewise.
  1662. * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
  1663. (elf_backend_gc_mark_hook): Likewise.
  1664. * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
  1665. * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
  1666. (elf_backend_gc_mark_hook): Likewise.
  1667. 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
  1668. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
  1669. (elf_backend_adjust_dynamic_symbol): Likewise.
  1670. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
  1671. (elf_backend_adjust_dynamic_symbol): Likewise.
  1672. * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
  1673. (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
  1674. * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
  1675. (_bfd_x86_elf_adjust_dynamic_symbol): New.
  1676. (elf_backend_adjust_dynamic_symbol): Likewise.
  1677. 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
  1678. * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
  1679. comments.
  1680. 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
  1681. * elf32-i386.c (elf_i386_mkobject): Removed.
  1682. (bfd_elf32_mkobject): Likewise.
  1683. * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
  1684. (bfd_elf64_mkobject): Likewise.
  1685. (bfd_elf32_mkobject): Likewise.
  1686. * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
  1687. * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
  1688. (bfd_elf64_mkobject): Likewise.
  1689. (bfd_elf32_mkobject): Likewise.
  1690. 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
  1691. * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
  1692. Call _bfd_x86_elf_link_setup_gnu_properties.
  1693. * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
  1694. pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
  1695. entries.
  1696. (elf_x86_64_non_lazy_plt): Likewise.
  1697. (elf_x86_64_lazy_bnd_plt): Likewise.
  1698. (elf_x86_64_non_lazy_bnd_plt): Likewise.
  1699. (elf_x86_64_lazy_ibt_plt): Likewise.
  1700. (elf_x32_lazy_ibt_plt): Likewise.
  1701. (elf_x86_64_non_lazy_ibt_plt): Likewise.
  1702. (elf_x32_non_lazy_ibt_plt): Likewise.
  1703. (elf_x86_64_nacl_plt): Likewise.
  1704. (elf_x86_64_link_setup_gnu_properties): Updated. Call
  1705. _bfd_x86_elf_link_setup_gnu_properties.
  1706. * elfxx-x86.c: Include elf-vxworks.h".
  1707. (_bfd_x86_elf_link_setup_gnu_properties): New function.
  1708. * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
  1709. comments for pic_plt0_entry and pic_plt_entry.
  1710. (elf_x86_non_lazy_plt_layout): Likewise.
  1711. (elf_x86_plt_layout_table): New.
  1712. (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
  1713. 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
  1714. PR ld/22061
  1715. * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
  1716. .eh_frame section for the second PLT.
  1717. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
  1718. alignment of .eh_frame section for the second PLT.
  1719. 2017-09-01 Nick Clifton <nickc@redhat.com>
  1720. PR 22059
  1721. * dwarf2.c (decode_line_info): Fix test for an overlong line info
  1722. structure.
  1723. 2017-09-01 Nick Clifton <nickc@redhat.com>
  1724. PR 22058
  1725. * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
  1726. attribute buffer is NUL terminated.
  1727. 2017-08-31 Nick Clifton <nickc@redhat.com>
  1728. PR 22047
  1729. * dwarf2.c (read_section): If necessary add a terminating NUL byte
  1730. to dwarf string sections.
  1731. 2017-08-31 Alan Modra <amodra@gmail.com>
  1732. * po/SRC-POTFILES.in: Regenerate.
  1733. 2017-08-31 Alan Modra <amodra@gmail.com>
  1734. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
  1735. for a section containing just a terminator. Allow multiple
  1736. terminators at end of section.
  1737. * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
  1738. sections when not adding alignment. Assert on terminator in
  1739. the middle of FDEs.
  1740. 2017-08-31 Alan Modra <amodra@gmail.com>
  1741. PR 21441
  1742. PR 22048
  1743. * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
  1744. terminators.
  1745. 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
  1746. * configure.ac (bfd_backends): Add elf64.lo together with
  1747. elfxx-x86.lo for 64-bit BFD.
  1748. * configure: Regenerated.
  1749. 2017-08-31 James Bowman <james.bowman@ftdichip.com>
  1750. * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
  1751. for R_FT32_18.
  1752. 2017-08-31 Alan Modra <amodra@gmail.com>
  1753. PR binutils/22032
  1754. * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
  1755. before _close_and_cleanup. Call iovec->bclose after.
  1756. (bfd_close): Remove code common to, and call, bfd_close_all_done.
  1757. 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
  1758. * elf32-i386.c (elf_i386_plt_type): Removed.
  1759. (elf_i386_plt): Likewise.
  1760. (elf_i386_get_synthetic_symtab): Updated. Call
  1761. _bfd_x86_elf_get_synthetic_symtab.
  1762. * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
  1763. (elf_x86_64_plt): Likewise.
  1764. (elf_x86_64_get_synthetic_symtab): Updated. Call
  1765. _bfd_x86_elf_get_synthetic_symtab.
  1766. * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
  1767. (elf_x86_64_get_plt_got_vma): Likewise.
  1768. (elf_i386_valid_plt_reloc_p): Likewise.
  1769. (elf_x86_64_valid_plt_reloc_p): Likewise.
  1770. (_bfd_x86_elf_get_synthetic_symtab): Likewise.
  1771. * elfxx-x86.h (elf_x86_plt_type): New.
  1772. (elf_x86_plt): Likewise.
  1773. (_bfd_x86_elf_get_synthetic_symtab): Likewise.
  1774. 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
  1775. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
  1776. target_id instead of elf_machine_code.
  1777. 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
  1778. * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
  1779. (elf_i386_lazy_plt_layout): Likewise.
  1780. (elf_i386_non_lazy_plt_layout): Likewise.
  1781. (elf_i386_plt_layout): Likewise.
  1782. (elf_i386_link_hash_table): Likewise.
  1783. (elf_i386_next_tls_desc_index): Likewise.
  1784. (elf_i386_srelplt2): Likewise.
  1785. (elf_i386_plt): Likewise.
  1786. (elf_i386_lazy_plt): Likewise.
  1787. (elf_i386_non_lazy_plt): Likewise.
  1788. (elf_i386_link_hash_table_create): Likewise.
  1789. (bfd_elf32_bfd_link_hash_table_create): Likewise.
  1790. (elf_i386_lazy_plt): Updated.
  1791. (elf_i386_non_lazy_plt): Likewise.
  1792. (elf_i386_lazy_ibt_plt): Likewise.
  1793. (elf_i386_non_lazy_ibt_plt): Likewise.
  1794. (elf_i386_allocate_dynrelocs): Likewise.
  1795. (elf_i386_size_dynamic_sections): Likewise.
  1796. (elf_i386_relocate_section): Likewise.
  1797. (elf_i386_finish_dynamic_symbol): Likewise.
  1798. (elf_i386_finish_dynamic_sections): Likewise.
  1799. (elf_i386_get_synthetic_symtab): Likewise.
  1800. (elf_i386_link_setup_gnu_properties): Likewise.
  1801. (elf_i386_nacl_plt): Likewise.
  1802. * elf64-x86-64.c (ABI_64_P): Removed.
  1803. (ELF64_DYNAMIC_INTERPRETER): Likewise.
  1804. (ELF32_DYNAMIC_INTERPRETER): Likewise.
  1805. (elf_x86_64_lazy_plt_layout): Likewise.
  1806. (elf_x86_64_non_lazy_plt_layout): Likewise.
  1807. (elf_x86_64_plt_layout): Likewise.
  1808. (elf_x86_64_link_hash_table): Likewise.
  1809. (elf_x86_64_plt): Likewise.
  1810. (elf_x86_64_lazy_plt): Likewise.
  1811. (elf_x86_64_non_lazy_plt): Likewise.
  1812. (elf_x86_64_link_hash_table_create): Likewise.
  1813. (bfd_elf64_bfd_link_hash_table_create): Likewise.
  1814. (bfd_elf32_bfd_link_hash_table_create): Likewise.
  1815. (elf_x86_64_lazy_plt): Updated.
  1816. (elf_x86_64_non_lazy_plt): Likewise.
  1817. (elf_x86_64_lazy_bnd_plt): Likewise.
  1818. (elf_x86_64_non_lazy_bnd_plt): Likewise.
  1819. (elf_x86_64_lazy_ibt_plt): Likewise.
  1820. (elf_x32_lazy_ibt_plt): Likewise.
  1821. (elf_x86_64_non_lazy_ibt_plt): Likewise.
  1822. (elf_x32_non_lazy_ibt_plt): Likewise.
  1823. (elf_x86_64_allocate_dynrelocs): Likewise.
  1824. (elf_x86_64_size_dynamic_sections): Likewise.
  1825. (elf_x86_64_relocate_section): Likewise.
  1826. (elf_x86_64_finish_dynamic_symbol): Likewise.
  1827. (elf_x86_64_finish_dynamic_sections): Likewise.
  1828. (elf_x86_64_get_synthetic_symtab): Likewise.
  1829. (elf_x86_64_link_setup_gnu_properties): Likewise.
  1830. (elf_x86_64_nacl_plt): Likewise.
  1831. * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
  1832. "elf/x86-64.h".
  1833. (ELF32_DYNAMIC_INTERPRETER): New.
  1834. (ELF64_DYNAMIC_INTERPRETER): Likewise.
  1835. (ELFX32_DYNAMIC_INTERPRETER): Likewise.
  1836. (_bfd_x86_elf_link_hash_table_create): Likewise.
  1837. (_bfd_x86_elf_link_hash_table_free): Renamed to ...
  1838. (elf_x86_link_hash_table_free): This. Make it static.
  1839. * elfxx-x86.h: Don't include "objalloc.h".
  1840. (ABI_64_P): New.
  1841. (elf_x86_lazy_plt_layout): Likewise.
  1842. (elf_x86_non_lazy_plt_layout): Likewise.
  1843. (elf_x86_plt_layout): Likewise.
  1844. (_bfd_x86_elf_link_hash_table_create): Likewise.
  1845. (bfd_elf64_bfd_link_hash_table_create): Likewise.
  1846. (bfd_elf32_bfd_link_hash_table_create): Likewise.
  1847. (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
  1848. srelplt2 and next_tls_desc_index.
  1849. (_bfd_x86_elf_link_hash_table_free): Removed.
  1850. 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
  1851. * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
  1852. branch offset interpretation.
  1853. 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
  1854. PR binutils/22032
  1855. * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
  1856. 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
  1857. * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
  1858. (elf_x86_64_srelplt2): Likewise.
  1859. 2017-08-30 Alan Modra <amodra@gmail.com>
  1860. * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
  1861. (ppc64_elf_tls_optimize): Set it.
  1862. (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
  1863. insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
  1864. addis would add zero.
  1865. * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
  1866. (ppc_elf_tls_optimize): Set it.
  1867. (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
  1868. insn on TPREL16_LO relocs to use r2 when addis would add zero.
  1869. 2017-08-30 Alan Modra <amodra@gmail.com>
  1870. * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
  1871. __tls_get_addr call sequences to LE, don't move the addi down
  1872. to the nop. Replace the bl with addi and leave the nop alone.
  1873. 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
  1874. * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
  1875. Re-indent.
  1876. * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
  1877. Likewise.
  1878. (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
  1879. 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
  1880. * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
  1881. (BFD64_BACKENDS): Likewise.
  1882. (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
  1883. (BFD64_BACKENDS_CFILES): Likewise.
  1884. * Makefile.in: Regenerated.
  1885. * configure.ac (bfd_backends): Add elfxx-x86.lo together with
  1886. elf32-i386.lo and elf64-x86-64.lo.
  1887. * configure: Regenerated.
  1888. * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
  1889. "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
  1890. "objalloc.h" and "hashtab.h".
  1891. (ELIMINATE_COPY_RELOCS): Removed.
  1892. (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
  1893. (SYMBOL_NO_COPYRELOC): Likewise.
  1894. (elf_i386_link_hash_entry): Likewise.
  1895. (GOT_UNKNOWN): Likewise.
  1896. (GOT_NORMAL): Likewise.
  1897. (GOT_TLS_GD): Likewise.
  1898. (elf_i386_hash_entry): Likewise.
  1899. (elf_i386_obj_tdata): Likewise.
  1900. (elf_i386_tdata): Likewise.
  1901. (elf_i386_local_got_tls_type): Likewise.
  1902. (elf_i386_local_tlsdesc_gotent): Likewise.
  1903. (elf_i386_hash_table): Likewise.
  1904. (elf_i386_link_hash_newfunc): Likewise.
  1905. (elf_i386_local_htab_hash): Likewise.
  1906. (elf_i386_local_htab_eq): Likewise.
  1907. (elf_i386_get_local_sym_hash): Likewise.
  1908. (elf_i386_link_hash_table_free): Likewise.
  1909. (elf_i386_copy_indirect_symbol): Likewise.
  1910. (elf_i386_fixup_symbol): Likewise.
  1911. (elf_i386_readonly_dynrelocs): Likewise.
  1912. (elf_i386_always_size_sections): Likewise.
  1913. (elf_i386_set_tls_module_base): Likewise.
  1914. (elf_i386_dtpoff_base): Likewise.
  1915. (compare_relocs): Likewise.
  1916. (elf_i386_hash_symbol): Likewise.
  1917. (elf_i386_parse_gnu_properties): Likewise.
  1918. (elf_i386_merge_gnu_properties): Likewise.
  1919. (elf_i386_link_check_relocs): Likewise.
  1920. (elf_i386_merge_symbol_attribute): Likewise.
  1921. (bfd_elf32_bfd_link_check_relocs): Likewise.
  1922. (elf_backend_copy_indirect_symbol): Likewise.
  1923. (elf_backend_always_size_sections): Likewise.
  1924. (elf_backend_omit_section_dynsym): Likewise.
  1925. (elf_backend_hash_symbol): Likewise.
  1926. (elf_backend_fixup_symbol): Likewise.
  1927. (elf_backend_parse_gnu_properties): Likewise.
  1928. (elf_backend_merge_gnu_properties): Likewise.
  1929. (elf_backend_merge_symbol_attribute): Likewise.
  1930. (elf_i386_mkobject): Updated.
  1931. (elf_i386_link_hash_table_create): Likewise.
  1932. (elf_i386_check_tls_transition): Likewise.
  1933. (elf_i386_tls_transition): Likewise.
  1934. (elf_i386_convert_load_reloc): Likewise.
  1935. (elf_i386_check_relocs): Likewise.
  1936. (elf_i386_adjust_dynamic_symbol): Likewise.
  1937. (elf_i386_allocate_dynrelocs): Likewise.
  1938. (elf_i386_convert_load): Likewise.
  1939. (elf_i386_size_dynamic_sections): Likewise.
  1940. (elf_i386_relocate_section): Likewise.
  1941. (elf_i386_finish_dynamic_symbol ): Likewise.
  1942. (elf_i386_finish_dynamic_sections): Likewise.
  1943. (elf_i386_output_arch_local_syms): Likewise.
  1944. (elf_i386_get_synthetic_symtab): Likewise.
  1945. (elf_i386_link_setup_gnu_properties): Likewise.
  1946. (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
  1947. of elf_link_hash_table, as base.
  1948. (elf_i386_next_tls_desc_index): New.
  1949. (elf_i386_srelplt2): Likewise.
  1950. (elf_i386_plt): Likewise.
  1951. (elf_i386_lazy_plt): Likewise.
  1952. (elf_i386_non_lazy_plt): Likewise.
  1953. * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
  1954. "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
  1955. "objalloc.h" and "hashtab.h".
  1956. (ELIMINATE_COPY_RELOCS): Removed.
  1957. (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
  1958. (SYMBOL_NO_COPYRELOC): Likewise.
  1959. (elf_x86_64_link_hash_entry): Likewise.
  1960. (GOT_UNKNOWN): Likewise.
  1961. (GOT_NORMAL): Likewise.
  1962. (GOT_TLS_GD): Likewise.
  1963. (elf_x86_64_hash_entry): Likewise.
  1964. (elf_x86_64_obj_tdata): Likewise.
  1965. (elf_x86_64_tdata): Likewise.
  1966. (elf_x86_64_local_got_tls_type): Likewise.
  1967. (elf_x86_64_local_tlsdesc_gotent): Likewise.
  1968. (elf_x86_64_hash_table): Likewise.
  1969. (elf_x86_64_link_hash_newfunc): Likewise.
  1970. (elf_x86_64_local_htab_hash): Likewise.
  1971. (elf_x86_64_local_htab_eq): Likewise.
  1972. (elf_x86_64_get_local_sym_hash): Likewise.
  1973. (elf_x86_64_link_hash_table_free): Likewise.
  1974. (elf_x86_64_copy_indirect_symbol): Likewise.
  1975. (elf_x86_64_fixup_symbol): Likewise.
  1976. (elf_x86_64_readonly_dynrelocs): Likewise.
  1977. (elf_x86_64_always_size_sections): Likewise.
  1978. (elf_x86_64_set_tls_module_base): Likewise.
  1979. (elf_x86_64_dtpoff_base): Likewise.
  1980. (compare_relocs): Likewise.
  1981. (elf_x86_64_merge_symbol_attribute): Likewise.
  1982. (elf_x86_64_hash_symbol): Likewise.
  1983. (elf_x86_64_parse_gnu_properties): Likewise.
  1984. (elf_x86_64_merge_gnu_properties): Likewise.
  1985. (elf_x86_64_link_check_relocs): Likewise.
  1986. (elf_backend_copy_indirect_symbol): Likewise.
  1987. (elf_backend_always_size_sections): Likewise.
  1988. (bfd_elf64_bfd_link_check_relocs): Likewise.
  1989. (elf_backend_merge_symbol_attribute): Likewise.
  1990. (elf_backend_hash_symbol): Likewise.
  1991. (elf_backend_omit_section_dynsym): Likewise.
  1992. (elf_backend_fixup_symbol): Likewise.
  1993. (elf_backend_parse_gnu_properties): Likewise.
  1994. (elf_backend_merge_gnu_properties): Likewise.
  1995. (bfd_elf32_bfd_link_check_relocs): Likewise.
  1996. (elf_x86_64_mkobject): Updated.
  1997. (elf_x86_64_link_hash_table_create): Likewise.
  1998. (elf_x86_64_check_tls_transition): Likewise.
  1999. (elf_x86_64_tls_transition): Likewise.
  2000. (elf_x86_64_convert_load_reloc): Likewise.
  2001. (elf_x86_64_check_relocs): Likewise.
  2002. (elf_x86_64_adjust_dynamic_symbol): Likewise.
  2003. (elf_x86_64_allocate_dynrelocs): Likewise.
  2004. (elf_x86_64_convert_load): Likewise.
  2005. (elf_x86_64_size_dynamic_sections): Likewise.
  2006. (elf_x86_64_relocate_section): Likewise.
  2007. (elf_x86_64_finish_dynamic_symbol ): Likewise.
  2008. (elf_x86_64_finish_dynamic_sections): Likewise.
  2009. (elf_x86_64_output_arch_local_syms): Likewise.
  2010. (elf_x86_64_get_synthetic_symtab): Likewise.
  2011. (elf_x86_64_link_setup_gnu_properties): Likewise.
  2012. (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
  2013. instead of elf_link_hash_table, as base.
  2014. (elf_x86_64_next_tls_desc_index): New.
  2015. (elf_x86_64_srelplt2): Likewise.
  2016. (elf_x86_64_plt): Likewise.
  2017. (elf_x86_64_lazy_plt): Likewise.
  2018. (elf_x86_64_non_lazy_plt): Likewise.
  2019. * elfxx-x86.c: New file.
  2020. * elfxx-x86.h: Likewise.
  2021. 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
  2022. * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
  2023. return.
  2024. * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
  2025. 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
  2026. * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
  2027. sections before checking dynamic relocations and free invalid
  2028. PLT section contents.
  2029. * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
  2030. 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
  2031. * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
  2032. * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
  2033. 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
  2034. PR binutils/22018
  2035. * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
  2036. PLT section size.
  2037. * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
  2038. 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
  2039. * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
  2040. def_protected.
  2041. * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
  2042. 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
  2043. PR ld/21997
  2044. * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
  2045. dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
  2046. Add a has_no_copy_on_protected bitfield.
  2047. (elf_has_no_copy_on_protected): New.
  2048. * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
  2049. elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
  2050. (elf_merge_gnu_property_list): Likewise.
  2051. (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
  2052. to FALSE for elf_has_no_copy_on_protected.
  2053. * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
  2054. (elf_i386_link_hash_entry): Add def_protected.
  2055. (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
  2056. when checking info->nocopyreloc.
  2057. (elf_i386_link_setup_gnu_properties): Don't set
  2058. extern_protected_data here.
  2059. (elf_i386_merge_symbol_attribute): New function.
  2060. (elf_backend_merge_symbol_attribute): New.
  2061. * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
  2062. (elf_x86_64_link_hash_entry): Add def_protected.
  2063. (elf_x86_64_need_pic): Report protected symbol for def_protected.
  2064. (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
  2065. when checking info->nocopyreloc.
  2066. (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
  2067. relocation run-time overflow and unresolvable R_X86_64_32S
  2068. relocation against protected data symbol defined in shared object
  2069. with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
  2070. (elf_x86_64_link_setup_gnu_properties): Don't set
  2071. extern_protected_data here.
  2072. (elf_x86_64_merge_symbol_attribute): New function.
  2073. (elf_backend_merge_symbol_attribute): New.
  2074. 2017-08-26 Alan Modra <amodra@gmail.com>
  2075. * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
  2076. (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
  2077. (ppc_elf_relocate_section): Comment fix.
  2078. * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
  2079. (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
  2080. Support dynamic relocs for TPREL16 when non-pic too.
  2081. (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
  2082. (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
  2083. when non-pic too.
  2084. 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
  2085. * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
  2086. "symbol" in comments.
  2087. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
  2088. 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
  2089. PR ld/22001
  2090. * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
  2091. R_X86_64_PC32 relocation run-time overflow and unresolvable
  2092. R_X86_64_32S relocation with -z nocopyreloc.
  2093. 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
  2094. * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
  2095. Undefined symbols may not have a type.
  2096. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  2097. 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
  2098. * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
  2099. bfd_link_info. Report shared, PIE or PDE object based on
  2100. bfd_link_info.
  2101. (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
  2102. (elf_x86_64_relocate_section): Likewise.
  2103. 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
  2104. * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
  2105. for function symbols.
  2106. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  2107. 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
  2108. * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
  2109. extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
  2110. is set on any input relocatable file.
  2111. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
  2112. 2017-08-23 Alan Modra <amodra@gmail.com>
  2113. PR 21988
  2114. * elf64-ppc.c (ensure_undef_dynamic): Rename from
  2115. ensure_undefweak_dynamic. Handle undefined too.
  2116. * elf32-ppc.c (ensure_undef_dynamic): Likewise.
  2117. * elf32-hppa.c (ensure_undef_dynamic): Likewise.
  2118. (allocate_dynrelocs): Discard undefined non-default visibility
  2119. relocs first. Make undefined syms dynamic. Tidy goto.
  2120. 2017-08-21 Alan Modra <amodra@gmail.com>
  2121. H.J. Lu <hongjiu.lu@intel.com>
  2122. PR ld/21964
  2123. * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
  2124. * elflink.c (bfd_elf_define_start_stop): Rewrite.
  2125. 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
  2126. PR ld/20125
  2127. * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
  2128. undefined weak symbols.
  2129. 2017-08-18 Nick Clifton <nickc@redhat.com>
  2130. PR binutils/21962
  2131. * tekhex.c (getsym): Fix check for source pointer walking off the
  2132. end of the input buffer.
  2133. 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
  2134. PR ld/18808
  2135. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
  2136. relocations in debug sections, change abort to _bfd_error_handler.
  2137. 2017-08-14 Nick Clifton <nickc@redhat.com>
  2138. PR 21957
  2139. * elf.c (setup_group): Check for an empty or very small group
  2140. section.
  2141. * po/bfd.pot: Regenerate.
  2142. 2017-08-14 Alan Modra <amodra@gmail.com>
  2143. PR 21441
  2144. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
  2145. alignment padding here.
  2146. * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
  2147. in a reverse pass over sections.
  2148. 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
  2149. PR binutils/21943
  2150. * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
  2151. for @plt suffixes first.
  2152. * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
  2153. 2017-08-08 Nick Clifton <nickc@redhat.com>
  2154. PR 21916
  2155. * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
  2156. small section lengths.
  2157. * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
  2158. table.
  2159. (elfcore_grok_freebsd_prstatus): Add checks to make sure that
  2160. there is enough data present in the note.
  2161. 2017-08-08 Alan Modra <amodra@gmail.com>
  2162. PR 21017
  2163. * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
  2164. got.refcount for GOTOFF relocs, just create .got section.
  2165. 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
  2166. * elflink.c (elf_link_add_object_symbols): Move common symbol
  2167. check after bed->common_definition.
  2168. 2017-08-07 Alan Modra <amodra@gmail.com>
  2169. PR 21910
  2170. * elflink.c (bfd_elf_final_link): Don't segfault when sections
  2171. needed to define various dynamic tags have been discarded.
  2172. 2017-08-07 Nick Clifton <nickc@redhat.com>
  2173. PR 21884
  2174. * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
  2175. has not been set then use the bfd returned by
  2176. _bfd_elf_link_setup_gnu_properties. If that is null then search
  2177. through all the input bfds selecting the first normal, ELF format
  2178. one.
  2179. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
  2180. 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
  2181. * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
  2182. to 1 bit.
  2183. (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
  2184. (elf_i386_check_tls_transition): Check tls_get_addr directly.
  2185. (elf_i386_convert_load_reloc): Update tls_get_addr check.
  2186. (elf_i386_link_check_relocs): New function.
  2187. (bfd_elf32_bfd_link_check_relocs): New.
  2188. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
  2189. to 1 bit.
  2190. (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
  2191. (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
  2192. (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
  2193. (elf_x86_64_link_check_relocs): New function.
  2194. (bfd_elf64_bfd_link_check_relocs): New.
  2195. (bfd_elf32_bfd_link_check_relocs): Likewise.
  2196. 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
  2197. PR ld/21903:
  2198. * elflink.c (elf_link_add_object_symbols): Treat common symbol
  2199. as undefined for --no-define-common.
  2200. 2017-08-05 Alan Modra <amodra@gmail.com>
  2201. * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
  2202. hppa_link_hash_table.
  2203. 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
  2204. * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
  2205. entries for sysregs with negative indices.
  2206. 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  2207. * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
  2208. isn't the S/390 specific elf data.
  2209. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
  2210. 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
  2211. * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
  2212. * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
  2213. [R_RISCV_ADD16]: Likewise.
  2214. [R_RISCV_ADD32]: Likewise.
  2215. [R_RISCV_ADD64]: Likewise.
  2216. [R_RISCV_SUB6]: Likewise.
  2217. [R_RISCV_SUB8]: Likewise.
  2218. [R_RISCV_SUB16]: Likewise.
  2219. [R_RISCV_SUB32]: Likewise.
  2220. [R_RISCV_SUB64]: Likewise.
  2221. 2017-07-31 Alan Modra <amodra@gmail.com>
  2222. * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
  2223. without ld.so checks.
  2224. 2017-07-29 Alan Modra <amodra@gmail.com>
  2225. PR 21847
  2226. * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
  2227. (ppc64_elf_merge_symbol): Set non_zero_localentry.
  2228. (is_elfv2_localentry0): Test non_zero_localentry.
  2229. (ppc64_elf_tls_setup): Default to --no-plt-localentry.
  2230. 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  2231. * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
  2232. pointer check for htab->elf.irelplt.
  2233. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
  2234. 2017-07-27 Nick Clifton <nickc@redhat.com>
  2235. PR 21840
  2236. * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
  2237. size is -1.
  2238. * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
  2239. with error return.
  2240. * section.c (bfd_make_section_with_flags): Fail if the name or bfd
  2241. are NULL.
  2242. * vms-alpha.c (bfd_make_section_with_flags): Correct computation
  2243. of end pointer.
  2244. (evax_bfd_print_emh): Check for invalid string lengths.
  2245. 2017-07-25 Nick Clifton <nickc@redhat.com>
  2246. * po/fr.po: Updated French translation.
  2247. 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
  2248. PR 21824
  2249. * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
  2250. 16-bit absolute branches into 10-bit pc-relative branches on the
  2251. MSP430 as well as the MSP430X.
  2252. 2017-07-25 Alan Modra <amodra@gmail.com>
  2253. * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
  2254. (stub_eh_frame_size): New function.
  2255. (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
  2256. (group_sections): Init group tls_get_addr_opt_bctrl.
  2257. (ppc64_elf_size_stubs): Update sizing and initialization of
  2258. .eh_frame. Iteration over stubs via group list.
  2259. (ppc64_elf_build_stubs): Iterate over stubs via group list.
  2260. (ppc64_elf_finish_dynamic_sections): Update finalization of
  2261. .eh_frame.
  2262. 2017-07-24 Nick Clifton <nickc@redhat.com>
  2263. PR 21813
  2264. * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
  2265. of the relocs to the canonicalize_one_reloc routine.
  2266. * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
  2267. for the _bfd_mach_o_canonicalize_one_reloc field.
  2268. * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
  2269. res_base parameter. Use to check for corrupt pair relocs.
  2270. * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
  2271. Likewise.
  2272. * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
  2273. Likewise.
  2274. * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
  2275. Likewise.
  2276. * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
  2277. enough data in the record before attempting to parse it.
  2278. (_bfd_vms_slurp_eeom): Likewise.
  2279. (_bfd_vms_slurp_egsd): Check for an invalid section index.
  2280. (image_set_ptr): Likewise.
  2281. (alpha_vms_slurp_relocs): Likewise.
  2282. (alpha_vms_object_p): Check for a truncated record.
  2283. 2017-07-24 Nick Clifton <nickc@redhat.com>
  2284. PR 21803
  2285. * reloc.c (_bfd_unrecognized_reloc): New function. Reports
  2286. an unrecognized reloc and sets the bfd_error value.
  2287. * libbfd.h: Regenerate.
  2288. * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
  2289. function.
  2290. * elf32-i386.c (elf_i386_relocate_section): Likewise.
  2291. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
  2292. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  2293. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
  2294. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
  2295. 2017-07-23 Alan Modra <amodra@gmail.com>
  2296. * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
  2297. restore of LR.
  2298. 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
  2299. PR ld/18841
  2300. * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
  2301. reloc_class_ifunc for ifunc symbols.
  2302. 2017-07-19 Nick Clifton <nickc@redhat.com>
  2303. PR 21787
  2304. * archive.c (bfd_generic_archive_p): If the bfd does not have the
  2305. correct magic bytes at the start, set the error to wrong format
  2306. and clear the format selector before returning NULL.
  2307. 2017-07-19 Nick Clifton <nickc@redhat.com>
  2308. PR 21786
  2309. * coff-rs6000.c (_bfd_strntol): New function.
  2310. (_bfd_strntoll): New function.
  2311. (GET_VALUE_IN_FIELD): New macro.
  2312. (EQ_VALUE_IN_FIELD): new macro.
  2313. (_bfd_xcoff_slurp_armap): Use new macros.
  2314. (_bfd_xcoff_archive_p): Likewise.
  2315. (_bfd_xcoff_read_ar_hdr): Likewise.
  2316. (_bfd_xcoff_openr_next_archived_file): Likewise.
  2317. (_bfd_xcoff_stat_arch_elt): Likewise.
  2318. * coff64-rs6000.c (_bfd_strntol): New function.
  2319. (_bfd_strntoll): New function.
  2320. (GET_VALUE_IN_FIELD): New macro.
  2321. (xcoff64_slurp_armap): Use new macros.
  2322. 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
  2323. John Eric Martin <John.Martin@emmicro-us.com>
  2324. * bfd-in2.h: Regenerate.
  2325. * libbfd.h: Regenerate.
  2326. * elf32-arc.c (JLI): Define.
  2327. * reloc.c: Add JLI relocations.
  2328. 2017-07-18 Nick Clifton <nickc@redhat.com>
  2329. PR 21775
  2330. * coff-sh.c: Fix spelling typos.
  2331. * compress.c: Likewise.
  2332. * cpu-pdp11.c: Likewise.
  2333. * ecofflink.c: Likewise.
  2334. * elf-m10300.c: Likewise.
  2335. * elf.c: Likewise.
  2336. * elf32-arm.c: Likewise.
  2337. * elf32-m68k.c: Likewise.
  2338. * elf32-nds32.c: Likewise.
  2339. * elf32-ppc.c: Likewise.
  2340. * elf32-sh.c: Likewise.
  2341. * elf32-v850.c: Likewise.
  2342. * elf64-ppc.c: Likewise.
  2343. * elf64-x86-64.c: Likewise.
  2344. * elflink.c: Likewise.
  2345. * elfnn-aarch64.c: Likewise.
  2346. * elfxx-mips.c: Likewise.
  2347. * som.c: Likewise.
  2348. * sunos.c: Likewise.
  2349. * vms-alpha.c: Likewise.
  2350. * xcofflink.c: Likewise.
  2351. 2017-07-18 Nick Clifton <nickc@redhat.com>
  2352. PR binutils/21781
  2353. * coffcode.h (handle_COMDAT): Replace abort with an error message
  2354. and return.
  2355. 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
  2356. PR ld/21782
  2357. * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
  2358. to shared library.
  2359. 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
  2360. * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
  2361. 2017-07-16 Alan Modra <amodra@gmail.com>
  2362. * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
  2363. __tls_index GOT entries when using __tls_get_addr_opt stub.
  2364. * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
  2365. 2017-07-12 Alan Modra <amodra@gmail.com>
  2366. * po/es.po: Update from translationproject.org/latest/bfd/.
  2367. * po/fi.po: Likewise.
  2368. * po/fr.po: Likewise.
  2369. * po/id.po: Likewise.
  2370. * po/ja.po: Likewise.
  2371. * po/ro.po: Likewise.
  2372. * po/ru.po: Likewise.
  2373. * po/sr.po: Likewise.
  2374. * po/sv.po: Likewise.
  2375. * po/tr.po: Likewise.
  2376. * po/uk.po: Likewise.
  2377. * po/vi.po: Likewise.
  2378. * po/zh_CN.po: Likewise.
  2379. * po/hr.po: New file from translationproject.org.
  2380. * configure.ac (ALL_LINGUAS): Add hr. Sort.
  2381. * configure: Regenerate.
  2382. 2017-07-12 Nick Clifton <nickc@redhat.com>
  2383. Fix compile time warnings using gcc 7.1.1.
  2384. * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
  2385. plt_name buffer.
  2386. (elf_xtensa_get_gotplt_section): Increase length of got_name
  2387. buffer.
  2388. * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
  2389. default return of FALSE.
  2390. * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
  2391. default return of FALSE.
  2392. 2017-07-12 Alan Modra <amodra@gmail.com>
  2393. * binary.c (binary_set_section_contents): Don't print filepos in
  2394. error message.
  2395. (coff_write_object_contents): Cast size_t for error message.
  2396. (coff_slurp_line_table): Don't use bfd_vma symndx.
  2397. (coff_slurp_reloc_table): Remove unneeded cast.
  2398. * dwarf2.c (read_section): Cast bfd_int64_t to long long for
  2399. error message.
  2400. (find_abstract_instance_name): Likewise.
  2401. * elf32-arm.c (arm_type_of_stub): Correct error arg order.
  2402. (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
  2403. (elf32_arm_check_relocs): Make r_symndx an int.
  2404. * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
  2405. format string.
  2406. * elf32-metag.c (elf_metag_relocate_section): Delete extra error
  2407. message arg.
  2408. * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
  2409. error message.
  2410. * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
  2411. * elf32-s390.c (elf_s390_check_relocs): Likewise.
  2412. * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
  2413. * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
  2414. * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
  2415. * elf64-s390.c (elf_s390_check_relocs): Likewise.
  2416. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  2417. * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
  2418. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
  2419. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
  2420. * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
  2421. * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
  2422. and use %lu for error message.
  2423. * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
  2424. * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
  2425. error message.
  2426. * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
  2427. in error message.
  2428. (elf32_arm_final_link_relocate): Likewise.
  2429. * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
  2430. * coffcode.h (styp_to_sec_flags): Likewise.
  2431. * cofflink.c (_bfd_coff_write_global_sym): Likewise.
  2432. * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
  2433. * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
  2434. * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
  2435. (elf32_bfin_merge_private_bfd_data): Likewise.
  2436. * elf32-cris.c (cris_elf_relocate_section): Likewise.
  2437. * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
  2438. * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
  2439. (i370_elf_relocate_section): Likewise.
  2440. * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
  2441. * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
  2442. * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
  2443. * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
  2444. * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
  2445. * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
  2446. * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
  2447. * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
  2448. (_bfd_mips_elf_merge_private_bfd_data): Likewise.
  2449. * ieee.c (ieee_write_id, read_id): Likewise.
  2450. * mach-o.c (bfd_mach_o_write_contents): Likewise.
  2451. (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
  2452. (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
  2453. (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
  2454. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
  2455. * stabs.c (_bfd_link_section_stabs): Likewise.
  2456. * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
  2457. format.
  2458. * coff-mcore.c (coff_mcore_relocate_section): Likewise.
  2459. * coff-ppc.c (coff_ppc_relocate_section): Likewise.
  2460. * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
  2461. * coff-sh.c (sh_relax_section): Likewise.
  2462. (sh_relax_delete_bytes, sh_swap_insns): Likewise.
  2463. * coff-tic80.c (coff_tic80_relocate_section): Likewise.
  2464. * coffcode.h (coff_slurp_reloc_table): Likewise.
  2465. * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
  2466. (_bfd_coff_read_string_table): Likewise.
  2467. * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
  2468. * compress.c (bfd_get_full_section_contents): Likewise.
  2469. * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
  2470. * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
  2471. * elf.c (bfd_elf_string_from_elf_section): Likewise.
  2472. * elf32-arc.c (arc_special_overflow_checks): Likewise.
  2473. * elf32-arm.c (elf32_arm_tls_relax): Likewise.
  2474. (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
  2475. (elf32_arm_write_section): Likewise.
  2476. * elf32-bfin.c (bfin_relocate_section): Likewise.
  2477. (bfinfdpic_relocate_section): Likewise.
  2478. * elf32-hppa.c (hppa_build_one_stub): Likewise.
  2479. (final_link_relocate, elf32_hppa_relocate_section): Likewise.
  2480. * elf32-i386.c (elf_i386_tls_transition): Likewise.
  2481. (elf_i386_relocate_section): Likewise.
  2482. * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
  2483. * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
  2484. * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
  2485. * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
  2486. * elf32-metag.c (elf_metag_relocate_section): Likewise.
  2487. * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
  2488. (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
  2489. (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
  2490. (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
  2491. (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
  2492. (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
  2493. (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
  2494. (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
  2495. (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
  2496. * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
  2497. * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
  2498. * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
  2499. * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
  2500. * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
  2501. * elf32-sh.c (sh_elf_relax_section): Likewise.
  2502. (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
  2503. (sh_elf_relocate_section): Likewise.
  2504. * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
  2505. * elf32-spu.c (spu_elf_relocate_section): Likewise.
  2506. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
  2507. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
  2508. * elf32-v850.c (v850_elf_relax_section): Likewise.
  2509. * elf32-vax.c (elf_vax_check_relocs): Likewise.
  2510. (elf_vax_relocate_section): Likewise.
  2511. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
  2512. (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
  2513. (compute_text_actions, compute_ebb_proposed_actions): Likewise.
  2514. (do_fix_for_relocatable_link): Likewise.
  2515. * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
  2516. (elf64_alpha_relax_with_lituse): Likewise.
  2517. * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
  2518. (elf_hppa_final_link_relocate): Likewise.
  2519. * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
  2520. (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
  2521. (elf64_vms_link_add_object_symbols): Likewise.
  2522. * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
  2523. (mmix_final_link_relocate): Likewise.
  2524. * elf64-s390.c (invalid_tls_insn): Likewise.
  2525. (elf_s390_relocate_section): Likewise.
  2526. * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
  2527. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
  2528. (elf_x86_64_relocate_section): Likewise.
  2529. * elfcode.h (elf_slurp_symbol_table): Likewise.
  2530. * elfcore.h (elf_core_file_p): Likewise.
  2531. * elflink.c (elf_link_read_relocs_from_section): Likewise.
  2532. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
  2533. (elfNN_aarch64_relocate_section): Likewise.
  2534. * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
  2535. (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
  2536. * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
  2537. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
  2538. (_bfd_mips_elf_relocate_section): Likewise.
  2539. (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
  2540. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
  2541. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
  2542. * ieee.c (ieee_slurp_external_symbols): Likewise.
  2543. * ihex.c (ihex_write_object_content): Likewise.
  2544. * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
  2545. * merge.c (_bfd_merged_section_offset): Likewise.
  2546. * mmo.c (mmo_write_loc_chunk): Likewise.
  2547. (mmo_write_object_contents): Likewise.
  2548. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
  2549. * stabs.c (_bfd_link_section_stabs): Likewise.
  2550. * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
  2551. 2017-07-11 Alan Modra <amodra@gmail.com>
  2552. * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
  2553. 2017-07-11 Alan Modra <amodra@gmail.com>
  2554. * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
  2555. instruction" error using _bfd_error_handler, not einfo.
  2556. 2017-07-10 Nick Clifton <nickc@redhat.com>
  2557. * coffcode.h (coff_slurp_symbol_table): Do not include an entry
  2558. for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
  2559. 2017-07-07 John Baldwin <jhb@FreeBSD.org>
  2560. * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
  2561. 2017-07-07 Alan Modra <amodra@gmail.com>
  2562. * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
  2563. 2017-07-07 Alan Modra <amodra@gmail.com>
  2564. * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
  2565. as long long. Move code replacing "ll" with "I64", and simplify.
  2566. 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
  2567. * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
  2568. to 1.
  2569. 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
  2570. * dwarf2.c (line_info_add_include_dir_stub): Replace time with
  2571. xtime.
  2572. (line_info_add_file_name): Likewise.
  2573. (decode_line_info): Likewise.
  2574. 2017-07-04 Tristan Gingold <gingold@adacore.com>
  2575. * version.m4: Bump version to 2.29.51
  2576. * configure: Regenerate.
  2577. 2017-07-04 Jiong Wang <jiong.wang@arm.com>
  2578. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
  2579. sanity check at the head of this function.
  2580. 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
  2581. * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
  2582. dwarf_line_str_size.
  2583. (struct attr_abbrev): Add field implicit_const.
  2584. (dwarf_debug_sections): Add .debug_line_str.
  2585. (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
  2586. (dwarf_debug_section_assert): Add static assertion.
  2587. (read_indirect_line_string): New.
  2588. (read_abbrevs): Support DW_FORM_implicit_const.
  2589. (is_str_attr): Support DW_FORM_line_strp.
  2590. (read_attribute_value): Support DW_FORM_line_strp and
  2591. DW_FORM_implicit_const.
  2592. (read_attribute): Support DW_FORM_implicit_const.
  2593. (line_info_add_include_dir, line_info_add_include_dir_stub):
  2594. (line_info_add_file_name, read_formatted_entries): New.
  2595. (decode_line_info, parse_comp_unit): Support DWARF 5.
  2596. (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
  2597. 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
  2598. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
  2599. abort statement that was put for symbols that are not dynamic.
  2600. 2017-07-03 Tristan Gingold <gingold@adacore.com>
  2601. * po/bfd.pot: Regenerate
  2602. 2017-07-03 Alan Modra <amodra@gmail.com>
  2603. * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
  2604. __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
  2605. * elf.c (setup_group): Use "Lx" to print sh_size.
  2606. (_bfd_elf_setup_sections): Remove unnecessary cast and print
  2607. unknown section type in hex.
  2608. (copy_special_section_fields): Style fix.
  2609. (bfd_section_from_shdr): Correct format for sh_link. Use a
  2610. common error message for all the variants of unrecognized
  2611. section types.
  2612. (assign_file_positions_for_load_sections): Use "Lx" for lma
  2613. adjust error message.
  2614. (assign_file_positions_for_non_load_sections): Formatting.
  2615. (rewrite_elf_program_header): Formatting. Use "Lx" for
  2616. bfd_vma values in error messages.
  2617. * elfcode.h (elf_slurp_reloc_table_from_section): Cast
  2618. ELF_R_SYM value to type expected by format.
  2619. * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
  2620. in error messages.
  2621. (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
  2622. (elf_link_input_bfd): Use "Lx" for r_info.
  2623. (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
  2624. 2017-07-03 Alan Modra <amodra@gmail.com>
  2625. * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
  2626. * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
  2627. Microsoft C library variant of long long format specifier.
  2628. (PRINT20): Cast value to bfd_uint64_t not long long.
  2629. * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
  2630. * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
  2631. long long. Don't cast to bfd_vma.
  2632. * elf32-score.c (score3_bfd_getl48): Likewise.
  2633. * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
  2634. 2017-07-03 Alan Modra <amodra@gmail.com>
  2635. * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
  2636. print d_tag.
  2637. (bfd_elf_print_symbol): Don't cast symbol->flags.
  2638. (_bfd_elf_symbol_from_bfd_symbol): Likewise.
  2639. * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
  2640. _bfd_error_handler argument order.
  2641. (ppc_elf_merge_private_bfd_data): Don't cast flags.
  2642. 2017-07-03 Alan Modra <amodra@gmail.com>
  2643. * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
  2644. AC_TYPE_LONG_DOUBLE.
  2645. * configure: Regenerate.
  2646. * config.in: Regenerate.
  2647. 2017-06-29 Andrew Waterman <andrew@sifive.com>
  2648. * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
  2649. relocs.
  2650. 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
  2651. * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
  2652. unless it is undefined weak.
  2653. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
  2654. relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
  2655. relocation.
  2656. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
  2657. is not dynamic in PIC, abort.
  2658. 2017-06-29 Jiong Wang <jiong.wang@arm.com>
  2659. PR ld/21402
  2660. * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
  2661. undefined weak symbols into dynamic.
  2662. (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
  2663. relocation for non-dynamic symbols.
  2664. (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
  2665. 2017-06-29 Jiong Wang <jiong.wang@arm.com>
  2666. * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
  2667. (elfNN_aarch64_final_link_relocate): Delete duplicated code for
  2668. BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
  2669. BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
  2670. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
  2671. support for them.
  2672. 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
  2673. * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
  2674. (elfcore_write_s390_gs_bc): Likewise.
  2675. * elf.c (elfcore_grok_s390_gs_cb): New function.
  2676. (elfcore_grok_s390_gs_bc): New function.
  2677. (elfcore_grok_note): Call them.
  2678. (elfcore_write_s390_gs_cb): New function.
  2679. (elfcore_write_s390_gs_bc): New function.
  2680. (elfcore_write_register_note): Call them.
  2681. 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
  2682. * libbfd.c (_bfd_generic_get_section_contents): Don't call
  2683. bfd_get_file_size. Check archive element size.
  2684. (_bfd_generic_get_section_contents_in_window): Likewise.
  2685. 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
  2686. * bfd-in2.h: Regenerated.
  2687. * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
  2688. (bfd_get_file_size): Likewise.
  2689. 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
  2690. Matthew Fortune <matthew.fortune@imgtec.com>
  2691. * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
  2692. * cpu-mips.c (I_interaptiv_mr2): New enum value.
  2693. (arch_info_struct): Add "mips:interaptiv-mr2" entry.
  2694. * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
  2695. case.
  2696. (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
  2697. (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
  2698. (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
  2699. (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
  2700. `bfd_mach_mips_interaptiv_mr2' entries.
  2701. * bfd-in2.h: Regenerate.
  2702. 2017-06-27 Nick Clifton <nickc@redhat.com>
  2703. * tekhex.c (pass_over): Revert accidental conversion of a local
  2704. array to a static array.
  2705. 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
  2706. PR ld/13402
  2707. * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
  2708. reloc addend if necessary. Adjust diff only if
  2709. shrinked_insn_address < end_address.
  2710. 2017-06-27 Alan Modra <amodra@gmail.com>
  2711. PR binutils/21665
  2712. * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
  2713. (_bfd_generic_get_section_contents_in_window): Likewise.
  2714. 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
  2715. * elfnn-riscv.c (perform_relocation): Support the new
  2716. R_RISCV_32_PCREL relocation.
  2717. (riscv_elf_relocate_section): Likewise.
  2718. * elfxx-riscv.c (howto_table): Likewise.
  2719. (riscv_reloc_map): Likewise.
  2720. * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
  2721. * libbfd.h: Regenerate.
  2722. 2017-06-27 Alan Modra <amodra@gmail.com>
  2723. PR binutils/21665
  2724. * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
  2725. Use unsigned file pointer type, and remove cast.
  2726. * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
  2727. Add "count", not "sz".
  2728. 2017-06-26 Pedro Alves <palves@redhat.com>
  2729. PR binutils/21665
  2730. * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
  2731. "sz".
  2732. 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
  2733. PR binutils/21665
  2734. * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
  2735. a missing line.
  2736. 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
  2737. * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
  2738. * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
  2739. E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
  2740. (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
  2741. `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
  2742. 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
  2743. PR binutils/21665
  2744. * compress.c (bfd_get_full_section_contents): Don't check the
  2745. file size here.
  2746. * libbfd.c (_bfd_generic_get_section_contents): Check for and
  2747. reject a section whose size + offset is greater than the size
  2748. of the entire file.
  2749. (_bfd_generic_get_section_contents_in_window): Likewise.
  2750. 2017-06-26 Nick Clifton <nickc@redhat.com>
  2751. PR binutils/21670
  2752. * tekhex.c (getvalue): Check for the source pointer exceeding the
  2753. end pointer before the first byte is read.
  2754. 2017-06-26 Nick Clifton <nickc@redhat.com>
  2755. PR binutils/21665
  2756. * opncls.c (get_build_id): Check that the section is big enough
  2757. to contain the whole note.
  2758. * compress.c (bfd_get_full_section_contents): Check for and reject
  2759. a section whose size is greater than the size of the entire file.
  2760. * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
  2761. contain a notes section.
  2762. 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  2763. * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
  2764. pointer checks.
  2765. (elf_s390_modify_segment_map): Likewise.
  2766. (bfd_elf_s390_set_options): Lisewise.
  2767. 2017-06-26 Alan Modra <amodra@gmail.com>
  2768. * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
  2769. a --just-syms bfd.
  2770. (_bfd_elf_size_group_sections): Skip --just-syms bfds.
  2771. (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
  2772. .preinit_array on --just-syms bfds.
  2773. (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
  2774. (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
  2775. (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
  2776. 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
  2777. * elf.c (find_link): Bounds check "hint".
  2778. 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
  2779. * elf32-arm.c (using_thumb_only): Update list of architectures in
  2780. BFD_ASSERT for which the logic is valid.
  2781. (using_thumb2_bl): Likewise.
  2782. (using_thumb2): Likewise and return true for ARMv8-R.
  2783. (arch_has_arm_nop): Likewise.
  2784. (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
  2785. merging logic. Update commentis for value 15 of v8m_baseline,
  2786. v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
  2787. merging of value 15 of Tag_CPU_arch.
  2788. 2017-06-23 Jiong Wang <jiong.wang@arm.com>
  2789. * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
  2790. BFD_RELOC_AARCH64_ADR_GOT_PAGE
  2791. * bfd-in2.h: Regenerate.
  2792. 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
  2793. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
  2794. the error_alignment label forward. Properly align program
  2795. property note section.
  2796. 2017-06-22 Eric Christopher <echristo@gmail.com>
  2797. * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
  2798. abs to fix a truncation warning.
  2799. 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
  2800. * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
  2801. local undefined weak symbol to 0.
  2802. * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
  2803. 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
  2804. * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
  2805. is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
  2806. (elf_i386_link_setup_gnu_properties): If info->shstk is set,
  2807. turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
  2808. * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
  2809. info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
  2810. (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
  2811. turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
  2812. 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
  2813. * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
  2814. (elf_i386_lazy_ibt_plt_entry): Likewise.
  2815. (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
  2816. (elf_i386_non_lazy_ibt_plt_entry): Likewise.
  2817. (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
  2818. (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
  2819. (elf_i386_lazy_plt_layout): Likewise.
  2820. (elf_i386_non_lazy_plt_layout): Likewise.
  2821. (elf_i386_link_hash_entry): Add plt_second.
  2822. (elf_i386_link_hash_table): Add plt_second and
  2823. plt_second_eh_frame.
  2824. (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
  2825. (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
  2826. the second PLT. Check the second PLT.
  2827. (elf_i386_relocate_section): Use the second PLT to resolve
  2828. PLT reference if needed.
  2829. (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
  2830. needed.
  2831. (elf_i386_finish_dynamic_sections): Set sh_entsize on the
  2832. second PLT. Generate unwind info for the second PLT.
  2833. (elf_i386_plt_type): Add plt_second.
  2834. (elf_i386_get_synthetic_symtab): Support the second PLT.
  2835. (elf_i386_parse_gnu_properties): Support
  2836. GNU_PROPERTY_X86_FEATURE_1_AND.
  2837. (elf_i386_merge_gnu_properties): Support
  2838. GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
  2839. on GNU_PROPERTY_X86_FEATURE_1_IBT
  2840. (elf_i386_link_setup_gnu_properties): If info->ibt is set,
  2841. turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
  2842. for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
  2843. is set on all relocatable inputs.
  2844. * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
  2845. (elf_x32_lazy_ibt_plt_entry): Likewise.
  2846. (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
  2847. (elf_x32_non_lazy_ibt_plt_entry): Likewise.
  2848. (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
  2849. (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
  2850. (elf_x86_64_lazy_ibt_plt): Likewise.
  2851. (elf_x32_lazy_ibt_plt): Likewise.
  2852. (elf_x86_64_non_lazy_ibt_plt): Likewise.
  2853. (elf_x32_non_lazy_ibt_plt): Likewise.
  2854. (elf_x86_64_get_synthetic_symtab): Support the second PLT.
  2855. (elf_x86_64_parse_gnu_properties): Support
  2856. GNU_PROPERTY_X86_FEATURE_1_AND.
  2857. (elf_x86_64_merge_gnu_properties): Support
  2858. GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
  2859. on GNU_PROPERTY_X86_FEATURE_1_IBT
  2860. (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
  2861. turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
  2862. for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
  2863. is set on all relocatable inputs.
  2864. 2017-06-22 Nick Clifton <nickc@redhat.com>
  2865. PR binutils/21649
  2866. * som.c (setup_sections): NUL terminate the space_strings buffer.
  2867. Check that the space.name field does not index beyond the end of
  2868. the space_strings buffer.
  2869. 2017-06-21 Nick Clifton <nickc@redhat.com>
  2870. PR binutils/21646
  2871. * coff-sh.c (sh_reloc): Check for an out of range reloc.
  2872. 2017-06-21 Nick Clifton <nickc@redhat.com>
  2873. PR binutils/21639
  2874. * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
  2875. type of the size parameter.
  2876. (_bfd_vms_save_counted_string): Add second parameter - the maximum
  2877. length of the counted string.
  2878. * vms.h (_bfd_vms_save_sized_string): Update prototype.
  2879. (_bfd_vms_save_counted_string): Likewise.
  2880. * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
  2881. _bfd_vms_save_counted_string.
  2882. (_bfd_vms_slurp_ehdr): Likewise.
  2883. (_bfd_vms_slurp_egsd): Likewise.
  2884. (Parse_module): Likewise.
  2885. 2017-06-21 Alan Modra <amodra@gmail.com>
  2886. * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
  2887. calls before tocsave calls.
  2888. (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
  2889. following nop.
  2890. 2017-06-21 Nick Clifton <nickc@redhat.com>
  2891. PR binutils/21645
  2892. * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
  2893. bfd_get_full_section_contents returns no contents.
  2894. 2017-06-21 Nick Clifton <nickc@redhat.com>
  2895. PR binutils/21638
  2896. * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
  2897. record.
  2898. 2017-06-21 Nick Clifton <nickc@redhat.com>
  2899. PR binutils/21637
  2900. * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
  2901. list.
  2902. (image_set_ptr): Likewise.
  2903. (alpha_vms_fix_sec_rel): Likewise.
  2904. (alpha_vms_slurp_relocs): Likewise.
  2905. 2017-06-21 Nick Clifton <nickc@redhat.com>
  2906. PR binutils/21633
  2907. * ieee.c (ieee_slurp_sections): Check for a NULL return from
  2908. read_id.
  2909. (ieee_archive_p): Likewise.
  2910. (ieee_object_p): Likewise.
  2911. 2017-06-21 Nick Clifton <nickc@redhat.com>
  2912. PR binutils/21640
  2913. * elf.c (setup_group): Zero the group section pointer list after
  2914. allocation so that loops can be caught. Check for NULL pointers
  2915. when processing a group list.
  2916. 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  2917. * elf-s390.h: New file.
  2918. * elf64-s390.c (struct elf_s390_link_hash_table): Add params
  2919. field.
  2920. (elf_s390_additional_program_headers): New function.
  2921. (elf_s390_modify_segment_map): New function.
  2922. (bfd_elf_s390_set_options): New function.
  2923. (elf_backend_additional_program_headers)
  2924. (elf_backend_modify_segment_map): Add macro definitions.
  2925. 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
  2926. PR ld/21626
  2927. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
  2928. the DYNAMIC bit instead of bfd_count_sections.
  2929. 2017-06-19 Nick Clifton <nickc@redhat.com>
  2930. PR binutils/21618
  2931. * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
  2932. length.
  2933. (evax_bfd_print_eeom): Likewise.
  2934. (evax_bfd_print_egsd): Check for an overlarge record length.
  2935. (evax_bfd_print_etir): Likewise.
  2936. 2017-06-19 Nick Clifton <nickc@redhat.com>
  2937. PR binutils/21612
  2938. * libieee.h (struct common_header_type): Add end_p field.
  2939. * ieee.c (this_byte_and_next): Do not advance input_p beyond
  2940. end_p.
  2941. (read_id): Check for a length that exceeds the remaining bytes in
  2942. the input buffer.
  2943. (ieee_seek): Initialise end_p.
  2944. (ieee_archive_p): Likewise.
  2945. (ieee_object_p): Likewise.
  2946. 2017-06-19 Nick Clifton <nickc@redhat.com>
  2947. PR binutils/21611
  2948. * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
  2949. before reading the EIHS structure entries.
  2950. 2017-06-19 Nick Clifton <nickc@redhat.com>
  2951. PR binutils/21615
  2952. * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
  2953. gsd_size. Check that there are enough bytes remaining to read the
  2954. type and size of the next egsd. Check that the size of the egsd
  2955. does not exceed the size of the record.
  2956. 2017-06-19 Alan Modra <amodra@gmail.com>
  2957. * config.bfd: Correct targ_underscore for cris.
  2958. 2017-06-18 Alan Modra <amodra@gmail.com>
  2959. * config.bfd: Correct targ_underscore for epiphany, ip2k,
  2960. m32c, mn10200, pru, rl78, rx, crisv32 and v850.
  2961. 2017-06-16 Nick Clifton <nickc@redhat.com>
  2962. * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
  2963. bucketlist is empty because there are no symbols to add to the
  2964. list.
  2965. 2017-06-16 Alan Modra <amodra@gmail.com>
  2966. PR ld/20022
  2967. PR ld/21557
  2968. PR ld/21562
  2969. PR ld/21571
  2970. * targets.c (struct bfd_target): Add _bfd_define_start_stop.
  2971. (BFD_JUMP_TABLE_LINK): Likewise.
  2972. * elf-bfd.h (bfd_elf_define_start_stop): Declare.
  2973. * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
  2974. (bfd_elf_define_start_stop): New function.
  2975. * linker.c (bfd_generic_define_start_stop): New function.
  2976. * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
  2977. new field.
  2978. * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
  2979. * aout-target.h (MY_bfd_define_start_stop): Define.
  2980. * aout-tic30.c (MY_bfd_define_start_stop): Define.
  2981. * binary.c (binary_bfd_define_start_stop): Define.
  2982. * bout.c (b_out_bfd_define_start_stop): Define.
  2983. * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
  2984. * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
  2985. * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
  2986. * coffcode.h (coff_bfd_define_start_stop): Define.
  2987. * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
  2988. * i386msdos.c (msdos_bfd_define_start_stop): Define.
  2989. * i386os9k.c (os9k_bfd_define_start_stop): Define.
  2990. * ieee.c (ieee_bfd_define_start_stop): Define.
  2991. * ihex.c (ihex_bfd_define_start_stop): Define.
  2992. * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
  2993. * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
  2994. * mmo.c (mmo_bfd_define_start_stop): Define.
  2995. * nlm-target.h (nlm_bfd_define_start_stop): Define.
  2996. * oasys.c (oasys_bfd_define_start_stop): Define.
  2997. * pef.c (bfd_pef_bfd_define_start_stop): Define.
  2998. * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
  2999. * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
  3000. * som.c (som_bfd_define_start_stop): Define.
  3001. * srec.c (srec_bfd_define_start_stop): Define.
  3002. * tekhex.c (tekhex_bfd_define_start_stop): Define.
  3003. * versados.c (versados_bfd_define_start_stop): Define.
  3004. * vms-alpha.c (vms_bfd_define_start_stop): Define.
  3005. (alpha_vms_bfd_define_start_stop): Define.
  3006. * xsym.c (bfd_sym_bfd_define_start_stop): Define.
  3007. * bfd-in2.h: Regenerate.
  3008. * libbfd.h: Regenerate.
  3009. 2017-06-16 Jiong Wang <jiong.wang@arm.com>
  3010. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
  3011. SYMBOL_REFERENCES_LOCAL.
  3012. 2017-06-15 Jiong Wang <jiong.wang@arm.com>
  3013. PR ld/21532
  3014. * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
  3015. (elfNN_aarch64_final_link_relocate): Also propagate relocations to
  3016. runtime for if there needs copy relocation elimination.
  3017. (need_copy_relocation_p): New function. Return true for symbol with
  3018. pc-relative references and if it's against read-only sections.
  3019. (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
  3020. (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
  3021. that are related with accessing external objects.
  3022. (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
  3023. in elfNN_aarch64_check_relocs.
  3024. 2017-06-15 Nick Clifton <nickc@redhat.com>
  3025. PR binutils/21582
  3026. * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
  3027. bugs.
  3028. PR binutils/21581
  3029. (ieee_archive_p): Likewise.
  3030. 2017-06-15 Nick Clifton <nickc@redhat.com>
  3031. PR binutils/21579
  3032. * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
  3033. 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
  3034. * elf32-xtensa.c (elf_xtensa_be_plt_entry,
  3035. elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
  3036. keep both windowed and call0 ABI PLT definitions.
  3037. (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
  3038. elf_xtensa_*_plt_entry endex.
  3039. (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
  3040. 2017-06-14 Nick Clifton <nickc@redhat.com>
  3041. PR binutils/21578
  3042. * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
  3043. flag value.
  3044. 2017-06-14 Nick Clifton <nickc@redhat.com>
  3045. PR binutils/21589
  3046. * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
  3047. maximum value for the ascic pointer. Check that name processing
  3048. does not read beyond this value.
  3049. (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
  3050. end of etir record.
  3051. 2017-06-14 Nick Clifton <nickc@redhat.com>
  3052. PR binutils/21591
  3053. * versados.c (versados_mkobject): Zero the allocated tdata structure.
  3054. (process_otr): Check for an invalid offset in the otr structure.
  3055. 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
  3056. * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
  3057. 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
  3058. PR ld/20022
  3059. PR ld/21557
  3060. PR ld/21562
  3061. PR ld/21571
  3062. * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
  3063. vtable field to a union.
  3064. (_bfd_elf_is_start_stop): Removed.
  3065. * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
  3066. __start_SECNAME and __stop_SECNAME symbols.
  3067. * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
  3068. * elflink.c (_bfd_elf_is_start_stop): Removed.
  3069. (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
  3070. _bfd_elf_is_start_stop.
  3071. (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
  3072. __stop_SECNAME symbols. Updated.
  3073. (elf_gc_smash_unused_vtentry_relocs): Likewise.
  3074. (bfd_elf_gc_record_vtinherit): Likewise.
  3075. (bfd_elf_gc_record_vtentry): Likewise.
  3076. 2017-06-13 Nick Clifton <nickc@redhat.com>
  3077. PR ld/21524
  3078. * elflink.c (elf_link_adjust_relocs): Generate an error when
  3079. encountering a reloc against a symbol removed by garbage
  3080. collection.
  3081. 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
  3082. * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
  3083. to merge_gnu_properties.
  3084. * elf-properties.c (elf_merge_gnu_properties): Add struct
  3085. bfd_link_info * and pass it to merge_gnu_properties.
  3086. (elf_merge_gnu_property_list): Add struct bfd_link_info *
  3087. and pass it to elf_merge_gnu_properties.
  3088. (_bfd_elf_link_setup_gnu_properties): Pass info to
  3089. elf_merge_gnu_property_list.
  3090. * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
  3091. bfd_link_info *.
  3092. * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
  3093. 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
  3094. PR 21564
  3095. * binary.c (binary_set_section_contents): Scale lma by octets
  3096. per byte to set filepos.
  3097. 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3098. * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
  3099. dynamic sections.
  3100. 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3101. * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
  3102. require TEXTREL.
  3103. 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3104. * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
  3105. patched section contents for TLS IE reloc.
  3106. * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
  3107. 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3108. * elf32-arc.c (elf_arc_relocate_section): Added "call" to
  3109. RELOC_FOR_GLOBAL_SYMBOL macro.
  3110. 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3111. * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
  3112. changes.
  3113. 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3114. * config/tc-arc.c (md_undefined_symbol): Changed.
  3115. * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
  3116. 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3117. * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
  3118. symbols.
  3119. 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3120. * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
  3121. warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
  3122. 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
  3123. * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
  3124. object is created.
  3125. 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
  3126. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
  3127. that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
  3128. is non-zero. Add clarifying comments.
  3129. 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
  3130. * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
  3131. name. Use local IFUNC symbol name string to report unsupported
  3132. non-PIC call to IFUNC function.
  3133. (elf_i386_relocate_section): Dump local IFUNC name with minfo
  3134. when generating R_386_IRELATIVE relocation.
  3135. (elf_i386_finish_dynamic_symbol): Likewise.
  3136. * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
  3137. IFUNC symbol name.
  3138. (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
  3139. when generating R_X86_64_IRELATIVE relocation.
  3140. (elf_x86_64_finish_dynamic_symbol): Likewise.
  3141. 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
  3142. * elf.c (setup_group): Make sure BFD sections are created for all
  3143. group sections in the input file when processing SHF_GROUP
  3144. sections.
  3145. (bfd_section_from_shdr): Avoid duplicating logic already
  3146. implemented in `setup_group'.
  3147. 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
  3148. PR binutils/21546
  3149. * peXXigen.c (pe_print_idata): Use the address of the first thunk
  3150. if the hint address is zero.
  3151. 2017-06-06 James Clarke <jrtc27@jrtc27.com>
  3152. PR ld/19579
  3153. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
  3154. ELF_COMMON_DEF_P for common symbols.
  3155. 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
  3156. * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
  3157. SEC_GROUP sections as SEC_EXCLUDE.
  3158. (bfd_elf_set_group_contents): Replace use of abort with an assert.
  3159. (assign_section_numbers): Use resolve_section_groups flag instead
  3160. of relocatable link type.
  3161. (_bfd_elf_init_private_section_data): Use resolve_section_groups
  3162. flag instead of checking the final_link flag for part of the
  3163. checks in here. Fix white space as a result.
  3164. * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
  3165. instead of relocatable link type.
  3166. (bfd_elf_final_link): Likewise.
  3167. 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
  3168. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
  3169. variable `bed'.
  3170. * elf32-score.c (score_elf_final_link_relocate): Likewise.
  3171. (s3_bfd_score_elf_check_relocs): Likewise.
  3172. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
  3173. (score_elf_final_link_relocate): Likewise.
  3174. (s7_bfd_score_elf_check_relocs): Likewise.
  3175. 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
  3176. * elflink.c (init_reloc_cookie_rels): Remove unused variable
  3177. `bed'.
  3178. 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
  3179. * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
  3180. from `reloc_count' rather than decrementing it.
  3181. * elf.c (bfd_section_from_shdr): Multiply the adjustment to
  3182. `reloc_count' by `int_rels_per_ext_rel'.
  3183. * elf32-score.c (score_elf_final_link_relocate): Do not multiply
  3184. `reloc_count' by `int_rels_per_ext_rel' for last relocation
  3185. entry determination.
  3186. (s3_bfd_score_elf_check_relocs): Likewise.
  3187. * elf32-score7.c (score_elf_final_link_relocate): Likewise.
  3188. (s7_bfd_score_elf_relocate_section): Likewise.
  3189. (s7_bfd_score_elf_check_relocs): Likewise.
  3190. * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
  3191. prototype and function.
  3192. (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
  3193. (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
  3194. triple rather than once the sum of REL and RELA relocation entry
  3195. counts.
  3196. (bfd_elf64_get_reloc_upper_bound): Remove macro.
  3197. * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
  3198. `reloc_count' by `int_rels_per_ext_rel' for internal relocation
  3199. storage allocation size determination.
  3200. (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
  3201. size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
  3202. by `int_rels_per_ext_rel' for last relocation entry
  3203. determination.
  3204. (bfd_elf_final_link): Do not multiply `reloc_count' by
  3205. `int_rels_per_ext_rel' for internal relocation storage
  3206. allocation size determination.
  3207. (init_reloc_cookie_rels): Do not multiply `reloc_count' by
  3208. `int_rels_per_ext_rel' for last relocation entry determination.
  3209. (elf_gc_smash_unused_vtentry_relocs): Likewise.
  3210. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
  3211. (_bfd_mips_elf_relocate_section): Likewise.
  3212. 2017-06-05 Alan Modra <amodra@gmail.com>
  3213. PR 21529
  3214. * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
  3215. 2017-06-01 John Baldwin <jhb@FreeBSD.org>
  3216. * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
  3217. determine structure sizes.
  3218. (elfcore_grok_freebsd_prstatus): Likewise.
  3219. 2017-06-01 Alan Modra <amodra@gmail.com>
  3220. * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
  3221. (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
  3222. dynamic objects.
  3223. (is_elfv2_localentry0): New function.
  3224. (ppc64_elf_tls_setup): Default params->plt_localentry0.
  3225. (plt_stub_size): Adjust size for tls_get_addr_opt stub.
  3226. (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
  3227. (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
  3228. optimized localentry:0 stubs.
  3229. (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
  3230. (ppc64_elf_relocate_section): Leave nop unchanged for optimized
  3231. localentry:0 stubs.
  3232. (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
  3233. DT_PPC64_OPT.
  3234. * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
  3235. 2017-05-30 Casey Smith <clegg89@gmail.com>
  3236. PR ld/21523
  3237. * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
  3238. value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
  3239. 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
  3240. * cpu-arc.c (arc_compatible): New function.
  3241. 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
  3242. * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
  3243. 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
  3244. PR binutils/21519
  3245. * bfdio.c (bfd_get_file_size): New function.
  3246. * bfd-in2.h: Regenerated.
  3247. 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
  3248. * elf32-arc.c (arc_elf_merge_attributes): Add fall through
  3249. comments.
  3250. 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
  3251. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
  3252. dynobj instead of htab->elf.dynobj.
  3253. 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
  3254. * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
  3255. and function.
  3256. (mips_elf64_canonicalize_dynamic_reloc): Likewise.
  3257. (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
  3258. actual number of internal relocations retrieved. Adjust
  3259. function description.
  3260. (bfd_elf64_canonicalize_reloc): Remove macro.
  3261. (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
  3262. 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
  3263. * archures.c (bfd_mach_sparc_v9m8): Define.
  3264. (bfd_mach_sparc_v8plusm8): Likewise.
  3265. (bfd_mach_sparc_v9_p): Adjust to M8.
  3266. (bfd_mach_sparc_64bit_p): Likewise.
  3267. * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
  3268. bfd_mach_sparc_v8plusm8.
  3269. * bfd-in2.h: Regenerated.
  3270. * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
  3271. sparc:v8plusm8.
  3272. * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
  3273. bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
  3274. capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
  3275. SHA3.
  3276. * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
  3277. bfd_mach_sparc_v8plusm8.
  3278. 2017-05-19 Alan Modra <amodra@gmail.com>
  3279. * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
  3280. debug and special sections when no non-note alloc sections in an
  3281. object are kept.
  3282. 2017-05-18 Alan Modra <amodra@gmail.com>
  3283. * arc-got.h: Don't compare boolean values against TRUE or FALSE.
  3284. * elf-m10300.c: Likewise.
  3285. * elf.c: Likewise.
  3286. * elf32-arc.c: Likewise.
  3287. * elf32-bfin.c: Likewise.
  3288. * elf32-m68k.c: Likewise.
  3289. * elf32-nds32.c: Likewise.
  3290. * elf32-tilepro.c: Likewise.
  3291. * elflink.c: Likewise.
  3292. * elfnn-aarch64.c: Likewise.
  3293. * elfnn-riscv.c: Likewise.
  3294. * elfxx-tilegx.c: Likewise.
  3295. * mach-o.c: Likewise.
  3296. * peXXigen.c: Likewise.
  3297. * vms-alpha.c: Likewise.
  3298. * vms-lib.c: Likewise.
  3299. 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
  3300. PR ld/20882
  3301. * elflink.c (elf_gc_mark_debug_section): New function.
  3302. (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
  3303. referenced by kept debug sections.
  3304. 2017-05-16 Alan Modra <amodra@gmail.com>
  3305. * elf-m10300.c: Rename occurrences of non_ir_ref.
  3306. * elf32-arm.c: Likewise.
  3307. * elf32-bfin.c: Likewise.
  3308. * elf32-cr16.c: Likewise.
  3309. * elf32-cris.c: Likewise.
  3310. * elf32-d10v.c: Likewise.
  3311. * elf32-dlx.c: Likewise.
  3312. * elf32-fr30.c: Likewise.
  3313. * elf32-frv.c: Likewise.
  3314. * elf32-hppa.c: Likewise.
  3315. * elf32-i370.c: Likewise.
  3316. * elf32-i386.c: Likewise.
  3317. * elf32-iq2000.c: Likewise.
  3318. * elf32-lm32.c: Likewise.
  3319. * elf32-m32c.c: Likewise.
  3320. * elf32-m32r.c: Likewise.
  3321. * elf32-m68hc1x.c: Likewise.
  3322. * elf32-m68k.c: Likewise.
  3323. * elf32-mcore.c: Likewise.
  3324. * elf32-metag.c: Likewise.
  3325. * elf32-microblaze.c: Likewise.
  3326. * elf32-moxie.c: Likewise.
  3327. * elf32-msp430.c: Likewise.
  3328. * elf32-mt.c: Likewise.
  3329. * elf32-nios2.c: Likewise.
  3330. * elf32-or1k.c: Likewise.
  3331. * elf32-ppc.c: Likewise.
  3332. * elf32-rl78.c: Likewise.
  3333. * elf32-s390.c: Likewise.
  3334. * elf32-score.c: Likewise.
  3335. * elf32-score7.c: Likewise.
  3336. * elf32-sh.c: Likewise.
  3337. * elf32-tic6x.c: Likewise.
  3338. * elf32-tilepro.c: Likewise.
  3339. * elf32-v850.c: Likewise.
  3340. * elf32-vax.c: Likewise.
  3341. * elf32-xstormy16.c: Likewise.
  3342. * elf32-xtensa.c: Likewise.
  3343. * elf64-alpha.c: Likewise.
  3344. * elf64-hppa.c: Likewise.
  3345. * elf64-ia64-vms.c: Likewise.
  3346. * elf64-mmix.c: Likewise.
  3347. * elf64-ppc.c: Likewise.
  3348. * elf64-s390.c: Likewise.
  3349. * elf64-sh64.c: Likewise.
  3350. * elf64-x86-64.c: Likewise.
  3351. * elflink.c: Likewise.
  3352. * elfnn-aarch64.c: Likewise.
  3353. * elfnn-ia64.c: Likewise.
  3354. * elfnn-riscv.c: Likewise.
  3355. * elfxx-mips.c: Likewise.
  3356. * elfxx-sparc.c: Likewise.
  3357. * elfxx-tilegx.c: Likewise.
  3358. * linker.c: Likewise.
  3359. 2017-05-16 Alan Modra <amodra@gmail.com>
  3360. * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
  3361. * elflink.c (elf_link_add_object_symbols): Update to use
  3362. non_ir_ref_dynamic.
  3363. (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
  3364. non_ir_ref.
  3365. * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
  3366. 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
  3367. * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
  3368. 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
  3369. * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
  3370. GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
  3371. properties.
  3372. * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
  3373. 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
  3374. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
  3375. to plt_second.
  3376. (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
  3377. to plt_second/plt_second_eh_frame.
  3378. (elf_x86_64_link_hash_newfunc): Updated.
  3379. (elf_x86_64_allocate_dynrelocs): Likewise.
  3380. (elf_x86_64_size_dynamic_sections): Likewise.
  3381. (elf_x86_64_relocate_section): Likewise.
  3382. (elf_x86_64_finish_dynamic_symbol): Likewise.
  3383. (elf_x86_64_finish_dynamic_sections): Likewise.
  3384. (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
  3385. (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
  3386. .plt.sec section.
  3387. (elf_backend_setup_gnu_properties): Updated. Create the
  3388. .plt.sec section instead of the .plt.sec section.
  3389. 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
  3390. * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
  3391. commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
  3392. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
  3393. 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
  3394. * elf64-sparc.c (elf64_sparc_set_reloc): New function.
  3395. (bfd_elf64_set_reloc): Define.
  3396. (elf64_sparc_write_relocs): Use `canon_reloc_count'.
  3397. 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
  3398. * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
  3399. (struct bfd_target): New field _bfd_set_reloc.
  3400. * bfd.c (bfd_set_reloc): Call backend _set_bfd.
  3401. * reloc.c (_bfd_generic_set_reloc): New function.
  3402. * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
  3403. * nlm-target.h (nlm_set_reloc): Likewise.
  3404. * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
  3405. * aout-tic30.c (MY_set_reloc): Likewise.
  3406. * aout-target.h (MY_set_reloc): Likewise.
  3407. * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
  3408. * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
  3409. * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
  3410. * vms-alpha.c (alpha_vms_set_reloc): Likewise.
  3411. * aout-adobe.c (aout_32_set_reloc): Likewise.
  3412. * bout.c (b_out_set_reloc): Likewise.
  3413. * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
  3414. * i386os9k.c (aout_32_set_reloc): Likewise.
  3415. * ieee.c (ieee_set_reloc): Likewise.
  3416. * oasys.c (oasys_set_reloc): Likewise.
  3417. * som.c (som_set_reloc): Likewise.
  3418. * versados.c (versados_set_reloc): Likewise.
  3419. * coff64-rs6000.c (rs6000_xcoff64_vec): Add
  3420. _bfd_generic_set_reloc.
  3421. (rs6000_xcoff64_aix_vec): LIkewise.
  3422. * libbfd.c (_bfd_norelocs_set_reloc): New function.
  3423. * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
  3424. * i386msdos.c (msdos_set_reloc): Define to
  3425. _bfd_norelocs_set_reloc.
  3426. * elfcode.h (elf_set_reloc): Define.
  3427. * bfd-in2.h: Regenerated.
  3428. 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
  3429. PR ld/21481
  3430. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
  3431. for IFUNC function address.
  3432. 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
  3433. * elf32-arc.c (FEATURE_LIST_NAME): Define.
  3434. (CONFLICT_LIST): Likewise.
  3435. (opcode/arc-attrs.h): Include.
  3436. (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
  3437. (arc_extract_features): New file.
  3438. (arc_stralloc): Likewise.
  3439. (arc_elf_merge_attributes): Likewise.
  3440. (arc_elf_merge_private_bfd_data): Use object attributes.
  3441. (bfd_arc_get_mach_from_attributes): New function.
  3442. (arc_elf_object_p): Use object attributes.
  3443. (arc_elf_final_write_processing): Likewise.
  3444. (elf32_arc_obj_attrs_arg_type): New function.
  3445. (elf32_arc_obj_attrs_handle_unknown): Likewise.
  3446. (elf32_arc_section_from_shdr): Likewise.
  3447. (elf_backend_obj_attrs_vendor): Define.
  3448. (elf_backend_obj_attrs_section): Likewise.
  3449. (elf_backend_obj_attrs_arg_type): Likewise.
  3450. (elf_backend_obj_attrs_section_type): Likewise.
  3451. (elf_backend_obj_attrs_handle_unknown): Likewise.
  3452. (elf_backend_section_from_shdr): Likewise.
  3453. 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
  3454. PR ld/21458
  3455. * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
  3456. of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
  3457. and the destination is a Thumb symbol.
  3458. 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
  3459. * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
  3460. initializer to silence GCC 4.2.
  3461. * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
  3462. 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
  3463. * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
  3464. (LAZY_PLT_ENTRY_SIZE): This.
  3465. (NON_LAZY_PLT_ENTRY_SIZE): New.
  3466. (elf_x86_64_plt0_entry): Renamed to ...
  3467. (elf_x86_64_lazy_plt0_entry): This.
  3468. (elf_x86_64_plt_entry): Renamed to ...
  3469. (elf_x86_64_lazy_plt_entry): This.
  3470. (elf_x86_64_bnd_plt0_entry): Renamed to ...
  3471. (elf_x86_64_lazy_bnd_plt0_entry): This.
  3472. (elf_x86_64_legacy_plt_entry): Removed.
  3473. (elf_x86_64_bnd_plt_entry): Renamed to ...
  3474. (elf_x86_64_lazy_bnd_plt_entry): This.
  3475. (elf_x86_64_legacy_plt2_entry): Renamed to ...
  3476. (elf_x86_64_non_lazy_plt_entry): This.
  3477. (elf_x86_64_bnd_plt2_entry): Renamed to ...
  3478. (elf_x86_64_non_lazy_bnd_plt_entry): This.
  3479. (elf_x86_64_eh_frame_plt): Renamed to ...
  3480. (elf_x86_64_eh_frame_lazy_plt): This.
  3481. (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
  3482. (elf_x86_64_eh_frame_lazy_bnd_plt): This.
  3483. (elf_x86_64_eh_frame_plt_got): Renamed to ...
  3484. (elf_x86_64_eh_frame_non_lazy_plt): This.
  3485. (elf_x86_64_lazy_plt_layout): New.
  3486. (elf_x86_64_non_lazy_plt_layout): Likewise.
  3487. (elf_x86_64_plt_layout): Likewise.
  3488. (elf_x86_64_backend_data): Remove PLT layout information. Add
  3489. os for target system.
  3490. (GET_PLT_ENTRY_SIZE): Removed.
  3491. (elf_x86_64_lazy_plt): New.
  3492. (elf_x86_64_non_lazy_plt): Likewise.
  3493. (elf_x86_64_lazy_bnd_plt): Likewise.
  3494. (elf_x86_64_non_lazy_bnd_plt): Likewise.
  3495. (elf_x86-64_arch_bed): Updated.
  3496. (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
  3497. (elf_x86_64_create_dynamic_sections): Removed.
  3498. (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
  3499. _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
  3500. (elf_x86-64_adjust_dynamic_symbol): Updated.
  3501. (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
  3502. size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
  3503. size for PLT0 if there is no PLT0. Get plt_entry_size from
  3504. non_lazy_plt for non-lazy PLT entries.
  3505. (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
  3506. from non_lazy_plt for non-lazy PLT entries.
  3507. (elf_x86-64_relocate_section): Updated. Properly get PLT index
  3508. if there is no PLT0.
  3509. (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
  3510. in the PLT entry with generic PLT layout. Fill the non-lazy PLT
  3511. entries with non-lazy PLT layout. Don't fill the second and third
  3512. slots in the PLT entry if there is no PLT0.
  3513. (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
  3514. if there is no PLT0. Set sh_entsize on the .plt.got section.
  3515. (compare_relocs): New.
  3516. (elf_x86_64_plt_type): Likewise.
  3517. (elf_x86_64_plt): Likewise.
  3518. (elf_x86_64_nacl_plt): New. Forward declaration.
  3519. (elf_x86_64_get_plt_sym_val): Removed.
  3520. (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
  3521. against all dynamic relocations.
  3522. (elf_x86_64_link_setup_gnu_properties): New function.
  3523. (elf_backend_create_dynamic_sections): Updated.
  3524. (elf_backend_setup_gnu_properties): New.
  3525. (elf_x86_64_nacl_plt): New.
  3526. (elf_x86_64_nacl_arch_bed): Updated.
  3527. 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
  3528. * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
  3529. (LAZY_PLT_ENTRY_SIZE): This.
  3530. (NON_LAZY_PLT_ENTRY_SIZE): New.
  3531. (elf_i386_plt0_entry): Renamed to ...
  3532. (elf_i386_lazy_plt0_entry): This.
  3533. (elf_i386_plt_entry): Renamed to ...
  3534. (elf_i386_lazy_plt_entry): This.
  3535. (elf_i386_pic_plt0_entry): Renamed to ...
  3536. (elf_i386_pic_lazy_plt0_entry): This.
  3537. (elf_i386_pic_plt_entry): Renamed to ...
  3538. (elf_i386_pic_lazy_plt_entry): This.
  3539. (elf_i386_got_plt_entry): Renamed to ...
  3540. (elf_i386_non_lazy_plt_entry): This.
  3541. (elf_i386_pic_got_plt_entry): Renamed to ...
  3542. (elf_i386_pic_non_lazy_plt_entry): This.
  3543. (elf_i386_eh_frame_plt): Renamed to ...
  3544. (elf_i386_eh_frame_lazy_plt): This.
  3545. (elf_i386_eh_frame_plt_got): Renamed to ...
  3546. (elf_i386_eh_frame_non_lazy_plt): This.
  3547. (elf_i386_plt_layout): Renamed to ...
  3548. (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
  3549. eh_frame_plt_got_size.
  3550. (elf_i386_non_lazy_plt_layout): New.
  3551. (elf_i386_plt_layout): Likewise.
  3552. (elf_i386_non_lazy_plt): Likewise.
  3553. (GET_PLT_ENTRY_SIZE): Removed.
  3554. (elf_i386_plt): Renamed to ...
  3555. (elf_i386_lazy_plt): This.
  3556. (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
  3557. (elf_i386_arch_bed): Updated.
  3558. (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
  3559. (elf_i386_create_dynamic_sections): Removed.
  3560. (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
  3561. _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
  3562. (elf_i386_adjust_dynamic_symbol): Updated.
  3563. (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
  3564. size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
  3565. size for PLT0 if there is no PLT0.
  3566. (elf_i386_size_dynamic_sections): Updated. Check whether GOT
  3567. output section is discarded only if GOT isn't empty.
  3568. (elf_i386_relocate_section): Updated. Properly get PLT index
  3569. if there is no PLT0.
  3570. (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
  3571. second and third slots in the PLT entry if there is no PLT0.
  3572. (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
  3573. if there is no PLT0. Set sh_entsize on the .plt.got section.
  3574. (elf_i386_nacl_plt): Forward declaration.
  3575. (elf_i386_get_plt_sym_val): Removed.
  3576. (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
  3577. against all dynamic relocations.
  3578. (elf_i386_link_setup_gnu_properties): New function.
  3579. (elf_backend_create_dynamic_sections): Updated.
  3580. (elf_backend_setup_gnu_properties): New.
  3581. (elf_i386_nacl_plt): Updated.
  3582. (elf_i386_nacl_arch_bed): Likewise.
  3583. (elf_i386_vxworks_arch_bed): Likewise.
  3584. 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
  3585. * elflink.c (elf_output_implib): Remove executable flag from import
  3586. library bfd.
  3587. * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
  3588. library is a relocatable object file.
  3589. 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
  3590. PR ld/21404
  3591. * elf32-avr.c (avr_should_move_sym): New function.
  3592. (avr_should_reduce_sym_size): Likewise.
  3593. (avr_should_increase_sym_size): Likewise.
  3594. (elf32_avr_relax_delete_bytes): Adjust symbol values
  3595. and sizes by calling new functions.
  3596. 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
  3597. * config.bfd (riscv32-*): Enable rv64.
  3598. 2017-05-02 Alan Modra <amodra@gmail.com>
  3599. PR 21384
  3600. * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
  3601. rather than h->root.type == bfd_link_hash_new.
  3602. (bfd_elf_record_link_assignment): Similarly, call
  3603. bfd_elf_link_mark_dynamic_symbol when h->non_elf.
  3604. 2017-04-29 Alan Modra <amodra@gmail.com>
  3605. PR 21432
  3606. * reloc.c (reloc_offset_in_range): New function.
  3607. (bfd_perform_relocation, bfd_install_relocation): Use it.
  3608. (_bfd_final_link_relocate): Likewise.
  3609. 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
  3610. * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
  3611. before using .plt.got.
  3612. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
  3613. 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
  3614. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
  3615. instead of "+=" to update 0.
  3616. 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
  3617. * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
  3618. .plt.got section here.
  3619. (elf_i386_check_relocs): Don't create the .plt.got section.
  3620. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
  3621. the .plt.got and .plt.bnd sections here.
  3622. (elf_x86_64_check_relocs): Don't create the .plt.got nor
  3623. .plt.bnd sections.
  3624. 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
  3625. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
  3626. has_bnd_reloc.
  3627. (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
  3628. (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
  3629. (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
  3630. (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
  3631. has_bnd_reloc.
  3632. 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
  3633. * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
  3634. to return bfd *.
  3635. (_bfd_elf_link_setup_gnu_properties): Return bfd *.
  3636. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
  3637. the first relocatable ELF input with GNU properties.
  3638. 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
  3639. * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
  3640. VxWorks for non-PIC.
  3641. 2017-04-27 Alan Modra <amodra@gmail.com>
  3642. * elf-bfd.h (struct elf_backend_data): Make asection param of
  3643. elf_backend_eh_frame_address_size const.
  3644. (_bfd_elf_eh_frame_address_size): Likewise.
  3645. * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
  3646. * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
  3647. * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
  3648. * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
  3649. * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
  3650. (next_cie_fde_offset): Constify params.
  3651. (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
  3652. 2017-04-27 Alan Modra <amodra@gmail.com>
  3653. * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
  3654. (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
  3655. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
  3656. aug_data_len.
  3657. (offset_adjust): New function.
  3658. (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
  3659. (adjust_eh_frame_local_symbols): Likewise.
  3660. (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
  3661. after changing anything. Return true if anything changed.
  3662. * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
  3663. _bfd_elf_adjust_eh_frame_global_symbol for globals.
  3664. 2017-04-27 Alan Modra <amodra@gmail.com>
  3665. * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
  3666. when force_local.
  3667. 2017-04-27 Alan Modra <amodra@gmail.com>
  3668. * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
  3669. (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
  3670. (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
  3671. (ppc_elf_relocate_section): Likewise. Delete silly optimisation
  3672. for undef and undefweak dyn_relocs.
  3673. * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
  3674. (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
  3675. (allocate_got, allocate_dynrelocs): Likewise.
  3676. (ppc64_elf_relocate_section): Likewise.
  3677. 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
  3678. * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
  3679. DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
  3680. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
  3681. add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
  3682. 2017-04-26 Nick Clifton <nickc@redhat.com>
  3683. PR binutils/21434
  3684. * reloc.c (bfd_perform_relocation): Check for a negative address
  3685. in the reloc.
  3686. 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
  3687. PR ld/21334
  3688. * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
  3689. member.
  3690. * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
  3691. (elf_backend_always_renumber_dynsyms): Define.
  3692. (elfNN_bed): Initialize `always_renumber_dynsyms' member.
  3693. * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
  3694. * elflink.c (bfd_elf_size_dynamic_sections): Also call
  3695. `_bfd_elf_link_renumber_dynsyms' if the backend has requested
  3696. it.
  3697. (bfd_elf_size_dynsym_hash_dynstr): Likewise.
  3698. 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
  3699. * elflink.c (bfd_elf_size_dynamic_sections): Only call
  3700. `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
  3701. sections have been created.
  3702. 2017-04-26 Nick Clifton <nickc@redhat.com>
  3703. PR binutils/21431
  3704. * compress.c (bfd_init_section_compress_status): Check the return
  3705. value from bfd_malloc.
  3706. 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
  3707. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
  3708. no_finish_dynamic_symbol.
  3709. (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
  3710. 0.
  3711. (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
  3712. weak symbol, don't make it dynamic.
  3713. (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
  3714. set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
  3715. relocation for GOT reference.
  3716. (elf_x86_64_finish_dynamic_symbol): Abort if
  3717. no_finish_dynamic_symbol isn't 0.
  3718. 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
  3719. PR ld/21402
  3720. * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
  3721. undefined weak symbol, don't make it dynamic.
  3722. (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
  3723. set no_finish_dynamic_symbol and generate R_386_RELATIVE
  3724. relocation for R_386_GOT32.
  3725. 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
  3726. PR ld/21425
  3727. * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
  3728. 2017-04-23 Alan Modra <amodra@gmail.com>
  3729. PR 21414
  3730. * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
  3731. * elf.c (lcomm_sym): New.
  3732. (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
  3733. * bfd-in2.h: Regenerate.
  3734. 2017-04-23 Alan Modra <amodra@gmail.com>
  3735. PR 21412
  3736. * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
  3737. parameters and comment.
  3738. (_bfd_elf_get_reloc_section): Delete.
  3739. (_bfd_elf_plt_get_reloc_section): Declare.
  3740. * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
  3741. New functions. Don't blindly skip over assumed .rel/.rela prefix.
  3742. Extracted from..
  3743. (_bfd_elf_get_reloc_section): ..here. Delete.
  3744. (assign_section_numbers): Call elf_get_reloc_section.
  3745. * elf64-ppc.c (elf_backend_get_reloc_section): Define.
  3746. * elfxx-target.h (elf_backend_get_reloc_section): Update.
  3747. 2017-04-23 Alan Modra <amodra@gmail.com>
  3748. PR 21409
  3749. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
  3750. no symbols.
  3751. 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
  3752. PR ld/21402
  3753. * elf32-i386.c (elf_i386_link_hash_entry): Add
  3754. no_finish_dynamic_symbol.
  3755. (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
  3756. (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
  3757. symbol, don't make it dynamic in PIE.
  3758. (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
  3759. set no_finish_dynamic_symbol and generate R_386_RELATIVE
  3760. relocation for R_386_GOT32
  3761. (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
  3762. isn't 0.
  3763. 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
  3764. PR ld/19617
  3765. PR ld/21086
  3766. * elflink.c (elf_link_add_object_symbols): Require
  3767. --no-dynamic-linker with -E/--dynamic-list when creating
  3768. dynamic sections.
  3769. 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
  3770. * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
  3771. if forced local.
  3772. 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
  3773. * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
  3774. dynamic symbol sorting.
  3775. 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
  3776. PR ld/21382
  3777. * elflink.c (elf_link_add_object_symbols): Preserve
  3778. dynamic_ref_after_ir_def when restoring the symbol table for
  3779. unneeded dynamic object.
  3780. 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
  3781. PR ld/21401
  3782. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
  3783. on on undefined IFUNC symbol in the second PLT.
  3784. 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
  3785. * peXXigen.c (pe_print_reloc): Correct chunk_end.
  3786. 2017-04-19 Alan Modra <amodra@gmail.com>
  3787. * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
  3788. or make dynamic for info->dynamic_undefined_weak 0 and 1.
  3789. * elf32-ppc.c:Formatting.
  3790. (ensure_undefweak_dynamic): Don't make dynamic when
  3791. info->dynamic_undefined_weak is zero.
  3792. (allocate_dynrelocs): Discard undefweak dyn_relocs for
  3793. info->dynamic_undefined_weak. Discard undef dyn_relocs when
  3794. not default visibility. Discard undef and undefweak
  3795. dyn_relocs earlier.
  3796. (ppc_elf_relocate_section): Adjust to suit.
  3797. * elf64-ppc.c: Formatting.
  3798. (ensure_undefweak_dynamic): Don't make dynamic when
  3799. info->dynamic_undefined_weak is zero.
  3800. (allocate_dynrelocs): Discard undefweak dyn_relocs for
  3801. info->dynamic_undefined_weak. Discard them earlier.
  3802. 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
  3803. PR ld/21389
  3804. * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
  3805. before generating the version definition section.
  3806. 2017-04-17 Alan Modra <amodra@gmail.com>
  3807. * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
  3808. state when a regular object file defines a symbol with
  3809. incompatible type to that defined by an earlier shared lib.
  3810. 2017-04-13 Alan Modra <amodra@gmail.com>
  3811. * coffcode.h: Wrap some overly long _bfd_error_handler args.
  3812. * elf.c: Likewise.
  3813. * elf32-arm.c: Likewise.
  3814. * elf32-i386.c: Likewise.
  3815. * elf32-mep.c: Likewise.
  3816. * elf64-ia64-vms.c: Likewise.
  3817. * elf64-x86-64.c: Likewise.
  3818. * elflink.c: Likewise.
  3819. * elfnn-ia64.c: Likewise.
  3820. * elfxx-mips.c: Likewise.
  3821. 2017-04-13 Alan Modra <amodra@gmail.com>
  3822. * aoutx.h: Use %B and %A in error messages throughout file.
  3823. * aout-cris.c: Likewise.
  3824. * archive.c: Likewise.
  3825. * binary.c: Likewise.
  3826. * coff-rs6000.c: Likewise.
  3827. * coff-tic4x.c: Likewise.
  3828. * coffcode.h: Likewise.
  3829. * coffgen.c: Likewise.
  3830. * cofflink.c: Likewise.
  3831. * coffswap.h: Likewise.
  3832. * cpu-arm.c: Likewise.
  3833. * elf-eh-frame.c: Likewise.
  3834. * elf-m10300.c: Likewise.
  3835. * elf.c: Likewise.
  3836. * elf32-arc.c: Likewise.
  3837. * elf32-arm.c: Likewise.
  3838. * elf32-bfin.c: Likewise.
  3839. * elf32-frv.c: Likewise.
  3840. * elf32-iq2000.c: Likewise.
  3841. * elf32-m32c.c: Likewise.
  3842. * elf32-microblaze.c: Likewise.
  3843. * elf32-nds32.c: Likewise.
  3844. * elf32-rl78.c: Likewise.
  3845. * elf32-rx.c: Likewise.
  3846. * elf32-score.c: Likewise.
  3847. * elf32-score7.c: Likewise.
  3848. * elf32-sh64.c: Likewise.
  3849. * elf32-v850.c: Likewise.
  3850. * elf32-vax.c: Likewise.
  3851. * elf32-visium.c: Likewise.
  3852. * elf64-ia64-vms.c: Likewise.
  3853. * elf64-mmix.c: Likewise.
  3854. * elf64-sh64.c: Likewise.
  3855. * elfcode.h: Likewise.
  3856. * elfnn-aarch64.c: Likewise.
  3857. * elfnn-ia64.c: Likewise.
  3858. * elfxx-mips.c: Likewise.
  3859. * hpux-core.c: Likewise.
  3860. * ieee.c: Likewise.
  3861. * ihex.c: Likewise.
  3862. * linker.c: Likewise.
  3863. * merge.c: Likewise.
  3864. * mmo.c: Likewise.
  3865. * oasys.c: Likewise.
  3866. * pdp11.c: Likewise.
  3867. * peXXigen.c: Likewise.
  3868. * rs6000-core.c: Likewise.
  3869. * vms-alpha.c: Likewise.
  3870. * xcofflink.c: Likewise.
  3871. 2017-04-13 Alan Modra <amodra@gmail.com>
  3872. * bfd.c (PRINT_TYPE): Define.
  3873. (_doprnt): New function.
  3874. (error_handler_internal): Use _doprnt.
  3875. * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
  3876. calls in their natural order, throughout file.
  3877. * coff-mcore.c: Likewise.
  3878. * coff-ppc.c: Likewise.
  3879. * coff-tic80.c: Likewise.
  3880. * cofflink.c: Likewise.
  3881. * elf-s390-common.c: Likewise.
  3882. * elf.c: Likewise.
  3883. * elf32-arm.c: Likewise.
  3884. * elf32-i386.c: Likewise.
  3885. * elf32-m32r.c: Likewise.
  3886. * elf32-msp430.c: Likewise.
  3887. * elf32-spu.c: Likewise.
  3888. * elf64-ia64-vms.c: Likewise.
  3889. * elf64-sparc.c: Likewise.
  3890. * elf64-x86-64.c: Likewise.
  3891. * elflink.c: Likewise.
  3892. * elfnn-aarch64.c: Likewise.
  3893. * elfnn-ia64.c: Likewise.
  3894. * elfxx-mips.c: Likewise.
  3895. 2017-04-13 Alan Modra <amodra@gmail.com>
  3896. * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
  3897. branch veneers" error. Fix double space and format message.
  3898. * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
  3899. * elf64-ppc.c (tocsave_find): Supply missing %B arg.
  3900. 2017-04-13 Alan Modra <amodra@gmail.com>
  3901. * bfd-in2.h: Regenerate.
  3902. 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
  3903. * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
  3904. extra `\n' in warning/error messages.
  3905. * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
  3906. * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
  3907. 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
  3908. * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
  3909. processor-specific properties with generic ELF target vector.
  3910. 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
  3911. * elf32-sparc.c (elf_backend_fixup_symbol): New.
  3912. * elf64-sparc.c (elf_backend_fixup_symbol): New.
  3913. * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
  3914. (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
  3915. has_non_got_reloc.
  3916. (link_hash_newfunc): Initialize has_got_reloc and
  3917. has_non_got_reloc.
  3918. (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
  3919. section.
  3920. (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
  3921. has_non_got_reloc.
  3922. (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
  3923. has_non_got_reloc.
  3924. (_bfd_sparc_elf_fixup_symbol): New function.
  3925. (allocate_dynrelocs): Don't allocate space for dynamic
  3926. relocations and discard relocations against resolved undefined
  3927. weak symbols in executable. Don't make resolved undefined weak
  3928. symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
  3929. relocation against undefined weak symbols in PIE.
  3930. (_bfd_sparc_elf_relocate_section): Don't generate dynamic
  3931. relocations against resolved undefined weak symbols in PIE
  3932. (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
  3933. without ynamic PLT/GOT relocations for resolved undefined weak
  3934. symbols.
  3935. Don't generate dynamic relocation against resolved undefined
  3936. weak symbol in executable.
  3937. (pie_finish_undefweak_symbol): New function.
  3938. (_bfd_sparc_elf_finish_dynamic_sections): Call
  3939. pie_finish_undefweak_symbol on all symbols in PIE.
  3940. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
  3941. (_bfd_sparc_elf_fixup_symbol): New function.
  3942. 2017-04-10 Nick Clifton <nickc@redhat.com>
  3943. * config.bfd: Remove ns32k from obsolete list.
  3944. 2017-04-10 Alan Modra <amodra@gmail.com>
  3945. PR 21287
  3946. * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
  3947. (special_sections_i): Likewise for .init_array.
  3948. (special_sections_p): Likewise for .preinit_array.
  3949. 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
  3950. PR ld/19579
  3951. PR ld/21306
  3952. * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
  3953. ELF_COMMON_DEF_P for common symbols.
  3954. * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
  3955. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  3956. * elflink.c (_bfd_elf_merge_symbol): Revert commits
  3957. 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
  3958. 07492f668d2173da7a2bda3707ff0985e0f460b6.
  3959. 2017-04-07 Pedro Alves <palves@redhat.com>
  3960. * opncls.c (bfd_get_debug_link_info): Rename to...
  3961. (bfd_get_debug_link_info_1): ... this. Change type of second
  3962. parameter to void pointer. Adjust.
  3963. (bfd_get_debug_link_info): Reimplement on top of
  3964. bfd_get_debug_link_info_1.
  3965. (separate_debug_file_exists, separate_alt_debug_file_exists):
  3966. Change type of second parameter to void pointer. Adjust.
  3967. (get_func_type, check_func_type): Change type of second parameter
  3968. to void pointer.
  3969. (find_separate_debug_file): Add 'func_data' parameter. Pass it to
  3970. the callback functions instead of passing the address of a local.
  3971. (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
  3972. find_separate_debug_file.
  3973. (get_alt_debug_link_info_shim): Change type of second parameter to
  3974. void pointer. Adjust.
  3975. (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
  3976. find_separate_debug_file.
  3977. (get_build_id_name, bfd_boolean check_build_id_file): Change type
  3978. of second parameter to void pointer. Adjust.
  3979. (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
  3980. pointer local to find_separate_debug_file.
  3981. 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
  3982. * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
  3983. external symbols with a definition.
  3984. (_bfd_coff_gc_mark_extra_sections): Fix typo.
  3985. 2017-04-07 Alan Modra <amodra@gmail.com>
  3986. * po/SRC-POTFILES.in: Regenerate.
  3987. 2017-04-05 Alan Modra <amodra@gmail.com>
  3988. * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
  3989. reference counting.
  3990. 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
  3991. (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
  3992. numbers for DataDirectory entry indicies passed to
  3993. add_data_entry().
  3994. 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
  3995. * elf.c (get_program_header_size): Add a GNU_MBIND segment for
  3996. each GNU_MBIND section and align GNU_MBIND section to page size.
  3997. (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
  3998. segment for each GNU_MBIND section.
  3999. (_bfd_elf_init_private_section_data): Copy sh_info from input
  4000. for GNU_MBIND section.
  4001. 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
  4002. * elfnn-riscv.c (GP_NAME): Delete.
  4003. (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
  4004. (_bfd_riscv_relax_lui): Likewise.
  4005. 2017-04-04 Nick Clifton <nickc@redhat.com>
  4006. PR binutils/21342
  4007. * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
  4008. dereference.
  4009. (bfd_elf_final_link): Only initialize the extended symbol index
  4010. section if there are extended symbol tables to list.
  4011. 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
  4012. * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
  4013. (BFD32_BACKENDS_CFILES): Add elf-properties.c.
  4014. * configure.ac (elf): Add elf-properties.lo.
  4015. * Makefile.in: Regenerated.
  4016. * configure: Likewise.
  4017. * elf-bfd.h (elf_property_kind): New.
  4018. (elf_property): Likewise.
  4019. (elf_property_list): Likewise.
  4020. (elf_properties): Likewise.
  4021. (_bfd_elf_parse_gnu_properties): Likewise.
  4022. (_bfd_elf_get_property): Likewise.
  4023. (_bfd_elf_link_setup_gnu_properties): Likewise.
  4024. (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
  4025. and setup_gnu_properties.
  4026. (elf_obj_tdata): Add properties.
  4027. * elf-properties.c: New file.
  4028. * elf32-i386.c (elf_i386_parse_gnu_properties): New.
  4029. (elf_i386_merge_gnu_properties): Likewise.
  4030. (elf_backend_parse_gnu_properties): Likewise.
  4031. (elf_backend_merge_gnu_properties): Likewise.
  4032. * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
  4033. (elf_x86_64_merge_gnu_properties): Likewise.
  4034. (elf_backend_parse_gnu_properties): Likewise.
  4035. (elf_backend_merge_gnu_properties): Likewise.
  4036. * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
  4037. (elf_backend_parse_gnu_properties): Likewise.
  4038. (elf_backend_setup_gnu_properties): Likewise.
  4039. (elfNN_bed): Add elf_backend_parse_gnu_properties,
  4040. elf_backend_merge_gnu_properties and
  4041. elf_backend_setup_gnu_properties.
  4042. 2017-03-30 Pip Cet <pipcet@gmail.com>
  4043. * elf32-wasm32.c: Add relocation code, two relocs.
  4044. * reloc.c: Add wasm32 relocations.
  4045. * libbfd.h: Regenerate.
  4046. * bfd-in2.h: Regenerate.
  4047. * bfd/po/bfd.pot: Regenerate.
  4048. 2017-03-29 Nick Clifton <nickc@redhat.com>
  4049. PR binutils/18025
  4050. * coff-bfd.h (struct coff_section_data): Add new fields:
  4051. saved_bias and bias.
  4052. * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
  4053. computed for PE binaries.
  4054. * dwarf2.c (scan_unit_for_symbols): Only warn once about each
  4055. missing abbrev.
  4056. 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
  4057. PR ld/16044
  4058. * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
  4059. to handle a local symbol with a hash-symbol-entry; without PLT.
  4060. Add BFD_ASSERT for an incidental case with GOT entry present.
  4061. (cris_elf_check_relocs): Increment PLT refcount only if the symbol
  4062. isn't forced-or-set local.
  4063. 2017-03-27 Pip Cet <pipcet@gmail.com>
  4064. * wasm-module.c: New file to support WebAssembly modules.
  4065. * wasm-module.h: New file to support WebAssembly modules.
  4066. * doc/webassembly.texi: Start documenting wasm-module.c.
  4067. * config.bfd: Add wasm_vec.
  4068. * targets.c: Likewise.
  4069. * configure.ac: Likewise.
  4070. * Makefile.am: Add entries for wasm-module.c.
  4071. * Makefile.in: Regenerate.
  4072. * configure: Regenerate.
  4073. * po/SRC-POTFILES.in: Regenerate.
  4074. 2017-03-27 Pip Cet <pipcet@gmail.com>
  4075. * cpu-wasm32.c: New file to support wasm32 architecture.
  4076. * elf32-wasm32.c: New file to support wasm32 architecture.
  4077. * Makefile.am: Add wasm32 architecture.
  4078. * archures.c: Likewise.
  4079. * config.bfd: Likewise.
  4080. * configure.ac: Likewise.
  4081. * targets.c: Likewise.
  4082. * Makefile.in: Regenerate.
  4083. * bfd-in2.h: Regenerate.
  4084. * configure: Regenerate.
  4085. * po/SRC-POTFILES.in: Regenerate.
  4086. 2017-03-20 Alan Modra <amodra@gmail.com>
  4087. PR 21266
  4088. * elf64-ppc.c (compare_symbols): Stabilize sort.
  4089. 2017-03-18 Alan Modra <amodra@gmail.com>
  4090. * elf64-ppc.c (struct ppc_link_hash_table): Add
  4091. local_ifunc_resolver and maybe_local_ifunc_resolver.
  4092. (ppc_build_one_stub): Set flags on emitting dynamic
  4093. relocation to ifunc.
  4094. (ppc64_elf_relocate_section): Likewise.
  4095. (ppc64_elf_finish_dynamic_symbol): Likewise.
  4096. (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
  4097. local dynamic relocs to ifuncs.
  4098. * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
  4099. local_ifunc_resolver and maybe_local_ifunc_resolver.
  4100. (ppc_elf_relocate_section): Set flag on emitting dynamic
  4101. relocation to ifuncs.
  4102. (ppc_elf_finish_dynamic_symbol): Likewise.
  4103. (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
  4104. dynamic relocs to ifuncs.
  4105. 2017-03-13 Nick Clifton <nickc@redhat.com>
  4106. PR binutils/21202
  4107. * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
  4108. BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
  4109. (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
  4110. BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
  4111. * bfd-in2.h: Regenerate.
  4112. * libbfd.h: Regenerate.
  4113. * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
  4114. names.
  4115. (IS_AARCH64_TLSDESC_RELOC): Likewise.
  4116. (elfNN_aarch64_howto_table): Likewise.
  4117. (aarch64_tls_transition_without_check): Likewise.
  4118. (aarch64_reloc_got_type): Likewise.
  4119. (elfNN_aarch64_final_link_relocate): Likewise.
  4120. (elfNN_aarch64_tls_relax): Likewise.
  4121. (elfNN_aarch64_relocate_section): Likewise.
  4122. (elfNN_aarch64_gc_sweep_hook): Likewise.
  4123. (elfNN_aarch64_check_relocs): Likewise.
  4124. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  4125. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  4126. 2017-03-11 Alan Modra <amodra@gmail.com>
  4127. * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
  4128. parameter is in fact used. Whitespace fixes.
  4129. * elf64-ppc.c: Likewise.
  4130. 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
  4131. * rs6000-core.c (CORE_NEW): Simplify macro when
  4132. AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
  4133. 2017-03-07 Alan Modra <amodra@gmail.com>
  4134. PR 21224
  4135. PR 20519
  4136. * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
  4137. dyn_relocs check.
  4138. 2017-03-05 Alan Modra <amodra@gmail.com>
  4139. * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
  4140. * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
  4141. (next_cie_fde_offset): New function.
  4142. (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
  4143. (_bfd_elf_discard_section_eh_frame): Align zero terminator to
  4144. four bytes. Align CIEs to four or eight bytes depending on
  4145. per_encoding_aligned8. Align FDEs according to their encoding.
  4146. Pad last FDE to output section alignment.
  4147. (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
  4148. assertion.
  4149. * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
  4150. (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
  4151. (ppc64_elf_finish_dynamic_sections): Adjust to suit.
  4152. 2017-03-02 Martin Bickel <binutils@ineranves.de>
  4153. PR ld/21212
  4154. * elf.c (rewrite_elf_program_header): Do not issue a warning for
  4155. empty segments which have a zero filesz, but a non-zero memsz.
  4156. 2017-03-02 Alan Modra <amodra@gmail.com>
  4157. * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
  4158. 2017-02-28 Alan Modra <amodra@gmail.com>
  4159. * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
  4160. (ppc64_elf_relocate_section): Likewise.
  4161. 2017-02-28 Alan Modra <amodra@gmail.com>
  4162. PR 20995
  4163. * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
  4164. rather than elf32_nios2_hash_table or elf_hash_table.
  4165. (create_got_section): Likewise.
  4166. (nios2_elf32_finish_dynamic_symbol): Likewise.
  4167. (nios2_elf32_adjust_dynamic_symbol): Likewise.
  4168. (nios2_elf32_size_dynamic_sections): Likewise.
  4169. (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
  4170. vars. Use htab equivalents directly instead. Don't create
  4171. all dynamic sections on needing just the GOT. Use a goto
  4172. rather than a fall-through with reloc test. Ensure
  4173. htab->dynobj is set when making dynamic sreloc section.
  4174. (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
  4175. equivalent directly instead. Don't segfault on looking for
  4176. .dynamic when dynamic sections have not been created. Don't
  4177. segfault on .got.plt being discarded.
  4178. (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
  4179. Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
  4180. fixme and another not so relevant comment.
  4181. (nios2_elf_add_symbol_hook): Delete dynobj var. If not
  4182. already set, set hash table dynobj on creating .sbss.
  4183. 2017-02-28 Alan Modra <amodra@gmail.com>
  4184. * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
  4185. * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
  4186. (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
  4187. (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
  4188. (ppc64_elf_relocate_section): Likewise.
  4189. * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
  4190. (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
  4191. (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
  4192. * libbfd.h: Regenerate.
  4193. * bfd-in2.h: Regenerate.
  4194. 2017-02-28 Alan Modra <amodra@gmail.com>
  4195. * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
  4196. dynamic .data.rel.ro read-only.
  4197. * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
  4198. rather than section flags when deciding where copy reloc goes.
  4199. * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
  4200. * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
  4201. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
  4202. * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
  4203. * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
  4204. * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
  4205. * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
  4206. * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
  4207. * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
  4208. * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
  4209. * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
  4210. * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
  4211. * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
  4212. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
  4213. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
  4214. * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
  4215. * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
  4216. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
  4217. * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
  4218. 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
  4219. * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
  4220. `jalr $0, $25' instruction encoding.
  4221. 2017-02-27 Nick Clifton <nickc@redhat.com>
  4222. PR ld/21180
  4223. * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
  4224. generating a seg-fault when encountering a symbol that has been
  4225. deleted by garbage collection.
  4226. 2017-02-25 Alan Modra <amodra@gmail.com>
  4227. * elf32-arc.c (struct dynamic_sections): Delete.
  4228. (enum dyn_section_types): Delete.
  4229. (dyn_section_names): Delete.
  4230. (arc_create_dynamic_sections): Delete.
  4231. (elf_arc_finish_dynamic_sections): Don't call the above. Don't
  4232. segfault on discarded .rela.plt section.
  4233. (elf_arc_size_dynamic_sections): Formatting. Don't call
  4234. arc_create_dynamic_sections. Don't allocate memory for sections
  4235. handled by the generic linker. Correct code finding relocs in
  4236. read-only sections. Set SEC_EXCLUDE on zero size .got,
  4237. .got.plt, and .dynbss sections. Do set .interp for pies.
  4238. 2017-02-24 Andrew Waterman <andrew@sifive.com>
  4239. * elfnn-riscv.c (GP_NAME): New macro.
  4240. (riscv_global_pointer_value): Use it.
  4241. (_bfd_riscv_relax_lui): If symbol and global pointer are in same
  4242. output section, consider only that section's alignment.
  4243. 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
  4244. * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
  4245. * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
  4246. * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
  4247. * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
  4248. 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
  4249. * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
  4250. <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
  4251. or misaligned.
  4252. 2017-02-23 Alan Modra <amodra@gmail.com>
  4253. PR 20744
  4254. * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
  4255. 16D relocations.
  4256. (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
  4257. (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
  4258. relocs.
  4259. 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
  4260. PR ld/20828
  4261. * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
  4262. processing ahead of the call to `elf_gc_sweep_symbol'.
  4263. 2017-02-22 Nick Clifton <nickc@redhat.com>
  4264. PR binutils/21193
  4265. * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
  4266. created section 4-byte alignment.
  4267. 2017-02-22 Alan Modra <amodra@gmail.com>
  4268. * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
  4269. on .got or .plt output section being discarded by script.
  4270. * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
  4271. vxworks splt temp.
  4272. 2017-02-21 Alan Modra <amodra@gmail.com>
  4273. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
  4274. DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
  4275. 2017-02-20 Alan Modra <amodra@gmail.com>
  4276. PR 21181
  4277. * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
  4278. if DT_RELSZ/DT_RELASZ is zero.
  4279. 2017-02-17 Nick Clifton <nickc@redhat.com>
  4280. * compress.c (bfd_get_full_section_contents): Remember to reduce
  4281. compressed size by the sizeof the compression header when
  4282. decompressing the contents.
  4283. 2017-02-17 Pedro Alves <palves@redhat.com>
  4284. * srec.c (Chunk): Rename to ...
  4285. (_bfd_srec_len): ... this.
  4286. (S3Forced): Rename to ...
  4287. (_bfd_srec_forceS3): ... this.
  4288. * objcopy.c: Adjust all references.
  4289. 2017-02-17 Pedro Alves <palves@redhat.com>
  4290. * archive.c (bsd_write_armap): Rename to ...
  4291. (_bfd_bsd_write_armap): ... this.
  4292. (coff_write_armap): Rename to ...
  4293. (_bfd_coff_write_armap): ... this.
  4294. * libbfd-in.h (bsd_write_armap): Rename to ...
  4295. (_bfd_bsd_write_armap): ... this.
  4296. (coff_write_armap): Rename to ...
  4297. (_bfd_coff_write_armap): ... this.
  4298. * aout-target.h, aout-tic30.c: Adjust all users.
  4299. * libbfd.h: Regenerate.
  4300. 2017-02-17 Pedro Alves <palves@redhat.com>
  4301. * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
  4302. (warn_deprecated): Rename to ...
  4303. (_bfd_warn_deprecated): ... this.
  4304. * libbfd.c (warn_deprecated): Rename to ...
  4305. (_bfd_warn_deprecated): ... this.
  4306. * bfd-in2.h: Regenerate.
  4307. 2017-02-17 Pedro Alves <palves@redhat.com>
  4308. * bfdio.c (real_ftell): Rename to ...
  4309. (_bfd_real_ftell): ... this.
  4310. (real_fseek): Rename to ...
  4311. (_bfd_real_fseek): ... this.
  4312. (real_fopen): Rename to ...
  4313. (_bfd_real_fopen): ... this.
  4314. * libbfd-in.h (real_ftell): Rename to ...
  4315. (_bfd_real_ftell): ... this.
  4316. (real_fseek): Rename to ...
  4317. (_bfd_real_fseek): ... this.
  4318. (real_fopen): Rename to ...
  4319. (_bfd_real_fopen): ... this.
  4320. * cache.c, dwarf2.c, opncls.c: Adjust all callers.
  4321. * libbfd.h: Regenerate.
  4322. 2017-02-17 Pedro Alves <palves@redhat.com>
  4323. * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
  4324. * libbfd.c (read_unsigned_leb128): Rename to ...
  4325. (_bfd_read_unsigned_leb128): ... this.
  4326. (read_signed_leb128): Rename to ...
  4327. (_bfd_read_signed_leb128): ... this.
  4328. (safe_read_leb128): Rename to ...
  4329. (_bfd_safe_read_leb128): ... this.
  4330. * libbfd-in.h (read_unsigned_leb128): Rename to ...
  4331. (_bfd_read_unsigned_leb128): ... this.
  4332. (read_signed_leb128): Rename to ...
  4333. (_bfd_read_signed_leb128): ... this.
  4334. (safe_read_leb128): Rename to ...
  4335. (_bfd_safe_read_leb128): ... this.
  4336. * libbfd.h: Renegerate.
  4337. 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
  4338. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
  4339. before trying to fine matching file and line information.
  4340. 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
  4341. * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
  4342. (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
  4343. not match current bfd, then reload debug information. Record bfd
  4344. we're loading debug info for in the stash. If we have debug
  4345. informatin in the cache then perform section placement before
  4346. returning.
  4347. 2017-02-16 Alan Modra <amodra@gmail.com>
  4348. PR 21000
  4349. * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
  4350. * elfxx-target.h (elf_backend_no_page_alias): Define.
  4351. (elfNN_bed): Init new field.
  4352. * elf.c (assign_file_positions_for_load_sections): If no_page_alias
  4353. ensure PT_LOAD segment starts on a new page.
  4354. * elf32-hppa.c (elf_backend_no_page_alias): Define.
  4355. 2017-02-16 Alan Modra <amodra@gmail.com>
  4356. PR 21132
  4357. * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
  4358. if pic.
  4359. 2017-02-16 Jiong Wang <jiong.wang@arm.com>
  4360. * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
  4361. * bfd-in2.h: Regenerated.
  4362. 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
  4363. PR ld/21168
  4364. * elf32-i386.c (elf_i386_relocate_section): Allow
  4365. "lea foo@GOT, %reg" in PIC.
  4366. 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
  4367. PR ld/20244
  4368. * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
  4369. symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
  4370. error against local IFUNC symbol without a base register for
  4371. PIC.
  4372. 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
  4373. * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
  4374. `%P: %H:' with `info->callbacks->einfo'.
  4375. (ppc_elf_relocate_section): Likewise.
  4376. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
  4377. (ppc64_elf_edit_toc): Likewise.
  4378. (ppc64_elf_relocate_section): Likewise.
  4379. 2017-02-14 Alan Modra <amodra@gmail.com>
  4380. * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
  4381. --gc-keep-exported, and test versioned field of sym rather than
  4382. looking for @ in name.
  4383. 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
  4384. * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
  4385. __global_pointer$.
  4386. 2017-02-13 Nick Clifton <nickc@redhat.com>
  4387. PR binutils/21151
  4388. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
  4389. unit length field.
  4390. 2017-02-07 Andrew Waterman <andrew@sifive.com>
  4391. * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
  4392. entry size if PLT header is written.
  4393. 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
  4394. Fix sparc64 dynamic relocation processing to use the dynamic
  4395. symbol count.
  4396. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
  4397. to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
  4398. should be used.
  4399. 2017-02-03 Nick Clifton <nickc@redhat.com>
  4400. PR 21096
  4401. * coffcode.h (coff_write_object_contents): Enlarge size of
  4402. s_name_buf in order to avoid compile time warning about possible
  4403. integer truncation.
  4404. * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
  4405. 32-bits of insn value before printing into buffer.
  4406. 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
  4407. * elfxx-mips.c (mips_elf_hash_sort_data): Add
  4408. `max_local_dynindx'.
  4409. (mips_elf_sort_hash_table): Handle it.
  4410. (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
  4411. symbols bump up `max_local_dynindx' rather than
  4412. `max_non_got_dynindx'.
  4413. 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
  4414. * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
  4415. `min_got_dynindx', `max_unref_got_dynindx' and
  4416. `max_non_got_dynindx' members to the `bfd_size_type' data type.
  4417. (mips_elf_sort_hash_table): Adjust accordingly.
  4418. 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
  4419. * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
  4420. to access the hash table.
  4421. 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
  4422. * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
  4423. non-NULL `htab' to the beginning.
  4424. 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
  4425. * elflink.c (elf_gc_sweep): Wrap overlong line.
  4426. 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
  4427. * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
  4428. (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
  4429. * elfxx-mips.c (mips_elf_link_hash_table): Add
  4430. `ignore_branch_isa' member.
  4431. (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
  4432. in branch relocation calculation as an error if
  4433. `ignore_branch_isa' has been set.
  4434. (_bfd_mips_elf_insn32): Rename to...
  4435. (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
  4436. parameter to `insn32' and add an `ignore_branch_isa' parameter.
  4437. Handle the new parameter.
  4438. 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
  4439. * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
  4440. local variable dynobj.
  4441. PR ld/20995
  4442. * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
  4443. (elf_cris_adjust_dynamic_symbol): Place variables copied into the
  4444. executable from read-only sections into sdynrelro.
  4445. (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
  4446. dynamic relocs in sdynrelro.
  4447. (elf_backend_want_dynrelro): Define.
  4448. 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
  4449. * config.bfd (*-*-rtemsaout*): Mark as removed.
  4450. 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
  4451. * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
  4452. (arm-*-rtems*): Move to (arm*-*-eabi*).
  4453. (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
  4454. (m68-*-rtems*): Move to (m68*-*-elf*).
  4455. 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
  4456. * config.bfd (*-*-rtemscoff*): Mark as removed.
  4457. 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
  4458. PR ld/20828
  4459. * elflink.c (bfd_elf_record_link_assignment): Revert last
  4460. change and don't ever clear `forced_local'. Set `mark'
  4461. unconditionally.
  4462. (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
  4463. file.
  4464. (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
  4465. (bfd_elf_size_dynamic_sections): ... here.
  4466. * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
  4467. and set `mark' instead in `__tls_get_addr_opt' processing.
  4468. * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
  4469. 2017-01-24 Alan Modra <amodra@gmail.com>
  4470. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
  4471. where dynamic relocs are preferable. Allow ifunc too.
  4472. (ensure_undefweak_dynamic): New function.
  4473. (allocate_dynrelocs): Use it here. Move plt handling last and
  4474. don't make symbols dynamic, simplifying loop. Only make undef
  4475. weak symbols with GOT entries dynamic. Correct condition
  4476. for GOT relocs. Handle dynamic relocs on ifuncs. Correct
  4477. comments. Remove goto.
  4478. (ppc_elf_relocate_section): Correct test for using dynamic
  4479. symbol on GOT relocs. Rearrange test for emitting GOT relocs
  4480. to suit. Set up explicit tls_index entries and implicit GOT
  4481. tls_index entries resolvable at link time for
  4482. __tls_get_addr_opt. Simplify test to clear mem for prelink.
  4483. * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
  4484. (ensure_undefweak_dynamic): New function.
  4485. (allocate_dynrelocs): Use it here. Only make undef weak symbols
  4486. with GOT entries dynamic. Remove unnecessary test of
  4487. WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
  4488. (ppc64_elf_relocate_section): Correct test for using dynamic
  4489. symbol on GOT relocs. Rearrange test for emitting GOT relocs
  4490. to suit. Set up explicit tls_index entries and implicit GOT
  4491. tls_index entries resolvable at link time for __tls_get_addr_opt.
  4492. Simplify expression to clear mem for prelink.
  4493. 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
  4494. * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
  4495. 2017-01-20 Jiong Wang <jiong.wang@arm.com>
  4496. * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
  4497. (elf_backend_hash_symbol): Define.
  4498. 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
  4499. PR ld/20828
  4500. * elflink.c (bfd_elf_record_link_assignment): Clear any
  4501. `forced_local' marking for DSO symbols that are not being
  4502. provided.
  4503. 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
  4504. * elfnn-riscv.c (riscv_elf_object_p): New function.
  4505. 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
  4506. PR ld/21038
  4507. * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
  4508. plt_bnd_eh_frame.
  4509. (elf_x86_64_check_relocs): Create .eh_frame section for the
  4510. .plt.bnd section.
  4511. (elf_x86_64_size_dynamic_sections): Allocate and initialize
  4512. .eh_frame section for the .plt.bnd section.
  4513. (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
  4514. for the .plt.bnd section.
  4515. 2017-01-12 Nick Clifton <nickc@redhat.com>
  4516. PR binutils/20876
  4517. * opncls.c (find_separate_debug_file): Add include_dirs
  4518. parameter. Only include the directory part of the bfd's filename
  4519. in search paths if include_dirs is true. Add a couple of extra
  4520. locations for looking for debug files.
  4521. ( bfd_follow_gnu_debuglink): Update invocation of
  4522. find_separate_debug_file.
  4523. (bfd_follow_gnu_debugaltlink): Likewise.
  4524. (get_build_id): New function: Finds the build-id of the given bfd.
  4525. (get_build_id_name): New function: Computes the name of the
  4526. separate debug info file for a bfd, based upon its build-id.
  4527. (check_build_id_file): New function: Checks to see if a separate
  4528. debug info file exists at the given location, and that its
  4529. build-id matches that of the original bfd.
  4530. (bfd_follow_build_id_debuglink): New function: Finds a separate
  4531. debug info file for a given bfd by using the build-id method.
  4532. * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
  4533. method of locating a separate debug info file before using the
  4534. debuglink method.
  4535. * bfd-in2.h: Regenerate.
  4536. 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
  4537. PR ld/21038
  4538. * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
  4539. (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
  4540. elf_x86_64_eh_frame_plt_got.
  4541. (elf_x86_64_size_dynamic_sections): Get unwind info from
  4542. elf_x86_64_bnd_arch_bed for the BND PLT.
  4543. 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
  4544. * config.bfd: Add entries for i686-redox and x86_64-redox.
  4545. 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
  4546. * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
  4547. to 4 bytes.
  4548. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
  4549. .eh_frame section to 4 bytes for x32.
  4550. (elf_x86_64_check_relocs): Likewise.
  4551. 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
  4552. PR ld/20830
  4553. * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
  4554. (PLT_GOT_FDE_LENGTH): Likewise.
  4555. (elf_i386_plt_layout): Add eh_frame_plt_got and
  4556. eh_frame_plt_got_size.
  4557. (elf_i386_plt): Updated.
  4558. (elf_i386_link_hash_table): Add plt_got_eh_frame.
  4559. (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
  4560. (elf_i386_size_dynamic_sections): Allocate and initialize
  4561. .eh_frame section for .plt.got.
  4562. (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
  4563. .plt.got.
  4564. (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
  4565. eh_frame_plt_got_size.
  4566. * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
  4567. (PLT_GOT_FDE_LENGTH): Likewise.
  4568. (elf_x86_64_backend_data): Add eh_frame_plt_got and
  4569. eh_frame_plt_got_size.
  4570. (elf_x86_64_arch_bed): Updated.
  4571. (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
  4572. eh_frame_plt_got_size.
  4573. (elf_x86_64_nacl_arch_bed): Likewise.
  4574. (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
  4575. (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
  4576. (elf_x86_64_size_dynamic_sections): Allocate and initialize
  4577. .eh_frame section for .plt.got.
  4578. (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
  4579. for .plt.got.
  4580. 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
  4581. * elf32-i386.c (elf_i386_size_dynamic_sections): Set
  4582. plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
  4583. 2017-01-09 Nick Clifton <nickc@redhat.com>
  4584. * dwarf2.c (lookup_address_in_function_table): Return early if
  4585. there are no functions in the given comp unit, or if the high
  4586. address of the last function in the comp unit is less than the
  4587. desired address.
  4588. 2017-01-09 Nick Clifton <nickc@redhat.com>
  4589. PR binutils/21013
  4590. * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
  4591. message if there are too many symbols to load.
  4592. 2017-01-04 James Clarke <jrtc27@jrtc27.com>
  4593. * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
  4594. if relocs are cached.
  4595. 2017-01-03 Rich Felker <bugdal@aerifal.cx>
  4596. PR ld/21017
  4597. * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
  4598. for R_MICROBLAZE_GOTOFF_64.
  4599. 2017-01-03 Nick Clifton <nickc@redhat.com>
  4600. * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
  4601. warning about using a possibly uninitialised variable.
  4602. 2017-01-02 Alan Modra <amodra@gmail.com>
  4603. * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
  4604. (allocate_plt_static, allocate_dynrelocs): Use it.
  4605. 2017-01-02 Alan Modra <amodra@gmail.com>
  4606. * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
  4607. .PARISC.unwind section.
  4608. 2017-01-02 Alan Modra <amodra@gmail.com>
  4609. PR ld/20989
  4610. * elfxx-sparc.c (gdop_relative_offset_ok): New function.
  4611. (_bfd_sparc_elf_relocate_section): Use it to validate GOT
  4612. indirect to GOT pointer relative code edit.
  4613. 2017-01-02 Alan Modra <amodra@gmail.com>
  4614. Update year range in copyright notice of all files.
  4615. For older changes see ChangeLog-2016
  4616. Copyright (C) 2017 Free Software Foundation, Inc.
  4617. Copying and distribution of this file, with or without modification,
  4618. are permitted in any medium without royalty provided the copyright
  4619. notice and this notice are preserved.
  4620. Local Variables:
  4621. mode: change-log
  4622. left-margin: 8
  4623. fill-column: 74
  4624. version-control: never
  4625. End: