ChangeLog-2018 176 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949
  1. 2018-12-31 Alan Modra <amodra@gmail.com>
  2. PR 24041
  3. * elflink.c (elf_link_add_object_symbols): Don't segfault on
  4. crafted ET_DYN with no program headers.
  5. 2018-12-31 Alan Modra <amodra@gmail.com>
  6. * elf64-ppc.c (ppc64_elf_relocate_section <tls_ldgd_opt>): When
  7. editing an old-style __tls_get_addr call, replace a toc restore
  8. insn with a nop.
  9. 2018-12-28 Alan Modra <amodra@gmail.com>
  10. PR 24015
  11. * elf.c (bfd_elf_get_default_section_type): Make common sections
  12. SHT_NOBITS.
  13. * linker.c (bfd_generic_define_common_symbol): Clear
  14. SEC_HAS_CONTENTS.
  15. 2018-12-28 Alan Modra <amodra@gmail.com>
  16. PR 23966
  17. * libbfd.c (SSIZE_MAX): Define.
  18. (bfd_malloc, bfd_realloc): Don't cast size to long to check for
  19. "negative" values, compare against SSIZE_MAX instead.
  20. 2018-12-23 H.J. Lu <hongjiu.lu@intel.com>
  21. * elf32-i386.c (elf_i386_rtype_to_howto): Remove the unused bfd
  22. pointer argument.
  23. (elf_i386_info_to_howto_rel): Updated.
  24. (elf_i386_tls_transition): Likewise.
  25. (elf_i386_relocate_section): Likewise.
  26. 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
  27. * elf32-i386.c (elf_i386_relocate_section): Call
  28. elf_i386_rtype_to_howto to get reloc_howto_type pointer.
  29. * elf64-x86-64.c (elf_x86_64_relocate_section): Call
  30. elf_x86_64_rtype_to_howto to get reloc_howto_type pointer.
  31. 2018-12-18 Alan Modra <amodra@gmail.com>
  32. * Makefile.am (bfdinclude_HEADERS): Add bfd_stdint.h.
  33. (BFD_H_DEPS): Add include/diagnostics.h.
  34. (LOCAL_H_DEPS): Add bfd_stdint.h.
  35. * bfd-in.h: Include bfd_stdint.h.
  36. * arc-plt.h: Don't include stdint.h.
  37. * coff-rs6000.c: Likewise.
  38. * coff64-rs6000.c: Likewise.
  39. * elfxx-riscv.c: Likewise.
  40. * cache.c: Don't include bfd_stdint.h.
  41. * elf32-arm.c: Likewise.
  42. * elf32-avr.c: Likewise.
  43. * elf32-nds32.c: Likewise.
  44. * elf32-rl78.c: Likewise.
  45. * elf32-rx.c: Likewise.
  46. * elf32-wasm32.c: Likewise.
  47. * elf64-nfp.c: Likewise.
  48. * elflink.c: Likewise.
  49. * elfnn-aarch64.c: Likewise.
  50. * elfnn-ia64.c: Likewise.
  51. * elfxx-ia64.c: Likewise.
  52. * elfxx-x86.h: Likewise.
  53. * wasm-module.c: Likewise, and don't include sysdep.h twice.
  54. * elf-nacl.h: Don't include bfd.h.
  55. * mach-o.h: Likewise.
  56. * elfxx-aarch64.c: Include bfd.h and elf-bfd.h.
  57. * elfxx-aarch64.h: Don't include bfd.h, elf-bfd.h or stdint.h.
  58. * mach-o-aarch64.c: Include mach-o.h later.
  59. * mach-o-arm.c: Likewise.
  60. * mach-o-i386.c: Likewise.
  61. * mach-o-x86-64.c: Likewise.
  62. * mach-o.c: Likewise.
  63. * sysdep.h: Don't include ansidecl.h or sys/stat.h.
  64. * Makefile.in: Regenerate.
  65. * bfd-in2.h: Regenerate.
  66. 2018-12-18 Alan Modra <amodra@gmail.com>
  67. PR 23980
  68. * elf32-i386.c (elf_i386_relocate_section): Exit with wrong format
  69. error rather than asserting input file is as expected.
  70. * elf32-s390.c (elf_s390_relocate_section): Likewise.
  71. * elf32-sh.c (sh_elf_relocate_section): Likewise.
  72. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
  73. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
  74. * elf64-s390.c (elf_s390_relocate_section): Likewise.
  75. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  76. * elf32-ppc.c (ppc_elf_relocate_section): Exit with wrong format
  77. error if input file is not ppc32 ELF.
  78. 2018-12-18 Alan Modra <amodra@gmail.com>
  79. PR 23980
  80. * elf64-ppc.c (ppc64_elf_hide_symbol): Check hash table type
  81. before referencing ppc64-only fields of hash entries.
  82. 2018-12-17 Alan Modra <amodra@gmail.com>
  83. PR 23994
  84. * aoutx.h: Include limits.h.
  85. (get_reloc_upper_bound): Detect long overflow and return a file
  86. too big error if it occurs.
  87. * elf.c: Include limits.h.
  88. (_bfd_elf_get_symtab_upper_bound): Detect long overflow and return
  89. a file too big error if it occurs.
  90. (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
  91. (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
  92. 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
  93. PR ld/23900
  94. * elf.c (get_program_header_size): Add a PT_GNU_PROPERTY
  95. segment for NOTE_GNU_PROPERTY_SECTION_NAME.
  96. (_bfd_elf_map_sections_to_segments): Create a PT_GNU_PROPERTY
  97. segment for NOTE_GNU_PROPERTY_SECTION_NAME.
  98. * elfxx-x86.c (_bfd_elf_link_setup_gnu_properties): Don't set
  99. GNU_PROPERTY_X86_UINT32_VALID.
  100. 2018-12-11 Max Filippov <jcmvbkbc@gmail.com>
  101. * elf32-xtensa.c (elf_xtensa_do_reloc): Limit const16 opcode
  102. immediate field to 16 least significant bits.
  103. 2018-12-11 H.J. Lu <hongjiu.lu@intel.com>
  104. * elf32-xc16x.c (elf32_xc16x_rtype_to_howto): New function.
  105. (elf32_xc16x_relocate_section): Call elf32_xc16x_rtype_to_howto
  106. instead of xc16x_reloc_type_lookup to get reloc_howto_type.
  107. 2018-12-07 H.J. Lu <hongjiu.lu@intel.com>
  108. PR ld/23958
  109. * elflink.c (_bfd_elf_add_default_symbol): Override the previous
  110. definition from IR object.
  111. 2018-12-08 Stafford Horne <shorne@gmail.com>
  112. * elf32-or1k.c (or1k_grok_prstatus): New function.
  113. (or1k_grok_psinfo): Likewise.
  114. 2018-12-07 H.J. Lu <hongjiu.lu@intel.com>
  115. * elf-properties.c (elf_find_and_remove_property): Add a
  116. bfd_boolean argument to indicate if the property should be
  117. removed.
  118. (elf_merge_gnu_property_list): Updated. Report
  119. property change in linker map file.
  120. (elf_get_gnu_property_section_size): Skip property_remove
  121. properties.
  122. (elf_write_gnu_properties): Likewise.
  123. (_bfd_elf_link_setup_gnu_properties): Report property merge
  124. in linker map file. Pass abfd to elf_merge_gnu_property_list.
  125. 2018-12-07 Alan Modra <amodra@gmail.com>
  126. PR 23952
  127. * syms.c (_bfd_generic_read_minisymbols): Free syms before
  128. returning with zero symcount.
  129. 2018-12-06 Alan Modra <amodra@gmail.com>
  130. * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_VLE_ADDR20>): Correct
  131. mask and shift value.
  132. (ppc_elf_vle_split16): Use E_OPCODE_MASK. Handle e_li
  133. specially.
  134. 2018-12-05 Sam Tebbs <sam.tebbs@arm.com>
  135. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Add check for 'B'.
  136. 2018-12-04 H.J. Lu <hongjiu.lu@intel.com>
  137. PR ld/23372
  138. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Don't remove
  139. empty properties for GNU_PROPERTY_X86_COMPAT_ISA_1_USED and
  140. GNU_PROPERTY_X86_UINT32_OR_AND.
  141. (_bfd_x86_elf_link_fixup_gnu_properties): Likewise.
  142. 2018-12-03 Kito Cheng <kito@andestech.com>
  143. * elfxx-riscv.h (RISCV_DONT_CARE_VERSION): New macro.
  144. (struct riscv_subset_t): New structure.
  145. (riscv_subset_t): New typedef.
  146. (riscv_subset_list_t): New structure.
  147. (riscv_release_subset_list): New prototype.
  148. (riscv_add_subset): Likewise.
  149. (riscv_lookup_subset): Likewise.
  150. (riscv_lookup_subset_version): Likewise.
  151. (riscv_release_subset_list): Likewise.
  152. * elfxx-riscv.c: Include safe-ctype.h.
  153. (riscv_parsing_subset_version): New function.
  154. (riscv_supported_std_ext): Likewise.
  155. (riscv_parse_std_ext): Likewise.
  156. (riscv_parse_sv_or_non_std_ext): Likewise.
  157. (riscv_parse_subset): Likewise.
  158. (riscv_add_subset): Likewise.
  159. (riscv_lookup_subset): Likewise.
  160. (riscv_lookup_subset_version): Likewise.
  161. (riscv_release_subset_list): Likewise.
  162. 2018-12-01 H.J. Lu <hongjiu.lu@intel.com>
  163. PR ld/23930
  164. * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Update
  165. the iplt section alignment if it is non-empty.
  166. (_bfd_x86_elf_link_setup_gnu_properties): Set plt.iplt_alignment
  167. and delay setting the iplt section alignment.
  168. * elfxx-x86.h (elf_x86_plt_layout): Add iplt_alignment.
  169. 2018-11-30 Nick Clifton <nickc@redhat.com>
  170. PR 23942
  171. * elfcode.h (elf_object_p): Check for corrupt input files with
  172. more program headers than can actually fit in the file.
  173. 2018-11-30 Nick Clifton <nickc@redhat.com>
  174. PR 23932
  175. * elf.c (IS_CONTAINED_BY_LMA): Add a check for a negative section
  176. size.
  177. (rewrite_elf_program_header): If no sections are mapped into a
  178. segment return an error.
  179. 2018-11-30 Alan Modra <amodra@gmail.com>
  180. PR 23937
  181. * elf64-ppc.c (write_plt_relocs_for_local_syms): Don't add local
  182. entry offset for ifuncs.
  183. 2018-11-29 H.J. Lu <hongjiu.lu@intel.com>
  184. PR ld/23929
  185. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Don't
  186. merge .note.gnu.property section in IR inputs.
  187. 2018-11-27 Thomas Preud'homme <thomas.preudhomme@linaro.org>
  188. * cpu-arm.c (processors): Add processors known to GAS but missing here
  189. and reindent.
  190. (bfd_arm_update_notes): Add comment explaining why the list of
  191. architectures in the switch should not be updated.
  192. (architectures): Likewise.
  193. 2018-11-27 Maciej W. Rozycki <macro@linux-mips.org>
  194. * elfxx-mips.c (_bfd_mips_elf_check_relocs) <R_MIPS16_HI16>
  195. <R_MIPS_HI16, R_MIPS_HIGHER, R_MIPS_HIGHEST, R_MICROMIPS_HI16>
  196. <R_MICROMIPS_HIGHER, R_MICROMIPS_HIGHEST>: Also accept an
  197. absolute symbol in PIC code.
  198. 2018-11-27 Maciej W. Rozycki <macro@linux-mips.org>
  199. * elfxx-mips.c (_bfd_mips_elf_check_relocs) <R_MIPS16_26>
  200. <R_MIPS_26, R_MICROMIPS_26_S1>: Use `info->callbacks->einfo'
  201. rather than `_bfd_error_handler' to report refused relocations
  202. in PIC code and continue processing. Fix error message: `can
  203. not' -> `cannot'.
  204. 2018-11-27 H.J. Lu <hongjiu.lu@intel.com>
  205. PR binutils/23919
  206. * compress.c (bfd_is_section_compressed_with_header): Initialize
  207. *uncompressed_align_pow_p to 0.
  208. 2018-11-27 Tamar Christina <tamar.christina@arm.com>
  209. PR ld/23904
  210. * elfnn-aarch64.c (_bfd_aarch64_adrp_p): Use existing constants.
  211. (_bfd_aarch64_erratum_843419_branch_to_stub): Use _bfd_aarch64_adrp_p.
  212. (struct erratum_835769_branch_to_stub_clear_data): New.
  213. (_bfd_aarch64_erratum_843419_clear_stub): New.
  214. (clear_erratum_843419_entry): New.
  215. (elfNN_aarch64_tls_relax): Use it.
  216. (elfNN_aarch64_relocate_section): Pass input_section.
  217. (aarch64_map_one_stub): Handle branch type none as valid.
  218. 2018-11-27 Mark Wielaard <mark@klomp.org>
  219. PR binutils/23919
  220. * bfd.c (bfd_update_compression_header): Explicitly set alignment.
  221. (bfd_check_compression_header): Add uncompressed_alignment_power
  222. argument. Check ch_addralign is a power of 2.
  223. * bfd-in2.h: Regenerated.
  224. * compress.c (bfd_compress_section_contents): Get and set
  225. orig_uncompressed_alignment_pow if section is decompressed.
  226. (bfd_is_section_compressed_with_header): Add and get
  227. uncompressed_align_pow_p argument.
  228. (bfd_is_section_compressed): Add uncompressed_align_power argument
  229. to bfd_is_section_compressed_with_header call.
  230. (bfd_init_section_decompress_status): Get and set
  231. uncompressed_alignment_power.
  232. * elf.c (_bfd_elf_make_section_from_shdr): Add
  233. uncompressed_align_power argument to
  234. bfd_is_section_compressed_with_header call.
  235. 2018-11-21 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  236. * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Do not
  237. error when .MSP430.attributes section is missing from objects
  238. created by LTO.
  239. 2018-11-13 Jim Wilson <jimw@sifive.com>
  240. * elfnn-riscv.c (riscv_float_abi_string): New.
  241. (_bfd_riscv_elf_merge_private_bfd_data): Use it for error message.
  242. 2018-11-09 Bernhard M. Wiedemann <bwiedemann@suse.de>
  243. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Correct comment
  244. concerning timestamp insertion.
  245. 2018-11-09 Cupertino Miranda <cmiranda@synopsys.com>
  246. * arc-got.h (arc_got_entry_type_for_reloc): Changed to
  247. correct static TLS relocs.
  248. * elf32-arc.c (elf_arc_check_relocs): Introduced warning to
  249. TLS relocs which require -fPIC.
  250. (arc_create_forced_local_got_entries_for_tls): Created.
  251. Traverses list of GOT entries to be resolved statically
  252. when needed.
  253. (elf_arc_finish_dynamic_sections): Changed. Calls
  254. arc_create_forced_local_got_entries_for_tls for each known
  255. possibly GOT symbol.
  256. 2018-11-09 rhn <sowaac.rhn@porcupinefactory.org>
  257. PR 23699
  258. * ihex.c (ihex_write_object_contents): Check for sign extended
  259. addresses that cannot be supported in the ihex format.
  260. 2018-11-09 Claudiu Zissulescu <claziss@synopsys.com>
  261. * arc-got.h (arc_get_local_got_ents): Revamp it; use
  262. elf_local_got_ents to store the local got list.
  263. (get_got_entry_list_for_symbo): Restructure it.
  264. * elf32-arc.c (elf_arc_relocate_section): Correct the call to
  265. get_got_entry_list_for_symbol.
  266. 2018-11-07 Nick Clifton <nickc@redhat.com>
  267. * po/fr.po: Updated French translation.
  268. * po/pt.po: Updated Portuguese translation.
  269. 2018-11-06 Roman Bolshakov <r.bolshakov@yadro.com>
  270. Saagar Jha <saagar@saagarjha.com>
  271. * mach-o.h: Add new enums for BFD_MACH_O_PLATFORM_MACOS,
  272. BFD_MACH_O_PLATFORM_IOS, BFD_MACH_O_PLATFORM_TVOS,
  273. BFD_MACH_O_PLATFORM_WATCHOS, BFD_MACH_O_PLATFORM_BRIDGEOS,
  274. BFD_MACH_O_TOOL_CLANG, BFD_MACH_O_TOOL_SWIFT, BFD_MACH_O_TOOL_LD.
  275. (struct bfd_mach_o_note_command): New.
  276. (struct bfd_mach_o_build_version_tool): New.
  277. (struct bfd_mach_o_build_version_command): New.
  278. (bfd_mach_o_read_version_min): Don't split version into
  279. a few fields. Rename reserved to sdk.
  280. * mach-o.c (bfd_mach_o_read_version_min): Don't split version into a
  281. few fields. Rename reserved to sdk.
  282. (bfd_mach_o_read_command): Handle LC_VERSION_MIN_TVOS, LC_NOTE,
  283. LC_BUILD_VERSION.
  284. (bfd_mach_o_read_note): New.
  285. (bfd_mach_o_read_build_version): New.
  286. 2018-11-07 Yoshinori Sato <ysato@users.sourceforge.jp>
  287. * config.bfd: Add rx-*-linux.
  288. * congigure.ac: Likewise.
  289. * elf32-rx.c (rx_linux_object_p): New function.
  290. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME)
  291. (elf_backend_object_p, elf32_bed): Define rx-*-linux.
  292. * targets.c: Add rx_elf32_linux_le_vec.
  293. * configure: Regenerate.
  294. 2018-11-06 Romain Margheriti <lilrom13@gmail.com>
  295. PR 23742
  296. * mach-o.c (bfd_mach_o_read_command): Accept and ignore
  297. BFD_MACH_O_LC_LINKER_OPTIONS and BFD_MACH_O_LC_BUILD_VERSION
  298. commands.
  299. 2018-11-02 Alan Modra <amodra@gmail.com>
  300. PR 23850
  301. * elf.c (bfd_section_from_shdr): Treat SHF_ALLOC SHT_REL* sections
  302. in an executable or shared library as normal sections.
  303. 2018-10-31 Renlin Li <renlin.li@arm.com>
  304. * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Don't create got
  305. section for Local Exec TLS model.
  306. 2018-10-24 H.J. Lu <hongjiu.lu@intel.com>
  307. PR ld/23818
  308. * elflink.c (_bfd_elf_link_assign_sym_version): Hide symbols
  309. defined in discarded input sections.
  310. 2018-10-24 Alan Modra <amodra@gmail.com>
  311. * elf32-arm.c (elf32_arm_size_stubs): Ignore as-needed libs that
  312. were not needed.
  313. 2018-10-23 Alan Modra <amodra@gmail.com>
  314. PR 23806
  315. * merge.c (_bfd_add_merge_section): Don't attempt to merge
  316. sections with ridiculously large alignments.
  317. 2018-10-23 Alan Modra <amodra@gmail.com>
  318. PR 23805
  319. * elflink.c (elf_link_input_bfd): Don't segfault on finding
  320. STT_TLS symbols without any TLS sections. Instead, change the
  321. symbol type to STT_NOTYPE.
  322. 2018-10-23 Alan Modra <amodra@gmail.com>
  323. PR 23804
  324. * merge.c (_bfd_add_merge_section): Don't attempt to merge
  325. sections where size is not a multiple of entsize.
  326. 2018-10-20 Alan Modra <amodra@gmail.com>
  327. PR 23788
  328. * elf.c (section_match): Don't require a size match for SHT_SYMTAB
  329. or SHT_STRTAB.
  330. 2018-10-17 Alan Modra <amodra@gmail.com>
  331. PR 23653
  332. * elflink.c (_bfd_elf_link_create_dynstrtab): Match elf_object_id
  333. too when choosing dynobj.
  334. 2018-10-16 Alan Modra <amodra@gmail.com>
  335. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Simplify
  336. PE_DEBUG_DATA size checks.
  337. 2018-10-16 Alan Modra <amodra@gmail.com>
  338. PR 23781
  339. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Free data
  340. before returning.
  341. 2018-10-16 Alan Modra <amodra@gmail.com>
  342. PR 23534
  343. * init.c (bfd_init): Return an unsigned int.
  344. bfd-in2.h: Regenerate.
  345. 2018-10-15 Alan Modra <amodra@gmail.com>
  346. PR 23534
  347. * init.c (BFD_INIT_MAGIC): Define.
  348. (bfd_init): Return BFD_INIT_MAGIC.
  349. bfd-in2.h: Regenerate.
  350. 2018-10-13 Alan Modra <amodra@gmail.com>
  351. PR 23770
  352. PR 23425
  353. * reloc.c (_bfd_clear_contents): Replace "location" param with
  354. "buf" and "off". Bounds check "off". Return status.
  355. * cofflink.c (_bfd_coff_generic_relocate_section): Update
  356. _bfd_clear_contents call.
  357. * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Likewise.
  358. * elf32-arc.c (elf_arc_relocate_section): Likewise.
  359. * elf32-i386.c (elf_i386_relocate_section): Likewise.
  360. * elf32-metag.c (metag_final_link_relocate): Likewise.
  361. * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Likewise.
  362. * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
  363. * elf32-visium.c (visium_elf_relocate_section): Likewise.
  364. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
  365. * elf64-x86-64.c *(elf_x86_64_relocate_section): Likewise.
  366. * libbfd-in.h (_bfd_clear_contents): Update prototype.
  367. * libbfd.h: Regenerate.
  368. 2018-10-09 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
  369. * elflink.c (elf_link_output_extsym): Do not place symbols into a
  370. discarded .dynsym.
  371. 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
  372. PR ld/23428
  373. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
  374. add GNU_PROPERTY_X86_FEATURE_2_NEEDED to force program header
  375. in non-code PT_LOAD segment.
  376. 2018-10-08 Alan Modra <amodra@gmail.com>
  377. * elf-nacl.c (nacl_modify_segment_map): Cope with header PT_LOAD
  378. lacking sections.
  379. * elf.c (_bfd_elf_map_sections_to_segments): Assume file and
  380. program headers are required when info->load_phdrs. Reorganize
  381. code handling program headers. Generate a mapping without
  382. sections just for file and program headers when -z separate-code
  383. would indicate they should be on a different page to the first
  384. section.
  385. 2018-10-08 Alan Modra <amodra@gmail.com>
  386. * elf.c (assign_file_positions_for_load_sections): Set p_vaddr
  387. from m->p_vaddr_offset for segments without sections. Invert
  388. sign of p_vaddr_offset.
  389. (rewrite_elf_program_header, copy_elf_program_header): Save
  390. old segment p_vaddr to p_vaddr_offset. Invert sign of
  391. p_vaddr_offset.
  392. 2018-10-08 Alan Modra <amodra@gmail.com>
  393. * elf.c (get_program_header_size): Don't count PT_INTERP if
  394. .interp is empty.
  395. (_bfd_elf_map_sections_to_segments): Don't create PT_INTERP if
  396. .interp is empty.
  397. 2018-10-08 Alan Modra <amodra@gmail.com>
  398. * elf32-spu.c (spu_elf_modify_segment_map): Don't insert
  399. overlays before segment containing headers.
  400. 2018-10-08 Alan Modra <amodra@gmail.com>
  401. * elf.c (make_mapping): Cope with zero size array at end of
  402. struct elf_segment_map.
  403. (_bfd_elf_map_sections_to_segments): Likewise.
  404. (rewrite_elf_program_header, copy_elf_program_header): Likewise.
  405. (_bfd_elf_map_sections_to_segments): Rename phdr_index to hdr_index.
  406. 2018-10-05 Alan Modra <amodra@gmail.com>
  407. * elf32-spu.c (spu_elf_create_sections): Make .note.spu_name
  408. SHT_NOTE.
  409. 2018-10-05 Richard Henderson <rth@twiddle.net>
  410. * bfd-in2.h: Regenerated.
  411. * elf32-or1k.c: (or1k_elf_howto_table): Fix formatting for
  412. R_OR1K_PLT26, Add R_OR1K_PCREL_PG21, R_OR1K_GOT_PG21,
  413. R_OR1K_TLS_GD_PG21, R_OR1K_TLS_LDM_PG21, R_OR1K_TLS_IE_PG21,
  414. R_OR1K_LO13, R_OR1K_GOT_LO13, R_OR1K_TLS_GD_LO13, R_OR1K_TLS_LDM_LO13,
  415. R_OR1K_TLS_IE_LO13, R_OR1K_SLO13, R_OR1K_PLTA26.
  416. (or1k_reloc_map): Add BFD_RELOC_OR1K_PCREL_PG21,
  417. BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_TLS_GD_PG21,
  418. BFD_RELOC_OR1K_TLS_LDM_PG21, BFD_RELOC_OR1K_TLS_IE_PG21,
  419. BFD_RELOC_OR1K_LO13, BFD_RELOC_OR1K_GOT_LO13,
  420. BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_GD_LO13,
  421. BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_LO13,
  422. BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_PLTA26.
  423. (elf_or1k_link_hash_table): Add field saw_plta.
  424. (or1k_final_link_relocate): Add value calculations for new relocations.
  425. (or1k_elf_relocate_section): Add section relocations for new
  426. relocations.
  427. (or1k_write_plt_entry): New function.
  428. (or1k_elf_finish_dynamic_sections): Add support for PLTA relocations
  429. using new l.adrp instruction. Cleanup PLT relocation code generation.
  430. * libbfd.h: Regenerated.
  431. * reloc.c: Add BFD_RELOC_OR1K_PCREL_PG21, BFD_RELOC_OR1K_LO13,
  432. BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_GOT_LO13,
  433. BFD_RELOC_OR1K_PLTA26, BFD_RELOC_OR1K_TLS_GD_PG21,
  434. BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_LDM_PG21,
  435. BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_PG21,
  436. BFD_RELOC_OR1K_TLS_IE_LO13.
  437. 2018-10-05 Richard Henderson <rth@twiddle.net>
  438. * elf32-or1k.c (or1k_elf_relocate_section): Add error for unknown
  439. relocations. Add error for non zero addend with plt and got
  440. relocations. Add error for got and plt references against dynamic, non
  441. local, symbols. Add error when linking non shared liraries with
  442. flag_pic.
  443. 2018-10-05 Richard Henderson <rth@twiddle.net>
  444. Stafford Horne <shorne@gmail.com>
  445. * bfd-in2.h: Regenerated.
  446. * elf32-or1k.c (N_ONES): New macro.
  447. (or1k_elf_howto_table): Fix R_OR1K_PLT26 to complain on overflow.
  448. Add definitions for R_OR1K_TLS_TPOFF, R_OR1K_TLS_DTPOFF,
  449. R_OR1K_TLS_DTPMOD, R_OR1K_AHI16, R_OR1K_GOTOFF_AHI16,
  450. R_OR1K_TLS_IE_AHI16, R_OR1K_TLS_LE_AHI16, R_OR1K_SLO16,
  451. R_OR1K_GOTOFF_SLO16, R_OR1K_TLS_LE_SLO16.
  452. (or1k_reloc_map): Add entries for BFD_RELOC_HI16_S,
  453. BFD_RELOC_LO16_GOTOFF, BFD_RELOC_HI16_GOTOFF, BFD_RELOC_HI16_S_GOTOFF,
  454. BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
  455. BFD_RELOC_OR1K_SLO16, BFD_RELOC_OR1K_GOTOFF_SLO16,
  456. BFD_RELOC_OR1K_TLS_LE_SLO16.
  457. (or1k_reloc_type_lookup): Change search loop to start ad index 0 and
  458. also check results before returning.
  459. (or1k_reloc_name_lookup): Simplify loop to use R_OR1K_max as index
  460. limit.
  461. (or1k_final_link_relocate): New function.
  462. (or1k_elf_relocate_section): Add support for new AHI and SLO
  463. relocations. Use or1k_final_link_relocate instead of generic
  464. _bfd_final_link_relocate.
  465. (or1k_elf_check_relocs): Add support for new AHI and SLO relocations.
  466. * reloc.c: Add new enums for BFD_RELOC_OR1K_SLO16,
  467. BFD_RELOC_OR1K_GOTOFF_SLO16, BFD_RELOC_OR1K_TLS_IE_AHI16,
  468. BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
  469. BFD_RELOC_OR1K_TLS_LE_SLO16. Remove unused BFD_RELOC_OR1K_GOTOFF_HI16
  470. and BFD_RELOC_OR1K_GOTOFF_LO16.
  471. * libbfd.h: Regenerated.
  472. 2018-10-04 Jim Wilson <jimw@sifive.com>
  473. * elfnn-riscv.c (riscv_elf_size_dynamic_sections): In dynobj->sections
  474. loop, handle htab->sdyntdata section.
  475. 2018-10-04 Jose E. Marchesi <jose.marchesi@oracle.com>
  476. * elf64-sparc.c (elf64_sparc_output_arch_syms): Do notcorrect the
  477. impact of STT_REGISTER symbols in the dynsym sh_info here...
  478. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): ...but
  479. do it here.
  480. 2018-10-03 H.J. Lu <hongjiu.lu@intel.com>
  481. PR ld/23658
  482. * elf.c (get_program_header_size): Put all adjacent SHT_NOTE
  483. sections with the same section alignment into a single PT_NOTE
  484. segment. Check SHT_NOTE section type instead of section name.
  485. (_bfd_elf_map_sections_to_segments): Likewise.
  486. 2018-10-03 Millan Wolff <mail@milianw.de>
  487. PR 23715
  488. * dwarf2.c (find_abstract_instance): Allow recursive invocations
  489. of find_abstract_instance to override the name variable.
  490. 2018-10-03 Nick Clifton <nickc@redhat.com>
  491. * po/pt.po: Updated Portuguese translation.
  492. 2018-10-01 Cupertino Miranda <cmiranda@synopsys.com>
  493. * arc-got.h (relocate_fix_got_relocs_for_got_info): Changed. Take TLS
  494. section alignment in consideration for this relocation. Fixed TCB_SIZE
  495. offset size to include section alignment.
  496. (get_got_entry_list_for_symbol): Changed.
  497. * elf32-arc.c (FINAL_SECTSTART): Added this formula macro.
  498. (ARC_TLS_DTPOFF) Updated reloc to use new created macro instead.
  499. (arc_special_overflow_checks): Fixed TCB_SIZE offsize to include
  500. section alignment.
  501. (elf_arc_check_relocs): Changed.
  502. (elf_arc_finish_dynamic_symbol) Return FALSE in case arc_htab is NULL.
  503. (struct elf_arc_link_hash_entry): Moved and changed.
  504. (elf_arc_link_hash_newfunc): Changed.
  505. (arc_elf_link_hash_table_create): Removed old initializations.
  506. (elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed.
  507. 2018-09-28 H.J. Lu <hongjiu.lu@intel.com>
  508. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Use
  509. elfclass instead of bed->s->elfclass.
  510. 2018-09-27 Jim Wilson <jimw@sifive.com>
  511. * elfnn-riscv.c (riscv_init_pcgp_relocs): Add explanatory comment.
  512. (riscv_free_pcgp_relocs, riscv_record_pcgp_reloc): Likewise.
  513. (riscv_find_pcgp_hi_reloc, riscv_reocrd_pcgp_lo_reloc): Likewise.
  514. (riscv_find_pcgp_lo_reloc): Likewise.
  515. (riscv_delete_pcgp_hi_reloc, riscv_use_pcgp_hi_reloc): Delete.
  516. (riscv_delete_pcgp_lo_reloc): Likewise.
  517. (_bfd_riscv_relax_pc): Don't call riscv_use_pcgp_hi_reloc. Replace
  518. calls to riscv_delete_pcgp_lo_reloc and riscv_delete_pcgp_hi_reloc
  519. with TRUE. Mark abfd arg as ATTRIBUTE_UNUSED.
  520. 2018-09-25 Jim Wilson <jimw@sifive.com>
  521. * elfnn-riscv.c (riscv_make_plt_header): New arg output_bfd. Change
  522. return type to bfd_boolean. If EF_RISCV_RVE call _bfd_error_handler
  523. and return FALSE. Return TRUE at end.
  524. (riscv_make_plt_entry): Likewise.
  525. (riscv_elf_finish_dynamic_symbol): Update call to riscv_make_plt_entry.
  526. (riscv_elf_finish_dynamic_sections): Update call to
  527. riscv_make_plt_header.
  528. 2018-09-24 Jim Wilson <jimw@sifive.com>
  529. * elfnn-riscv.c (_bfd_riscv_relax_pc) <R_RISCV_PCREL_LO12_I>: New local
  530. hi_sec_off which is symbol address with addend subtracted. Use in
  531. riscv_find_pcgp_hi_reloc and riscv_record_pcgp_lo_reloc calls.
  532. * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Add check for reloc
  533. overflow with addend. Use reloc_dangerous instead of reloc_overflow.
  534. Add strings for the two errors handled here.
  535. (riscv_elf_relocate_section) In case R_RISCV_PCREL_LO12_I, rewrite
  536. comment. Only give error with addend when used with section symbol.
  537. In case bfd_reloc_dangerous, update error string.
  538. 2018-09-24 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  539. PR gdb/20948
  540. * elf.c (_bfd_elf_write_object_contents): Return from function
  541. early if abfd->direction == both_direction.
  542. 2018-09-21 Simon Marchi <simon.marchi@ericsson.com>
  543. * configure.ac: Check for fls.
  544. * elf32-nds32.c (fls): Only define if !HAVE_FLS.
  545. * config.in: Re-generate.
  546. * configure: Re-generate.
  547. 2018-09-20 Maciej W. Rozycki <macro@linux-mips.org>
  548. * config.bfd <rs6000-*-aix5.[01], rs6000-*-aix[5-9]*>: Remove
  549. duplicate `case' selectors.
  550. 2018-09-20 Nelson Chu <nelson.chu1990@gmail.com>
  551. * elf32-nds32.c (nds32_elf_relax_loadstore):
  552. Remove the unused target features.
  553. (bfd_elf32_nds32_set_target_option): Remove the unused parameters.
  554. (nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
  555. nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
  556. nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
  557. nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
  558. calculate_plt_offset, calculate_got_memory_address,
  559. nds32_elf_check_dup_relocs): Removed.
  560. All callers changed.
  561. * elf32-nds32.h: Remove the unused macros and defines.
  562. (elf_nds32_link_hash_table): Remove the unused variable.
  563. (bfd_elf32_nds32_set_target_option): Update prototype.
  564. (nds32_elf_ex9_init): Removed.
  565. * elf32-nds32.c (nds32_convert_32_to_16): Updated.
  566. * elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
  567. to initialize array nds32_elf_howto_table in any order
  568. without lots of EMPTY_HOWTO.
  569. (nds32_reloc_map): Updated.
  570. * reloc.c: Add BFD_RELOC_NDS32_LSI.
  571. * bfd-in2.h: Regenerated.
  572. * bfd/libbfd.h: Regenerated.
  573. * elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
  574. (nds32_reloc_map): Likewise.
  575. (nds32_elf_relax_flsi): New function.
  576. (nds32_elf_relax_section): Support floating load/store relaxation.
  577. * elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
  578. New macro.
  579. (struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
  580. (struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
  581. (elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
  582. nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
  583. New functions.
  584. (nds32_info_to_howto_rel): Add BFD_ASSERT.
  585. (bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
  586. nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
  587. nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
  588. bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
  589. (nds32_elf_final_sda_base): Improve it to find the better gp value.
  590. (insert_nds32_elf_blank): Must consider `len' when inserting blanks.
  591. * elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
  592. (struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
  593. * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
  594. (create_got_section): Likewise.
  595. (allocate_dynrelocs, nds32_elf_size_dynamic_sections,
  596. nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
  597. (nds32_elf_check_relocs): Fix the issue that the shared library may
  598. has TEXTREL entry in the dynamic section.
  599. (nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
  600. since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
  601. (nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
  602. dynamic entry.
  603. (calculate_offset): Remove the unused parameter `pic_ext_target' and
  604. related codes.
  605. All callers changed.
  606. (elf_backend_dtrel_excludes_plt): Disable it temporarily since it
  607. will cause some errors for our test cases.
  608. * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
  609. generic object.
  610. * reloc.c: Add TLS relocations.
  611. * libbfd.h: Regenerated.
  612. * bfd-in2.h: Regenerated.
  613. * elf32-nds32.h (struct section_id_list_t): New.
  614. (elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
  615. elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
  616. New prototypes.
  617. (elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
  618. New macro.
  619. (nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
  620. elf_nds32_link_hash_table): Updated.
  621. * elf32-nds32.c (enum elf_nds32_tls_type): New.
  622. (struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
  623. (elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
  624. fls, ones32, list_insert, list_insert_sibling, dump_chain,
  625. elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
  626. elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
  627. (elf_nds32_obj_tdata): Add new fields.
  628. (elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
  629. (nds32_elf_howto_table): Add TLS relocations.
  630. (nds32_reloc_map): Likewise.
  631. (nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
  632. nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
  633. nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
  634. nds32_elf_check_relocs, allocate_dynrelocs): Updated.
  635. (nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
  636. (dtpoff_base): Rename it to `gottpof' and then update it.
  637. 2018-09-20 Alan Modra <amodra@gmail.com>
  638. PR 23685
  639. * peXXigen.c (pe_print_edata): Correct export address table
  640. overflow checks. Check dataoff against section size too.
  641. 2018-09-20 Alan Modra <amodra@gmail.com>
  642. PR 23686
  643. * dwarf2.c (read_section): Error when attempting to malloc
  644. "(bfd_size_type) -1".
  645. * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
  646. function_name. Bounds check reloc address. Formatting. Ensure
  647. .stabstr zero terminated.
  648. 2018-09-18 Nick Clifton <nickc@redhat.com>
  649. PR 23657
  650. * elfcode.h (elf_swap_shdr_in): Generate a warning message if an
  651. ELF section has contents and size larger than the file size.
  652. 2018-09-14 Maciej W. Rozycki <macro@mips.com>
  653. PR ld/21375
  654. * elfxx-mips.h (_bfd_mips_elf_hide_symbol): New prototype.
  655. (_bfd_mips_elf_linker_flags): Update prototype.
  656. * elf32-mips.c (elf_backend_hide_symbol): New macro.
  657. * elf64-mips.c (elf_backend_hide_symbol): Likewise.
  658. * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
  659. * elfxx-mips.c (mips_elf_link_hash_table): Add
  660. `use_absolute_zero' and `gnu_target' members.
  661. (mips_elf_record_global_got_symbol): Call
  662. `_bfd_mips_elf_hide_symbol' rather than
  663. `_bfd_elf_link_hash_hide_symbol'.
  664. (mips_use_local_got_p): Return FALSE if the symbol is absolute.
  665. (mips_elf_obtain_contents): Reorder function.
  666. (mips_elf_nullify_got_load): New function.
  667. (mips_elf_calculate_relocation): Add `contents' parameter.
  668. Nullify GOT loads or if it is not possible, then redirect GOT
  669. relocations to the `__gnu_absolute_zero' symbol, for references
  670. that are supposed to resolve to zero.
  671. (mips_elf_define_absolute_zero): New function.
  672. (_bfd_mips_elf_check_relocs): Prepare for arrangements made in
  673. `mips_elf_calculate_relocation' for references made via the GOT
  674. that are supposed to resolve to zero.
  675. (_bfd_mips_elf_hide_symbol): New function.
  676. (_bfd_mips_elf_linker_flags): Add the `gnu_target' parameter,
  677. set the `gnu_target' member of the MIPS hash table.
  678. (MIPS_LIBC_ABI_ABSOLUTE): New enumeration constant.
  679. (_bfd_mips_post_process_headers): Use it.
  680. 2018-09-14 Maciej W. Rozycki <macro@mips.com>
  681. * elfxx-mips.c (mips_elf_store_contents): New function...
  682. (mips_elf_perform_relocation): ... factored out from here.
  683. 2018-09-14 Lifang Xia <lifang_xia@c-sky.com>
  684. * elf32-csky.c (csky_elf_howto_table): Fill special_function of
  685. R_CKCORE_PCREL32.
  686. (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
  687. 2018-09-14 Alan Modra <amodra@gmail.com>
  688. PR 23425
  689. * reloc.c (bfd_generic_get_relocated_section_contents): Zero reloc
  690. fields in debug sections when reloc is against an undefined symbol
  691. and called from bfd_simple_get_relocated_section_contents or
  692. similar.
  693. * dwarf2.c (find_abstract_instance): Return true for zero offset
  694. DW_FORM_ref_addr without returning values.
  695. 2018-09-06 Alan Modra <amodra@gmail.com>
  696. PR 23570
  697. * elf32-avr.c (elf_avr_special_sections): New.
  698. (elf_backend_special_sections): Define.
  699. 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
  700. * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
  701. error when an invalid relocation is passed; this is already done
  702. by `_bfd_sparc_elf_info_to_howto_ptr'.
  703. 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
  704. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
  705. error when an invalid symbol index is retrieved in ELF64_R_SYM of
  706. a relocation seen in an input file.
  707. 2018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  708. Alan Modra <amodra@gmail.com>
  709. PR 23595
  710. elf.c (copy_elf_program_header): When first segment contains
  711. only the headers and SHT_NOBITS sections, use segment p_filesz
  712. to calculate header and padding size. Use filepos of the first
  713. section otherwise.
  714. 2018-08-31 H.J. Lu <hongjiu.lu@intel.com>
  715. PR ld/23600
  716. * archures.c (bfd_arch_get_compatible): Allow an IR object with
  717. unknown architecture.
  718. 2018-08-31 Alan Modra <amodra@gmail.com>
  719. * elf64-ppc.c (num_relocs_for_offset): New function.
  720. (emit_relocs_for_offset): New function.
  721. (use_global_in_relocs): New function, split out from..
  722. (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
  723. (ppc_size_one_stub): Calculate reloc count for notoc stubs.
  724. (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
  725. 2018-08-31 Alan Modra <amodra@gmail.com>
  726. * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
  727. (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
  728. (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
  729. Define.
  730. * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
  731. (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
  732. (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
  733. * bfd-in2.h: Regenerate.
  734. * libbfd.h: Regenerate.
  735. 2018-08-31 Alan Modra <amodra@gmail.com>
  736. * elf64-ppc.c: Correct _notoc stub comments.
  737. (ppc_build_one_stub): Simplify output of branch for notoc
  738. long branch stub. Don't include label offset of 8 bytes in
  739. "off" calculation for notoc plt stub. Don't emit insns to get pc.
  740. (build_offset): Emit insns to get pc here instead.
  741. (size_offset): Add 4 extra insns.
  742. (plt_stub_size): Adjust for "off" and size_offset changes.
  743. (ppc_size_one_stub): Rearrange code into a switch, duplicating
  744. some to better match ppc_build_one_stub.
  745. 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
  746. * archures.c (bfd_architecture): New machine
  747. bfd_mach_mips_gs264e.
  748. * bfd-in2.h (bfd_architecture): Likewise.
  749. * cpu-mips.c (enum I_xxx): Likewise.
  750. (arch_info_struct): Likewise.
  751. * elfxx-mips.c (_bfd_elf_mips_mach): Handle
  752. E_MIPS_MACH_GS264E.
  753. (mips_set_isa_flags): Likewise.
  754. (mips_mach_extensions): Map bfd_mach_mips_gs264e to
  755. bfd_mach_mips_gs464e extension.
  756. 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
  757. * archures.c (bfd_architecture): New machine
  758. bfd_mach_mips_gs464e.
  759. * bfd-in2.h (bfd_architecture): Likewise.
  760. * cpu-mips.c (enum I_xxx): Likewise.
  761. (arch_info_struct): Likewise.
  762. * elfxx-mips.c (_bfd_elf_mips_mach): Handle
  763. E_MIPS_MACH_GS464E.
  764. (mips_set_isa_flags): Likewise.
  765. (mips_mach_extensions): Map bfd_mach_mips_gs464e to
  766. bfd_mach_mips_gs464 extension.
  767. 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
  768. * archures.c (bfd_architecture): Rename
  769. bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
  770. * bfd-in2.h (bfd_architecture): Likewise.
  771. * cpu-mips.c (enum I_xxx): Likewise.
  772. (arch_info_struct): Likewise.
  773. * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
  774. (mips_set_isa_flags): Likewise.
  775. (mips_mach_extensions): Likewise.
  776. (bfd_mips_isa_ext_mach): Likewise.
  777. (bfd_mips_isa_ext): Likewise.
  778. (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
  779. 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
  780. * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
  781. 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
  782. * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
  783. isa_ext for infer ABI flags.
  784. (print_mips_ases): Add Loongson EXT extension.
  785. 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
  786. * elfxx-mips.c (print_mips_ases): Add CAM extension.
  787. 2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
  788. * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
  789. out the GNU_PROPERTY_X86_UINT32_VALID bit.
  790. 2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
  791. PR ld/23499
  792. * elf.c (_bfd_elf_get_symbol_version_string): Return
  793. _("<corrupt>") for corrupt symbol version info.
  794. 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
  795. * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
  796. X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
  797. X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
  798. X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
  799. instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
  800. (_bfd_x86_elf_merge_gnu_properties): Likewise.
  801. (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
  802. instead of X86_ISA_1_NEEDED.
  803. (_bfd_x86_elf_link_fixup_gnu_properties): Handle
  804. X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
  805. X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
  806. X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
  807. X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
  808. 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
  809. * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
  810. GNU_PROPERTY_X86_UINT32_VALID bit.
  811. (_bfd_x86_elf_link_fixup_gnu_properties): Set the
  812. GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
  813. 2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
  814. PR 23460
  815. * plugin.c (struct plugin_list_entry): New structure.
  816. (plugin_list): New variable.
  817. (try_load_plugin): Place opened plugins on a list. Ensure that
  818. the refcount in the dynamic loader is kept at 1.
  819. 2018-08-23 Alan Modra <amodra@gmail.com>
  820. * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
  821. nop" error message.
  822. 2018-08-23 Nick Clifton <nickc@redhat.com>
  823. * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
  824. code with an assertion.
  825. 2018-08-23 Nick Clifton <nickc@redhat.com>
  826. PR 23061
  827. * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
  828. it to prevent walking off the end of the table.
  829. (coff_get_normalized_symtab): Pass internal_end pointer to
  830. coff_pointerize_aux.
  831. 2018-08-23 Alan Modra <amodra@gmail.com>
  832. * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
  833. unresolved_reloc on ppc_stub_plt_call_notoc.
  834. 2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
  835. PR ld/23536
  836. * development.sh (experimental): New.
  837. 2018-08-22 Helge Deller <deller@gmx.de>
  838. Nick Clifton <nickc@redhat.com>
  839. * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
  840. the section type of the .PARISC.unwind section on 64-bit binaries
  841. and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
  842. Add comment about the sh_entsize value.
  843. 2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
  844. PR 23560
  845. * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
  846. stub's target, since it may have been changed after the layout.
  847. 2018-08-21 John Darington <john@darrington.wattle.id.au>
  848. * elf32-s12z.c (opru18_reloc): New function.
  849. (elf_s12z_howto_table): Adjust Howto according to new knowledge.
  850. 2018-08-21 mephi42 <mephi42@gmail.com>
  851. PR binutils/23315
  852. * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
  853. data is already considered filled.
  854. 2018-08-21 Alan Modra <amodra@gmail.com>
  855. * elf64-ppc.c (HOW): Define.
  856. (ONES): Delete.
  857. (ppc64_elf_howto_raw): Use HOW to initialize entries.
  858. * elf32-ppc.c (HOW): Define.
  859. (ppc_elf_howto_raw): Use HOW to initialize entries, updating
  860. R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
  861. 2018-08-21 Alan Modra <amodra@gmail.com>
  862. * reloc.c (reloc_howto_type): Typedef.
  863. (bfd_symbol): Delete forward declaration.
  864. (struct reloc_howto_struct): Add "negate" field. Make "size",
  865. "bitsize", "rightshift", "bitpos", "complain_on_overflow",
  866. "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
  867. Rearrange for better packing. Revise comments.
  868. (HOWTO): Map to rearranged reloc_howto_struct.
  869. (bfd_get_reloc_size): Delete now unused cases.
  870. (read_reloc, write_reloc): Likewise.
  871. (apply_reloc, _bfd_relocate_contents): Test howto->negate
  872. rather than howto->size < 0 for negated relocation values.
  873. * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
  874. signed/unsigned warning.
  875. (xcoff_ppc_relocate_section): Delete "condition is always false"
  876. code.
  877. * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
  878. * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
  879. changes.
  880. * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
  881. size 16 for ALPHA_R_LINKAGE.
  882. (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
  883. bitsize to zero.
  884. * bfd-in.h (reloc_howto_type): Delete.
  885. * bfd-in2.h: Regenerate.
  886. 2018-08-21 Alan Modra <amodra@gmail.com>
  887. * reloc.c (HOWTO): Revise comment.
  888. (NEWHOWTO, HOWTO_PREPARE): Delete.
  889. * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
  890. reloc_howto_struct with reloc_howto_type.
  891. * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
  892. * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
  893. * elf-hppa.h (HOW): Define.
  894. (elf_hppa_howto_table): Use it to simplify this table, correcting
  895. name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
  896. R_PARISC_LTOFF_FPTR16DF.
  897. * elf32-mep.c (MEPREL): Use HOWTO.
  898. * bfd-in2.h: Regenerate.
  899. 2018-08-20 Alan Modra <amodra@gmail.com>
  900. * mmo.c (valid_mmo_symbol_character_set): Initialize and make
  901. array const.
  902. (mmo_init): Don't init valid_mmo_symbol_character_set.
  903. 2018-08-20 Alan Modra <amodra@gmail.com>
  904. * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
  905. 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
  906. PR ld/23515
  907. * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
  908. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
  909. backend fixup_gnu_properties if it isn't NULL. Discard
  910. .note.gnu.property section if all properties have been removed.
  911. * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
  912. (elfNN_bed): Initialize fixup_gnu_properties.
  913. * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
  914. function.
  915. * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
  916. prototype.
  917. (elf_backend_fixup_gnu_properties): New.
  918. 2018-08-16 Alan Modra <amodra@gmail.com>
  919. * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
  920. Formatting.
  921. 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
  922. PR binutils/23494
  923. * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
  924. (BFD32_LIBS_CFILES): Add elf-properties.c.
  925. (BFD32_BACKENDS): Remove elf-properties.lo.
  926. (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
  927. * configure.ac (elf): Remove elf-properties.lo.
  928. * Makefile.in: Regenerated.
  929. * configure: Likewise.
  930. 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
  931. PR ld/23428
  932. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
  933. add X86_ISA_1_NEEDED property only if existing properties won't
  934. be removed.
  935. 2018-08-11 Alan Modra <amodra@gmail.com>
  936. * reloc.c (bfd_get_reloc_size): Sort switch.
  937. (read_reloc, write_reloc, apply_reloc): New functions.
  938. (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
  939. (_bfd_relocate_contents): Use read_reloc and write_reloc.
  940. (_bfd_clear_contents): Likewise.
  941. 2018-08-11 John Darrington <john@darrington.wattle.id.au>
  942. * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
  943. (_bfd_clear_contents): Likewise.
  944. (bfd_perform_relocation): Likewise.
  945. (bfd_install_relocation): Likewise.
  946. 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
  947. PR ld/23499
  948. * elflink.c (bfd_elf_record_link_assignment): Always clear
  949. h->verinfo.verdef when overriding a dynamic definition.
  950. 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
  951. PR binutils/23494
  952. * elf-properties.c (elf_get_gnu_property_section_size): Always
  953. use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
  954. (elf_write_gnu_properties): Likewise.
  955. 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
  956. PR binutils/23494
  957. * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
  958. calling _bfd_elf_convert_gnu_property_size to convert
  959. .note.gnu.property section size.
  960. (bfd_convert_section_contents): Check BFD_DECOMPRESS after
  961. calling _bfd_elf_convert_gnu_properties to convert
  962. .note.gnu.property section.
  963. * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
  964. (_bfd_elf_convert_gnu_properties): Likewise.
  965. * elf-properties.c (elf_get_gnu_property_section_size): New
  966. function.
  967. (elf_write_gnu_properties): Likewise.
  968. (_bfd_elf_convert_gnu_property_size): Likewise.
  969. (_bfd_elf_convert_gnu_properties): Likewise.
  970. (_bfd_elf_link_setup_gnu_properties): Use
  971. elf_get_gnu_property_section_size and elf_write_gnu_properties.
  972. 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
  973. PR ld/23486
  974. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
  975. GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
  976. (_bfd_x86_elf_link_setup_gnu_properties): Adding the
  977. GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
  978. GNU_PROPERTY_X86_ISA_1_USED, property.
  979. 2018-08-07 Alan Modra <amodra@gmail.com>
  980. * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
  981. Add lr_restore, eh_size and eh_base.
  982. (eh_advance, eh_advance_size): New functions.
  983. (build_tls_get_addr_stub): Emit EH info for stub.
  984. (ppc_build_one_stub): Likewise for _notoc stubs.
  985. (ppc_size_one_stub): Size EH info for stub.
  986. (group_sections): Init new map_stub fields.
  987. (stub_eh_frame_size): Delete.
  988. (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
  989. program for stubs.
  990. (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
  991. offset to stub section here..
  992. (ppc64_elf_finish_dynamic_sections): ..rather than here.
  993. 2018-08-07 Alan Modra <amodra@gmail.com>
  994. * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
  995. instruction of __tls_get_addr_opt stub.
  996. (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
  997. dealing with __tls_get_addr_opt stub.
  998. (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
  999. 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
  1000. * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
  1001. efalgs only when in/out exists.
  1002. (elf32_arc_section_from_shdr): Don't complain about 0x0c
  1003. section type. It is mwdt compiler specific.
  1004. 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
  1005. * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
  1006. 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
  1007. * elf32-arc.c (arc_elf_merge_attributes): Handle
  1008. Tag_ARC_ATR_version.
  1009. 2018-08-05 Alan Modra <amodra@gmail.com>
  1010. * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
  1011. (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
  1012. (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
  1013. (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
  1014. (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
  1015. (ppc_stub_type): Add ppc_stub_long_branch_notoc,
  1016. ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
  1017. ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
  1018. ppc_stub_plt_call_both.
  1019. (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
  1020. (build_offset, size_offset): New functions.
  1021. (plt_stub_size): Support plt_call_notoc and plt_call_both.
  1022. (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
  1023. (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
  1024. (ppc64_elf_size_stubs): Likewise, and new stubs.
  1025. (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
  1026. * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
  1027. * bfd-in2.h: Regenerate.
  1028. * libbfd.h: Regenerate.
  1029. 2018-08-05 Alan Modra <amodra@gmail.com>
  1030. * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
  1031. 2018-08-02 Jim Wilson <jimw@sifive.com>
  1032. * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
  1033. add SEC_LINKER_CREATED flag.
  1034. 2018-08-01 Nick Clifton <nickc@redhat.com>
  1035. * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
  1036. about potentially truncated strncpy operations.
  1037. (_bfd_xcoff_put_symbol_name): Likewise.
  1038. * elf32-avr.c (avr_stub_name): Check for a NULL return from
  1039. bfd_malloc.
  1040. 2018-08-01 Zenith <zenith432@users.sourceforge.net>
  1041. PR 23460
  1042. * plugin.c (bfd_plugin_open_input): Close file descriptor if the
  1043. call to fstat fails.
  1044. (try_claim): Always close the file descriptor at the end of the
  1045. function.
  1046. (try_load_plugin): If a plugin has already been registered, then
  1047. skip the dlopen and onload steps and go straight to claiming the
  1048. file. If these is an error, close the plugin.
  1049. 2018-08-01 Alan Modra <amodra@gmail.com>
  1050. * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
  1051. (ppc_build_one_stub): Don't set stub_offset, instead assert that
  1052. it is sane. Don't adjust stub_offset for alignment. Adjust size
  1053. calculation. Use "targ" temp when calculating offsets.
  1054. (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
  1055. calculating offsets. Adjust for alignment before setting
  1056. tls_get_addr_opt_bctrl.
  1057. 2018-08-01 Alan Modra <amodra@gmail.com>
  1058. * po/SRC-POTFILES.in: Regenerate.
  1059. 2018-07-30 Nick Clifton <nickc@redhat.com>
  1060. PR 22706
  1061. * elf32-sh.c (sh_elf_relocate_section): When processing
  1062. translation relocs, fail if the relocation offset is too small.
  1063. Replace BFD_ASSERTs with more helpful error messages.
  1064. 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
  1065. * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
  1066. (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
  1067. * Makefile.in: Regenerated.
  1068. * archures.c (enum bfd_architecture): Add bfd_arch_csky and
  1069. related bfd_mach defines.
  1070. (bfd_csky_arch): Declare.
  1071. (bfd_archures_list): Add C-SKY.
  1072. * bfd-in.h (elf32_csky_build_stubs): Declare.
  1073. (elf32_csky_size_stubs): Declare.
  1074. (elf32_csky_next_input_section: Declare.
  1075. (elf32_csky_setup_section_lists): Declare.
  1076. * bfd-in2.h: Regenerated.
  1077. * config.bfd: Add C-SKY.
  1078. * configure.ac: Likewise.
  1079. * configure: Regenerated.
  1080. * cpu-csky.c: New file.
  1081. * elf-bfd.h (enum elf_target_id): Add C-SKY.
  1082. * elf32-csky.c: New file.
  1083. * libbfd.h: Regenerated.
  1084. * reloc.c: Add C-SKY relocations.
  1085. * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
  1086. (_bfd_target_vector): Add C-SKY target vector entries.
  1087. 2018-07-27 John Darrington <john@darrington.wattle.id.au>
  1088. * elf32-s12z.c (ELF_TARGET_ID): Don't define.
  1089. 2018-07-27 John Darrington <john@darrington.wattle.id.au>
  1090. * libbfd.c (bfd_getb24, bfd_getl24): New functions.
  1091. (bfd_get_24, bfd_put_24): New macros.
  1092. * bfd-in2.h: Regenerate.
  1093. 2018-07-27 John Darrington <john@darrington.wattle.id.au>
  1094. * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
  1095. 2018-07-26 Alan Modra <amodra@gmail.com>
  1096. * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
  1097. for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
  1098. 2018-07-25 Alan Modra <amodra@gmail.com>
  1099. * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
  1100. Avoid trashing toff with added when used as a symbol index.
  1101. Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
  1102. creating unnecessary fixups when relocatable.
  1103. 2018-07-25 Alan Modra <amodra@gmail.com>
  1104. * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
  1105. -Wstringop-truncation warning for gcc-8.0 too.
  1106. * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
  1107. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
  1108. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
  1109. * elf32-s390.c (elf_s390_write_core_note): Comment fix.
  1110. * elf64-s390.c (elf_s390_write_core_note): Likewise.
  1111. 2018-07-24 Alan Modra <amodra@gmail.com>
  1112. PR 23430
  1113. * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
  1114. * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
  1115. 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
  1116. * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
  1117. relocation sections consistency check to always check both
  1118. .rela.dyn and .rela.plt when they exist. Rearrange variable
  1119. definition and assignment places.
  1120. 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
  1121. * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
  1122. relocations section for dynamic undefined weak symbols when
  1123. linking a shared object.
  1124. 2018-07-23 Tom Tromey <tom@tromey.com>
  1125. * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
  1126. 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
  1127. * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
  1128. cleanup for the case of a global symbol that binds locally. Also
  1129. install a value in the GOT slot in the case of a local symbol in
  1130. a non-PIC link.
  1131. 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
  1132. PR ld/23428
  1133. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
  1134. separate code program header is needed, make sure that the first
  1135. read-only PT_LOAD segment has no code by adding a
  1136. GNU_PROPERTY_X86_ISA_1_USED note.
  1137. 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
  1138. Maciej W. Rozycki <macro@mips.com>
  1139. * elfxx-mips.c (print_mips_ases): Add MMI extension.
  1140. 2018-07-20 Maciej W. Rozycki <macro@mips.com>
  1141. * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
  1142. create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
  1143. dynamic relocation section will be discarded from output.
  1144. (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
  1145. the dynamic relocation section will be retained in output.
  1146. 2018-07-18 Maciej W. Rozycki <macro@mips.com>
  1147. * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
  1148. checks for defined weak symbols.
  1149. 2018-07-17 Maciej W. Rozycki <macro@mips.com>
  1150. * elf32-nds32.c (nds32_elf_relax_loadstore): Use
  1151. `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
  1152. whether the symbol is absolute.
  1153. (nds32_elf_relax_lo12): Likewise.
  1154. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
  1155. (elfNN_aarch64_check_relocs): Likewise.
  1156. * xcofflink.c (xcoff_need_ldrel_p): Likewise.
  1157. (bfd_xcoff_import_symbol): Likewise.
  1158. (xcoff_write_global_symbol): Likewise.
  1159. 2018-07-17 Maciej W. Rozycki <macro@mips.com>
  1160. * linker.c (bfd_is_abs_symbol): New macro.
  1161. * bfd-in2.h: Regenerate.
  1162. 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
  1163. * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
  1164. (elfcore_write_ppc_ppr): Likewise.
  1165. (elfcore_write_ppc_dscr): Likewise.
  1166. (elfcore_write_ppc_ebb): Likewise.
  1167. (elfcore_write_ppc_pmu): Likewise.
  1168. (elfcore_write_ppc_tm_cgpr): Likewise.
  1169. (elfcore_write_ppc_tm_cfpr): Likewise.
  1170. (elfcore_write_ppc_tm_cvmx): Likewise.
  1171. (elfcore_write_ppc_tm_cvsx): Likewise.
  1172. (elfcore_write_ppc_tm_spr): Likewise.
  1173. (elfcore_write_ppc_tm_ctar): Likewise.
  1174. (elfcore_write_ppc_tm_cppr): Likewise.
  1175. (elfcore_write_ppc_tm_cdscr): Likewise.
  1176. * elf.c (elfcore_write_ppc_tar): New function.
  1177. (elfcore_write_ppc_ppr): Likewise.
  1178. (elfcore_write_ppc_dscr): Likewise.
  1179. (elfcore_write_ppc_ebb): Likewise.
  1180. (elfcore_write_ppc_pmu): Likewise.
  1181. (elfcore_write_ppc_tm_cgpr): Likewise.
  1182. (elfcore_write_ppc_tm_cfpr): Likewise.
  1183. (elfcore_write_ppc_tm_cvmx): Likewise.
  1184. (elfcore_write_ppc_tm_cvsx): Likewise.
  1185. (elfcore_write_ppc_tm_spr): Likewise.
  1186. (elfcore_write_ppc_tm_ctar): Likewise.
  1187. (elfcore_write_ppc_tm_cppr): Likewise.
  1188. (elfcore_write_ppc_tm_cdscr): Likewise.
  1189. (elfcore_write_register_note): Call them.
  1190. (elfcore_grok_ppc_tar): New function.
  1191. (elfcore_grok_ppc_ppr): Likewise.
  1192. (elfcore_grok_ppc_dscr): Likewise.
  1193. (elfcore_grok_ppc_ebb): Likewise.
  1194. (elfcore_grok_ppc_pmu): Likewise.
  1195. (elfcore_grok_ppc_tm_cgpr): Likewise.
  1196. (elfcore_grok_ppc_tm_cfpr): Likewise.
  1197. (elfcore_grok_ppc_tm_cvmx): Likewise.
  1198. (elfcore_grok_ppc_tm_cvsx): Likewise.
  1199. (elfcore_grok_ppc_tm_spr): Likewise.
  1200. (elfcore_grok_ppc_tm_ctar): Likewise.
  1201. (elfcore_grok_ppc_tm_cppr): Likewise.
  1202. (elfcore_grok_ppc_tm_cdscr): Likewise.
  1203. (elfcore_grok_note): Call them.
  1204. 2018-07-11 Maciej W. Rozycki <macro@mips.com>
  1205. * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
  1206. than `!bfd_link_pic' in determining the dynamic symbol index.
  1207. Avoid the index of -1.
  1208. (mips_elf_initialize_tls_slots): Likewise. Flatten code by
  1209. moving `dyn' to the beginning of the function block.
  1210. 2018-07-11 Maciej W. Rozycki <macro@mips.com>
  1211. Rich Felker <bugdal@aerifal.cx>
  1212. PR ld/22570
  1213. * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
  1214. than `bfd_link_pic' to determine whether dynamic relocations are
  1215. to be produced.
  1216. (mips_elf_initialize_tls_slots): Likewise.
  1217. 2018-07-10 Maciej W. Rozycki <macro@mips.com>
  1218. * elflink.c (bfd_elf_final_link): Rename `remove' local variable
  1219. to `remove_section'.
  1220. 2018-07-10 Alan Modra <amodra@gmail.com>
  1221. * elf32-xgate.h: Delete.
  1222. * elf32-xgate.c: Delete unnecessary forward declarations, add two
  1223. that are now needed.
  1224. (xgate_elf_bfd_link_hash_table_create)
  1225. (xgate_elf_bfd_link_hash_table_free)
  1226. (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
  1227. (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
  1228. (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
  1229. (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
  1230. (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
  1231. (elf32_xgate_post_process_headers): Delete.
  1232. (elf32_xgate_backend_symbol_processing): New function.
  1233. (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
  1234. (_bfd_xgate_elf_print_private_bfd_data): Make static.
  1235. (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
  1236. (elf_backend_relocate_section, elf_backend_object_p)
  1237. (elf_backend_final_write_processing, elf_backend_can_gc_sections)
  1238. (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
  1239. (bfd_elf32_bfd_link_hash_table_create)
  1240. (bfd_elf32_bfd_set_private_flags)
  1241. (xgate_stub_hash_lookup): Don't define.
  1242. (elf_backend_symbol_processing): Define.
  1243. * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
  1244. 2018-07-09 Maciej W. Rozycki <macro@mips.com>
  1245. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
  1246. `->needs_lazy_stub' if the stubs output section is the absolute
  1247. section.
  1248. 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
  1249. PR ld/23388
  1250. * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
  1251. * configure: Regenerated.
  1252. 2018-07-09 Alan Modra <amodra@gmail.com>
  1253. * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
  1254. _bfd_elf_post_process_headers.
  1255. 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
  1256. * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
  1257. space for dynamic relocation for undefined weak symbol.
  1258. (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
  1259. relocation for undefined weak symbols.
  1260. (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
  1261. section for relocations against undefined weak symbols.
  1262. 2018-07-06 Alan Hayward <alan.hayward@arm.com>
  1263. * elf.c (elfcore_grok_aarch_sve): New function.
  1264. (elfcore_grok_note): Check for Aarch64 SVE.
  1265. (elfcore_write_aarch_sve): New function.
  1266. (elfcore_write_register_note): Check for Aarch64 SVE.
  1267. * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
  1268. 2018-07-06 Alan Modra <amodra@gmail.com>
  1269. * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
  1270. DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
  1271. * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
  1272. * elf32-s390.c (elf_s390_write_core_note): Likewise.
  1273. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
  1274. * elf64-s390.c (elf_s390_write_core_note): Likewise.
  1275. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
  1276. 2018-07-05 Jim Wilson <jimw@sifive.com>
  1277. * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
  1278. (riscv64*-*-*): Likewise.
  1279. (riscv-*-*): Add as an alias for riscv32*-*-*.
  1280. 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
  1281. PR ld/23372
  1282. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
  1283. ISA properties with empty bits.
  1284. 2018-07-05 Nick Clifton <nickc@redhat.com>
  1285. * po/ru.po: Updated Russian translation.
  1286. 2018-07-05 Alan Modra <amodra@gmail.com>
  1287. * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
  1288. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
  1289. on mismatch. Remove "warning: " from messages. Track last bfd
  1290. used to set tags.
  1291. (ppc_elf_merge_obj_attributes): Likewise. Handle status from
  1292. _bfd_elf_ppc_merge_fp_attributes.
  1293. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
  1294. from _bfd_elf_ppc_merge_fp_attributes.
  1295. 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
  1296. * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
  1297. * Makefile.in: Regenerated.
  1298. 2018-07-03 Alan Modra <amodra@gmail.com>
  1299. * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
  1300. sections.
  1301. 2018-07-03 Alan Modra <amodra@gmail.com>
  1302. * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
  1303. * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
  1304. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
  1305. ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
  1306. incompatible attribute.
  1307. (ppc_elf_merge_obj_attributes): Likewise. Return
  1308. _bfd_elf_merge_object_attributes result.
  1309. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
  1310. _bfd_elf_merge_object_attributes result.
  1311. 2018-07-03 Alan Modra <amodra@gmail.com>
  1312. PR 17550
  1313. * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
  1314. in discarded sections.
  1315. 2018-07-02 Maciej W. Rozycki <macro@mips.com>
  1316. * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
  1317. `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
  1318. list.
  1319. 2018-07-02 Maciej W. Rozycki <macro@mips.com>
  1320. * elf64-mips.c (micromips_elf64_howto_table_rel): Add
  1321. R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
  1322. R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
  1323. R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
  1324. R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
  1325. R_MICROMIPS_PC23_S2 relocation entries.
  1326. (micromips_elf64_howto_table_rela): Likewise.
  1327. (micromips_reloc_map): Likewise.
  1328. * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
  1329. (elf_micromips_howto_table_rela): Likewise.
  1330. (micromips_reloc_map): Likewise.
  1331. 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
  1332. PR ld/23324
  1333. * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
  1334. R_X86_64_converted_reloc_bit bit.
  1335. 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
  1336. Tom Tromey <tom@tromey.com>
  1337. PR 13157
  1338. PR 21787
  1339. * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
  1340. (bfd_mach_o_close_and_cleanup): Redefine.
  1341. * archive.c (_bfd_unlink_from_archive_parent): New function,
  1342. extracted from..
  1343. (_bfd_archive_close_and_cleanup): ..here.
  1344. (bfd_generic_archive_p): Do not clear archive's format.
  1345. * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
  1346. * libbfd.h: Regenerate.
  1347. 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
  1348. * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
  1349. bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
  1350. bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
  1351. bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
  1352. * bfd-in2.h: Regenerate.
  1353. * cpu-arm.c (arch_info_struct): Add entries for above new
  1354. bfd_mach_arm values.
  1355. * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
  1356. bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
  1357. architectures. Force assert failure for any new Tag_CPU_arch value.
  1358. 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
  1359. * doc/bfdint.texi: Use command-line consistently when used in a
  1360. compount word.
  1361. * doc/bfdsumm.texi: Likewise.
  1362. 2018-06-29 Maciej W. Rozycki <macro@mips.com>
  1363. * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
  1364. visibility check made for undefined weak symbols.
  1365. 2018-06-26 Nick Clifton <nickc@redhat.com>
  1366. * po/uk.po: Updated Ukranian translation.
  1367. 2018-06-25 Nick Clifton <nickc@redhat.com>
  1368. * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
  1369. for malloc returning NULL.
  1370. (_bfd_aarch64_erratum_843419_fixup): Check for
  1371. _bfd_aarch64_erratum_835769_stub_name returning NULL.
  1372. 2018-06-24 Nick Clifton <nickc@redhat.com>
  1373. * po/bfd.pot: Regenerate.
  1374. 2018-06-24 Nick Clifton <nickc@redhat.com>
  1375. * version.m4: Update version string to 2.31.51.
  1376. * configure: Regenerate.
  1377. 2018-06-24 Nick Clifton <nickc@redhat.com>
  1378. 2.31 branch created.
  1379. 2018-06-21 Maciej W. Rozycki <macro@mips.com>
  1380. * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
  1381. (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
  1382. 2018-06-21 Maciej W. Rozycki <macro@mips.com>
  1383. * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
  1384. EI_ABIVERSION setting together.
  1385. 2018-06-21 Maciej W. Rozycki <macro@mips.com>
  1386. * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
  1387. (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
  1388. (MIPS_LIBC_ABI_MAX): New enumeration constants.
  1389. (_bfd_mips_post_process_headers): Use them in place of magic
  1390. numbers.
  1391. 2018-06-21 Jim Wilson <jimw@sifive.com>
  1392. * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
  1393. Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
  1394. 2018-06-21 Alan Modra <amodra@gmail.com>
  1395. * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
  1396. * doc/Makefile.in: Regenerate.
  1397. 2018-06-20 Renlin Li <renlin.li@arm.com>
  1398. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
  1399. to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
  1400. BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
  1401. BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
  1402. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
  1403. BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
  1404. BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
  1405. BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
  1406. BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
  1407. 2018-06-20 Nick Clifton <nickc@redhat.com>
  1408. PR 23316
  1409. * opncls.c (get_build_id): Check for a negative or excessive data
  1410. size in the build-id note.
  1411. 2018-06-20 Nick Clifton <nickc@redhat.com>
  1412. PR 23299
  1413. * mach-o.c (cputype): New function.
  1414. (cpusubtype): New function.
  1415. (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
  1416. values in the MACH-O file header.
  1417. (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
  1418. cpusubtype fields from the input bfd's mach-o header to the output
  1419. bfd.
  1420. * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
  1421. Redefine to bfd_mach_o_bfd_print_private_data.
  1422. * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
  1423. 2018-06-19 Maciej W. Rozycki <macro@mips.com>
  1424. PR ld/22966
  1425. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
  1426. `.got.plt' entry referred is in range.
  1427. (mips_finish_exec_plt): Correct the range check for `.got.plt'
  1428. start. Replace the assertion used for that with a proper error
  1429. message.
  1430. 2018-06-19 Maciej W. Rozycki <macro@mips.com>
  1431. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
  1432. formatting.
  1433. 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
  1434. * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
  1435. (INCLUDES): Rename to ...
  1436. (AM_CPPFLAGS): ... this.
  1437. * configure.ac: Remove AC_PREREQ.
  1438. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
  1439. info-in-builddir no-texinfo.tex.
  1440. (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
  1441. * doc/bfd.texinfo: Rename to ...
  1442. * doc/bfd.texi: ... this.
  1443. * Makefile.in: Re-generate.
  1444. * aclocal.m4: Re-generate.
  1445. * config.in: Re-generate.
  1446. * configure: Re-generate.
  1447. * doc/Makefile.in: Re-generate.
  1448. 2018-06-18 Mephi <mephi42@gmail.com>
  1449. PR 23297
  1450. * mach-o-x86-64.c (x86_64_howto_table): Add entry for
  1451. BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
  1452. (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
  1453. (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
  1454. * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
  1455. * bfd-in2.h: Regenerate.
  1456. * libbfd.h: Regenerate.
  1457. 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
  1458. * elfxx-mips.c (print_mips_ases): Add GINV extension.
  1459. 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
  1460. PR binutils/23267
  1461. * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
  1462. symbol version is base version.
  1463. 2018-06-14 Alan Modra <amodra@gmail.com>
  1464. * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
  1465. * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
  1466. (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
  1467. (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
  1468. "dynamic_relocs" is not set.
  1469. * elfxx-mips.c (count_section_dynsyms): Likewise.
  1470. 2018-06-14 Alan Modra <amodra@gmail.com>
  1471. PR 23282
  1472. * bfdio.c (bfd_seek): Optimize away seeks to current position.
  1473. 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
  1474. Faraz Shahbazker <Faraz.Shahbazker@mips.com>
  1475. * elfxx-mips.c (print_mips_ases): Add CRC.
  1476. 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
  1477. PR ld/23161
  1478. * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
  1479. (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
  1480. __bss_start, _end and _edata in shared libraries.
  1481. 2018-06-07 Alan Modra <amodra@gmail.com>
  1482. * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
  1483. __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
  1484. 2018-06-05 Alan Modra <amodra@gmail.com>
  1485. * bfd.c (struct bfd): Update comment on "where" usage.
  1486. * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
  1487. "iostream", and "where" from containing archive file. Return
  1488. error on NULL iovec.
  1489. (bfd_bread): Similarly, and return error attempted out of
  1490. bounds archive element access.
  1491. (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
  1492. "where" from containing archive file.
  1493. (bfd_seek): Likewise. Return error on NULL iovec. Don't
  1494. attempt to optimize away seeks. Don't paper over errors by
  1495. calling bfd_tell.
  1496. (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
  1497. (bfd_get_size): Likewise.
  1498. (bfd_mmap): Operate on and use iovec of containing archive
  1499. file. Return error on NULL iovec.
  1500. * cache.c (bfd_cache_lookup_worker): Abort if working on
  1501. archive element bfd.
  1502. (cache_bread_1): Delete bfd parameter, add FILE* parameter.
  1503. Don't ignore zero byte reads.
  1504. (cache_bread): Look up FILE* in cache here. Error on NULL
  1505. lookup.
  1506. (cache_bwrite): Rename "where" to "from".
  1507. (cache_bmmap): Don't handle archive elements.
  1508. * coffcode.h (coff_slurp_line_table): Exit early on zero
  1509. lineno count.
  1510. * bfd-in2.h: Regenerate.
  1511. 2018-06-05 Alan Modra <amodra@gmail.com>
  1512. PR 23254
  1513. * plugin.c (bfd_plugin_open_input): Allow for possibility of
  1514. nested archives. Open file again for plugin.
  1515. (try_claim): Don't save and restore file position. Close file
  1516. if not claimed.
  1517. * sysdep.h (O_BINARY): Define.
  1518. 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
  1519. * elf32-xtensa.c (xtensa_read_table_entries): Make global.
  1520. (compute_fill_extra_space): Drop declaration. Rename function to
  1521. xtensa_compute_fill_extra_space.
  1522. (compute_ebb_actions, remove_dead_literal): Update references to
  1523. compute_fill_extra_space.
  1524. 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
  1525. * elf32-xtensa.c (elf32xtensa_separate_props): New global
  1526. variable.
  1527. (xtensa_add_names): New function.
  1528. (xtensa_property_section_name): Add new parameter
  1529. separate_sections, use it to choose property section name.
  1530. (xtensa_get_separate_property_section): New function.
  1531. (xtensa_get_property_section): Invoke
  1532. xtensa_get_separate_property_section to get individual property
  1533. section if it exists, common property section otherwise.
  1534. (xtensa_make_property_section): Pass elf32xtensa_separate_props
  1535. to xtensa_property_section_name.
  1536. 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
  1537. PR binutils/23146
  1538. * bfd-in.h: Include "diagnostics.h".
  1539. * bfd-in2.h: Regenerated.
  1540. * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
  1541. DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
  1542. DIAGNOSTIC_POP to silence GCC 8.1 warnings with
  1543. -Wstringop-truncation.
  1544. * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
  1545. * elf32-s390.c (elf_s390_write_core_note): Likewse.
  1546. * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
  1547. * elf64-s390.c (elf_s390_write_core_note): Likewse.
  1548. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
  1549. 2018-06-03 Jim Wilson <jimw@sifive.com>
  1550. PR ld/23244
  1551. * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
  1552. for and handle an undefined weak with no PLT.
  1553. PR ld/22756
  1554. * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
  1555. to code that ignores duplicate symbols.
  1556. 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
  1557. * version.m4: Bump version to 2.30.52
  1558. * configure: Regenerated.
  1559. 2018-06-01 Alan Modra <amodra@gmail.com>
  1560. * bfd.c (_bfd_error_handler): Arrange for this function to be
  1561. declared in bfd-in2.h.
  1562. * libbfd-in.h (_bfd_error_handler): Don't declare.
  1563. * libbfd.h: Regenerate.
  1564. * bfd-in2.h: Regenerate.
  1565. 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
  1566. * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
  1567. This is needed to generate UEFI application image files from ELFs.
  1568. 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
  1569. * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
  1570. plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
  1571. plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
  1572. plt_tlsdesc_got2_insn_end for TLSDESC entry.
  1573. (elf_i386_lazy_ibt_plt): Likewise.
  1574. (elf_i386_nacl_plt): Likewise.
  1575. * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
  1576. (elf_x86_64_tlsdesc_plt_entry): This.
  1577. (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
  1578. plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
  1579. plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
  1580. plt_tlsdesc_got2_insn_end for TLSDESC entry.
  1581. (elf_x86_64_lazy_bnd_plt): Likewise.
  1582. (elf_x86_64_lazy_ibt_plt): Likewise.
  1583. (elf_x32_lazy_ibt_plt): Likewise.
  1584. (elf_x86_64_nacl_plt): Likewise.
  1585. (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
  1586. plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
  1587. plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
  1588. plt_tlsdesc_got2_insn_end to update TLSDESC entry.
  1589. * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
  1590. Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
  1591. plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
  1592. plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
  1593. (elf_x86_non_lazy_plt_layout): Update comments.
  1594. (elf_x86_plt_layout): Likewise.
  1595. 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
  1596. PR ld/23238
  1597. * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
  1598. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
  1599. (elf_backend_add_symbol_hook): Likewise.
  1600. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
  1601. (elf_backend_add_symbol_hook): Likewise.
  1602. * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
  1603. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
  1604. (elf_backend_add_symbol_hook): Likewise.
  1605. * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
  1606. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
  1607. * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
  1608. (elf_backend_add_symbol_hook): Likewise.
  1609. * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
  1610. handling.
  1611. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
  1612. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
  1613. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
  1614. * elflink.c (elf_link_add_object_symbols): Set
  1615. elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
  1616. 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
  1617. PR ld/23194
  1618. * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
  1619. * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
  1620. Extracted from _bfd_elf_link_assign_sym_version.
  1621. (_bfd_elf_link_hide_sym_by_version): New function.
  1622. (_bfd_elf_link_assign_sym_version): Use
  1623. _bfd_elf_link_hide_versioned_symbol.
  1624. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
  1625. _bfd_elf_link_hide_sym_by_version instead of
  1626. bfd_hide_sym_by_version. Don't check unversioned symbol.
  1627. 2018-05-25 Alan Modra <amodra@gmail.com>
  1628. * Makefile.in: Regenerate.
  1629. * po/SRC-POTFILES.in: Regenerate.
  1630. 2018-05-25 Alan Modra <amodra@gmail.com>
  1631. * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
  1632. * configure: Regenerate.
  1633. 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
  1634. * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
  1635. to data.
  1636. 2018-05-22 Alan Modra <amodra@gmail.com>
  1637. PR 23207
  1638. * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
  1639. is NULL.
  1640. (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
  1641. sections.
  1642. (final_link_relocate): Revert last change.
  1643. 2018-05-22 Alan Modra <amodra@gmail.com>
  1644. PR 23207
  1645. * elf32-hppa.c (final_link_relocate): Don't look for plt call
  1646. stubs in non-alloc sections.
  1647. 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
  1648. PR ld/23201
  1649. * aout-target.h (MY_bfd_link_hide_symbol): New.
  1650. * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
  1651. * binary.c (binary_bfd_link_hide_symbol): Likewise.
  1652. * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
  1653. * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
  1654. * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
  1655. * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
  1656. * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
  1657. * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
  1658. * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
  1659. * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
  1660. * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
  1661. * linker.c (_bfd_generic_link_hide_symbol): Likewise.
  1662. (bfd_link_hide_symbol): Likewise.
  1663. * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
  1664. * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
  1665. * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
  1666. * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
  1667. * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
  1668. * som.c (som_bfd_link_hide_symbol): Likewise.
  1669. * srec.c (srec_bfd_link_hide_symbol): Likewise.
  1670. * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
  1671. * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
  1672. (alpha_vms_bfd_link_hide_symbol): Likewise.
  1673. * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
  1674. * coff64-rs6000.c (rs6000_xcoff64_vec): Add
  1675. _bfd_generic_link_hide_symbol.
  1676. (rs6000_xcoff64_aix_vec): Likewise.
  1677. * elflink.c (bfd_elf_record_link_assignment): Don't make forced
  1678. local symbol dynamic.
  1679. (_bfd_elf_link_hide_symbol): New function.
  1680. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
  1681. check root.ldscript_def.
  1682. * targets.c (bfd_target): Add _bfd_link_hide_symbol.
  1683. (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
  1684. * bfd-in2.h: Regenerated.
  1685. * libbfd.h: Likewise.
  1686. 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
  1687. PR binutils/23199
  1688. * elf.c (setup_group): Mark section in a section group with
  1689. SHF_GROUP.
  1690. 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
  1691. PR ld/23194
  1692. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
  1693. set eh->local_ref to 1 if a symbol is versioned and there is a
  1694. version script.
  1695. 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
  1696. * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
  1697. EF_RISCV_RVE.
  1698. 2018-05-18 Jim Wilson <jimw@sifive.com>
  1699. * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
  1700. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  1701. (riscv_elf_relocate_section): Don't generate dynamic relocation if
  1702. UNDEFWEAK_NO_DYNAMIC_RELOC is true.
  1703. (riscv_elf_finish_dynamic_symbol): Likewise.
  1704. 2018-05-18 John Darrington <john@darrington.wattle.id.au>
  1705. * Makefile.am: Add s12z files.
  1706. * Makefile.in: Regenerate.
  1707. * archures.c: Add bfd_s12z_arch.
  1708. * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
  1709. * bfd-in2.h: Regenerate.
  1710. * config.bfd: Add s12z target.
  1711. * configure.ac: Add s12z target.
  1712. * configure: Regenerate.
  1713. * cpu-s12z.c: New file.
  1714. * elf32-s12z.c: New file.
  1715. * libbfd.c (bfd_putb24): New function.
  1716. (bfd_putl24): New function.
  1717. * libbfd.h: Regenerate.
  1718. * reloc.c: Add s12z relocations.
  1719. (bfd_get_reloc_size): Handle size 5 relocs.
  1720. * targets.c: Add s12z_elf32_vec.
  1721. 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
  1722. PR ld/23189
  1723. * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
  1724. like R_386_GOT32.
  1725. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
  1726. set eh->local_ref to 1 for linker defined symbols.
  1727. 2018-05-18 Alan Modra <amodra@gmail.com>
  1728. PR 23199
  1729. * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
  1730. don't point at other SHT_GROUP sections. Set shdr corresponding
  1731. to invalid entry, to NULL rather than section 0. Identify
  1732. SHT_GROUP section index when reporting an error. Cope with NULL
  1733. shdr pointer.
  1734. 2018-05-18 Alan Modra <amodra@gmail.com>
  1735. * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
  1736. * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
  1737. visibility.
  1738. * libbfd.h: Regenerate.
  1739. * configure: Regenerate.
  1740. * config.in: Regenerate.
  1741. 2018-05-18 Alan Modra <amodra@gmail.com>
  1742. * libbfd-in.h: Add include guard.
  1743. * libcoff-in.h: Likewise.
  1744. * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
  1745. * doc/Makefile.in: Regenerate.
  1746. * libbfd.h: Regenerate.
  1747. * libcoff.h: Regenerate.
  1748. 2018-05-16 Maciej W. Rozycki <macro@mips.com>
  1749. * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
  1750. 2018-05-16 Alan Modra <amodra@gmail.com>
  1751. PR 22458
  1752. * format.c (struct bfd_preserve): Add section_id.
  1753. (bfd_preserve_save, bfd_preserve_restore): Save and restore
  1754. _bfd_section_id.
  1755. (bfd_reinit): Set _bfd_section_id.
  1756. (bfd_check_format_matches): Put all matches of any priority into
  1757. matching_vector. Save initial section id and start each attempted
  1758. match at that section id.
  1759. * libbfd-in.h (_bfd_section_id): Declare.
  1760. * section.c (_bfd_section_id): Rename from section_id and make
  1761. global. Adjust uses.
  1762. (bfd_get_next_section_id): Delete.
  1763. * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
  1764. bfd_get_section_id with _bfd_section_id.
  1765. * libbfd.h: Regenerate.
  1766. * bfd-in2.h: Regenerate.
  1767. 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
  1768. * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
  1769. of the aux structure are initialised.
  1770. 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
  1771. * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
  1772. 2018-05-15 Nick Clifton <nickc@redhat.com>
  1773. * po/pt.po: New Portuguese translation.
  1774. * configure.ac (ALL_LINGUAS): Add pt.
  1775. * configure: Regenerate.
  1776. 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
  1777. PR ld/23169
  1778. * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
  1779. an error on IFUNC pointer defined in PDE.
  1780. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
  1781. _bfd_x86_elf_link_fixup_ifunc_symbol.
  1782. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
  1783. * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
  1784. function.
  1785. * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
  1786. 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
  1787. PR ld/23162
  1788. * elfxx-x86.c (elf_x86_linker_defined): New function.
  1789. (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
  1790. _end and _edata locally defined within executables.
  1791. 2018-05-12 Alan Modra <amodra@gmail.com>
  1792. PR 20659
  1793. * elf.c (rewrite_elf_program_header): Use segment_mark only for
  1794. PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
  1795. Instead make matching_lma and suggested_lma pointers to the
  1796. sections. Align section vma and lma calculated from segment.
  1797. Don't clear includes_phdrs or includes_filehdr based on p_paddr
  1798. test. Try to handle alignment padding before first section by
  1799. adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
  1800. 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
  1801. * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
  1802. conformant to TI ABI.
  1803. (pru_elf32_relax_section): Likewise.
  1804. (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
  1805. * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
  1806. (pru_elf32_pmem_relocate): Trap - should not get here.
  1807. (pru_elf32_relocate_section): Add support for REL relocations.
  1808. (elf_info_to_howto_rel): Enable REL.
  1809. (elf_backend_may_use_rel_p): Likewise.
  1810. (elf_backend_may_use_rela_p): Likewise.
  1811. (elf_backend_default_use_rela_p): Likewise.
  1812. 2018-05-09 Alan Modra <amodra@gmail.com>
  1813. PR 23148
  1814. * peXXigen.c (pe_print_edata): Correct minimum size.
  1815. 2018-05-09 Alan Modra <amodra@gmail.com>
  1816. PR 23147
  1817. * peXXigen.c (pe_print_idata): Bound check hint_addr.
  1818. 2018-05-08 Nick Clifton <nickc@redhat.com>
  1819. PR 22809
  1820. * elf.c (bfd_elf_get_str_section): Check for an excessively large
  1821. string section.
  1822. * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
  1823. attribute section is larger than the size of the file.
  1824. 2018-05-07 Alan Modra <amodra@gmail.com>
  1825. * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
  1826. strncmp when checking for ".bf" special symbol.
  1827. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
  1828. section name a char array, remove sentinal known_sections entry,
  1829. and adjust loop over known_sections to suit. Use memcmp rather
  1830. than strncmp.
  1831. 2018-05-04 Alan Modra <amodra@gmail.com>
  1832. * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
  1833. (struct elf_external_linux_prpsinfo32_ugid16),
  1834. (struct elf_external_linux_prpsinfo64_ugid32),
  1835. (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
  1836. to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
  1837. Move comment to..
  1838. * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
  1839. directives.
  1840. * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
  1841. to data.
  1842. * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
  1843. * elf32-s390.c (elf_s390_write_core_note): Likewise.
  1844. * elf64-s390.c (elf_s390_write_core_note): Likewise.
  1845. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
  1846. * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
  1847. pragmas.
  1848. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
  1849. false positive gcc-8 warning.
  1850. * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
  1851. 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
  1852. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
  1853. of arguments when warning about different long double types.
  1854. 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
  1855. * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
  1856. (elf_backend_fixup_symbol): New macro.
  1857. * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
  1858. handling.
  1859. (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
  1860. 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
  1861. * Makefile.am: Added NFP files to build.
  1862. * archures.c: Added bfd_arch_nfp
  1863. * config.bfd: Added NFP support.
  1864. * configure.ac: Added NFP support.
  1865. * cpu-nfp.c: New, for NFP support.
  1866. * elf-bfd.h: Added elf_section_info()
  1867. * elf64-nfp.c: New, for NFP support.
  1868. * po/SRC-POTFILES.in: Added NFP source files.
  1869. * targets.c: Added nfp_elf64_vec
  1870. * bfd-in2.h: Regenerate.
  1871. * Makefile.in: Regenerate.
  1872. * configure: Regenerate.
  1873. 2018-04-27 Alan Modra <amodra@gmail.com>
  1874. * bfd-in2.h: Regenerate.
  1875. * libbfd.h: Regenerate.
  1876. 2018-04-27 Alan Modra <amodra@gmail.com>
  1877. PR 23123
  1878. PR 22374
  1879. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
  1880. relocs for ifuncs.
  1881. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
  1882. 2018-04-26 Pedro Alves <palves@redhat.com>
  1883. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
  1884. ifunc and non-ifunc symbols duplicates.
  1885. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1886. Mickaël Guêné <mickael.guene@st.com>
  1887. * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
  1888. (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
  1889. (elf32_arm_populate_plt_entry): Likewise.
  1890. (elf32_arm_output_plt_map_1): Likewise.
  1891. (elf32_arm_output_arch_local_syms): Likewise.
  1892. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1893. Mickaël Guêné <mickael.guene@st.com>
  1894. * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
  1895. _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
  1896. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1897. Mickaël Guêné <mickael.guene@st.com>
  1898. * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
  1899. for R_ARM_TARGET2.
  1900. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1901. Mickaël Guêné <mickael.guene@st.com>
  1902. * elf32-arm.c (DEFAULT_STACK_SIZE): New.
  1903. (elf32_arm_always_size_sections): Create stack segment.
  1904. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1905. Mickaël Guêné <mickael.guene@st.com>
  1906. * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
  1907. (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
  1908. relocations.
  1909. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
  1910. R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
  1911. (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
  1912. R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
  1913. (struct elf32_arm_link_hash_table): Update comment.
  1914. (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
  1915. (IS_ARM_TLS_RELOC): Likewise.
  1916. (elf32_arm_check_relocs): Likewise.
  1917. (allocate_dynrelocs_for_symbol): Likewise.
  1918. (elf32_arm_size_dynamic_sections): Update comment.
  1919. * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
  1920. BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
  1921. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1922. Mickaël Guêné <mickael.guene@st.com>
  1923. * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
  1924. (elf32_arm_create_dynamic_sections): Handle FDPIC.
  1925. (elf32_arm_allocate_plt_entry): Likewise.
  1926. (elf32_arm_populate_plt_entry): Likewise.
  1927. (elf32_arm_output_plt_map_1): Likewise.
  1928. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1929. Mickaël Guêné <mickael.guene@st.com>
  1930. * elf32-arm.c (struct fdpic_local): New.
  1931. (elf_arm_obj_tdata): Add local_fdpic_cnts field.
  1932. (elf32_arm_local_fdpic_cnts): New.
  1933. (struct fdpic_global): New.
  1934. (elf32_arm_link_hash_entry): Add fdpic_cnts field.
  1935. (elf32_arm_link_hash_table): Add srofixup field.
  1936. (arm_elf_add_rofixup): New.
  1937. (arm_elf_fill_funcdesc): New.
  1938. (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
  1939. (elf32_arm_allocate_local_sym_info): Likewise.
  1940. (create_got_section): Create .rofixup section.
  1941. (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
  1942. (bfd_elf32_arm_set_target_params): Handle FDPIC.
  1943. (elf32_arm_final_link_relocate): Likewise.
  1944. (elf32_arm_check_relocs): Likewise.
  1945. (allocate_dynrelocs_for_symbol): Likewise.
  1946. (elf32_arm_size_dynamic_sections): Likewise.
  1947. (elf32_arm_finish_dynamic_sections): Likewise.
  1948. (elf32_arm_output_arch_local_syms): Likewise.
  1949. (elf32_arm_fdpic_omit_section_dynsym): New.
  1950. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1951. Mickaël Guêné <mickael.guene@st.com>
  1952. * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
  1953. (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
  1954. (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
  1955. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
  1956. R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
  1957. (elf32_arm_howto_from_type): Take new members of
  1958. elf32_arm_howto_table_2 into account.
  1959. (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
  1960. BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
  1961. BFD_RELOC_ARM_FUNCDESC_VALUE.
  1962. * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
  1963. BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
  1964. BFD_RELOC_ARM_FUNCDESC_VALUE.
  1965. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1966. Mickaël Guêné <mickael.guene@st.com>
  1967. * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
  1968. EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
  1969. (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
  1970. (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
  1971. 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
  1972. Mickaël Guêné <mickael.guene@st.com>
  1973. * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
  1974. arm_elf32_fdpic_le_vec to targ_selvecs. Accept
  1975. arm*-*-uclinuxfdpiceabi.
  1976. * configure.ac: Add support for arm_elf32_fdpic_be_vec and
  1977. arm_elf32_fdpic_le_vec.
  1978. * configure: Regenerate.
  1979. * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
  1980. (elf32_arm_link_hash_table_create): Initialize fdpic_p.
  1981. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
  1982. (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
  1983. (elf32_arm_fdpic_link_hash_table_create): New.
  1984. * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
  1985. arm_elf32_fdpic_le_vec.
  1986. 2018-04-25 Alan Modra <amodra@gmail.com>
  1987. * elf-linux-core.h: Disable gcc-8 string truncation warning.
  1988. * elf.c (elfcore_write_prpsinfo): Likewise.
  1989. 2018-04-25 Alan Modra <amodra@gmail.com>
  1990. * Makefile.am: Remove arm-aout and arm-coff support.
  1991. * config.bfd: Likewise.
  1992. * configure.ac: Likewise.
  1993. * targets.c: Likewise.
  1994. * aout-arm.c: Delete.
  1995. * armnetbsd.c: Delete.
  1996. * riscix.c: Delete.
  1997. * Makefile.in: Regenerate.
  1998. * configure: Regenerate.
  1999. * po/SRC-POTFILES.in: Regenerate.
  2000. 2018-04-24 Nick Clifton <nickc@redhat.com>
  2001. PR 23113
  2002. * elf.c (ignore_section_sym): Check for the output_section pointer
  2003. being NULL before dereferencing it.
  2004. PR 23110
  2005. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
  2006. a negative PE_DEBUG_DATA size before iterating over the debug data.
  2007. 2018-04-23 Alan Modra <amodra@gmail.com>
  2008. * elf-linux-core.h: Revert last change.
  2009. * elf.c: Likewise.
  2010. 2018-04-23 Nick Clifton <nickc@redhat.com>
  2011. PR 23056
  2012. * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
  2013. the end of the string table, and zero it.
  2014. 2018-04-23 Alan Modra <amodra@gmail.com>
  2015. * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
  2016. gcc-8 string truncation warning.
  2017. (swap_linux_prpsinfo32_ugid16_out): Likewise.
  2018. (swap_linux_prpsinfo64_ugid32_out): Likewise.
  2019. (swap_linux_prpsinfo64_ugid16_out): Likewise.
  2020. * elf.c (elfcore_write_prpsinfo): Likewise.
  2021. 2018-04-23 Nick Clifton <nickc@redhat.com>
  2022. PR 23056
  2023. * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
  2024. the end of the string table, and zero it.
  2025. 2018-04-20 Alan Modra <amodra@gmail.com>
  2026. PR 22978
  2027. * elf32-hppa.c (got_relocs_needed): Add extra param to special
  2028. case both dtprel and tprel relocs.
  2029. (allocate_dynrelocs): Adjust conditions for got relocs.
  2030. (elf32_hppa_relocate_section): Likewise for local sym got relocs.
  2031. Emit dynamic relocs on TLS GOT entries for shared libraries,
  2032. not when pic. Omit dynamic reloc on dtprel entry when local,
  2033. and on tprel entry when local and executable.
  2034. 2018-04-19 Alan Modra <amodra@gmail.com>
  2035. PR 22537
  2036. * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
  2037. (hppa_type_of_stub): Don't return a long branch stub for
  2038. symbols other than those defined statically.
  2039. 2018-04-19 Alan Modra <amodra@gmail.com>
  2040. * Makefile.am: Revert 2018-04-18 coff-mips changes.
  2041. * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
  2042. to selvecs for mips targets change 2018-04-18.
  2043. * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
  2044. and mips_ecoff_bele_vec.
  2045. * targets.c: Likewise.
  2046. * coff-mips.c: Resurrect.
  2047. * Makefile.in: Regenerate.
  2048. * configure: Regenerate.
  2049. * po/SRC-POTFILES.in: Regenerate.
  2050. 2018-04-18 Alan Modra <amodra@gmail.com>
  2051. * Makefile.am: Remove mips aout and coff support.
  2052. * config.bfd: Likewise.
  2053. * configure.ac: Likewise.
  2054. * targets.c: Likewise.
  2055. * coff-mips.c: Delete
  2056. * mipsbsd.c: Delete
  2057. * pe-mips.c: Delete
  2058. * pei-mips.c: Delete
  2059. * Makefile.in: Regenerate.
  2060. * configure: Regenerate.
  2061. * po/SRC-POTFILES.in: Regenerate.
  2062. 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
  2063. * elf32-i386.c (elf32_bed): Define before including
  2064. "elf32-target.h".
  2065. * elf64-x86-64.c (elf64_bed): Define before including
  2066. "elf64-target.h".
  2067. (elf32_bed): Define before including "elf32-target.h".
  2068. 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
  2069. PR ld/23055
  2070. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
  2071. normal input file with compatible relocation.
  2072. 2018-04-18 Alan Modra <amodra@gmail.com>
  2073. * Makefile.am: Remove support for assorted i386 aout and coff targets.
  2074. * config.bfd: Likewise.
  2075. * configure.ac: Likewise.
  2076. * doc/bfdint.texi: Likewise.
  2077. * targets.c: Likewise.
  2078. * freebsd.h: Delete.
  2079. * i386dynix.c: Delete.
  2080. * i386freebsd.c: Delete.
  2081. * i386linux.c: Delete.
  2082. * i386mach3.c: Delete.
  2083. * i386netbsd.c: Delete.
  2084. * i386os9k.c: Delete.
  2085. * Makefile.in: Regenerate.
  2086. * configure: Regenerate.
  2087. * po/SRC-POTFILES.in: Regenerate.
  2088. 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
  2089. Microblaze Target: PIC data text relative
  2090. * bfd/reloc.c (2 new BFD relocations):
  2091. BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
  2092. BFD_RELOC_MICROBLAZE_64_TEXTPCREL
  2093. * bfd/bfd-in2.h: Regenerate
  2094. * bfd/libbfd.h: Regenerate
  2095. * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
  2096. new relocs and handle them in both relocate and relax functions.
  2097. (microblaze_elf_reloc_type_lookup): add mapping between for new
  2098. bfd relocs.
  2099. (microblaze_elf_relocate_section): Handle new relocs in case of
  2100. elf relocation.
  2101. (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
  2102. 2018-04-17 Nick Clifton <nickc@redhat.com>
  2103. PR 23055
  2104. * aoutx.h (find_nearest_line): Check that the symbol name exists
  2105. and is long enough, before attempting to see if it is for a .o
  2106. file.
  2107. * hash.c (bfd_hash_hash): Add an assertion that the string is not
  2108. NULL.
  2109. * linker.c (bfd_link_hash_lookup): Fail if the table or string are
  2110. NULL.
  2111. (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
  2112. has no name.
  2113. PR 23065
  2114. * dwarf2.c (concat_filename): Check for a NULL table pointer.
  2115. 2018-04-16 Nick Clifton <nickc@redhat.com>
  2116. PR 23061
  2117. * coffgen.c (coff_pointerize_aux): Check for an out of range
  2118. fixup.
  2119. 2018-04-16 Alan Modra <amodra@gmail.com>
  2120. * Makefile.am: Remove arm-epoc-pe support.
  2121. * coff-arm.c: Likewise.
  2122. * config.bfd: Likewise.
  2123. * configure.ac: Likewise.
  2124. * targets.c: Likewise.
  2125. * epoc-pe-arm.c: Delete.
  2126. * epoc-pei-arm.c: Delete.
  2127. * Makefile.in: Regenerate.
  2128. * configure: Regenerate.
  2129. * po/SRC-POTFILES.in: Regenerate.
  2130. 2018-04-16 Alan Modra <amodra@gmail.com>
  2131. * Makefile.am: Remove sparc-aout and sparc-coff support.
  2132. * config.bfd: Likewise.
  2133. * configure.ac: Likewise.
  2134. * targets.c: Likewise.
  2135. * aout-sparcle.c: Delete.
  2136. * aoutf1.h: Delete.
  2137. * cf-sparclynx.c: Delete.
  2138. * coff-sparc.c: Delete.
  2139. * demo64.c: Delete.
  2140. * sparclinux.c: Delete.
  2141. * sparclynx.c: Delete.
  2142. * sparcnetbsd.c: Delete.
  2143. * sunos.c: Delete.
  2144. * Makefile.in: Regenerate.
  2145. * configure: Regenerate.
  2146. * po/SRC-POTFILES.in: Regenerate.
  2147. 2018-04-16 Alan Modra <amodra@gmail.com>
  2148. * Makefile.am: Remove m68k-aout and m68k-coff support.
  2149. * aoutf1.h: Likewise.
  2150. * aoutx.h: Likewise.
  2151. * archive.c: Likewise.
  2152. * bfd-in.h: Likewise.
  2153. * bfd.c: Likewise.
  2154. * coffcode.h: Likewise.
  2155. * coffswap.h: Likewise.
  2156. * config.bfd: Likewise.
  2157. * configure.ac: Likewise.
  2158. * configure.host: Likewise.
  2159. * doc/bfd.texinfo: Likewise.
  2160. * doc/bfdint.texi: Likewise.
  2161. * freebsd.h: Likewise.
  2162. * gen-aout.c: Likewise.
  2163. * hpux-core.c: Likewise.
  2164. * libaout.h: Likewise.
  2165. * libbfd-in.h: Likewise.
  2166. * pdp11.c: Likewise.
  2167. * peicode.h: Likewise.
  2168. * riscix.c: Likewise.
  2169. * targets.c: Likewise.
  2170. * aout0.c: Delete.
  2171. * coff-apollo.c: Delete.
  2172. * coff-aux.c: Delete.
  2173. * coff-m68k.c: Delete.
  2174. * coff-svm68k.c: Delete.
  2175. * coff-u68k.c: Delete.
  2176. * hosts/delta68.h: Delete.
  2177. * hosts/hp300bsd.h: Delete.
  2178. * hosts/m68kaux.h: Delete.
  2179. * hosts/news.h: Delete.
  2180. * hp300bsd.c: Delete.
  2181. * hp300hpux.c: Delete.
  2182. * liboasys.h: Delete.
  2183. * m68k4knetbsd.c: Delete.
  2184. * m68klinux.c: Delete.
  2185. * m68knetbsd.c: Delete.
  2186. * oasys.c: Delete.
  2187. * versados.c: Delete.
  2188. * Makefile.in: Regenerate.
  2189. * bfd-in2.h: Regenerate.
  2190. * configure: Regenerate.
  2191. * libbfd.h: Regenerate.
  2192. * po/SRC-POTFILES.in: Regenerate.
  2193. 2018-04-16 Alan Modra <amodra@gmail.com>
  2194. * Makefile.am: Remove sh5 and sh64 support.
  2195. * archures.c: Likewise.
  2196. * config.bfd: Likewise.
  2197. * configure.ac: Likewise.
  2198. * cpu-sh.c: Likewise.
  2199. * elf32-sh-relocs.h: Likewise.
  2200. * elf32-sh.c: Likewise.
  2201. * targets.c: Likewise.
  2202. * elf32-sh64-com.c: Delete.
  2203. * elf32-sh64.c: Delete.
  2204. * elf32-sh64.h: Delete.
  2205. * elf64-sh64.c: Delete.
  2206. * Makefile.in: Regenerate.
  2207. * bfd-in2.h: Regenerate.
  2208. * configure: Regenerate.
  2209. * po/SRC-POTFILES.in: Regenerate.
  2210. 2018-04-16 Alan Modra <amodra@gmail.com>
  2211. * Makefile.am: Remove sh-symbianelf support.
  2212. * config.bfd: Likewise.
  2213. * configure.ac: Likewise.
  2214. * targets.c: Likewise.
  2215. * elf32-sh-symbian.c: Delete.
  2216. * Makefile.in: Regenerate.
  2217. * configure: Regenerate.
  2218. * po/SRC-POTFILES.in: Regenerate.
  2219. 2018-04-16 Alan Modra <amodra@gmail.com>
  2220. * Makefile.am: Remove vax-bsd and vax-ultrix support.
  2221. * config.bfd: Likewise.
  2222. * configure.ac: Likewise.
  2223. * targets.c: Likewise.
  2224. * vaxbsd.c: Delete.
  2225. * Makefile.in: Regenerate.
  2226. * configure: Regenerate.
  2227. * po/SRC-POTFILES.in: Regenerate.
  2228. 2018-04-16 Alan Modra <amodra@gmail.com>
  2229. * Makefile.am: Remove w65 support.
  2230. * archures.c: Likewise.
  2231. * coffcode.h: Likewise.
  2232. * config.bfd: Likewise.
  2233. * configure.ac: Likewise.
  2234. * targets.c: Likewise.
  2235. * coff-w65.c: Delete.
  2236. * cpu-w65.c: Delete.
  2237. * Makefile.in: Regenerate.
  2238. * bfd-in2.h: Regenerate.
  2239. * configure: Regenerate.
  2240. * po/SRC-POTFILES.in: Regenerate.
  2241. 2018-04-16 Alan Modra <amodra@gmail.com>
  2242. * Makefile.am: Remove we32k support.
  2243. * archures.c: Likewise.
  2244. * coffcode.h: Likewise.
  2245. * config.bfd: Likewise.
  2246. * configure.ac: Likewise.
  2247. * targets.c: Likewise.
  2248. * coff-we32k.c: Delete.
  2249. * cpu-we32k.c: Delete.
  2250. * Makefile.in: Regenerate.
  2251. * bfd-in2.h: Regenerate.
  2252. * configure: Regenerate.
  2253. * po/SRC-POTFILES.in: Regenerate.
  2254. 2018-04-16 Alan Modra <amodra@gmail.com>
  2255. * Makefile.am: Remove m88k support.
  2256. * aoutx.h: Likewise.
  2257. * archures.c: Likewise.
  2258. * coffcode.h: Likewise.
  2259. * coffswap.h: Likewise.
  2260. * config.bfd: Likewise.
  2261. * configure.ac: Likewise.
  2262. * cpu-ns32k.c: Likewise.
  2263. * elf32-nds32.c: Likewise.
  2264. * mach-o.c: Likewise.
  2265. * netbsd-core.c: Likewise.
  2266. * reloc.c: Likewise.
  2267. * targets.c: Likewise.
  2268. * coff-m88k.c: Delete.
  2269. * cpu-m88k.c: Delete.
  2270. * elf32-m88k.c: Delete.
  2271. * hosts/m88kmach3.h: Delete.
  2272. * m88kmach3.c: Delete.
  2273. * m88kopenbsd.c: Delete.
  2274. * Makefile.in: Regenerate.
  2275. * bfd-in2.h: Regenerate.
  2276. * configure: Regenerate.
  2277. * po/SRC-POTFILES.in: Regenerate.
  2278. 2018-04-16 Alan Modra <amodra@gmail.com>
  2279. * Makefile.am: Remove i370 support.
  2280. * archures.c: Likewise.
  2281. * config.bfd: Likewise.
  2282. * configure.ac: Likewise.
  2283. * targets.c: Likewise.
  2284. * cpu-i370.c: Delete.
  2285. * elf32-i370.c: Delete.
  2286. * Makefile.in: Regenerate.
  2287. * bfd-in2.h: Regenerate.
  2288. * configure: Regenerate.
  2289. * po/SRC-POTFILES.in: Regenerate.
  2290. 2018-04-16 Alan Modra <amodra@gmail.com>
  2291. * Makefile.am: Remove h8500 support.
  2292. * archures.c: Likewise.
  2293. * coffcode.h: Likewise.
  2294. * config.bfd: Likewise.
  2295. * configure.ac: Likewise.
  2296. * targets.c: Likewise.
  2297. * coff-h8500.c: Delete.
  2298. * cpu-h8500.c: Delete.
  2299. * Makefile.in: Regenerate.
  2300. * bfd-in2.h: Regenerate.
  2301. * configure: Regenerate.
  2302. * po/SRC-POTFILES.in: Regenerate.
  2303. 2018-04-16 Alan Modra <amodra@gmail.com>
  2304. * Makefile.am: Remove h8300-coff support.
  2305. * coffcode.h: Likewise.
  2306. * config.bfd: Likewise.
  2307. * configure.ac: Likewise.
  2308. * reloc16.c: Likewise.
  2309. * targets.c: Likewise.
  2310. * coff-h8300.c: Delete.
  2311. * Makefile.in: Regenerate.
  2312. * configure: Regenerate.
  2313. * po/SRC-POTFILES.in: Regenerate.
  2314. 2018-04-16 Alan Modra <amodra@gmail.com>
  2315. * Makefile.am: Remove IEEE 695 support.
  2316. * archures.c: Likewise.
  2317. * bfd.c: Likewise.
  2318. * config.bfd: Likewise.
  2319. * configure.ac: Likewise.
  2320. * doc/bfd.texinfo: Likewise.
  2321. * doc/bfdint.texi: Likewise.
  2322. * doc/bfdsumm.texi: Likewise.
  2323. * section.c: Likewise.
  2324. * targets.c: Likewise.
  2325. * ieee.c: Delete.
  2326. * libieee.h: Delete.
  2327. * Makefile.in: Regenerate.
  2328. * bfd-in2.h: Regenerate.
  2329. * configure: Regenerate.
  2330. * po/SRC-POTFILES.in: Regenerate.
  2331. 2018-04-16 Alan Modra <amodra@gmail.com>
  2332. * config.bfd: Remove tandem support.
  2333. 2018-04-16 Alan Modra <amodra@gmail.com>
  2334. * Makefile.am: Remove newsos3 support.
  2335. * aoutx.h: Likewise.
  2336. * config.bfd: Likewise.
  2337. * configure.ac: Likewise.
  2338. * targets.c: Likewise.
  2339. * newsos3.c: Delete.
  2340. * Makefile.in: Regenerate.
  2341. * configure: Regenerate.
  2342. * po/SRC-POTFILES.in: Regenerate.
  2343. 2018-04-16 Alan Modra <amodra@gmail.com>
  2344. * Makefile.am: Remove netware support.
  2345. * bfd-in.h: Likewise.
  2346. * bfd.c: Likewise.
  2347. * config.bfd: Likewise.
  2348. * configure.ac: Likewise.
  2349. * doc/bfdint.texi: Likewise.
  2350. * ecoff.c: Likewise.
  2351. * targets.c: Likewise.
  2352. * libnlm.h: Delete.
  2353. * nlm-target.h: Delete.
  2354. * nlm.c: Delete.
  2355. * nlm32-alpha.c: Delete.
  2356. * nlm32-i386.c: Delete.
  2357. * nlm32-ppc.c: Delete.
  2358. * nlm32-sparc.c: Delete.
  2359. * nlm32.c: Delete.
  2360. * nlm64.c: Delete.
  2361. * nlmcode.h: Delete.
  2362. * nlmswap.h: Delete.
  2363. * Makefile.in: Regenerate.
  2364. * bfd-in2.h: Regenerate.
  2365. * configure: Regenerate.
  2366. * po/SRC-POTFILES.in: Regenerate.
  2367. 2018-04-16 Alan Modra <amodra@gmail.com>
  2368. * archures.c: Remove tahoe support.
  2369. * config.bfd: Likewise.
  2370. * configure.ac: Likewise.
  2371. * hosts/tahoe.h: Delete.
  2372. * bfd-in2.h: Regenerate.
  2373. * configure: Regenerate.
  2374. 2018-04-14 Alan Modra <amodra@gmail.com>
  2375. * elf-bfd.h (struct elf_backend_data): Add relropagesize.
  2376. * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
  2377. sanity test.
  2378. (elfNN_bed): Init relropagesize.
  2379. * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
  2380. select relropagesize.
  2381. * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
  2382. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
  2383. (ELF_MINPAGESIZE): Don't define.
  2384. * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
  2385. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
  2386. * bfd-in2.h: Regenerate.
  2387. 2018-04-14 Alan Modra <amodra@gmail.com>
  2388. * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
  2389. on __QNXTARGET__ define.
  2390. 2018-04-14 Alan Modra <amodra@gmail.com>
  2391. * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
  2392. to obsolete list.
  2393. 2018-04-11 Alan Modra <amodra@gmail.com>
  2394. * aout-adobe.c: Delete.
  2395. * bout.c: Delete.
  2396. * coff-i860.c: Delete.
  2397. * coff-i960.c: Delete.
  2398. * cpu-i860.c: Delete.
  2399. * cpu-i960.c: Delete.
  2400. * elf32-i860.c: Delete.
  2401. * elf32-i960.c: Delete.
  2402. * hosts/i860mach3.h: Delete.
  2403. * Makefile.am: Remove i860, i960, bout, and adobe support.
  2404. * archures.c: Remove i860 and i960 support.
  2405. * coffcode.h: Likewise.
  2406. * reloc.c: Likewise.
  2407. * aoutx.h: Comment updates.
  2408. * archive.c: Remove BOUT and i960 support.
  2409. * bfd.c: Remove BOUT support.
  2410. * coffswap.h: Remove i960 support.
  2411. * config.bfd: Remove i860, i960 and adobe targets.
  2412. * configure.ac: Remove adode, bout, i860, i960, icoff targets.
  2413. * targets.c: Likewise.
  2414. * ieee.c: Remove i960 support.
  2415. * mach-o.c: Remove i860 support.
  2416. * Makefile.in: Regenerate.
  2417. * bfd-in2.h: Regenerate.
  2418. * configure: Regenerate.
  2419. * libbfd.h: Regenerate.
  2420. * po/SRC-POTFILES.in: Regenerate.
  2421. 2018-04-09 Maciej W. Rozycki <macro@mips.com>
  2422. * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
  2423. in the BFD symbol referred by the relocation.
  2424. (mips_elf64_write_rela): Likewise.
  2425. 2018-04-09 Maciej W. Rozycki <macro@mips.com>
  2426. * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
  2427. error for out-of-range `r_sym' values.
  2428. 2018-04-09 Alan Modra <amodra@gmail.com>
  2429. * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
  2430. (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
  2431. (ppc64_elf_check_relocs): Set has_pltcall.
  2432. (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
  2433. (ppc64_elf_inline_plt): New function.
  2434. (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
  2435. * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
  2436. * elf32-ppc.c (has_pltcall): Define.
  2437. (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
  2438. (ppc_elf_check_relocs): Set has_pltcall.
  2439. (ppc_elf_inline_plt): New function.
  2440. (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
  2441. (ppc_elf_size_dynamic_sections): Likewise.
  2442. * elf32-ppc.h (ppc_elf_inline_plt): Declare.
  2443. 2018-04-09 Alan Modra <amodra@gmail.com>
  2444. * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
  2445. (is_plt_seq_reloc): New function.
  2446. (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
  2447. (ppc_elf_tls_optimize): Handle inline plt call sequence.
  2448. (ppc_elf_relax_section): Handle PLTCALL reloc.
  2449. (ppc_elf_relocate_section): Nop out inline plt call sequence when
  2450. resolving locally.
  2451. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
  2452. R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
  2453. (has_tls_get_addr_call): Correct comment.
  2454. (is_branch_reloc): Add PLTCALL.
  2455. (is_plt_seq_reloc): New function.
  2456. (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
  2457. has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
  2458. entry for R_PPC64_PLTCALL.
  2459. (ppc64_elf_tls_optimize): Handle inline plt call sequence.
  2460. (ppc_type_of_stub): Handle PLTCALL reloc.
  2461. (toc_adjusting_stub_needed): Likewise.
  2462. (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
  2463. reloc insn. Nop out inline plt call sequence when resolving
  2464. locally. Handle __tls_get_addr inline plt call optimization.
  2465. 2018-04-09 Alan Modra <amodra@gmail.com>
  2466. * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
  2467. (struct ppc_stub_hash_entry): Add symtype field.
  2468. (PLT_KEEP): Define.
  2469. (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
  2470. (create_linkage_sections): Create pltlocal and relpltlocal.
  2471. (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
  2472. Set PLT_KEEP.
  2473. (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
  2474. (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
  2475. (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
  2476. Keep PLT entries for inline calls against locals.
  2477. (ppc_build_one_stub): Use pltlocal as appropriate.
  2478. (ppc_size_one_stub): Likewise.
  2479. (ppc64_elf_size_stubs): Set symtype.
  2480. (build_global_entry_stubs_and_plt): Init pltlocal and write
  2481. relpltlocal for globals.
  2482. (write_plt_relocs_for_local_syms): Likewise for local syms.
  2483. (ppc64_elf_relocate_section): Support PLT for local syms.
  2484. * elf32-ppc.c (PLT_KEEP): Define.
  2485. (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
  2486. (ppc_elf_create_glink): Create pltlocal and relpltlocal.
  2487. (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
  2488. Set PLT_KEEP. Adjust update_local_sym_info call.
  2489. (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
  2490. (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
  2491. (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
  2492. (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
  2493. (write_global_sym_plt): Init pltlocal and write relpltlocal.
  2494. (ppc_finish_symbols): Likewise for locals.
  2495. 2018-04-09 Alan Modra <amodra@gmail.com>
  2496. * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
  2497. for local symbols to..
  2498. (write_plt_relocs_for_local_syms): ..here. New function.
  2499. (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
  2500. global symbols to..
  2501. (build_global_entry_stubs_and_plt): ..here. Rename from
  2502. build_global_entry_stubs.
  2503. (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
  2504. Call write_plt_relocs_for_local_syms.
  2505. * elf32-ppc.c (get_sym_h): New function.
  2506. (ppc_elf_relax_section): Use get_sym_h.
  2507. (ppc_elf_relocate_section): Move output of PLT relocs and glink
  2508. stubs for local symbols to..
  2509. (ppc_finish_symbols): ..here. New function.
  2510. (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
  2511. global syms to..
  2512. (write_global_sym_plt): ..here. New function.
  2513. * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
  2514. (ppc_finish_symbols): Declare.
  2515. 2018-04-09 Alan Modra <amodra@gmail.com>
  2516. * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
  2517. (ppc_elf_relocate_section): Likewise.
  2518. * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
  2519. (ppc64_elf_relocate_section): Likewise. Correct PLT16
  2520. resolution to plt entry relative to toc pointer.
  2521. 2018-04-09 Alan Modra <amodra@gmail.com>
  2522. * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
  2523. TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
  2524. file when other TLS flags are tested in a mask.
  2525. (TLS_MARK, NON_GOT): Define.
  2526. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
  2527. (update_local_sym_info): Don't create got entry when NON_GOT.
  2528. (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
  2529. Set TLS_MARK.
  2530. (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
  2531. (ppc64_elf_relocate_section): Likewise.
  2532. (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
  2533. __tls_get_addr calls lacking a marker reloc.
  2534. * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
  2535. TLS_TPRELGD): Renumber. Update comment.
  2536. (TLS_MARK, NON_GOT): Define.
  2537. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
  2538. (update_local_sym_info): Don't create got entry when NON_GOT.
  2539. (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
  2540. Set TLS_MARK.
  2541. (ppc_elf_tls_optimize): Don't attempt to optimize indirect
  2542. __tls_get_addr calls lacking a marker reloc.
  2543. 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
  2544. * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
  2545. R_X86_64_converted_reloc_bit.
  2546. 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
  2547. PR gas/22318
  2548. * configure: Regenerated.
  2549. 2018-04-05 Alan Modra <amodra@gmail.com>
  2550. * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
  2551. (elf_hppa_info_to_howto_rel): Likewise.
  2552. 2018-04-04 Maciej W. Rozycki <macro@mips.com>
  2553. * elf-hppa.h (elf_hppa_info_to_howto): Also return
  2554. unsuccessfully for unimplemented relocations.
  2555. (elf_hppa_info_to_howto_rel): Likewise.
  2556. 2018-04-04 Maciej W. Rozycki <macro@mips.com>
  2557. * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
  2558. `bfd_error_bad_value' error and call `_bfd_error_handler' on a
  2559. howto lookup failure.
  2560. (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
  2561. accordingly.
  2562. (elf32_i860_info_to_howto_rela): Likewise.
  2563. (elf32_i860_relocate_splitn): Likewise.
  2564. (elf32_i860_relocate_pc16): Likewise.
  2565. (elf32_i860_relocate_pc26): Likewise.
  2566. (elf32_i860_relocate_section): Likewise.
  2567. 2018-04-04 Maciej W. Rozycki <macro@mips.com>
  2568. * elf32-visium.c (visium_info_to_howto_rela): Correct the range
  2569. check for `visium_elf_howto_table' table access.
  2570. 2018-04-04 Maciej W. Rozycki <macro@mips.com>
  2571. * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
  2572. check for `iq2000_elf_howto_table' table access.
  2573. 2018-04-04 Maciej W. Rozycki <macro@mips.com>
  2574. * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
  2575. for `elf32_frv_howto_table' table access.
  2576. 2018-04-04 Maciej W. Rozycki <macro@mips.com>
  2577. * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
  2578. unsuccessfully for placeholder howtos.
  2579. * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
  2580. * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
  2581. 2018-03-29 Maciej W. Rozycki <macro@mips.com>
  2582. * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
  2583. `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
  2584. 2018-03-28 Maciej W. Rozycki <macro@mips.com>
  2585. * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
  2586. ATTRIBUTE_UNUSED from `abfd'.
  2587. 2018-03-28 Maciej W. Rozycki <macro@mips.com>
  2588. * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
  2589. `_bfd_error_handler' call formatting.
  2590. 2018-03-28 Maciej W. Rozycki <macro@mips.com>
  2591. * elf32-mips.c (mips_info_to_howto_rel): Call
  2592. `mips_elf32_rtype_to_howto' directly rather than via
  2593. `->elf_backend_mips_rtype_to_howto'.
  2594. 2018-03-28 Renlin Li <renlin.li@arm.com>
  2595. PR ld/22970
  2596. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
  2597. BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
  2598. BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
  2599. BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
  2600. BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
  2601. BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
  2602. BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
  2603. BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
  2604. BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
  2605. (elfNN_aarch64_final_link_relocate): Support new relocations.
  2606. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
  2607. relocations.
  2608. (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
  2609. 2018-03-28 Renlin Li <renlin.li@arm.com>
  2610. PR ld/22970
  2611. * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
  2612. BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
  2613. BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
  2614. BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
  2615. BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
  2616. BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
  2617. BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
  2618. BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
  2619. BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
  2620. BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
  2621. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
  2622. TLSLE_LDST16_TPREL_LO12,
  2623. TLSLE_LDST16_TPREL_LO12_NC,
  2624. TLSLE_LDST32_TPREL_LO12,
  2625. TLSLE_LDST32_TPREL_LO12_NC,
  2626. TLSLE_LDST64_TPREL_LO12,
  2627. TLSLE_LDST64_TPREL_LO12_NC,
  2628. TLSLE_LDST8_TPREL_LO12,
  2629. TLSLE_LDST8_TPREL_LO12_NC.
  2630. * bfd-in2.h: Regenerated.
  2631. * libbfd.h: Regenerated.
  2632. 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
  2633. PR ld/22972
  2634. * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
  2635. has_old_style_got_reloc.
  2636. (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
  2637. relocations. Fix a couple of long lines.
  2638. (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
  2639. a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
  2640. GOT relocations.
  2641. 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
  2642. PR ld/23000
  2643. * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
  2644. ENDBR64 to the TLSDESC PLT entry.
  2645. 2018-03-21 Alan Modra <amodra@gmail.com>
  2646. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
  2647. symbols. Use size_t counts. Delete redundant opd test.
  2648. 2018-03-21 Alan Modra <amodra@gmail.com>
  2649. * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
  2650. 2018-03-21 Alan Modra <amodra@gmail.com>
  2651. * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
  2652. field unsigned.
  2653. (update_local_sym_info): Likewise for local_got_tls_masks.
  2654. (ppc_elf_tls_optimize): Likewise for lgot_masks.
  2655. 2018-03-21 Alan Modra <amodra@gmail.com>
  2656. * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
  2657. (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
  2658. do in size_dynamic_sections.
  2659. 2018-03-21 Alan Modra <amodra@gmail.com>
  2660. * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
  2661. without first checking array bounds.
  2662. * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
  2663. 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
  2664. PR ld/22983
  2665. * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
  2666. non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
  2667. 2018-03-19 Nick Clifton <nickc@redhat.com>
  2668. * po/es.po: Updated Spanish translation.
  2669. 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
  2670. * elf32-xtensa.c (xlate_map_entry): Change types of address
  2671. fields from 'unsigned' to 'bfd_vma'.
  2672. (xlate_offset_with_removed_text): Use struct xlate_map_entry as
  2673. the key argument to bsearch. Allow offsets past the end of a
  2674. section, use the last map entry for translation of such offsets.
  2675. 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
  2676. * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
  2677. Not support the target feature.
  2678. (nds32_elf_ex9_itb_base): Likewise.
  2679. (nds32_elf_ex9_import_table): Likewise.
  2680. (nds32_elf_ex9_finish): Likewise.
  2681. (nds32_elf_ex9_reloc_jmp): Likewise.
  2682. (nds32_elf_get_insn_with_reg): Likewise.
  2683. (nds32_get_local_syms): Likewise.
  2684. (nds32_elf_ex9_replace_instruction): Likewise.
  2685. (nds32_elf_ifc_calc): Likewise.
  2686. (nds32_elf_ifc_finish): Likewise.
  2687. (nds32_elf_ifc_replace): Likewise.
  2688. (nds32_elf_ifc_reloc): Likewise.
  2689. 2018-03-14 Alan Modra <amodra@gmail.com>
  2690. * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
  2691. sfpr size added before defining alias symbols.
  2692. (ppc64_elf_build_stubs): Add stub section padding before
  2693. copying sfpr contents and defining save/restore alias symbols.
  2694. 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
  2695. PR ld/20882
  2696. * elflink.c (elf_gc_mark_debug_section): Also check the local
  2697. debug definition section.
  2698. 2018-03-13 Nick Clifton <nickc@redhat.com>
  2699. PR 22113
  2700. * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
  2701. function. Add an end address parameter. Check access of the data
  2702. pointer to make sure that they do not extend beyond the end
  2703. address. Return FALSE if any check fails. Add the end address
  2704. pointer to the ui structure.
  2705. (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
  2706. codes to make sure that they do not extend beyond the end address
  2707. pointer. Print an error message and return immediately if any
  2708. check fails.
  2709. 2018-03-09 Nick Clifton <nickc@redhat.com>
  2710. * elf64-s390.c (elf_s390_relocate_section): Move check for
  2711. relocations against non-allocated sections to before the code that
  2712. handles ifunc relocations.
  2713. * elf32-s390.c (elf_s390_relocate_section): Likewise.
  2714. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
  2715. relocs against IFUNC symbols in non-allocated sections as relocs
  2716. against FUNC symbols.
  2717. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
  2718. 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
  2719. PR ld/22929
  2720. * elf32-i386.c (elf_i386_relocate_section): Treat relocation
  2721. against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
  2722. relocation against FUNC symbol.
  2723. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  2724. 2018-03-07 Renlin Li <renlin.li@arm.com>
  2725. PR ld/20402
  2726. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
  2727. symbol, and don't emit relocation in specific case.
  2728. 2018-03-07 Alan Modra <amodra@gmail.com>
  2729. * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
  2730. (mips_elf64_slurp_one_reloc_table): Pass on error.
  2731. 2018-03-03 James Cowgill <james.cowgill@mips.com>
  2732. Maciej W. Rozycki <macro@mips.com>
  2733. PR ld/21900
  2734. * elfxx-mips.c (mips_elf_calculate_relocation): Only return
  2735. after calling `undefined_symbol' hook if this is an error
  2736. condition. Assume the value of 0 for the symbol requested
  2737. otherwise.
  2738. 2018-03-02 Jim Wilson <jimw@sifive.com>
  2739. PR 22903
  2740. * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
  2741. and nop instead of 4.
  2742. (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
  2743. 8 instead of 4.
  2744. 2018-03-01 Jim Wilson <jimw@sifive.com>
  2745. PR 22756
  2746. * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
  2747. else if instead of if.
  2748. 2018-03-01 Alan Modra <amodra@gmail.com>
  2749. * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
  2750. 2018-02-28 Alan Modra <amodra@gmail.com>
  2751. PR 22887
  2752. * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
  2753. 2018-02-28 Nick Clifton <nickc@redhat.com>
  2754. PR 22895
  2755. PR 22893
  2756. * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
  2757. pointer. Drop unused abfd parameter. Check the size of the block
  2758. before initialising the data field. Return the end pointer if the
  2759. size is invalid.
  2760. (read_attribute_value): Adjust invocations of read_n_bytes.
  2761. PR 22894
  2762. * dwarf1.c (parse_die): Check the length of form blocks before
  2763. advancing the data pointer.
  2764. 2018-02-28 Alan Modra <amodra@gmail.com>
  2765. PR 22887
  2766. * aoutx.h (translate_symbol_table): Print an error message and set
  2767. bfd_error on finding an invalid name string offset.
  2768. 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
  2769. * config.in: Regenerated.
  2770. * configure: Likewise.
  2771. * configure.ac: Add --enable-separate-code.
  2772. (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
  2773. to 1 for Linux/x86 targets,
  2774. * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
  2775. DEFAULT_LD_Z_SEPARATE_CODE is 1.
  2776. 2018-02-27 Nick Clifton <nickc@redhat.com>
  2777. * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
  2778. message.
  2779. * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
  2780. * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
  2781. * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
  2782. * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
  2783. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
  2784. * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
  2785. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
  2786. * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
  2787. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
  2788. PR 22875
  2789. * elf-bfd.h (struct elf_backend_data): Change the return type of
  2790. the elf_info_to_howto and elf_info_to_howto_rel function pointers
  2791. to bfd_boolean.
  2792. * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
  2793. value from the info_to_howto function and fail if that function
  2794. failed.
  2795. * elf32-h8300.c (elf32_h8_relocate_section): Check return value
  2796. from the info_to_howto function.
  2797. (elf32_h8_relax_section): Likewise.
  2798. * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
  2799. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
  2800. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
  2801. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
  2802. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
  2803. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
  2804. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
  2805. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
  2806. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
  2807. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
  2808. (riscv_elf_relocate_section): Likewise.
  2809. * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
  2810. bfd_boolean. Issue an error message, set an error value and
  2811. return FALSE if the reloc is not recognized.
  2812. (elf_hppa_info_to_howto_rel): Likewise.
  2813. * elf-m10200.c (mn10200_info_to_howto): Likewise.
  2814. * elf-m10300.c (mn10300_info_to_howto): Likewise.
  2815. * elf.c (_bfd_elf_no_info_to_howto): Likewise.
  2816. * elf32-arc.c (arc_info_to_howto_rel): Likewise.
  2817. * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
  2818. * elf32-avr.c (avr_info_to_howto_rela): Likewise.
  2819. * elf32-bfin.c (bfin_info_to_howto): Likewise.
  2820. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
  2821. * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
  2822. * elf32-cris.c (elf_cr16c_info_to_howto_rel)
  2823. (cris_info_to_howto_rela): Likewise.
  2824. * elf32-crx.c (elf_crx_info_to_howto): Likewise.
  2825. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
  2826. * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
  2827. Likewise.
  2828. * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
  2829. (elf32_dlx_info_to_howto_rel): Likewise.
  2830. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
  2831. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
  2832. * elf32-frv.c (frv_info_to_howto_rela)
  2833. (frvfdpic_info_to_howto_rel): Likewise.
  2834. * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
  2835. * elf32-gen.c (elf_generic_info_to_howto)
  2836. (elf_generic_info_to_howto_rel): Likewise.
  2837. * elf32-h8300.c (elf32_h8_info_to_howto)
  2838. (elf32_h8_info_to_howto_rel): Likewise.
  2839. * elf32-i370.c (i370_elf_info_to_howto): Likewise.
  2840. * elf32-i386.c (elf_i386_reloc_type_lookup)
  2841. (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
  2842. * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
  2843. Likewise.
  2844. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
  2845. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
  2846. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
  2847. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
  2848. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
  2849. * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
  2850. Likewise.
  2851. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
  2852. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
  2853. * elf32-m68k.c (rtype_to_howto): Likewise.
  2854. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
  2855. * elf32-mep.c (mep_info_to_howto_rela): Likewise.
  2856. * elf32-metag.c (metag_info_to_howto_rela): Likewise.
  2857. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
  2858. * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
  2859. Likewise.
  2860. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
  2861. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
  2862. * elf32-mt.c (mt_info_to_howto_rela): Likewise.
  2863. * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
  2864. Likewise.
  2865. * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
  2866. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
  2867. * elf32-pj.c (pj_elf_info_to_howto): Likewise.
  2868. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
  2869. * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
  2870. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
  2871. * elf32-rx.c (rx_info_to_howto_rela): Likewise.
  2872. * elf32-s390.c (elf_s390_info_to_howto): Likewise.
  2873. * elf32-score.c (s3_bfd_score_info_to_howto)
  2874. (_bfd_score_info_to_howto): Likewise.
  2875. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
  2876. * elf32-sh.c (sh_elf_info_to_howto): Likewise.
  2877. * elf32-spu.c (spu_elf_info_to_howto): Likewise.
  2878. * elf32-tic6x.c (elf32_tic6x_info_to_howto)
  2879. (elf32_tic6x_info_to_howto_rel): Likewise.
  2880. * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
  2881. * elf32-v850.c (v850_elf_info_to_howto_rel)
  2882. (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
  2883. * elf32-vax.c (rtype_to_howto): Likewise.
  2884. * elf32-visium.c (visium_info_to_howto_rela): Likewise.
  2885. * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
  2886. (elf32_wasm32_info_to_howto_rela): Likewise.
  2887. * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
  2888. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
  2889. * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
  2890. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
  2891. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
  2892. * elf64-gen.c (elf_generic_info_to_howto)
  2893. (elf_generic_info_to_howto_rel): Likewise.
  2894. * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
  2895. * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
  2896. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
  2897. * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
  2898. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
  2899. * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
  2900. Likewise.
  2901. * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
  2902. * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
  2903. Likewise.
  2904. * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
  2905. * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
  2906. * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
  2907. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
  2908. * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
  2909. * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
  2910. * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
  2911. * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
  2912. * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
  2913. * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
  2914. Default to NULL.
  2915. 2018-02-26 Jim Wilson <jimw@sifive.com>
  2916. Stephan Schreiber <info@fs-driver.org>
  2917. PR 15904
  2918. * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
  2919. call, set changed_contents and changed_relocs. Likewise after
  2920. successful ia64_elf_relax_br call.
  2921. 2018-02-26 Alan Modra <amodra@gmail.com>
  2922. * elf.c (assign_file_positions_except_relocs): Don't segfault
  2923. when actual number of phdrs is less than allocated. Delete
  2924. outdated comment. Formatting.
  2925. 2018-02-26 Alan Modra <amodra@gmail.com>
  2926. * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
  2927. * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
  2928. * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
  2929. * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
  2930. * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
  2931. * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
  2932. * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
  2933. * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
  2934. * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
  2935. * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
  2936. error/warning messages.
  2937. 2018-02-26 Alan Modra <amodra@gmail.com>
  2938. * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
  2939. * syms.c: Standardize error/warning messages.
  2940. 2018-02-26 Alan Modra <amodra@gmail.com>
  2941. * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
  2942. * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
  2943. * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
  2944. * peXXigen.c, * peicode.h: Standardize error/warning messages.
  2945. 2018-02-26 Alan Modra <amodra@gmail.com>
  2946. * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
  2947. 2018-02-26 Alan Modra <amodra@gmail.com>
  2948. * elfxx-mips.c: Standardize error/warning messages.
  2949. 2018-02-26 Alan Modra <amodra@gmail.com>
  2950. * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
  2951. * elflink.c: Standardize error/warning messages. Replace use of
  2952. linker callback einfo with _bfd_error_handler when possible.
  2953. 2018-02-26 Alan Modra <amodra@gmail.com>
  2954. * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
  2955. * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
  2956. * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
  2957. * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
  2958. * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
  2959. * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
  2960. * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
  2961. * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
  2962. * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
  2963. * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
  2964. * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
  2965. * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
  2966. * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
  2967. * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
  2968. * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
  2969. * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
  2970. * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
  2971. * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
  2972. * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
  2973. * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
  2974. * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
  2975. unrecognized/unsupported reloc message.
  2976. 2018-02-26 Alan Modra <amodra@gmail.com>
  2977. * elf32-ppc.c: Standardize error/warning messages. Use
  2978. _bfd_error_handler rather than einfo when einfo features not used.
  2979. * elf64-ppc.c: Likewise.
  2980. 2018-02-23 Alan Modra <amodra@gmail.com>
  2981. PR 22881
  2982. * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
  2983. segment if no matching LOAD segment.
  2984. 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
  2985. * elf32-nds32.h: Define mask for ict_model.
  2986. 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
  2987. * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
  2988. 2018-02-19 Maciej W. Rozycki <macro@mips.com>
  2989. Revert
  2990. 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
  2991. * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
  2992. .reginfo section has wrong size.
  2993. 2018-02-19 Maciej W. Rozycki <macro@mips.com>
  2994. * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
  2995. SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
  2996. `.MIPS.abiflags' sections.
  2997. (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
  2998. section's end.
  2999. 2018-02-19 Maciej W. Rozycki <macro@mips.com>
  3000. * section.c (SEC_FIXED_SIZE): New macro.
  3001. * bfd-in2.h: Regenerate.
  3002. 2018-02-19 Maciej W. Rozycki <macro@mips.com>
  3003. * section.c (SEC_HAS_GOT_REF): Remove macro.
  3004. * bfd-in2.h: Regenerate.
  3005. 2018-02-19 Alan Modra <amodra@gmail.com>
  3006. * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
  3007. arguments.
  3008. * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
  3009. * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
  3010. (_bfd_riscv_relax_pc): Likewise and fix typos.
  3011. * libbfd-in.h (_bfd_error_handler): Add attribute printf.
  3012. * libbfd.h: Regenerate.
  3013. 2018-02-19 Alan Modra <amodra@gmail.com>
  3014. * dwarf2.c (read_section): Don't use 'll' format modifier.
  3015. (find_abstract_instance): Likewise.
  3016. * elfcore.h (elf_core_file_p): Likewise.
  3017. 2018-02-19 Alan Modra <amodra@gmail.com>
  3018. * bfd-in.h: Include inttypes.h or if not available define
  3019. PRId64, PRIu64 and PRIx64.
  3020. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
  3021. modifier to print bfd_vma.
  3022. * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
  3023. * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
  3024. * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
  3025. * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
  3026. * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
  3027. * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
  3028. * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
  3029. * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
  3030. * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
  3031. * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
  3032. * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
  3033. * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
  3034. * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
  3035. * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
  3036. * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
  3037. and cast input to uint64_t, and similarly for Ld and Lu.
  3038. * bfd-in2.h: Regenerate.
  3039. 2018-02-19 Alan Modra <amodra@gmail.com>
  3040. * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
  3041. * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
  3042. * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
  3043. * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
  3044. * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
  3045. * reloc.c: Replace use of %R and %T in format strings passed to
  3046. einfo and friends by %pR and %pT.
  3047. 2018-02-19 Alan Modra <amodra@gmail.com>
  3048. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
  3049. of %A and %B.
  3050. * aout-adobe.c: Update all messages using %A and %B.
  3051. * aout-cris.c: Likewise.
  3052. * aoutx.h: Likewise.
  3053. * archive.c: Likewise.
  3054. * binary.c: Likewise.
  3055. * cache.c: Likewise.
  3056. * coff-alpha.c: Likewise.
  3057. * coff-arm.c: Likewise.
  3058. * coff-i860.c: Likewise.
  3059. * coff-mcore.c: Likewise.
  3060. * coff-ppc.c: Likewise.
  3061. * coff-rs6000.c: Likewise.
  3062. * coff-sh.c: Likewise.
  3063. * coff-tic4x.c: Likewise.
  3064. * coff-tic54x.c: Likewise.
  3065. * coff-tic80.c: Likewise.
  3066. * coff64-rs6000.c: Likewise.
  3067. * coffcode.h: Likewise.
  3068. * coffgen.c: Likewise.
  3069. * cofflink.c: Likewise.
  3070. * coffswap.h: Likewise.
  3071. * compress.c: Likewise.
  3072. * cpu-arm.c: Likewise.
  3073. * ecoff.c: Likewise.
  3074. * elf-attrs.c: Likewise.
  3075. * elf-eh-frame.c: Likewise.
  3076. * elf-ifunc.c: Likewise.
  3077. * elf-m10300.c: Likewise.
  3078. * elf-properties.c: Likewise.
  3079. * elf-s390-common.c: Likewise.
  3080. * elf.c: Likewise.
  3081. * elf32-arc.c: Likewise.
  3082. * elf32-arm.c: Likewise.
  3083. * elf32-avr.c: Likewise.
  3084. * elf32-bfin.c: Likewise.
  3085. * elf32-cr16.c: Likewise.
  3086. * elf32-cr16c.c: Likewise.
  3087. * elf32-cris.c: Likewise.
  3088. * elf32-crx.c: Likewise.
  3089. * elf32-d10v.c: Likewise.
  3090. * elf32-d30v.c: Likewise.
  3091. * elf32-epiphany.c: Likewise.
  3092. * elf32-fr30.c: Likewise.
  3093. * elf32-frv.c: Likewise.
  3094. * elf32-gen.c: Likewise.
  3095. * elf32-hppa.c: Likewise.
  3096. * elf32-i370.c: Likewise.
  3097. * elf32-i386.c: Likewise.
  3098. * elf32-i960.c: Likewise.
  3099. * elf32-ip2k.c: Likewise.
  3100. * elf32-iq2000.c: Likewise.
  3101. * elf32-lm32.c: Likewise.
  3102. * elf32-m32c.c: Likewise.
  3103. * elf32-m32r.c: Likewise.
  3104. * elf32-m68hc11.c: Likewise.
  3105. * elf32-m68hc12.c: Likewise.
  3106. * elf32-m68hc1x.c: Likewise.
  3107. * elf32-m68k.c: Likewise.
  3108. * elf32-mcore.c: Likewise.
  3109. * elf32-mep.c: Likewise.
  3110. * elf32-metag.c: Likewise.
  3111. * elf32-microblaze.c: Likewise.
  3112. * elf32-moxie.c: Likewise.
  3113. * elf32-msp430.c: Likewise.
  3114. * elf32-mt.c: Likewise.
  3115. * elf32-nds32.c: Likewise.
  3116. * elf32-nios2.c: Likewise.
  3117. * elf32-or1k.c: Likewise.
  3118. * elf32-pj.c: Likewise.
  3119. * elf32-ppc.c: Likewise.
  3120. * elf32-rl78.c: Likewise.
  3121. * elf32-rx.c: Likewise.
  3122. * elf32-s390.c: Likewise.
  3123. * elf32-score.c: Likewise.
  3124. * elf32-score7.c: Likewise.
  3125. * elf32-sh-symbian.c: Likewise.
  3126. * elf32-sh.c: Likewise.
  3127. * elf32-sh64.c: Likewise.
  3128. * elf32-sparc.c: Likewise.
  3129. * elf32-spu.c: Likewise.
  3130. * elf32-tic6x.c: Likewise.
  3131. * elf32-tilepro.c: Likewise.
  3132. * elf32-v850.c: Likewise.
  3133. * elf32-vax.c: Likewise.
  3134. * elf32-visium.c: Likewise.
  3135. * elf32-wasm32.c: Likewise.
  3136. * elf32-xgate.c: Likewise.
  3137. * elf32-xtensa.c: Likewise.
  3138. * elf64-alpha.c: Likewise.
  3139. * elf64-gen.c: Likewise.
  3140. * elf64-hppa.c: Likewise.
  3141. * elf64-ia64-vms.c: Likewise.
  3142. * elf64-mmix.c: Likewise.
  3143. * elf64-ppc.c: Likewise.
  3144. * elf64-s390.c: Likewise.
  3145. * elf64-sh64.c: Likewise.
  3146. * elf64-sparc.c: Likewise.
  3147. * elf64-x86-64.c: Likewise.
  3148. * elfcode.h: Likewise.
  3149. * elfcore.h: Likewise.
  3150. * elflink.c: Likewise.
  3151. * elfnn-aarch64.c: Likewise.
  3152. * elfnn-ia64.c: Likewise.
  3153. * elfnn-riscv.c: Likewise.
  3154. * elfxx-mips.c: Likewise.
  3155. * elfxx-sparc.c: Likewise.
  3156. * elfxx-tilegx.c: Likewise.
  3157. * elfxx-x86.c: Likewise.
  3158. * hpux-core.c: Likewise.
  3159. * ieee.c: Likewise.
  3160. * ihex.c: Likewise.
  3161. * libbfd.c: Likewise.
  3162. * linker.c: Likewise.
  3163. * mach-o.c: Likewise.
  3164. * merge.c: Likewise.
  3165. * mmo.c: Likewise.
  3166. * oasys.c: Likewise.
  3167. * pdp11.c: Likewise.
  3168. * pe-mips.c: Likewise.
  3169. * peXXigen.c: Likewise.
  3170. * peicode.h: Likewise.
  3171. * reloc.c: Likewise.
  3172. * rs6000-core.c: Likewise.
  3173. * srec.c: Likewise.
  3174. * stabs.c: Likewise.
  3175. * vms-alpha.c: Likewise.
  3176. * xcofflink.c: Likewise.
  3177. 2018-02-19 Alan Modra <amodra@gmail.com>
  3178. PR 22845
  3179. * elf.c (IS_TBSS): Define.
  3180. (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
  3181. (assign_file_positions_for_non_load_sections): Revert last change.
  3182. Properly calculate load segment limits to compare against relro limits.
  3183. 2018-02-17 Alan Modra <amodra@gmail.com>
  3184. PR 22845
  3185. * elf.c (assign_file_positions_for_non_load_sections): Ignore
  3186. degenerate zero size PT_LOAD segments when finding one overlapping
  3187. the PT_GNU_RELRO segment.
  3188. 2018-02-16 Alan Modra <amodra@gmail.com>
  3189. * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
  3190. (_bfd_bool_bfd_true): Rename from bfd_true.
  3191. (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
  3192. (_bfd_int_bfd_0): Rename from bfd_0.
  3193. (_bfd_uint_bfd_0): Rename from bfd_0u.
  3194. (_bfd_long_bfd_0): Rename from bfd_0l.
  3195. (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
  3196. (_bfd_void_bfd): Rename from bfd_void.
  3197. (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
  3198. (_bfd_bool_bfd_link_false_error),
  3199. (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
  3200. (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
  3201. (_bfd_bool_bfd_asection_bfd_asection_true),
  3202. (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
  3203. (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
  3204. * archive.c (_bfd_noarchive_get_elt_at_index),
  3205. (_bfd_noarchive_openr_next_archived_file),
  3206. (_bfd_noarchive_construct_extended_name_table),
  3207. (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
  3208. (_bfd_noarchive_write_armap): New functions.
  3209. * archures.c (_bfd_nowrite_set_arch_mach): New function.
  3210. * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
  3211. (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
  3212. (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
  3213. (alpha_ecoff_swap_coff_lineno_out),
  3214. (alpha_ecoff_swap_coff_reloc_out): New functions.
  3215. * coff-mips.c (mips_ecoff_swap_coff_aux_in),
  3216. (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
  3217. (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
  3218. (mips_ecoff_swap_coff_lineno_out),
  3219. (mips_ecoff_swap_coff_reloc_out): New functions.
  3220. * coffcode.h (coff_set_alignment_hook): Replace define with
  3221. new function.
  3222. (symname_in_debug_hook): Likewise.
  3223. * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
  3224. * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
  3225. * elf.c (assign_file_positions_except_relocs): Test
  3226. elf_backend_allow_non_load_phdr for NULL.
  3227. * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
  3228. _bfd_elf_link_omit_section_dynsym. Update uses.
  3229. (_bfd_elf_omit_section_dynsym_all): New function.
  3230. * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
  3231. (_bfd_elf_omit_section_dynsym_default): Declare.
  3232. (_bfd_elf_omit_section_dynsym_all): Declare.
  3233. * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
  3234. (_bfd_nolink_bfd_get_relocated_section_contents),
  3235. (_bfd_nolink_bfd_lookup_section_flags),
  3236. (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
  3237. (_bfd_nolink_bfd_link_hash_table_create),
  3238. (_bfd_nolink_bfd_link_just_syms),
  3239. (_bfd_nolink_bfd_copy_link_hash_symbol_type),
  3240. (_bfd_nolink_bfd_link_split_section),
  3241. (_bfd_nolink_section_already_linked),
  3242. (_bfd_nolink_bfd_define_common_symbol),
  3243. (_bfd_nolink_bfd_define_start_stop): New functions.
  3244. * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
  3245. (_bfd_norelocs_bfd_reloc_name_lookup),
  3246. (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
  3247. * section.c (_bfd_nowrite_set_section_contents): New function.
  3248. * syms.c (_bfd_nosymbols_canonicalize_symtab),
  3249. (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
  3250. (_bfd_nosymbols_get_symbol_version_string),
  3251. (_bfd_nosymbols_bfd_is_local_label_name),
  3252. (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
  3253. (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
  3254. (_bfd_nosymbols_bfd_make_debug_symbol),
  3255. ( _bfd_nosymbols_read_minisymbols),
  3256. ( _bfd_nosymbols_minisymbol_to_symbol),
  3257. (_bfd_nodynamic_get_synthetic_symtab): New functions.
  3258. * libbfd-in.h: Declare new functions. Update existing defines,
  3259. removing casts.
  3260. * aix386-core.c: Update to use new hooks. Formatting.
  3261. * aout-adobe.c: Likewise.
  3262. * aout-arm.c: Likewise.
  3263. * aout-target.h: Likewise.
  3264. * aout-tic30.c: Likewise.
  3265. * aoutf1.h: Likewise.
  3266. * binary.c: Likewise.
  3267. * bout.c: Likewise.
  3268. * cisco-core.c: Likewise.
  3269. * coff-alpha.c: Likewise.
  3270. * coff-i386.c: Likewise.
  3271. * coff-i860.c: Likewise.
  3272. * coff-i960.c: Likewise.
  3273. * coff-ia64.c: Likewise.
  3274. * coff-mips.c: Likewise.
  3275. * coff-ppc.c: Likewise.
  3276. * coff-rs6000.c: Likewise.
  3277. * coff-sh.c: Likewise.
  3278. * coff-tic30.c: Likewise.
  3279. * coff-tic54x.c: Likewise.
  3280. * coff-x86_64.c: Likewise.
  3281. * coff64-rs6000.c: Likewise.
  3282. * coffcode.h: Likewise.
  3283. * elf-m10300.c: Likewise.
  3284. * elf32-cr16.c: Likewise.
  3285. * elf32-lm32.c: Likewise.
  3286. * elf32-m32r.c: Likewise.
  3287. * elf32-metag.c: Likewise.
  3288. * elf32-score.c: Likewise.
  3289. * elf32-score7.c: Likewise.
  3290. * elf32-tilepro.c: Likewise.
  3291. * elf32-xstormy16.c: Likewise.
  3292. * elf32-xtensa.c: Likewise.
  3293. * elf64-alpha.c: Likewise.
  3294. * elf64-hppa.c: Likewise.
  3295. * elf64-ia64-vms.c: Likewise.
  3296. * elf64-mmix.c: Likewise.
  3297. * elf64-sh64.c: Likewise.
  3298. * elfnn-ia64.c: Likewise.
  3299. * elfxx-sparc.c: Likewise.
  3300. * elfxx-target.h: Likewise.
  3301. * elfxx-tilegx.c: Likewise.
  3302. * elfxx-x86.h: Likewise.
  3303. * hp300hpux.c: Likewise.
  3304. * hppabsd-core.c: Likewise.
  3305. * hpux-core.c: Likewise.
  3306. * i386msdos.c: Likewise.
  3307. * i386os9k.c: Likewise.
  3308. * ieee.c: Likewise.
  3309. * ihex.c: Likewise.
  3310. * irix-core.c: Likewise.
  3311. * libaout.h: Likewise.
  3312. * libecoff.h: Likewise.
  3313. * mach-o-target.c: Likewise.
  3314. * mach-o.c: Likewise.
  3315. * mipsbsd.c: Likewise.
  3316. * mmo.c: Likewise.
  3317. * netbsd-core.c: Likewise.
  3318. * nlm-target.h: Likewise.
  3319. * oasys.c: Likewise.
  3320. * osf-core.c: Likewise.
  3321. * pdp11.c: Likewise.
  3322. * pe-mips.c: Likewise.
  3323. * pe-x86_64.c: Likewise.
  3324. * pef.c: Likewise.
  3325. * plugin.c: Likewise.
  3326. * ppcboot.c: Likewise.
  3327. * ptrace-core.c: Likewise.
  3328. * sco5-core.c: Likewise.
  3329. * som.c: Likewise.
  3330. * sparclynx.c: Likewise.
  3331. * srec.c: Likewise.
  3332. * tekhex.c: Likewise.
  3333. * trad-core.c: Likewise.
  3334. * verilog.c: Likewise.
  3335. * versados.c: Likewise.
  3336. * vms-alpha.c: Likewise.
  3337. * vms-lib.c: Likewise.
  3338. * wasm-module.c: Likewise.
  3339. * xsym.c: Likewise.
  3340. * libbfd.h: Regenerate.
  3341. 2018-02-15 Jim Wilson <jimw@sifive.com>
  3342. * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
  3343. symbols whose section address is zero.
  3344. * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
  3345. when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
  3346. bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
  3347. Add %X%P to error messages.
  3348. 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
  3349. PR ld/22832
  3350. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
  3351. Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
  3352. and assert that the result of the call is not NULL.
  3353. 2018-02-14 Nick Clifton <nickc@redhat.com>
  3354. PR 22823
  3355. Revert previous delta. Add extra casts to avoid compile time
  3356. warnings instead.
  3357. * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
  3358. cast to avoid warning from gcc v8 compiler.
  3359. (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
  3360. (_bfd_generic_bfd_set_private_flags): Likewise.
  3361. (_bfd_generic_bfd_copy_private_section_data): Likewise.
  3362. (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
  3363. (_bfd_generic_bfd_copy_private_header_data): Likewise.
  3364. (_bfd_generic_bfd_print_private_bfd_data): Likewise.
  3365. (_bfd_noarchive_construct_extended_name_table): Likewise.
  3366. (_bfd_noarchive_truncate_arname): Likewise.
  3367. (_bfd_noarchive_write_ar_hdr): Likewise.
  3368. (_bfd_noarchive_get_elt_at_index): Likewise.
  3369. (_bfd_nosymbols_canonicalize_symtab): Likewise.
  3370. (_bfd_nosymbols_print_symbol): Likewise.
  3371. (_bfd_nosymbols_get_symbol_info): Likewise.
  3372. (_bfd_nosymbols_get_symbol_version_string): Likewise.
  3373. (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
  3374. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
  3375. (_bfd_nosymbols_get_lineno): Likewise.
  3376. (_bfd_nosymbols_find_nearest_line): Likewise.
  3377. (_bfd_nosymbols_find_line): Likewise.
  3378. (_bfd_nosymbols_find_inliner_info): Likewise.
  3379. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
  3380. (_bfd_nosymbols_read_minisymbols): Likewise.
  3381. (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
  3382. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
  3383. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
  3384. (_bfd_nowrite_set_arch_mach): Likewise.
  3385. (_bfd_nowrite_set_section_contents): Likewise.
  3386. (_bfd_nolink_sizeof_headers): Likewise.
  3387. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
  3388. (_bfd_nolink_bfd_relax_section): Likewise.
  3389. (_bfd_nolink_bfd_gc_sections): Likewise.
  3390. (_bfd_nolink_bfd_lookup_section_flags): Likewise.
  3391. (_bfd_nolink_bfd_merge_sections): Likewise.
  3392. (_bfd_nolink_bfd_is_group_section): Likewise.
  3393. (_bfd_nolink_bfd_discard_group): Likewise.
  3394. (_bfd_nolink_bfd_link_hash_table_create): Likewise.
  3395. (_bfd_nolink_bfd_link_add_symbols): Likewise.
  3396. (_bfd_nolink_bfd_link_just_syms): Likewise.
  3397. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
  3398. (_bfd_nolink_bfd_final_link): Likewise.
  3399. (_bfd_nolink_bfd_link_split_section): Likewise.
  3400. (_bfd_nolink_section_already_linked): Likewise.
  3401. (_bfd_nolink_bfd_define_common_symbol): Likewise.
  3402. (_bfd_nolink_bfd_define_start_stop): Likewise.
  3403. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
  3404. (_bfd_nodynamic_get_synthetic_symtab): Likewise.
  3405. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
  3406. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
  3407. * libbfd.c (bfd_false_any): Delete.
  3408. (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
  3409. (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
  3410. * libbfd.h (extern): Regenerate
  3411. * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
  3412. cast to avoid warning from gcc v8 compiler.
  3413. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
  3414. * binary.c (binary_get_symbol_info): Likewise.
  3415. * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
  3416. * coff-mips.c (mips_ecoff_backend_data): Likewise.
  3417. * coffcode.h (coff_set_alignment_hook): Likewise.
  3418. (symname_in_debug_hook): Likewise.
  3419. (bfd_coff_backend_data bigobj_swap_table): Likewise.
  3420. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
  3421. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
  3422. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
  3423. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
  3424. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
  3425. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
  3426. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
  3427. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
  3428. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
  3429. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
  3430. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
  3431. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
  3432. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
  3433. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
  3434. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
  3435. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
  3436. (bfd_elfNN_bfd_make_debug_symbol): Likewise.
  3437. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
  3438. (bfd_elfNN_bfd_set_private_flags): Likewise.
  3439. (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
  3440. (elf_backend_init_index_section): Likewise.
  3441. (elf_backend_allow_non_load_phdr): Likewise.
  3442. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
  3443. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
  3444. * ieee.c (ieee_construct_extended_name_table): Likewise.
  3445. (ieee_write_armap): Likewise.
  3446. (ieee_write_ar_hdr): Likewise.
  3447. (ieee_bfd_is_target_special_symbol): Likewise.
  3448. * ihex.c (ihex_canonicalize_symtab): Likewise.
  3449. (ihex_bfd_is_target_special_symbol): Likewise.
  3450. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
  3451. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
  3452. (_bfd_ecoff_set_alignment_hook): Likewise.
  3453. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
  3454. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
  3455. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
  3456. * oasys.c (oasys_construct_extended_name_table): Likewise.
  3457. (oasys_write_armap): Likewise.
  3458. (oasys_write_ar_hdr): Likewise.
  3459. (oasys_bfd_is_target_special_symbol): Likewise.
  3460. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
  3461. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
  3462. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
  3463. * som.c (som_bfd_is_target_special_symbol): Likewise.
  3464. * srec.c (srec_bfd_is_target_special_symbol): Likewise.
  3465. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
  3466. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
  3467. * versados.c (versados_bfd_is_target_special_symbol): Likewise.
  3468. (versados_bfd_reloc_name_lookup): Likewise.
  3469. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
  3470. (vms_bfd_define_start_stop): Likewise.
  3471. (alpha_vms_bfd_is_target_special_symbol): Likewise.
  3472. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
  3473. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
  3474. 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
  3475. PR ld/22842
  3476. * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
  3477. PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
  3478. * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
  3479. R_X86_64_PC32 reloc against dynamic function in data section.
  3480. Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
  3481. (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
  3482. against dynamic function in data section.
  3483. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
  3484. function address only if pcrel_plt is true.
  3485. (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
  3486. * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
  3487. PC-relative PLT. If PLT is PC-relative, don't generate dynamic
  3488. PC-relative relocation against a function definition in data
  3489. secton in PIE. Remove the obsolete comments.
  3490. (elf_x86_link_hash_table): Add pcrel_plt.
  3491. 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
  3492. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
  3493. instead of bfd_link_pic, for building shared library.
  3494. 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
  3495. PR gas/22791
  3496. * elf64-x86-64.c (is_32bit_relative_branch): Removed.
  3497. (elf_x86_64_relocate_section): Check PIC relocations in PIE.
  3498. Remove is_32bit_relative_branch usage. Disallow PC32 reloc
  3499. against protected function in shared object.
  3500. 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
  3501. PR 22828
  3502. * po/ru.po: Fix typo in Russian translation.
  3503. 2018-02-13 Maciej W. Rozycki <macro@mips.com>
  3504. * wasm-module.c (wasm_scan_name_function_section): Rename
  3505. `index' local variable to `idx'.
  3506. 2018-02-13 Nick Clifton <nickc@redhat.com>
  3507. PR 22823
  3508. Fix compile time warnings generated by gcc version 8.
  3509. * libbfd-in.h: Remove extraneous text from prototypes.
  3510. Add prototypes for bfd_false_any, bfd_true_any,
  3511. bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
  3512. bfd_n1_any, bfd_void_any.
  3513. (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
  3514. function.
  3515. (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
  3516. (_bfd_generic_bfd_set_private_flags): Likewise.
  3517. (_bfd_generic_bfd_copy_private_section_data): Likewise.
  3518. (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
  3519. (_bfd_generic_bfd_copy_private_header_data): Likewise.
  3520. (_bfd_generic_bfd_print_private_bfd_data): Likewise.
  3521. (_bfd_noarchive_construct_extended_name_table): Likewise.
  3522. (_bfd_noarchive_truncate_arname): Likewise.
  3523. (_bfd_noarchive_write_ar_hdr): Likewise.
  3524. (_bfd_noarchive_get_elt_at_index): Likewise.
  3525. (_bfd_nosymbols_canonicalize_symtab): Likewise.
  3526. (_bfd_nosymbols_print_symbol): Likewise.
  3527. (_bfd_nosymbols_get_symbol_info): Likewise.
  3528. (_bfd_nosymbols_get_symbol_version_string): Likewise.
  3529. (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
  3530. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
  3531. (_bfd_nosymbols_get_lineno): Likewise.
  3532. (_bfd_nosymbols_find_nearest_line): Likewise.
  3533. (_bfd_nosymbols_find_line): Likewise.
  3534. (_bfd_nosymbols_find_inliner_info): Likewise.
  3535. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
  3536. (_bfd_nosymbols_read_minisymbols): Likewise.
  3537. (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
  3538. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
  3539. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
  3540. (_bfd_nowrite_set_arch_mach): Likewise.
  3541. (_bfd_nowrite_set_section_contents): Likewise.
  3542. (_bfd_nolink_sizeof_headers): Likewise.
  3543. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
  3544. (_bfd_nolink_bfd_relax_section): Likewise.
  3545. (_bfd_nolink_bfd_gc_sections): Likewise.
  3546. (_bfd_nolink_bfd_lookup_section_flags): Likewise.
  3547. (_bfd_nolink_bfd_merge_sections): Likewise.
  3548. (_bfd_nolink_bfd_is_group_section): Likewise.
  3549. (_bfd_nolink_bfd_discard_group): Likewise.
  3550. (_bfd_nolink_bfd_link_hash_table_create): Likewise.
  3551. (_bfd_nolink_bfd_link_add_symbols): Likewise.
  3552. (_bfd_nolink_bfd_link_just_syms): Likewise.
  3553. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
  3554. (_bfd_nolink_bfd_final_link): Likewise.
  3555. (_bfd_nolink_bfd_link_split_section): Likewise.
  3556. (_bfd_nolink_section_already_linked): Likewise.
  3557. (_bfd_nolink_bfd_define_common_symbol): Likewise.
  3558. (_bfd_nolink_bfd_define_start_stop): Likewise.
  3559. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
  3560. (_bfd_nodynamic_get_synthetic_symtab): Likewise.
  3561. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
  3562. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
  3563. * libbfd.c (bfd_false_any): New function. Like bfd_false but
  3564. accepts one or more arguments.
  3565. (bfd_true_any): Likewise.
  3566. (bfd_nullvoidptr_any): Likewise.
  3567. (bfd_0_any): Likewise.
  3568. (bfd_0u_any): Likewise.
  3569. (bfd_0l_any): Likewise.
  3570. (_bfd_n1_any): Likewise.
  3571. (bfd_void_any): Likewise.
  3572. * libbfd.h (extern): Regenerate
  3573. * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
  3574. based dummy function.
  3575. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
  3576. * binary.c (binary_get_symbol_info): Likewise.
  3577. * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
  3578. * coff-mips.c (mips_ecoff_backend_data): Likewise.
  3579. * coffcode.h (coff_set_alignment_hook): Likewise.
  3580. (symname_in_debug_hook): Likewise.
  3581. (bfd_coff_backend_data bigobj_swap_table): Likewise.
  3582. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
  3583. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
  3584. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
  3585. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
  3586. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
  3587. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
  3588. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
  3589. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
  3590. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
  3591. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
  3592. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
  3593. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
  3594. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
  3595. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
  3596. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
  3597. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
  3598. (bfd_elfNN_bfd_make_debug_symbol): Likewise.
  3599. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
  3600. (bfd_elfNN_bfd_set_private_flags): Likewise.
  3601. (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
  3602. (elf_backend_init_index_section): Likewise.
  3603. (elf_backend_allow_non_load_phdr): Likewise.
  3604. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
  3605. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
  3606. * ieee.c (ieee_construct_extended_name_table): Likewise.
  3607. (ieee_write_armap): Likewise.
  3608. (ieee_write_ar_hdr): Likewise.
  3609. (ieee_bfd_is_target_special_symbol): Likewise.
  3610. * ihex.c (ihex_canonicalize_symtab): Likewise.
  3611. (ihex_bfd_is_target_special_symbol): Likewise.
  3612. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
  3613. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
  3614. (_bfd_ecoff_set_alignment_hook): Likewise.
  3615. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
  3616. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
  3617. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
  3618. * oasys.c (oasys_construct_extended_name_table): Likewise.
  3619. (oasys_write_armap): Likewise.
  3620. (oasys_write_ar_hdr): Likewise.
  3621. (oasys_bfd_is_target_special_symbol): Likewise.
  3622. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
  3623. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
  3624. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
  3625. * som.c (som_bfd_is_target_special_symbol): Likewise.
  3626. * srec.c (srec_bfd_is_target_special_symbol): Likewise.
  3627. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
  3628. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
  3629. * versados.c (versados_bfd_is_target_special_symbol): Likewise.
  3630. (versados_bfd_reloc_name_lookup): Likewise.
  3631. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
  3632. (vms_bfd_define_start_stop): Likewise.
  3633. (alpha_vms_bfd_is_target_special_symbol): Likewise.
  3634. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
  3635. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
  3636. * elf32-arc.c (get_replace_function): Assign replacement function
  3637. to func pointer.
  3638. * elf32-i370.c (i370_noop): Update prototype.
  3639. 2018-02-13 Alan Modra <amodra@gmail.com>
  3640. PR 22836
  3641. * elf.c (_bfd_elf_fixup_group_sections): Account for removed
  3642. relocation sections. If size reduces to just the flag word,
  3643. remove that too and mark with SEC_EXCLUDE.
  3644. * elflink.c (bfd_elf_final_link): Strip empty group sections.
  3645. 2018-02-13 Alan Modra <amodra@gmail.com>
  3646. PR 22829
  3647. * elf.c (assign_file_positions_for_non_load_sections): Rewrite
  3648. PT_GNU_RELRO setup.
  3649. 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
  3650. * i386msdos.c (msdos_mkobject); New function.
  3651. (msdos_object_p): New function.
  3652. (i386_msdos_vec): Use msdos_object_p as the check_format
  3653. function.
  3654. * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
  3655. NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
  3656. IMAGE_NT_SIGNATURE.
  3657. * peXXigen.c: Likewise.
  3658. * coff-ia64.c: Likewise.
  3659. 2018-02-12 Nick Clifton <nickc@redhat.com>
  3660. * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
  3661. assignment.
  3662. * elf32-arc.c (elf_arc_relocate_section): Likewise.
  3663. 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
  3664. * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
  3665. (sparc_elf_append_rela): Assert that there is enough room in section.
  3666. (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
  3667. (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
  3668. (allocate_dynrelocs): Remove outdated comments and reorder conditions.
  3669. For a symbol subject to a GOT relocation, reserve a slot in the
  3670. relocation section if the symbol isn't dynamic and we are in PIC mode.
  3671. (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
  3672. is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
  3673. <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
  3674. <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
  3675. (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
  3676. resolved_to_zero. Do not generate a dynamic GOT relocation for an
  3677. undefined weak symbol with non-default visibility. Remove superfluous
  3678. 'else' and fix formatting.
  3679. 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
  3680. * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
  3681. is_solaris.
  3682. (i386_elf32_sol2_vec): Don't declare.
  3683. (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
  3684. Don't set need_global_offset_table.
  3685. (elf_i386_solaris_arch_bed): New.
  3686. (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
  3687. Solaris.
  3688. * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
  3689. target_os != is_nacl instead of target_os == is_normal.
  3690. (x86_64_elf64_sol2_vec): Don't declare.
  3691. (elf_x86_64_link_setup_gnu_properties): Check target_os !=
  3692. is_nacl instead of target_os == is_normal. Don't set
  3693. need_global_offset_table.
  3694. (elf_x86_64_solaris_arch_bed): New.
  3695. (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
  3696. Solaris.
  3697. * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
  3698. _GLOBAL_OFFSET_TABLE_ for Solaris.
  3699. (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
  3700. need_global_offset_table.
  3701. * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
  3702. (elf_x86_link_hash_table): Remove need_global_offset_table.
  3703. (elf_x86_init_table): Likewise.
  3704. 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
  3705. * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
  3706. Remove prototype.
  3707. (i386_elf32_sol2_vec): Declared.
  3708. (elf_i386_link_setup_gnu_properties): Set
  3709. need_global_offset_table with info->output_bfd->xvec.
  3710. * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
  3711. Remove prototype.
  3712. (x86_64_elf64_sol2_vec): Declared.
  3713. (elf_x86_64_link_setup_gnu_properties): Set
  3714. need_global_offset_table with info->output_bfd->xvec.
  3715. 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
  3716. * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
  3717. New prototype.
  3718. (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
  3719. for Solaris.
  3720. * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
  3721. New prototype.
  3722. (elf_x86_64_link_setup_gnu_properties): Set
  3723. need_global_offset_table for Solaris.
  3724. * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
  3725. unused _GLOBAL_OFFSET_TABLE_ for Solaris.
  3726. (_bfd_x86_elf_link_setup_gnu_properties): Copy
  3727. need_global_offset_table.
  3728. * elfxx-x86.h (elf_x86_link_hash_table): Add
  3729. need_global_offset_table.
  3730. (elf_x86_init_table): Likewise.
  3731. 2018-02-08 Jim Wilson <jimw@sifive.com>
  3732. * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
  3733. change.
  3734. 2018-02-08 Nick Clifton <nickc@redhat.com>
  3735. PR 22788
  3736. * elf.c (elf_parse_notes): Reject notes with excessuively large
  3737. alignments.
  3738. 2018-02-07 Alan Modra <amodra@gmail.com>
  3739. Revert 2018-01-17 Alan Modra <amodra@gmail.com>
  3740. * elf32-ppc.c: Remove speculation barrier support.
  3741. * elf32-ppc.h: Likewise.
  3742. * elf64-ppc.c: Likewise.
  3743. * elf64-ppc.h: Likewise.
  3744. 2018-02-06 Jim Wilson <jimw@sifive.com>
  3745. * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
  3746. callback to report an error.
  3747. 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
  3748. PR ld/22263
  3749. * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
  3750. into call to !bfd_link_executable and tidy up.
  3751. (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
  3752. <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
  3753. !bfd_link_executable.
  3754. <R_SPARC_TLS_IE_HI22>: Likewise.
  3755. <GOT relocations>: Remove useless code, tidy and merge related blocks.
  3756. <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
  3757. !bfd_link_executable.
  3758. <R_SPARC_WPLT30>: Tidy up.
  3759. (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
  3760. !bfd_link_executable.
  3761. (allocate_dynrelocs): Likewise.
  3762. (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
  3763. <R_SPARC_TLS_GD_HI22>: Merge into...
  3764. <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
  3765. sparc_elf_tls_transition and remove redundant code.
  3766. <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
  3767. !bfd_link_executable.
  3768. <R_SPARC_TLS_LDO_HIX22>: Likewise.
  3769. <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
  3770. <R_SPARC_TLS_LDM_CALL>: Likewise.
  3771. <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
  3772. <R_SPARC_TLS_GD_ADD>: Likewise.
  3773. <R_SPARC_TLS_LDM_ADD>: Likewise.
  3774. <R_SPARC_TLS_LDO_ADD>: Likewise.
  3775. <R_SPARC_TLS_IE_LD>: Likewise.
  3776. 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
  3777. PR 22789
  3778. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
  3779. functions failed to find the function name, try the generic elf
  3780. find function instead.
  3781. 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
  3782. * coff-rs6000.c (xcoff_write_archive_contents_old): Use
  3783. 'memcpy' instead of 'strncpy' when writing the magic number.
  3784. 2018-02-06 Nick Clifton <nickc@redhat.com>
  3785. PR 22794
  3786. * opncls.c (bfd_get_debug_link_info_1): Check the size of the
  3787. section before attempting to read it in.
  3788. (bfd_get_alt_debug_link_info): Likewise.
  3789. 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
  3790. * bfd/dwarf2.c (find_abstract_name): Modified to return file and
  3791. line information in addition to name, if they can be found.
  3792. 2018-02-05 Renlin Li <renlin.li@arm.com>
  3793. PR ld/22764
  3794. * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
  3795. R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
  3796. check for writeable section as well.
  3797. 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
  3798. PR ld/22782
  3799. * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
  3800. _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
  3801. undefined weak symbol to 0.
  3802. * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
  3803. if _GLOBAL_OFFSET_TABLE_ is referenced.
  3804. * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
  3805. got_referenced instead of ref_regular_nonweak. Remove the
  3806. unused _GLOBAL_OFFSET_TABLE_ from symbol table.
  3807. * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
  3808. 2018-02-05 Maciej W. Rozycki <macro@mips.com>
  3809. * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
  3810. initialize `hi_reloc'.
  3811. 2018-02-05 Maciej W. Rozycki <macro@mips.com>
  3812. * elfxx-mips.c (_bfd_mips_elf_section_processing): For
  3813. SHT_MIPS_REGINFO sections don't assert the correct size and
  3814. report an error instead.
  3815. 2018-02-05 Maciej W. Rozycki <macro@mips.com>
  3816. * elf.c (_bfd_elf_write_object_contents): Propagate a failure
  3817. status from `->elf_backend_section_processing'.
  3818. 2018-02-02 Jim Wilson <jimw@sifive.com>
  3819. PR ld/22756
  3820. * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
  3821. If link_info->wrap_hash, check for a duplicate symbol and ignore.
  3822. (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
  3823. Pass new argument to riscv_relax_delete_bytes.
  3824. (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
  3825. ATTRIBUTE_UNUSED from link_info parameter.
  3826. 2018-02-02 Alan Modra <amodra@gmail.com>
  3827. * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
  3828. emitted for toc sequence optimization. Set and use "howto" later.
  3829. 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
  3830. * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
  3831. arithmetic on NULL pointer.
  3832. * elflink.c (_bfd_elf_archive_symbol_lookup,
  3833. elf_link_add_archive_symbols): Likewise.
  3834. 2018-01-31 Michael Matz <matz@suse.de>
  3835. * elflink.c (bfd_elf_define_start_stop): Fix check of
  3836. def_dynamic.
  3837. 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
  3838. PR ld/21964
  3839. * elflink.c (bfd_elf_define_start_stop): Check if __start and
  3840. __stop symbols are referenced by shared objects.
  3841. 2018-01-30 Alan Modra <amodra@gmail.com>
  3842. PR 22758
  3843. * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
  3844. segment when demand paged with lma on the same page. Test this
  3845. before load/non-load, executable/non-executable,
  3846. writable/non-writable tests and simplify. Delete bogus relro
  3847. condition in writable/non-writable test. Delete outdated
  3848. comment. Formatting.
  3849. 2018-01-30 Alan Modra <amodra@gmail.com>
  3850. * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
  3851. symbols dynamic.
  3852. 2018-01-29 Alan Modra <amodra@gmail.com>
  3853. PR 22741
  3854. * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
  3855. range before converting to a symbol table pointer.
  3856. 2018-01-27 Nick Clifton <nickc@redhat.com>
  3857. * po/ru.po: Updated Russian translation.
  3858. 2018-01-26 Alan Modra <amodra@gmail.com>
  3859. * elflink.c (bfd_elf_define_start_stop): Override symbols when
  3860. they are defined dynamically.
  3861. 2018-01-26 Alan Modra <amodra@gmail.com>
  3862. * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
  3863. .branch_lt changes size.
  3864. 2018-01-25 Alan Modra <amodra@gmail.com>
  3865. PR 22746
  3866. * elfcode.h (elf_object_p): Avoid integer overflow.
  3867. 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
  3868. PR ld/22727
  3869. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
  3870. Do a mere lookup of the __tls_get_addr symbol instead of adding it.
  3871. Revert
  3872. 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
  3873. PR ld/22263
  3874. * elfxx-sparc.c (sparc_elf_tls_transition): Replace
  3875. bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
  3876. bfd_link_executable for TLS check.
  3877. (_bfd_sparc_elf_check_relocs): Likewise.
  3878. (allocate_dynrelocs): Likewise.
  3879. (_bfd_sparc_elf_relocate_section): Likewise.
  3880. 2018-01-24 Renlin Li <renlin.li@arm.com>
  3881. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
  3882. BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
  3883. BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
  3884. BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
  3885. BFD_RELOC_AARCH64_MOVW_PREL_G3.
  3886. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  3887. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  3888. 2018-01-24 Renlin Li <renlin.li@arm.com>
  3889. * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
  3890. BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
  3891. BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
  3892. BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
  3893. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
  3894. BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
  3895. BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
  3896. BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
  3897. BFD_RELOC_AARCH64_MOVW_PREL_G3.
  3898. * bfd-in2.h: Regenerate.
  3899. * libbfd.h: Regenerate.
  3900. 2018-01-23 Maciej W. Rozycki <macro@mips.com>
  3901. * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
  3902. `mips_elf32_section_processing' comment reference.
  3903. 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
  3904. PR ld/22721
  3905. * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
  3906. versioned __tls_get_addr symbol.
  3907. 2018-01-19 Nick Clifton <nickc@redhat.com>
  3908. * po/fr.po: Updated French translation.
  3909. 2018-01-18 Alan Modra <amodra@gmail.com>
  3910. * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
  3911. * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
  3912. (ppc64_elf_build_stubs): Likewise.
  3913. 2018-01-17 Nick Clifton <nickc@redhat.com>
  3914. * po/ru.po: Updated Russian translation.
  3915. * po/uk/po: Updated Ukranian translation.
  3916. 2018-01-17 Alan Modra <amodra@gmail.com>
  3917. * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
  3918. 2018-01-17 Alan Modra <amodra@gmail.com>
  3919. * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
  3920. (CRSETEQ, BEQCTRM): Define.
  3921. (is_nonpic_glink_stub): Don't check bctr.
  3922. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
  3923. (ppc_elf_relax_section): Size speculation barrier.
  3924. (output_bctr): New function.
  3925. (write_glink_stub): Use output_bctr.
  3926. (ppc_elf_relocate_section): Use output_bctr for long branch stub.
  3927. (ppc_elf_finish_dynamic_symbol): Likewise.
  3928. (ppc_elf_finish_dynamic_sections): Use output_bctr.
  3929. * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
  3930. * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
  3931. (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
  3932. (size_global_entry_stubs): Handle speculation barrier sizing.
  3933. (plt_stub_size): Likewise.
  3934. (output_bctr): New function.
  3935. (build_plt_stub, build_tls_get_addr_stub): Output speculation
  3936. barrier.
  3937. (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
  3938. (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
  3939. (build_global_entry_stubs): Output speculation barrier.
  3940. (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
  3941. * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
  3942. 2018-01-17 Alan Modra <amodra@gmail.com>
  3943. * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
  3944. __tls_get_addr_opt, and alignment sizing.
  3945. (TLS_GET_ADDR_GLINK_SIZE): Delete.
  3946. (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
  3947. (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
  3948. or 8 insns.
  3949. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
  3950. (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
  3951. (ppc_elf_size_dynamic_sections): Likewise. Size branch table
  3952. by PLT reloc count.
  3953. (write_glink_stub): Handle __tls_get_addr_opt stub.
  3954. Pad out to size given by GLINK_ENTRY_SIZE.
  3955. (ppc_elf_relocate_section): Adjust write_glink_stub call.
  3956. (ppc_elf_finish_dynamic_symbol): Likewise.
  3957. (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
  3958. insn array since so many need rewriting.
  3959. * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
  3960. * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
  3961. GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
  3962. nops. Adjust all uses.
  3963. (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
  3964. in glink_vma calculation.
  3965. (struct ppc_link_hash_table): Add global_entry section pointer.
  3966. (create_linkage_sections): Create separate section for global
  3967. entry stubs.
  3968. (PPC_LO, PPC_HI, PPC_HA): Move earlier.
  3969. (size_global_entry_stubs): Handle sizing for aligned stubs.
  3970. (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
  3971. and don't stash end of glink branch table in rawsize.
  3972. (ppc_build_one_stub): Rewrite stub size calculations.
  3973. (build_global_entry_stubs): Use new section.
  3974. (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
  3975. Build lazy link stubs out to end of section. Build global entry
  3976. stubs in new section.
  3977. 2018-01-15 Nick Clifton <nickc@redhat.com>
  3978. * po/uk.po: Updated Ukranian translation.
  3979. 2018-01-13 Nick Clifton <nickc@redhat.com>
  3980. * po/bfd.pot: Regenerated.
  3981. 2018-01-13 Nick Clifton <nickc@redhat.com>
  3982. * version.m4: Bump version to 2.30.51
  3983. * configure: Regenerate.
  3984. 2018-01-13 Nick Clifton <nickc@redhat.com>
  3985. 2.30 branch created.
  3986. 2018-01-12 Jens Widell <jl@opera.com>
  3987. * elf.c (setup_group): Optimize search for group by remembering
  3988. last found group and restarting search at that index.
  3989. * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
  3990. 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
  3991. * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
  3992. bfd_link_common_skip_none in switch.
  3993. 2018-01-12 Alan Modra <amodra@gmail.com>
  3994. PR ld/22649
  3995. * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
  3996. references on forced local symbols.
  3997. 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
  3998. * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
  3999. .reginfo section has wrong size.
  4000. 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
  4001. PR ld/22393
  4002. * elf.c (_bfd_elf_map_sections_to_segments): When generating
  4003. separate code and read-only data LOAD segments, create a new
  4004. LOAD segment if the previous section contains text and the
  4005. current section doesn't or vice versa. Don't put a writable
  4006. section in a read-only segment if there is a RELRO segment.
  4007. 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
  4008. PR ld/22649
  4009. * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
  4010. references on forced local symbols.
  4011. 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
  4012. PR ld/22677
  4013. * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
  4014. INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
  4015. 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
  4016. PR 22662
  4017. * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
  4018. 2018-01-03 John Baldwin <jhb@FreeBSD.org>
  4019. * elf.c (elfcore_grok_freebsd_note): Handle
  4020. NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
  4021. NT_FREEBSD_PROCSTAT_VMMAP.
  4022. 2018-01-03 Alan Modra <amodra@gmail.com>
  4023. Update year range in copyright notice of all files.
  4024. For older changes see ChangeLog-2017
  4025. Copyright (C) 2018 Free Software Foundation, Inc.
  4026. Copying and distribution of this file, with or without modification,
  4027. are permitted in any medium without royalty provided the copyright
  4028. notice and this notice are preserved.
  4029. Local Variables:
  4030. mode: change-log
  4031. left-margin: 8
  4032. fill-column: 74
  4033. version-control: never
  4034. End: