ChangeLog-2015 152 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247
  1. 2015-12-27 Sandra Loosemore <sandra@codesourcery.com>
  2. * elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
  3. address.
  4. (nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
  5. messages.
  6. 2015-12-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
  7. * elf32-arm.c (using_thumb_only): Check that profile is 'M' and update
  8. logic around Tag_CPU_arch values to return TRUE for ARMv8-M
  9. architectures.
  10. (tag_cpu_arch_combine): Define v8m_baseline and v8m_mainline and update
  11. v4t_plus_v6_m and comb to deal with ARMv8-M Tag_CPU_arch merging logic.
  12. (elf32_arm_merge_eabi_attributes): Add Tag_CPU_name values for
  13. ARMv8-M.
  14. 2015-12-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
  15. (tag_cpu_arch_combine): Adjust comment in v4t_plus_v6_m with regards
  16. to merging with ARMv8-M Baseline.
  17. 2015-12-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
  18. (tag_cpu_arch_combine): Adjust v4t_plus_v6_m and comb array to account
  19. for new TAG_CPU_ARCH_V4T_PLUS_V6_M value. Deal with NULL values in
  20. comb array.
  21. 2015-12-22 Yury Usishchev <y.usishchev@samsung.com>
  22. * elf-bfd.h: Add callback to count additional relocations.
  23. * elf32-arm.c (_arm_elf_section_data): Add new counter.
  24. (insert_cantunwind_after): Increment relocations counter.
  25. (elf32_arm_fix_exidx_coverage): Remove exidx entries and add
  26. terminating CANTUNWIND entry only in final builds.
  27. (elf32_arm_add_relocation): New function.
  28. (elf32_arm_write_section): Add relocations in relocatable builds.
  29. (elf32_arm_count_additional_relocs): New function.
  30. (elf_backend_count_additional_relocs): New define.
  31. * elflink.c (bfd_elf_final_link): Use callback and adjust size of
  32. .rel section.
  33. * elfxx-target.h (elf_backend_count_additional_relocs): New define.
  34. 2015-12-22 Yoshinori Sato <ysato@users.sourceforge.jp>
  35. * archures.c: Add bfd_mach_rx_v2.
  36. * bfd-in2.h: Regenerate.
  37. * cpu-rx.c (arch_info_struct): Add v2 information.
  38. * elf32-rx.c (elf32_rx_machine): Add v2 support.
  39. 2015-12-22 Mickael Guene <mickael.guene@st.com>
  40. * bfd-in2.h: Regenerate.
  41. * section.c: Add SEC_ELF_NOREAD.
  42. * elf32-arm.c (elf32_arm_post_process_headers): Only set
  43. PF_X attribute if a segment only contains section with
  44. SHF_ARM_NOREAD flag.
  45. (elf32_arm_fake_sections): Add SEC_ELF_NOREAD conversion.
  46. (elf32_arm_section_flags): New function to convert SHF_ARM_NOREAD
  47. to bfd flag.
  48. (elf32_arm_lookup_section_flags): New function to allow
  49. INPUT_SECTION_FLAGS directive with SHF_ARM_NOREAD flag.
  50. (elf32_arm_special_sections): Add special sections array
  51. to catch section prefix by '.text.noread' pattern.
  52. 2015-12-18 H.J. Lu <hongjiu.lu@intel.com>
  53. * coff-x86_64.c (coff_amd64_reloc): Fix formatting.
  54. 2015-12-18 Nick Clifton <nickc@redhat.com>
  55. * coff-i386.c (coff_i386_reloc): Fix formatting.
  56. 2015-12-16 Mickael Guene <mickael.guene@st.com>
  57. * bfd-in2.h: Regenerate.
  58. * reloc.c: Add new relocations.
  59. * libbfd.h (bfd_reloc_code_real_names): Add new relocations
  60. display names.
  61. * elf32-arm.c (elf32_arm_howto_table_1): Add HOWTO for new
  62. relocations.
  63. (elf32_arm_reloc_map): Add bfd/arm mapping for new relocations.
  64. (elf32_arm_final_link_relocate): Implement new relocations
  65. resolution.
  66. 2015-12-15 Jan Beulich <jbeulich@suse.com>
  67. * coffgen.c (coff_write_alien_symbol): New parameter "iaux".
  68. (coff_write_symbols): Pass NULL for new argument.
  69. * cofflink.c (_bfd_coff_final_link): New local variables
  70. "iaux".
  71. Extend scope of local variables "indx" and "hash". Pass address
  72. of "iaux" to coff_write_alien_symbol(). Handle ".file" and the
  73. file name ending up in the string table separately. Avoid
  74. setting "rewrite" on more than one path.
  75. * libcoff-in.h (coff_write_alien_symbol): New parameter of type
  76. "union internal_auxent *".
  77. * libcoff.h: Re-generate.
  78. 2015-12-15 Nick Clifton <nickc@redhat.com>
  79. PR 19339
  80. * elf-vxworks.h: Update copyright notice.
  81. * elf-vxworks.c: Update copyright notice.
  82. * elf-nacl.h: Update copyright notice.
  83. * elf-nacl.c: Update copyright notice.
  84. 2015-12-10 H.J. Lu <hongjiu.lu@intel.com>
  85. PR ld/19317
  86. * linker.c (_bfd_generic_link_add_one_symbol): Don't complain
  87. plugin needed to handle slim lto object for relocatable link.
  88. 2015-12-09 Sandra Loosemore <sandra@codesourcery.com>
  89. * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
  90. %hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
  91. PLT entries. Assert alignment requirements.
  92. 2015-12-08 DJ Delorie <dj@redhat.com>
  93. * elf32-rl78.c (rl78_offset_for_reloc): Add more relocs.
  94. (rl78_elf_relax_section): Add bc/bz/bnc/bnz/bh/bnh. Fix reloc
  95. choices.
  96. * elf32-rx.c (rx_elf_object_p): Ignore empty and nobits sections.
  97. 2015-12-07 Nick Clifton <nickc@redhat.com>
  98. * elf32-rx.c (elf32_rx_relax_delete_bytes): Add extra parameter -
  99. the start of the relocs for the section. Delete code to load in
  100. the relocs.
  101. (elf32_rx_relax_section): Do not free the loaded relocs.
  102. 2015-12-07 Alan Modra <amodra@gmail.com>
  103. * elf32-ppc.c (ppc_elf_check_relocs): Don't error on local ifunc
  104. plt call. Wrap long lines.
  105. (ppc_elf_relocate_section): Wrap long lines.
  106. * elf64-ppc.c (ppc64_elf_check_relocs): Don't error on local ifunc
  107. plt calls. Move __tls_get_addr checks later. Don't create plt
  108. for addr14/addr24 relocs.
  109. (ppc64_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
  110. (ppc64_elf_relocate_section): Correct local ifunc handling for
  111. PLT64, PLT32 and PLT16 relocs.
  112. 2015-12-07 Alan Modra <amodra@gmail.com>
  113. PR19323
  114. * elfcode.h (elf_object_p): Check for ridiculous e_shnum and
  115. e_phnum values.
  116. 2015-12-07 Alan Modra <amodra@gmail.com>
  117. * reloc.c (BFD_RELOC_PPC64_ENTRY): New.
  118. * elf64-ppc.c (reloc_howto_type ppc64_elf_howto_raw): Add
  119. entry for R_PPC64_ENTRY.
  120. (LD_R2_0R12, ADD_R2_R2_R12, LIS_R2, ADDIS_R2_R12): Define.
  121. (ppc64_elf_reloc_type_lookup): Handle R_PPC64_ENTRY.
  122. (ppc64_elf_relocate_section): Edit code at R_PPC64_ENTTY. Use
  123. new insn defines.
  124. * libbfd.h: Regenerate.
  125. * bfd-in2.h: Regenerate.
  126. 2015-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
  127. * config.bfd: Mark sh5*-*-* and sh64*-*-* as obsolete.
  128. 2015-12-04 H.J. Lu <hongjiu.lu@intel.com>
  129. * elf32-i386.c (elf_i386_convert_load): Skip if addend isn't 0.
  130. (elf_i386_relocate_section): Skip R_386_GOT32X optimization if
  131. addend isn't 0.
  132. 2015-12-04 Tristan Gingold <gingold@adacore.com>
  133. * elf.c (rewrite_elf_program_header): Remove useless loop.
  134. 2015-12-02 Alan Modra <amodra@gmail.com>
  135. PR binutils/19315
  136. * dwarf2.c (_bfd_elf_find_function): Return symbol matched.
  137. (_bfd_dwarf2_find_nearest_line): Check symbol returned above
  138. against dwarf range.
  139. * elf-bfd.h (_bfd_elf_find_function): Update prototype.
  140. 2015-12-02 Alan Modra <amodra@gmail.com>
  141. * elf64-ppc.c (ppc64_elf_tls_optimize): Don't segfault on NULL
  142. symbol section or output section.
  143. (ppc64_elf_edit_toc): Similarly for ld -R objects.
  144. (ppc64_elf_size_stubs): Likewise.
  145. 2015-12-01 H.J. Lu <hongjiu.lu@intel.com>
  146. PR ld/19319
  147. * elf32-i386.c (elf_i386_convert_load): Check h->def_regular
  148. instead of bfd_link_hash_new.
  149. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
  150. relocation overflow for bfd_link_hash_undefined and
  151. bfd_link_hash_new if h->def_regular is set.
  152. 2015-12-01 Alan Modra <amodra@gmail.com>
  153. * aoutx.h (adjust_sizes_and_vmas): Remove unused text_size and
  154. text_end parameters. Update callers.
  155. * aout-tic30.c: Update adjust_sizes_and_vmas callers.
  156. * hp300hpux.c: Likewise.
  157. * i386lynx.c: Likewise.
  158. * libaout.h: Likewise.
  159. * netbsd.h: Likewise.
  160. * pdp11.c: Likewise.
  161. * riscix.c: Likewise.
  162. 2015-12-01 Alan Modra <amodra@gmail.com>
  163. * aout-adobe.c: Invoke aout N_* macros with pointer to
  164. struct internal_exec.
  165. * aout-arm.c: Likewise.
  166. * aout-cris.c: Likewise.
  167. * aout-target.h: Likewise.
  168. * aout-tic30.c: Likewise.
  169. * aoutf1.h: Likewise.
  170. * aoutx.h: Likewise.
  171. * bout.c: Likewise.
  172. * freebsd.h: Likewise.
  173. * gen-aout.c: Likewise.
  174. * hp300hpux.c: Likewise.
  175. * i386aout.c: Likewise.
  176. * i386linux.c: Likewise.
  177. * i386lynx.c: Likewise.
  178. * i386mach3.c: Likewise.
  179. * i386os9k.c: Likewise.
  180. * libaout.h: Likewise.
  181. * m68klinux.c: Likewise.
  182. * m88kmach3.c: Likewise.
  183. * mipsbsd.c: Likewise.
  184. * netbsd.h: Likewise.
  185. * pc532-mach.c: Likewise.
  186. * pdp11.c: Likewise.
  187. * riscix.c: Likewise.
  188. * sparclinux.c: Likewise.
  189. * sparclynx.c: Likewise.
  190. 2015-12-01 Alan Modra <amodra@gmail.com>
  191. * coff-rs6000.c (_bfd_xcoff_put_symbol_name): Replace abfd param
  192. with info param. Test info->traditional_format rather than
  193. BFD_TRADITIONAL_FORMAT flag.
  194. * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Likewise.
  195. * libxcoff.h (struct xcoff_backend_data_rec): Update
  196. _xcoff_put_symbol_name prototype.
  197. (bfd_xcoff_put_symbol_name): Add info param.
  198. * xcofflink.c (xcoff_find_tc0): Update bfd_xcoff_put_symbol_name call.
  199. (xcoff_write_global_symbol): Likewise.
  200. (xcoff_link_input_bfd): Test info->traditional_format rather than
  201. BFD_TRADITIONAL_FORMAT flag.
  202. * cofflink.c (_bfd_coff_final_link): Likewise.
  203. (_bfd_coff_link_input_bfd, _bfd_coff_write_global_sym): Likewise.
  204. 2015-12-01 Alan Modra <amodra@gmail.com>
  205. * po/SRC-POTFILES.in: Regenerate.
  206. 2015-12-01 Alan Modra <amodra@gmail.com>
  207. * elf32-arc.c (ARC_ELF_HOWTO): Delete.
  208. (arc_elf_howto): New function.
  209. (bfd_elf32_bfd_reloc_type_lookup): Use it in place of existing
  210. init code.
  211. (bfd_elf32_bfd_reloc_name_lookup): Use arc_elf_howto.
  212. (arc_info_to_howto_rel, elf_arc_relocate_section): Likwise.
  213. (elf_arc_check_relocs): Likewise.
  214. 2015-12-01 Cupertino Miranda <cupertino.miranda@synopsys.com>
  215. * elf32-arc.c (arc_elf_howto_init): Init dst_mask.
  216. 2015-11-20 Stefan Teleman <stefan.teleman@oracle.com>
  217. PR ld/19260
  218. * cache.c (bfd_cache_max_open): Avoid using getrlimit on 32-bit
  219. Solaris as the result is unreliable.
  220. 2015-11-20 Tristan Gingold <gingold@adacore.com>
  221. * mach-o-x86-64.c (x86_64_howto_table): Change name here too.
  222. 2015-11-20 Tristan Gingold <gingold@adacore.com>
  223. * targets.c (aarch64_mach_o_vec, arm_mach_o_vec): Declare.
  224. (_bfd_target_vector): Add new vectors.
  225. * reloc.c (BFD_RELOC_MACH_O_SUBTRACTOR32)
  226. (BFD_RELOC_MACH_O_SUBTRACTOR64, BFD_RELOC_MACH_O_ARM64_ADDEND)
  227. (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21)
  228. (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12)
  229. (BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT): New relocations.
  230. (BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32)
  231. (BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64): Remove.
  232. * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Change
  233. name of subtractor relocations.
  234. * config.bfd: Handle aarch64-*-darwin*, arm-*-darwin*.
  235. * Makefile.am (BFD32_BACKENDS): Add mach-o-arm.lo.
  236. (BFD32_BACKENDS_CFILES): Add mach-o-arm.c.
  237. (BFD64_BACKENDS): Add mach-o-aarch64.lo.
  238. (BFD64_BACKENDS_CFILES): Add mach-o-aarch64.c.
  239. * configure.ac: Handle aarch64_mach_o_vec and arm_mach_o_vec.
  240. * mach-o-aarch64.c: New file.
  241. * mach-o-arm.c: New file.
  242. * Makefile.in: Regenerate.
  243. * bfd-in2.h: Regenerate.
  244. * configure: Regenerate.
  245. * libbfd.h: Regenerate.
  246. 2015-11-20 David Bridgham <dab@froghouse.org>
  247. * pdp11.c (TARGET_PAGE_SIZE): Set to 256 to match definition in
  248. ld/emulparams/pdp11.sh.
  249. 2015-11-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  250. PR ld/19263
  251. * elf32-s390.c (elf_s390_gc_sweep_hook): Add null ptr check.
  252. * elf64-s390.c (elf_s390_check_relocs): Port the GOTOFF handling
  253. over from the 32 bit code.
  254. (elf_s390_relocate_section): Likewise.
  255. 2015-11-18 Alan Modra <amodra@gmail.com>
  256. PR 19256
  257. * archive.c (bfd_generic_openr_next_archived_file): Don't allow
  258. backward file movement via "negative" sizes.
  259. * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise.
  260. 2015-11-18 Tristan Gingold <gingold@adacore.com>
  261. * mach-o.h (bfd_mach_o_swap_in_non_scattered_reloc)
  262. (bfd_mach_o_canonicalize_non_scattered_reloc)
  263. (bfd_mach_o_pre_canonicalize_one_reloc): Declare.
  264. (bfd_mach_o_backend_data): Rename field
  265. _bfd_mach_o_swap_reloc_in to _bfd_mach_o_canonicalize_one_reloc.
  266. * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): Now public.
  267. (bfd_mach_o_canonicalize_non_scattered_reloc): Renames from
  268. bfd_mach_o_canonicalize_one_reloc.
  269. (bfd_mach_o_pre_canonicalize_one_reloc): New function.
  270. (bfd_mach_o_canonicalize_relocs): Adjust.
  271. (bfd_mach_o_canonicalize_relocs): Rename define from
  272. bfd_mach_o_swap_reloc_in.
  273. * mach-o-target.c (TARGET_NAME_BACKEND): Use
  274. bfd_mach_o_canonicalize_one_reloc instead of
  275. bfd_mach_o_swap_reloc_in.
  276. * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Renames
  277. from bfd_mach_o_i386_swap_reloc_in and adjust.
  278. (bfd_mach_o_canonicalize_one_reloc): Renames from
  279. bfd_mach_o_i386_canonicalize_one_reloc.
  280. * mach-o-x86_64.c (bfd_mach_o_x86_64_canonicalize_one_reloc): Renames
  281. from bfd_mach_o_x86_64_swap_reloc_in and adjust.
  282. (bfd_mach_o_canonicalize_one_reloc): Renames from
  283. bfd_mach_o_x86_64_canonicalize_one_reloc.
  284. 2015-11-18 Tristan Gingold <gingold@adacore.com>
  285. * mach-o.h (struct mach_o_data_struct): Add hdr_offset field.
  286. (bfd_mach_o_fat_archive_p): Renames prototype.
  287. (bfd_mach_o_fat_openr_next_archived_file): Renames.
  288. (bfd_mach_o_header_p): Add argument.
  289. * mach-o.c (bfd_mach_o_read_header): Add hdr_off argument and
  290. use it.
  291. (bfd_mach_o_read_section_32, bfd_mach_o_read_section_64)
  292. (bfd_mach_o_read_section): Remove offset argument.
  293. (bfd_mach_o_read_dylinker): Remove bfd_seek call.
  294. (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib)
  295. (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints)
  296. (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab)
  297. (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
  298. (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
  299. (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min)
  300. (bfd_mach_o_read_encryption_info): Likewise.
  301. (bfd_mach_o_read_encryption_info_64): New function.
  302. (bfd_mach_o_read_main, bfd_mach_o_read_source_version)
  303. (bfd_mach_o_read_segment): Remove call to bfd_seek.
  304. (bfd_mach_o_read_command): Use hdr_offset in bfd_seek.
  305. Handle BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT,
  306. BFD_MACH_O_LC_ENCRYPTION_INFO_64, BFD_MACH_O_LC_VERSION_MIN_WATCHOS.
  307. (bfd_mach_o_header_p): Add hdr_off argument.
  308. (bfd_mach_o_gen_object_p, bfd_mach_o_gen_core_p): Adjust calls.
  309. (bfd_mach_o_fat_archive_p): Renames.
  310. (bfd_mach_o_fat_openr_next_archived_file): Renames.
  311. (bfd_mach_o_close_and_cleanup): Remove useless code.
  312. (bfd_mach_o_close_and_cleanup): Define.
  313. * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p)
  314. (bfd_mach_o_x86_64_core_p): Adjust calls.
  315. * mach-o-target.c: Move defines for archive from mach-o.c.
  316. Remove check on TARGET_ARCHIVE.
  317. * mach-o-i386.c (bfd_mach_o_i386_object_p)
  318. (bfd_mach_o_i386_core_p): Adjust calls.
  319. 2015-11-17 Christophe Lyon <christophe.lyon@linaro.org>
  320. * elf32-arm.c (elf32_arm_write_section): Force offset output as
  321. long (%ld).
  322. 2015-11-13 Tristan Gingold <gingold@adacore.com>
  323. * version.m4: Bump version to 2.26.51
  324. * configure: Regenerate.
  325. 2015-11-11 Alan Modra <amodra@gmail.com>
  326. Peter Bergner <bergner@vnet.ibm.com>
  327. * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
  328. (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
  329. (ppc_elf_addr16_ha_reloc): Likewise.
  330. (ppc_elf_check_relocs): Likewise.
  331. (ppc_elf_relocate_section): Likewise.
  332. (is_insn_dq_form): Handle lxv and stxv instructions.
  333. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
  334. (ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
  335. (ppc64_elf_ha_reloc): Likewise.
  336. (ppc64_elf_check_relocs): Likewise.
  337. (ppc64_elf_relocate_section): Likewise.
  338. * bfd-in2.h: Regenerate.
  339. * libbfd.h: Likewise.
  340. * reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.
  341. 2015-11-10 H.J. Lu <hongjiu.lu@intel.com>
  342. * elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT
  343. and VTENTRY relocations when deleting relocations.
  344. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  345. 2015-11-10 H.J. Lu <hongjiu.lu@intel.com>
  346. * elf32-i386.c (elf_i386_relocate_section): Properly move
  347. kept relocations when deleting relocations.
  348. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  349. 2015-11-09 H.J. Lu <hongjiu.lu@intel.com>
  350. * elf32-i386.c (elf_i386_relocate_section): Use read and write
  351. pointers to reloc array, rather than memmove when deleting a
  352. reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
  353. reloc counts at end of loop.
  354. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  355. 2015-11-10 Alan Modra <amodra@gmail.com>
  356. * elf64-ppc.c (ppc64_elf_relocate_section): Use read and write
  357. pointers to reloc array, rather than memmove when deleting a
  358. reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
  359. reloc counts at end of loop.
  360. * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
  361. 2015-11-09 Dominik Vogt <vogt@linux.vnet.ibm.com>
  362. * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
  363. shift of negative value.
  364. * libbfd.c (safe_read_leb128): Likewise.
  365. * dwarf2.c (place_sections): Likewise.
  366. * bfd-in.h (align_power): Likewise.
  367. * bfd-in2.h (align_power): Likewise.
  368. 2015-10-30 Nick Clifton <nickc@redhat.com>
  369. * po/zh_CN.po: Updated (simplified) Chinese translation.
  370. 2015-10-29 Catherine Moore <clm@codesourcery.com>
  371. * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
  372. section to bfd_abs_section_ptr if the stub is discarded.
  373. 2015-10-29 Ed Schouten <ed@nuxi.nl>
  374. * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
  375. For this target we have to make sure we use ELFOSABI_CLOUDABI
  376. instead of ELFOSABI_NONE.
  377. * configure.ac (tb): Likewise.
  378. * elfnn-aarch64.c: Likewise.
  379. * targets.c (_bfd_target_vector): Likewise.
  380. * configure: Regenerate.
  381. 2015-10-29 Pedro Alves <palves@redhat.com>
  382. * libhppa.h (bfd_hppa_insn2fmt): Add cast.
  383. 2015-10-28 H.J. Lu <hongjiu.lu@intel.com>
  384. * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
  385. comment.
  386. 2015-10-28 Nick Clifton <nickc@redhat.com>
  387. * elf32-arm.c (create_instruction_branch_absolute): Replace
  388. pointer parameters with a simple integer parameter.
  389. (stm32l4xx_create_replacing_stub_ldmia): Update calls to
  390. create_instruction_branch_absolute.
  391. (stm32l4xx_create_replacing_stub_ldmdb): Likewise.
  392. (stm32l4xx_create_replacing_stub_vldm): Likewise.
  393. (elf32_arm_write_section): Use pointer type for veneer addresses.
  394. 2015-10-28 Cupertino Miranda <cmiranda@synopsys.com>
  395. * reloc.c (BFD_RELOC_ARC_32_PCREL): New entry.
  396. * elf32-arc.c (arc_elf_howto_ini): Update formula.
  397. (get_middle_endian_relocation): New function.
  398. (PDATA): Define.
  399. * bfd-in2.h: Regenerate.
  400. * libbfd.h: Likewise.
  401. 2015-10-28 Alan Modra <amodra@gmail.com>
  402. PR ld/19162
  403. * elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over
  404. linker input bfds..
  405. * section.c (bfd_get_next_section_by_name): ..to here. Add ibfd param.
  406. (bfd_get_linker_section): Adjust bfd_get_next_section_by_name call.
  407. * tekhex.c (first_phase): Likewise.
  408. * elflink.c (bfd_elf_gc_sections): Likewise.
  409. * bfd-in2.h: Regenerate.
  410. 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com>
  411. Christophe Monat <christophe.monat@st.com>
  412. * bfd-in2.h: Regenerate.
  413. * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
  414. STM32L4XX instruction scanning should be done.
  415. (bfd_elf32_arm_set_stm32l4xx_fix)
  416. (bfd_elf32_arm_stm32l4xx_erratum_scan)
  417. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes.
  418. (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument
  419. to prototype.
  420. * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME)
  421. (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros.
  422. (elf32_stm32l4xx_erratum_type): New enum.
  423. (elf32_stm32l4xx_erratum_list): New struct. List of veneers or
  424. jumps to veneers.
  425. (_arm_elf_section_data): Add stm32l4xx_erratumcount,
  426. stm32l4xx_erratumlist.
  427. (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size,
  428. stm32l4xx_fix and num_stm32l4xx_fixes fields.
  429. (ctz): New function.
  430. (popcount): New function.
  431. (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix.
  432. (put_thumb2_insn): New function.
  433. (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for
  434. LDM instructions.
  435. (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for
  436. VLDM instructions.
  437. (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
  438. glue section.
  439. (record_stm32l4xx_erratum_veneer) : New function. Create a single
  440. veneer, and its associated symbols.
  441. (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue.
  442. (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of
  443. erratum workaround required.
  444. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find
  445. out where veneers and branches to veneers have been placed in
  446. virtual memory after layout.
  447. (is_thumb2_ldmia): New function.
  448. (is_thumb2_ldmdb): Likewise.
  449. (is_thumb2_vldm ): Likewise.
  450. (stm32l4xx_need_create_replacing_stub): New function. Decide if a
  451. veneer must be emitted.
  452. (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an
  453. input BFD for potential erratum-triggering insns. Record results.
  454. (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in
  455. global hash table.
  456. (elf32_arm_size_dynamic_sections): Collect glue information.
  457. (create_instruction_branch_absolute): New function.
  458. (create_instruction_ldmia): Likewise.
  459. (create_instruction_ldmdb): Likewise.
  460. (create_instruction_mov): Likewise.
  461. (create_instruction_sub): Likewise.
  462. (create_instruction_vldmia): Likewise.
  463. (create_instruction_vldmdb): Likewise.
  464. (create_instruction_udf_w): Likewise.
  465. (create_instruction_udf): Likewise.
  466. (push_thumb2_insn32): Likewise.
  467. (push_thumb2_insn16): Likewise.
  468. (stm32l4xx_fill_stub_udf): Likewise.
  469. (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the
  470. replacing stub for ldmia instructions.
  471. (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb.
  472. (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm.
  473. (stm32l4xx_create_replacing_stub): New function. Dispatches the
  474. stub emission to the appropriate functions.
  475. (elf32_arm_write_section): Output veneers, and branches to veneers.
  476. 2015-10-27 Sangamesh Mallayya <nickc@redhat.com>sangamesh.swamy@in.ibm.com>
  477. * configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running
  478. aix for core file support.
  479. * configure: Regenerate.
  480. * rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb.
  481. Added BFD64 check if we are using old core file format for 32-bit gdb.
  482. Set sizeof CORE_COMMONSZ appropriately in case of either new or
  483. old core file format.
  484. (read_hdr): Added BFD64 check for 64-bit support.
  485. (rs6000coff_core_p): Likewise.
  486. (rs6000coff_core_file_matches_executable_p): Likewise.
  487. (rs6000coff_core_file_failing_command): Likewise.
  488. (rs6000coff_core_file_failing_signal): Likewise.
  489. Add support for debugging core files generated by binaries in
  490. Large Memory model.
  491. (rs6000coff_core_p): If Large Memory Model is used, then the .data
  492. segment should start from BDATAORG which has been defined in the
  493. system header files.
  494. 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
  495. PR ld/19175
  496. * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new
  497. instead of calling bfd_link_get_defined_symbol.
  498. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
  499. relocation overflow for bfd_link_hash_new.
  500. * linker.c (bfd_link_get_defined_symbol): Removed.
  501. * bfd-in2.h: Regenerated.
  502. 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
  503. PR ld/19171
  504. * elf32-i386.c (elf_i386_convert_load): Call
  505. bfd_link_get_defined_symbol to check if a symbol is defined.
  506. * elf64-x86-64.c (elf_x86_64_convert_load): Call
  507. bfd_link_get_defined_symbol to get defined symbol section and
  508. value.
  509. * linker.c (bfd_link_get_defined_symbol): New function.
  510. * bfd-in2.h: Regenerated.
  511. 2015-10-23 Alan Modra <amodra@gmail.com>
  512. PR ld/11133
  513. PR ld/19161
  514. PR ld/19167
  515. * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_*
  516. and __stop_* symbol refs.
  517. (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_*
  518. and __stop_* symbol refs here..
  519. (_bfd_elf_gc_mark_reloc): ..and here.
  520. * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype.
  521. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update
  522. _bfd_elf_gc_mark_rsec call.
  523. 2015-10-23 Alan Modra <amodra@gmail.com>
  524. PR ld/11133
  525. PR ld/19161
  526. * elflink.c (elf_gc_sweep): Revert last patch.
  527. (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here.
  528. 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
  529. PR ld/19161
  530. * elflink.c (elf_gc_sweep): Always keep sections marked with
  531. SEC_KEEP.
  532. 2015-10-22 Hans-Peter Nilsson <hp@bitrange.com>
  533. * mmo.c (struct mmo_data_struct): New members
  534. symbol_consistency_override_calculated and ignore_symbol_consistency.
  535. (mmo_section_has_contents, mmo_ignore_symbol_consistency): New
  536. functions.
  537. (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to
  538. report an error for unexpected value of Main.
  539. (mmo_write_symbols_and_terminator): Similar.
  540. 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
  541. * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and
  542. check call_nop_as_suffix for 1-byte NOP padding to pad call.
  543. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise.
  544. 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
  545. * elf64-x86-64.c: Include opcode/i386.h.
  546. (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and
  547. R_X86_64_REX_GOTPCRELX.
  548. (R_X86_64_standard): Replace R_X86_64_PLT32_BND with
  549. R_X86_64_REX_GOTPCRELX.
  550. (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and
  551. BFD_RELOC_X86_64_REX_GOTPCRELX.
  552. (need_convert_mov_to_lea): Renamed to ...
  553. (need_convert_load): This.
  554. (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and
  555. R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with
  556. need_convert_load.
  557. (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and
  558. R_X86_64_REX_GOTPCRELX.
  559. (elf_x86_64_size_dynamic_sections): Likewise.
  560. (elf_x86_64_relocate_section): Likewise.
  561. (elf_x86_64_convert_mov_to_lea): Renamed to ...
  562. (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea
  563. with need_convert_load. Support R_X86_64_GOTPCRELX and
  564. R_X86_64_REX_GOTPCRELX transformations.
  565. * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New.
  566. (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise.
  567. * bfd-in2.h: Regenerated.
  568. * libbfd.h: Likewise.
  569. 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
  570. * elf32-i386.c: Include opcode/i386.h.
  571. (elf_howto_table): Add R_386_GOT32X.
  572. (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X.
  573. (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X.
  574. (need_convert_mov_to_lea): Renamed to ...
  575. (need_convert_load): This.
  576. (elf_i386_check_relocs): Handle R_386_GOT32X. Replace
  577. need_convert_mov_to_lea with need_convert_load.
  578. (elf_i386_gc_sweep_hook): Handle R_386_GOT32X.
  579. (elf_i386_size_dynamic_sections): Likewise.
  580. (elf_i386_relocate_section): Likewise.
  581. (elf_i386_convert_mov_to_lea): Renamed to ...
  582. (elf_i386_convert_load): This. Replace need_convert_mov_to_lea
  583. with need_convert_load. Support R_386_GOT32X transformations.
  584. * reloc.c (BFD_RELOC_386_GOT32X): New.
  585. * bfd-in2.h: Regenerated.
  586. * libbfd.h: Likewise.
  587. 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  588. * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
  589. only when linking an executable.
  590. (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
  591. slot.
  592. * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
  593. only when linking an executable.
  594. (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
  595. slot.
  596. 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  597. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT
  598. reference counters for local IFUNC calls.
  599. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
  600. 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  601. * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT
  602. slot allocating code for GOTOFF relocs on ifunc symbols.
  603. (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs
  604. on ifunc symbols.
  605. (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt
  606. slot.
  607. 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  608. PR ld/18841
  609. * elf32-s390.c (elf_s390_reloc_type_class): Return
  610. reloc_class_ifunc for ifunc symbols.
  611. * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
  612. 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  613. * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
  614. elf_s390_finish_ifunc_symbol only for actually defined symbols.
  615. * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
  616. 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  617. * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
  618. `head' parameter.
  619. * elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
  620. * elf64-s390.c (allocate_dynrelocs): Don't use last parameter.
  621. 2015-10-20 Hans-Peter Nilsson <hp@bitrange.com>
  622. * mmo.c (mmo_write_symbols_and_terminator): Correct printed value
  623. of Main in error message.
  624. 2015-10-18 Doug Evans <xdje42@gmail.com>
  625. * targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
  626. 2015-10-17 Alan Modra <amodra@gmail.com>
  627. * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
  628. eh_frame FDE for ELFv1.
  629. 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
  630. * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
  631. is defined.
  632. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
  633. 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
  634. * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check
  635. def_regular.
  636. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
  637. 2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
  638. * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
  639. 2015-10-15 Alan Modra <amodra@gmail.com>
  640. * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion
  641. that input and output .note.renesas sections are same size.
  642. Instead, only copy input to output if they are.
  643. 2015-10-15 Riku Voipio <riku.voipio@iki.fi>
  644. PR ld/19123
  645. * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the
  646. offset for bfd_seek.
  647. * elfcode.h (elf_object_p): Likewise.
  648. 2015-10-14 Rich Felker <dalias@libc.org>
  649. PR ld/19091
  650. * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
  651. DT_PLTGOT for FDPIC output.
  652. 2015-10-13 Alan Modra <amodra@gmail.com>
  653. * elf.c (_bfd_elf_map_sections_to_segments): Don't set
  654. PT_GNU_RELRO p_flags.
  655. (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
  656. flags to PF_R here.
  657. 2015-10-12 H.J. Lu <hongjiu.lu@intel.com>
  658. PR ld/19073
  659. * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
  660. definition after the default version.
  661. 2015-10-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  662. PR ld/19083
  663. * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
  664. refcount for relocs not really requiring a got slot.
  665. * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
  666. 2015-10-11 John David Anglin <danglin@gcc.gnu.org>
  667. * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
  668. .data.rel.ro.local.
  669. 2015-10-07 Cupertino Miranda <cmiranda@synopsys.com>
  670. * archures.c: Remove support for older ARC. Added support for new
  671. ARC cpus (ARC600, ARC601, ARC700, ARCV2).
  672. * bfd-in2.h: Likewise.
  673. * config.bfd: Likewise.
  674. * cpu-arc.c: Likewise.
  675. * elf32-arc.c: Totally changed file with a refactored
  676. inplementation of the ARC port.
  677. * libbfd.h: Added ARC specific relocation types.
  678. * reloc.c: Likewise.
  679. 2015-10-06 H.J. Lu <hongjiu.lu@intel.com>
  680. * bfd.c (bfd_update_compression_header): Clear the ch_reserved
  681. field in 64-bit output.
  682. (bfd_convert_section_contents): Likewise.
  683. 2015-10-05 H.J. Lu <hongjiu.lu@intel.com>
  684. PR ld/18914
  685. * elflink.c (elf_link_add_object_symbols): Don't re-export a
  686. symbol if it isn't undefined.
  687. 2015-10-04 H.J. Lu <hongjiu.lu@intel.com>
  688. * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
  689. i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
  690. 2015-10-02 Renlin Li <renlin.li@arm.com>
  691. * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
  692. relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
  693. TLSDESC_OFF_G1.
  694. (aarch64_tls_transition_without_check): Add relaxation support.
  695. (aarch64_reloc_got_type): Add support.
  696. (elfNN_aarch64_final_link_relocate): Likewise.
  697. (elfNN_aarch64_tls_relax): Likewise.
  698. (elfNN_aarch64_relocate_section): Likewise.
  699. (elfNN_aarch64_gc_sweep_hook): Likewise.
  700. (elfNN_aarch64_check_relocs): Likewise.
  701. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  702. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  703. 2015-10-02 Renlin Li <renlin.li@arm.com>
  704. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
  705. BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
  706. 2015-10-02 Renlin Li <renlin.li@arm.com>
  707. * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
  708. Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
  709. (aarch64_tls_transition_without_check): Likewise
  710. (elfNN_aarch64_tls_relax): Likwise.
  711. 2015-10-02 Renlin Li <renlin.li@arm.com>
  712. * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
  713. for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
  714. 2015-10-02 Renlin Li <renlin.li@arm.com>
  715. * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
  716. AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
  717. * libbfd.h: Regenerate.
  718. * bfd-in2.h: Likewise.
  719. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
  720. TLSIE_MOVW_GOTTPREL_G1 check overflow.
  721. (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
  722. and TLSIE_MOVW_GOTTPREL_G0_NC.
  723. (elfNN_aarch64_final_link_relocate): Likewise.
  724. (elfNN_aarch64_relocate_section): Likewise.
  725. (elfNN_aarch64_gc_sweep_hook): Likewise.
  726. (elfNN_aarch64_check_relocs): Likewise.
  727. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  728. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  729. 2015-10-02 Renlin Li <renlin.li@arm.com>
  730. * elfnn-aarch64.c (aarch64_reloc_got_type): Add
  731. BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
  732. (elfNN_aarch64_final_link_relocate): Likewise.
  733. (elfNN_aarch64_relocate_section): Likewise.
  734. (elfNN_aarch64_gc_sweep_hook): Likewise.
  735. (elfNN_aarch64_check_relocs): Likewise.
  736. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  737. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  738. 2015-10-02 Renlin Li <renlin.li@arm.com>
  739. * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
  740. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  741. BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
  742. * libbfd.h: Regenerate.
  743. * bfd-in2.h: Likewise
  744. 2015-10-02 Renlin Li <renlin.li@arm.com>
  745. * elfnn-aarch64.c (aarch64_reloc_got_type): Add
  746. BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
  747. (elfNN_aarch64_final_link_relocate): Likewise.
  748. (elfNN_aarch64_relocate_section): Likewise.
  749. (elfNN_aarch64_gc_sweep_hook): Likewise.
  750. (elfNN_aarch64_check_relocs): Likewise.
  751. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  752. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  753. 2015-10-02 Renlin Li <renlin.li@arm.com>
  754. * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
  755. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  756. BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
  757. * bfd-in2.h: Regenerate.
  758. * libbfd.h: Likewise.
  759. 2015-10-02 Renlin Li <renlin.li@arm.com>
  760. * elfnn-aarch64.c (aarch64_reloc_got_type): Add
  761. BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
  762. (elfNN_aarch64_final_link_relocate): Likewise.
  763. (elfNN_aarch64_gc_sweep_hook): Likewise.
  764. (elfNN_aarch64_check_relocs): Likewise.
  765. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  766. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  767. 2015-10-02 Renlin Li <renlin.li@arm.com>
  768. * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
  769. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
  770. MOVW_GOTOFF_G0_NC.
  771. * libbfd.h: Regnerate.
  772. * bfd-in2.h: Regenerate.
  773. 2015-10-02 Renlin Li <renlin.li@arm.com>
  774. * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
  775. for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
  776. (elfNN_aarch64_gc_sweep_hook): Likewise.
  777. (elfNN_aarch64_check_relocs): Likewise
  778. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  779. (_bfd_aarch64_elf_resolve_relocation): Likewise
  780. (elfNN_aarch64_final_link_relocate): Likewise
  781. 2015-010-02 Renlin Li <renlin.li@arm.com>
  782. * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
  783. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  784. MOVW_GOTOFF_G1.
  785. * libbfd.h: Regenerate.
  786. * bfd-in2.h: Regenerate.
  787. 2015-10-02 Renlin Li <renlin.li@arm.com>
  788. * elfnn-aarch64.c (aarch64_reloc_got_type): Add
  789. BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
  790. (elfNN_aarch64_gc_sweep_hook): Likewise.
  791. (elfNN_aarch64_check_relocs): Likewise
  792. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  793. (_bfd_aarch64_elf_resolve_relocation): Likewise
  794. (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
  795. 2015-10-02 Renlin Li <renlin.li@arm.com>
  796. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
  797. switch statement.
  798. 2015-10-01 H.J. Lu <hongjiu.lu@intel.com>
  799. PR ld/19031
  800. * elf64-x86-64.c (elf_x86_64_check_relocs): Set
  801. pointer_equality_needed for R_X86_64_PC32 reloc in non-code
  802. sections.
  803. 2015-10-01 Renlin Li <renlin.li@arm.com>
  804. * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
  805. (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
  806. 2015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
  807. * config.bfd (targ_selvecs): Remove sh_elf32_vec and
  808. sh_elf32_le_vec from sh*-*-linux cases.
  809. 2015-10-01 Alan Modra <amodra@gmail.com>
  810. PR ld/19013
  811. * elflink.c (_bfd_elf_merge_sections): Revert last change.
  812. 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
  813. PR ld/19031
  814. * elf32-i386.c (elf_i386_check_relocs): Set
  815. pointer_equality_needed for R_386_PC32 reloc in non-code
  816. sections.
  817. 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
  818. PR ld/19013
  819. * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
  820. that have the compatible ELF machine code with the output bfd.
  821. 2015-09-30 Alan Modra <amodra@gmail.com>
  822. PR ld/19013
  823. * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
  824. will be handled by elf_link_input_bfd. Rename abfd param to obfd.
  825. 2015-09-30 Rich Felker <dalias@libc.org>
  826. * config.bfd (targ_selvecs): Add fdpic and misc targets
  827. for sh*-*-linux*.
  828. 2015-09-29 Andrew Stubbs <ams@codesourcery.com>
  829. H.J. Lu <hongjiu.lu@intel.com>
  830. PR binutils/19020
  831. * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
  832. * bfd-in2.h: Regenerated.
  833. 2015-08-11 Peter Zotov <whitequark@whitequark.org>
  834. PR ld/18759
  835. * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
  836. (R_OR1K_16_PCREL): Likewise.
  837. (R_OR1K_8_PCREL): Likewise.
  838. 2015-09-23 Nick Clifton <nickc@redhat.com>
  839. * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
  840. order to avoid problems with left shifting negative values.
  841. (abs32code): Likewise.
  842. * mach-o.c (FILE_ALIGN): Likewise.
  843. * coff-rs6000.c (xcoff_debug_sections): Delete unused static
  844. array.
  845. * elf32-visium.c (visium_reloc_map): Likewise.
  846. * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
  847. calls to abs function.
  848. * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
  849. * elf32-score.c (score_elf_final_link_relocate): Likewise.
  850. * elf32-score7.c (score_elf_final_link_relocate): Likewise.
  851. * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
  852. of shifting to create a negative mask.
  853. * elf32-msp430.c (elf_backend_special_sections): Define.
  854. * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
  855. (got_hi16_reloc_p): Delete unused function.
  856. * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
  857. partition name.
  858. 2015-09-23 Nick Clifton <nickc@redhat.com>
  859. PR binutils/15835
  860. * elf-bfd.h (struct elf_section_list): New structure.
  861. (struct elf_obj_tdata): Replace symtab_shndx_hdr with
  862. symtab_shndx_list. Delete symtab_shndx_section.
  863. (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
  864. * elf.c (bfd_elf_get_syms): If symtab index sections are present,
  865. scan them for the section that matches the provided symbol table.
  866. (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
  867. (assign_section_numbers): Use the first symtab index table in the
  868. list.
  869. (_bfd_elf_compute_section_file_positions): Replace use of
  870. symtab_shndx_hdr with use of symtab_shndx_list.
  871. (find_section_in_list): New function.
  872. (assign_file_postions_except_relocs): Use new function.
  873. (_bfd_elf_copy_private_symbol_data): Likewise.
  874. (swap_out_syms): Handle multiple symbol table index sections.
  875. * elf32-m32c.c (m32c_elf_relax_section): Replace use of
  876. symtab_shndx_hdr with use of symtab_shndx_list.
  877. * elf32-rl78.c (rl78_elf_relax_section): Likewise.
  878. * elf32-rx.c (rx_relax_section): Likewise.
  879. * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
  880. * elflink.c (bfd_elf_final_link): Likewise.
  881. 2015-09-21 H.J. Lu <hongjiu.lu@intel.com>
  882. * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
  883. ch_type.
  884. (bfd_check_compression_header): Use bfd_get_32 on ch_type.
  885. (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
  886. on ch_type.
  887. 2015-09-20 Rich Felker <dalias@libc.org>
  888. * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
  889. .interp when info->nointerp.
  890. (bfd_elf_size_dynamic_sections): Adjust assert.
  891. * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
  892. when info->nointerp.
  893. * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
  894. * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
  895. * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
  896. * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
  897. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
  898. * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
  899. * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
  900. * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
  901. * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
  902. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
  903. * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
  904. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
  905. * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
  906. * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
  907. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
  908. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
  909. * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
  910. * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
  911. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
  912. * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
  913. * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
  914. * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
  915. * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
  916. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
  917. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
  918. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
  919. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
  920. * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
  921. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
  922. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
  923. * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
  924. * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
  925. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
  926. * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
  927. 2015-09-18 Doug Evans <xdje42@gmail.com>
  928. * targets.c (enum bfd_flavour): Add comment.
  929. (bfd_flavour_name): New function.
  930. * bfd-in2.h: Regenerate.
  931. 2015-09-18 Alan Modra <amodra@gmail.com>
  932. * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
  933. from no_tls_get_addr_opt.
  934. * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
  935. (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
  936. default of -1.
  937. 2015-09-17 Alan Modra <amodra@gmail.com>
  938. PR 18867
  939. * elflink.c (elf_link_adjust_relocs): Correct start of insertion
  940. sort main loop.
  941. 2015-09-16 Alan Modra <amodra@gmail.com>
  942. PR 18867
  943. * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
  944. insert a run. Return status in case of malloc failure.
  945. Adjust callers.
  946. 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
  947. * elf32-xtensa.c (elf_xtensa_be_plt_entry)
  948. (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
  949. windowed ABI.
  950. (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
  951. up instructions according to ABI.
  952. 2015-09-14 Rich Felker <dalias@libc.org>
  953. * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
  954. instead of clearing it on cross-section relocations.
  955. (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
  956. 2015-09-12 Helge Deller <deller@gmx.de>
  957. PR ld/18514
  958. * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
  959. size to 0.
  960. 2015-09-09 Jiong Wang <jiong.wang@arm.com>
  961. * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
  962. 2015-09-09 Jiong Wang <jiong.wang@arm.com>
  963. * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
  964. TLS local dynamic traditional relocations types.
  965. (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
  966. local executable relaxation.
  967. 2015-09-03 H.J. Lu <hongjiu.lu@intel.com>
  968. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
  969. convert_mov_to_lea.
  970. 2015-09-02 H.J. Lu <hongjiu.lu@intel.com>
  971. * elf32-i386.c (R_386_irelative): Renamed to ...
  972. (R_386_ext2): This.
  973. (R_386_vt_offset): Updated.
  974. (elf_i386_rtype_to_howto): Likewise.
  975. (elf_i386_relocate_section): Likewise.
  976. 2015-09-01 H.J. Lu <hongjiu.lu@intel.com>
  977. PR ld/18900
  978. * elf32-i386.c (elf_i386_link_hash_entry): Add
  979. func_pointer_refcount.
  980. (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
  981. (elf_i386_get_local_sym_hash): Likewise.
  982. (elf_i386_copy_indirect_symbol): Also copy
  983. func_pointer_refcount.
  984. (elf_i386_check_relocs): Increment func_pointer_refcount.
  985. (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
  986. (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
  987. there are only function pointer relocations which can be
  988. resolved at run-time. Keep dynanamic relocations for run-time
  989. function pointer initialization.
  990. (elf_i386_relocate_section): Copy dynamic function pointer
  991. relocations.
  992. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
  993. func_pointer_refcount.
  994. (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
  995. (elf_x86_64_get_local_sym_hash): Likewise.
  996. (elf_x86_64_copy_indirect_symbol): Also copy
  997. func_pointer_refcount.
  998. (elf_x86_64_check_relocs): Increment func_pointer_refcount.
  999. (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
  1000. (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
  1001. there are only function pointer relocations which can be
  1002. resolved at run-time. Keep dynanamic relocations for run-time
  1003. function pointer initialization.
  1004. (elf_x86_64_relocate_section): Copy dynamic function pointer
  1005. relocations.
  1006. 2015-09-01 Alan Modra <amodra@gmail.com>
  1007. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
  1008. if .opd section has been edited.
  1009. 2015-09-01 Alan Modra <amodra@gmail.com>
  1010. PR 18878
  1011. * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
  1012. (enum ppc_stub_type): Add ppc_stub_save_res.
  1013. (struct map_stub): Add "next" and "needs_save_res".
  1014. (struct ppc_link_hash_entry): Add "save_res" flag.
  1015. (struct ppc_link_hash_table): Add "group".
  1016. (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
  1017. stub_sec is non-null. Set "save_res".
  1018. (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
  1019. (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
  1020. (ppc_build_one_stub): Handle ppc_stub_save_res.
  1021. (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
  1022. stub for linker defined save_res sym.
  1023. (group_sections): Init new fields of struct map_stub.
  1024. (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
  1025. (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
  1026. alias syms too.
  1027. (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
  1028. 2015-08-31 Alan Modra <amodra@gmail.com>
  1029. * elf64-ppc.c (get_r2off): Return -1 on error.
  1030. (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
  1031. addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
  1032. (ppc_size_one_stub): Corresponding size changes for r2off stubs.
  1033. Add condition in test for -R objects.
  1034. 2015-08-31 Alan Modra <amodra@gmail.com>
  1035. * section.c (section_id): Make file scope.
  1036. (bfd_get_next_section_id): New function.
  1037. * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
  1038. (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
  1039. group. Update all uses.
  1040. (struct ppc_link_hash_table): Delete top_id, top_index, and
  1041. input_list. Add sec_info_arr_size. Rename stub_group to
  1042. sec_info, and make group info indirect. Update stub_group refs
  1043. throughout file.
  1044. (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
  1045. entry.
  1046. (ppc_build_one_stub): Delete FIXME.
  1047. (ppc64_elf_setup_section_lists): Size htab->sec_info for all
  1048. sections, not just input sections. Don't create htab->input_list.
  1049. (ppc64_elf_next_input_section): Update to use sec_info union as
  1050. list pointer.
  1051. (PREV_SEC): Delete.
  1052. (group_sections): Pass "info" param rather than "htab". Iterate
  1053. over output sections rather than input_list. Use sec_info union
  1054. as list pointers. Alloc atruct map_stub, and return fail status.
  1055. * bfd-in2.h: Regenerate.
  1056. 2015-08-31 Alan Modra <amodra@gmail.com>
  1057. * elflink.c (elf_sort_symbol): Use correctly sized type for
  1058. calculating signed section->id difference.
  1059. (elf_link_add_object_symbols): Likewise.
  1060. * pef.c (bfd_pef_scan_start_address): Warning fix.
  1061. * vms-alpha.c (vms_new_section_hook): Likewise.
  1062. 2015-08-31 Alan Modra <amodra@gmail.com>
  1063. * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
  1064. (find_relocs_at_address_addr): Make "reloc_type" an enum.
  1065. (nds32_elf_relax_delete_blanks): Warning fix.
  1066. (nds32_elf_relax_loadstore): Correct loop bound.
  1067. 2015-08-31 Alan Modra <amodra@gmail.com>
  1068. * section.c (struct bfd_section): Make "id" and "index" unsigned.
  1069. * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
  1070. * elf.c (elf_map_symbols): Likewise.
  1071. * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
  1072. (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
  1073. (ppc64_elf_setup_section_lists): Ditto for local vars.
  1074. * elf32-arm.c: Similarly to elf64-ppc.c.
  1075. * elf32-avr.c: Likewise.
  1076. * elf32-hppa.c: Likewise.
  1077. * elf32-m68hc1x.c: Likewise.
  1078. * elf32-metag.c: Likewise.
  1079. * elf32-nios2.c: Likewise.
  1080. * elfnn-aarch64.c: Likewise.
  1081. * simple.c (struct saved_offsets): Make "section_count" unsigned.
  1082. * bfd-in2.h: Regenerate.
  1083. 2015-08-27 Alan Modra <amodra@gmail.com>
  1084. PR 18867
  1085. * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
  1086. (elf_backend_sort_relocs_p): Define.
  1087. 2015-08-26 Alan Modra <amodra@gmail.com>
  1088. PR 18867
  1089. * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
  1090. (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
  1091. (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
  1092. New functions.
  1093. (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
  1094. 2015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
  1095. PR ld/18401
  1096. * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
  1097. ISA value to a bfd machine number.
  1098. (bfd_mips_isa_ext): Update the ISA level and revision if
  1099. necessary. Use mips_mach_extends_p to decide if the ISA extension
  1100. needs to be set.
  1101. (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
  1102. be inferred from the ABI setting. Set the ISA level from the
  1103. maximum of the incoming and outgoing ISA levels.
  1104. 2015-08-25 Nick Clifton <nickc@redhat.com>
  1105. PR binutils/18854
  1106. * elf.c (bfd_section_from_shdr): Replace assertions with warnings
  1107. about multiple symbol tables.
  1108. 2015-08-25 Renlin Li <renlin.li@arm.com>
  1109. * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
  1110. ILP64.
  1111. * bfd-in2.h: Regenerate.
  1112. 2015-08-22 Alan Modra <amodra@gmail.com>
  1113. * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
  1114. Don't copy fields not set by _bfd_elf_swap_verdef_in.
  1115. 2015-08-19 Jiong Wang <jiong.wang@arm.com>
  1116. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
  1117. types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
  1118. BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
  1119. BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
  1120. BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
  1121. BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
  1122. BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
  1123. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
  1124. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
  1125. (elfNN_aarch64_final_link_relocate): Likewise.
  1126. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  1127. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  1128. 2015-08-19 Jiong Wang <jiong.wang@arm.com>
  1129. * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
  1130. BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
  1131. BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
  1132. BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
  1133. BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
  1134. BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
  1135. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
  1136. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
  1137. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
  1138. * bfd-in2.h: Regenerate.
  1139. * libbfd.h: Regenerate.
  1140. 2015-08-19 Jiong Wang <jiong.wang@arm.com>
  1141. PR ld/18276
  1142. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
  1143. types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
  1144. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
  1145. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
  1146. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
  1147. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
  1148. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
  1149. (elfNN_aarch64_final_link_relocate): Likewise.
  1150. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  1151. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  1152. 2015-08-19 Jiong Wang <jiong.wang@arm.com>
  1153. * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
  1154. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
  1155. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
  1156. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
  1157. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
  1158. BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
  1159. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
  1160. * bfd-in2.h: Regenerate.
  1161. * libbfd.h: Regenerate.
  1162. 2015-08-19 Jiong Wang <jiong.wang@arm.com>
  1163. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
  1164. BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
  1165. (aarch64_reloc_got_type): Likewise.
  1166. (elfNN_aarch64_final_link_relocate): Likewise.
  1167. (elfNN_aarch64_relocate_section): Likewise.
  1168. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  1169. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  1170. 2015-08-19 Jiong Wang <jiong.wang@arm.com>
  1171. * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
  1172. * bfd-in2.h: Regenerate.
  1173. * libbfd.h: Regenerate.
  1174. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  1175. BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
  1176. 2015-08-19 Alan Modra <amodra@gmail.com>
  1177. * elf-s390-common.c: Simplify expressions using
  1178. bfd_linke_executable, bfd_link_pie and bfd_link_pic.
  1179. * elf32-arm.c: Likewise.
  1180. * elf32-bfin.c: Likewise.
  1181. * elf32-frv.c: Likewise.
  1182. * elf32-m68k.c: Likewise.
  1183. * elf32-nios2.c: Likewise.
  1184. * elf32-ppc.c: Likewise.
  1185. * elf32-s390.c: Likewise.
  1186. * elf32-sh.c: Likewise.
  1187. * elf64-alpha.c: Likewise.
  1188. * elf64-ppc.c: Likewise.
  1189. * elf64-s390.c: Likewise.
  1190. * elflink.c: Likewise.
  1191. 2015-08-18 Jiong Wang <jiong.wang@arm.com>
  1192. * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
  1193. (elfNN_aarch64_relocate_section): Likewise.
  1194. (elfNN_aarch64_gc_sweep_hook): Likewise.
  1195. (elfNN_aarch64_check_relocs): Likewise.
  1196. 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
  1197. PR ld/18841
  1198. * elf-bfd.h (elf_link_hash_table): Add dynsym.
  1199. * elf32-i386.c (elf_i386_reloc_type_class): Return
  1200. reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
  1201. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
  1202. * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
  1203. (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
  1204. (elf_final_link_info): Remove dynsym_sec.
  1205. (elf_link_output_extsym): Replace dynsym_sec with dynsym.
  1206. (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
  1207. dynsym_sec with dynsym.
  1208. 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
  1209. * aoutx.h: Replace shared, executable, relocatable and pie
  1210. fields with bfd_link_executable, bfd_link_dll,
  1211. bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
  1212. * bout.c: Likewise.
  1213. * coff-alpha.c: Likewise.
  1214. * coff-arm.c: Likewise.
  1215. * coff-i386.c: Likewise.
  1216. * coff-i960.c: Likewise.
  1217. * coff-m68k.c: Likewise.
  1218. * coff-mcore.c: Likewise.
  1219. * coff-mips.c: Likewise.
  1220. * coff-ppc.c: Likewise.
  1221. * coff-rs6000.c: Likewise.
  1222. * coff-sh.c: Likewise.
  1223. * coff-tic80.c: Likewise.
  1224. * coff-x86_64.c: Likewise.
  1225. * coff64-rs6000.c: Likewise.
  1226. * coffgen.c: Likewise.
  1227. * cofflink.c: Likewise.
  1228. * ecoff.c: Likewise.
  1229. * ecofflink.c: Likewise.
  1230. * elf-bfd.h: Likewise.
  1231. * elf-eh-frame.c: Likewise.
  1232. * elf-ifunc.c: Likewise.
  1233. * elf-m10200.c: Likewise.
  1234. * elf-m10300.c: Likewise.
  1235. * elf-s390-common.c: Likewise.
  1236. * elf-vxworks.c: Likewise.
  1237. * elf.c: Likewise.
  1238. * elf32-arm.c: Likewise.
  1239. * elf32-avr.c: Likewise.
  1240. * elf32-bfin.c: Likewise.
  1241. * elf32-cr16.c: Likewise.
  1242. * elf32-cr16c.c: Likewise.
  1243. * elf32-cris.c: Likewise.
  1244. * elf32-crx.c: Likewise.
  1245. * elf32-d10v.c: Likewise.
  1246. * elf32-dlx.c: Likewise.
  1247. * elf32-epiphany.c: Likewise.
  1248. * elf32-fr30.c: Likewise.
  1249. * elf32-frv.c: Likewise.
  1250. * elf32-ft32.c: Likewise.
  1251. * elf32-h8300.c: Likewise.
  1252. * elf32-hppa.c: Likewise.
  1253. * elf32-i370.c: Likewise.
  1254. * elf32-i386.c: Likewise.
  1255. * elf32-i860.c: Likewise.
  1256. * elf32-ip2k.c: Likewise.
  1257. * elf32-iq2000.c: Likewise.
  1258. * elf32-lm32.c: Likewise.
  1259. * elf32-m32c.c: Likewise.
  1260. * elf32-m32r.c: Likewise.
  1261. * elf32-m68hc11.c: Likewise.
  1262. * elf32-m68hc1x.c: Likewise.
  1263. * elf32-m68k.c: Likewise.
  1264. * elf32-mcore.c: Likewise.
  1265. * elf32-mep.c: Likewise.
  1266. * elf32-metag.c: Likewise.
  1267. * elf32-microblaze.c: Likewise.
  1268. * elf32-moxie.c: Likewise.
  1269. * elf32-msp430.c: Likewise.
  1270. * elf32-mt.c: Likewise.
  1271. * elf32-nds32.c: Likewise.
  1272. * elf32-nios2.c: Likewise.
  1273. * elf32-or1k.c: Likewise.
  1274. * elf32-ppc.c: Likewise.
  1275. * elf32-rl78.c: Likewise.
  1276. * elf32-rx.c: Likewise.
  1277. * elf32-s390.c: Likewise.
  1278. * elf32-score.c: Likewise.
  1279. * elf32-score7.c: Likewise.
  1280. * elf32-sh-symbian.c: Likewise.
  1281. * elf32-sh.c: Likewise.
  1282. * elf32-sh64.c: Likewise.
  1283. * elf32-spu.c: Likewise.
  1284. * elf32-tic6x.c: Likewise.
  1285. * elf32-tilepro.c: Likewise.
  1286. * elf32-v850.c: Likewise.
  1287. * elf32-vax.c: Likewise.
  1288. * elf32-visium.c: Likewise.
  1289. * elf32-xc16x.c: Likewise.
  1290. * elf32-xstormy16.c: Likewise.
  1291. * elf32-xtensa.c: Likewise.
  1292. * elf64-alpha.c: Likewise.
  1293. * elf64-hppa.c: Likewise.
  1294. * elf64-ia64-vms.c: Likewise.
  1295. * elf64-mmix.c: Likewise.
  1296. * elf64-ppc.c: Likewise.
  1297. * elf64-s390.c: Likewise.
  1298. * elf64-sh64.c: Likewise.
  1299. * elf64-x86-64.c: Likewise.
  1300. * elflink.c: Likewise.
  1301. * elfnn-aarch64.c: Likewise.
  1302. * elfnn-ia64.c: Likewise.
  1303. * elfxx-mips.c: Likewise.
  1304. * elfxx-sparc.c: Likewise.
  1305. * elfxx-tilegx.c: Likewise.
  1306. * i386linux.c: Likewise.
  1307. * linker.c: Likewise.
  1308. * m68klinux.c: Likewise.
  1309. * pdp11.c: Likewise.
  1310. * pe-mips.c: Likewise.
  1311. * peXXigen.c: Likewise.
  1312. * reloc.c: Likewise.
  1313. * reloc16.c: Likewise.
  1314. * sparclinux.c: Likewise.
  1315. * sunos.c: Likewise.
  1316. * vms-alpha.c: Likewise.
  1317. * xcofflink.c: Likewise.
  1318. 2015-08-18 Alan Modra <amodra@gmail.com>
  1319. PR 18667
  1320. * Makefile.am: Use $(SED) in place of sed throughout.
  1321. * Makefile.in: Regenerate.
  1322. 2015-08-18 Alan Modra <amodra@gmail.com>
  1323. * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
  1324. if already defined, and set linker_def.
  1325. (ppc64_elf_set_toc): Use .TOC. value if defined other than by
  1326. the backend.
  1327. 2015-08-14 Alan Modra <amodra@gmail.com>
  1328. PR ld/18759
  1329. * elf32-or1k.c: Revert 2015-08-11 change.
  1330. 2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
  1331. PR ld/18801
  1332. * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
  1333. for read-only segment with dynamic IFUNC relocations.
  1334. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
  1335. 2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
  1336. * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
  1337. (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
  1338. mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
  1339. Update to use 'or' instead of 'addu/daddu'.
  1340. (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
  1341. (move_insns_32): Reorder table.
  1342. 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
  1343. * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
  1344. relocations in debug sections.
  1345. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  1346. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1347. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
  1348. message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
  1349. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1350. * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
  1351. (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
  1352. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1353. * elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
  1354. Loose the check for symbol from ABS section.
  1355. (elfNN_aarch64_size_stubs): Pass sym_sec.
  1356. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1357. PR ld/18668
  1358. * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
  1359. calls go through plt stub.
  1360. (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
  1361. JUMP26 relocation to support inserting veneer for call to plt stub.
  1362. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1363. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
  1364. BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
  1365. (aarch64_reloc_got_type): Likewise.
  1366. (elfNN_aarch64_final_link_relocate): Likewise.
  1367. (elfNN_aarch64_relocate_section): Likewise.
  1368. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  1369. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  1370. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1371. * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
  1372. * bfd-in2.h: Regenerate.
  1373. * libbfd.h: Regenerate.
  1374. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  1375. BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
  1376. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1377. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
  1378. BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
  1379. (aarch64_reloc_got_type): Likewise.
  1380. (elfNN_aarch64_final_link_relocate): Likewise.
  1381. (elfNN_aarch64_relocate_section): Likewise.
  1382. (elfNN_aarch64_gc_sweep_hook): Likewise.
  1383. (elfNN_aarch64_check_relocs): Likewise.
  1384. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  1385. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  1386. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1387. * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
  1388. * bfd-in2.h: Regenerate.
  1389. * libbfd.h: Regenerate.
  1390. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  1391. BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
  1392. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1393. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
  1394. BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
  1395. (aarch64_reloc_got_type): Likewise.
  1396. (elfNN_aarch64_final_link_relocate): Likewise.
  1397. (elfNN_aarch64_relocate_section): Likewise.
  1398. (elfNN_aarch64_gc_sweep_hook): Likewise.
  1399. (elfNN_aarch64_check_relocs): Likewise.
  1400. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  1401. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  1402. 2015-08-11 Jiong Wang <jiong.wang@arm.com>
  1403. * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
  1404. * bfd-in2.h: Regenerate.
  1405. * libbfd.h: Regenerate.
  1406. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  1407. BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
  1408. 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
  1409. PR ld/18808
  1410. * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
  1411. relocations in debug sections.
  1412. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
  1413. 2015-08-11 Peter Zotov <whitequark@whitequark.org>
  1414. PR ld/18759
  1415. * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
  1416. (R_OR1K_16_PCREL): Likewise.
  1417. (R_OR1K_8_PCREL): Likewise.
  1418. 2015-08-11 Nick Clifton <nickc@redhat.com>
  1419. PR binutils/18747
  1420. * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
  1421. opcode count.
  1422. PR binutils/18758
  1423. * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
  1424. group information.
  1425. * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
  1426. used_by_bfd pointer.
  1427. (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
  1428. 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
  1429. * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
  1430. 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
  1431. * elf-bfd.h (elf_symbol_version): New enum.
  1432. (elf_link_hash_entry): Replace hidden with versioned.
  1433. * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
  1434. version if the symbol is unversioned. Initialize versioned.
  1435. (_bfd_elf_add_default_symbol): Don't look for symbol version
  1436. if the symbol is unversioned or hidden. Initialize versioned.
  1437. (elf_collect_hash_codes): Don't look for symbol version if the
  1438. symbol is unversioned.
  1439. (elf_collect_gnu_hash_codes): Likewise.
  1440. (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
  1441. (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
  1442. hidden.
  1443. (elf_link_output_extsym): Likewise.
  1444. 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
  1445. PR binutils/18785
  1446. * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
  1447. sh_link and sh_info fields in stripped section headers, we also
  1448. check if the sh_type, sh_flags, sh_addralign and sh_entsize
  1449. fields of the output section match the output. Since
  1450. --only-keep-debug turns all non-debug sections into SHT_NOBITS
  1451. sections, the output SHT_NOBITS type matches any input type.
  1452. 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
  1453. PR ld/18720
  1454. * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
  1455. if the new symbol matches the existing one. The new hidden
  1456. versioned symbol matches the existing symbol if they have the
  1457. same symbol version. Update the existing symbol only if they
  1458. match.
  1459. (_bfd_elf_add_default_symbol): Update call to
  1460. _bfd_elf_merge_symbol.
  1461. (_bfd_elf_link_assign_sym_version): Don't set the hidden field
  1462. here.
  1463. (elf_link_add_object_symbols): Override a definition only if the
  1464. new symbol matches the existing one.
  1465. (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
  1466. the hidden versioned symbol.
  1467. (elf_link_output_extsym): Bind a symbol locally when linking
  1468. executable if it is locally defined, hidden versioned, not
  1469. referenced by shared library and not exported. Turn on
  1470. VERSYM_HIDDEN only if the hidden versioned symbol is defined
  1471. locally.
  1472. 2015-08-05 Nick Clifton <nickc@redhat.com>
  1473. * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
  1474. sh_info fields of sections whose type has been changed to
  1475. SHT_NOBITS.
  1476. 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
  1477. Tyler Hicks <tyhicks@canonical.com>
  1478. PR binutils/18750
  1479. * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
  1480. and stack overflow when char is signed and \200-\376 was in place of hex
  1481. digit; also fixes \377 was handled as EOF instead of "incorrect character".
  1482. (ihex_read_section): Changed for consistency.
  1483. (ihex_bad_byte): Prevent (now impossible to trigger) stack
  1484. overflow and incorrect escape sequence handling.
  1485. * srec.c (srec_bad_byte): Likewise.
  1486. 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
  1487. * elf32-cris.c (cris_elf_relocate_section)
  1488. (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
  1489. (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
  1490. just link_info->symbolic, to check if a symbol should be bound
  1491. symbolically.
  1492. 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
  1493. PR ld/18735
  1494. * elflink.c (_bfd_elf_add_default_symbol): Add the default
  1495. symbol if not performing a relocatable link.
  1496. (elf_link_add_object_symbols): Adjust the default symbol if
  1497. not performing a relocatable link.
  1498. 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
  1499. * elflink.c (elf_link_add_object_symbols): Remove
  1500. !info->relocatable check for info->executable. Add
  1501. !info->relocatable check for !info->executable.
  1502. (elf_link_output_extsym): Remove
  1503. !info->relocatable check for info->executable.
  1504. 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
  1505. * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
  1506. assignment loop for bfd plugin objects.
  1507. 2015-07-28 Alan Modra <amodra@gmail.com>
  1508. * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
  1509. segment for loaded sections after nonloaded sections if the
  1510. sections are on the same page.
  1511. 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
  1512. * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
  1513. * config.in, configure: Regenerate.
  1514. 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
  1515. * configure: Regenerated.
  1516. 2015-07-27 Nick Clifton <nickc@redhat.com>
  1517. * elf32-msp430.c (uses_large_model): New function.
  1518. (msp430_elf_eh_frame_address_size): New function.
  1519. (elf_backend_eh_frame_address_size): Define.
  1520. 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
  1521. PR ld/18705
  1522. * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
  1523. 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
  1524. PR ld/18705
  1525. * elf32-arm.c (elf_backend_extern_protected_data): Define.
  1526. 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
  1527. PR ld/18718
  1528. * elflink.c (elf_link_output_extsym): Check symbol version
  1529. section check only if not linking executable, the symbol is
  1530. referenced by shared library or not locally defined.
  1531. 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
  1532. * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
  1533. check if a symbol should be bound symbolically.
  1534. * elf32-hppa.c (elf32_hppa_check_relocs,
  1535. elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
  1536. elf32_hppa_finish_dynamic_symbol): Likewise.
  1537. * elf32-m68k.c (elf_m68k_check_relocs,
  1538. elf_m68k_relocate_section): Likewise.
  1539. * elf32-nios2.c (nios2_elf32_relocate_section,
  1540. nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
  1541. * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
  1542. elf32_tic6x_relocate_section): Likewise.
  1543. 2015-07-24 Alan Modra <amodra@gmail.com>
  1544. * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
  1545. prefix for reloc section corresponding to rela section associated
  1546. with renamed debug section.
  1547. 2015-07-24 Alan Modra <amodra@gmail.com>
  1548. * section.c (bfd_get_section_by_name_if): Iterate over entire hash
  1549. chain.
  1550. 2015-07-23 Joseph Myers <joseph@codesourcery.com>
  1551. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
  1552. <DT_MIPS_RLD_MAP_REL>: Add target address to host address
  1553. difference, not to host pointer.
  1554. 2015-07-22 Alan Modra <amodra@gmail.com>
  1555. * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
  1556. return -1 if symbol referenced is not defined. Tidy.
  1557. 2015-07-20 Alan Modra <amodra@gmail.com>
  1558. * po/SRC-POTFILES.in: Regenerate.
  1559. 2015-07-17 Jiong Wang <jiong.wang@arm.com>
  1560. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
  1561. (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
  1562. 2015-07-16 Jiong Wang <jiong.wang@arm.com>
  1563. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
  1564. BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
  1565. (aarch64_reloc_got_type): Ditto.
  1566. (elfNN_aarch64_final_link_relocate): Ditto.
  1567. (elfNN_aarch64_relocate_section): Ditto.
  1568. (elfNN_aarch64_gc_sweep_hook): Ditto.
  1569. (elfNN_aarch64_check_relocs): Ditto.
  1570. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
  1571. (_bfd_aarch64_elf_resolve_relocation): Ditto.
  1572. 2015-07-16 Jiong Wang <jiong.wang@arm.com>
  1573. * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
  1574. * bfd-in2.h: Regenerate.
  1575. * libbfd.h: Regenerate.
  1576. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  1577. BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
  1578. 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
  1579. PR binutils/18656
  1580. * bfd.c (bfd_convert_section_size): New function.
  1581. (bfd_convert_section_contents): Likewise.
  1582. * bfd-in2.h: Regenerated.
  1583. 2015-07-09 Catherine Moore <clm@codesourcery.com>
  1584. * elflink.c (bfd_elf_size_dynamic_sections): Call to
  1585. _bfd_elf_maybe_strip_eh_frame_hdr should be before
  1586. bed->elf_backend_size_dynamic_sections.
  1587. 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
  1588. * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
  1589. 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
  1590. * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
  1591. plus addend rather than the original st_value when looking up
  1592. entries in opd->adjust.
  1593. 2015-07-03 Kai Tietz <ktietz@redhat.com>
  1594. Nick Clifton <nickc@redhat.com>
  1595. PR ld/11539
  1596. * coffcode.h (coff_bfd_gc_sections): Define default
  1597. to bfd_coff_gc_sections function.
  1598. (coff_gc_mark_hook_fn): New type.
  1599. * coffgen.c (init_reloc_cookie): Copy and adjust coff
  1600. related code about gc-sections from elflink.c to here.
  1601. (fini_reloc_cookie): Likewise.
  1602. (init_reloc_cookie_rels): Likewise.
  1603. (fini_reloc_cookie_rels): Likewise.
  1604. (init_reloc_cookie_for_section): Likewise.
  1605. (fini_reloc_cookie_for_section): Likewise.
  1606. (_bfd_coff_gc_mark_hook): Likewise.
  1607. (_bfd_coff_gc_mark_rsec): Likewise.
  1608. (_bfd_coff_gc_mark_reloc): Likewise.
  1609. (_bfd_coff_gc_mark): Likewise.
  1610. (_bfd_coff_gc_mark_extra_sections): Likewise.
  1611. (coff_gc_sweep_symbol_info): Likewise.
  1612. (coff_gc_sweep_symbol): Likewise.
  1613. (gc_sweep_hook_fn): Likewise.
  1614. (coff_gc_sweep): Likewise.
  1615. (bfd_coff_gc_sections): Likewise.
  1616. (_bfd_coff_gc_keep): Likewise.
  1617. * libcoff-in.h (coff_reloc_cookie): New struct.
  1618. (bfd_coff_gc_sections): New prototype.
  1619. * libcoff.h: Regenerate.
  1620. 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
  1621. Cesar Philippidis <cesar@codesourcery.com>
  1622. * bfd-in2.h: Regenerated.
  1623. * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
  1624. (elf_nios2_r1_howto_table_rel): This.
  1625. (elf_nios2_r2_howto_table_rel): New.
  1626. (BFD_IS_R2): New.
  1627. (lookup_howto): Add ABFD parameter. Adjust to look up in either
  1628. the R1 or R2 relocation table, as determined by ABFD.
  1629. (nios2_reloc_map): Add R2 relocations.
  1630. (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
  1631. Pass it the ABFD parameter.
  1632. (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
  1633. return an R1 or R2 relocation.
  1634. (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
  1635. Pass it the ABFD parameter.
  1636. (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
  1637. boundary.
  1638. (nios2_elf32_relocate_section): Adjust call to lookup_howto.
  1639. * libbfd.h: Regenerated.
  1640. * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
  1641. (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
  1642. (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
  1643. (BFD_RELOC_NIOS2_R2_T1I7_2): New.
  1644. (BFD_RELOC_NIOS2_R2_T2I4): New.
  1645. (BFD_RELOC_NIOS2_R2_T2I4_1): New.
  1646. (BFD_RELOC_NIOS2_R2_T2I4_2): New.
  1647. (BFD_RELOC_NIOS2_R2_X1I7_2): New.
  1648. (BFD_RELOC_NIOS2_R2_X2L5): New.
  1649. (BFD_RELOC_NIOS2_R2_F1I5_2): New.
  1650. (BFD_RELOC_NIOS2_R2_L5I4X1): New.
  1651. (BFD_RELOC_NIOS2_R2_T1X1I6): New.
  1652. (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
  1653. 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
  1654. Cesar Philippidis <cesar@codesourcery.com>
  1655. * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
  1656. * bfd-in2.h: Regenerated.
  1657. * cpu-nios2.c (nios2_compatible): New.
  1658. (N): Use nios2_compatible instead of bfd_default_compatible.
  1659. (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
  1660. (arch_info_struct): New.
  1661. (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
  1662. * elf32-nios2.c (is_nios2_elf): New.
  1663. (nios2_elf32_merge_private_bfd_data): New.
  1664. (nios2_elf32_object_p): New.
  1665. (bfd_elf32_bfd_merge_private_bfd_data): Define.
  1666. (elf_backend_object_p): Define.
  1667. 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
  1668. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
  1669. 2015-06-30 Nick Clifton <nickc@redhat.com>
  1670. PR binutils/18570
  1671. * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
  1672. (write_obj_attribute): Likewise.
  1673. (elf_new_obj_attr): Likewise.
  1674. (bfd_elf_get_obj_attr_int): Likewise.
  1675. (bfd_elf_add_obj_attr_int): Likewise.
  1676. (bfd_elf_add_obj_attr_string): Likewise.
  1677. (bfd_elf_add_obj_attr_int_string): Likewise.
  1678. (gnu_obj_attrs_arg_type): Likewise.
  1679. (_bfd_elf_obj_attrs_arg_type): Likewise.
  1680. (_bfd_elf_parse_attributes): Likewise.
  1681. (_bfd_elf_merge_unknown_attribute_list): Likewise.
  1682. * elf-bfd.h (struct obj_attribute_list): Likewise.
  1683. Update prototypes.
  1684. 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
  1685. * bfd-in.h (compressed_debug_section_type): Remove
  1686. COMPRESS_DEBUG_ZLIB.
  1687. * bfd-in2.h : Regenerated.
  1688. 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
  1689. * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
  1690. instead of !shared to indicate an application vs shared library.
  1691. (_bfd_mips_elf_size_dynamic_sections): Likewise.
  1692. (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
  1693. (_bfd_mips_elf_get_target_dtag): Likewise.
  1694. 2015-06-25 DJ Delorie <dj@redhat.com>
  1695. * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
  1696. REL loads to match RELA stores.
  1697. 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
  1698. * elf.c (_bfd_elf_compute_section_file_positions): Don't
  1699. initialize sh_size for .shstrtab here.
  1700. 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
  1701. PR gas/18451
  1702. * elf-bfd.h (elf_sym_strtab): New.
  1703. (elf_link_hash_table): Add strtabcount, strtabsize and
  1704. strtab.
  1705. (_bfd_elf_stringtab_init): Removed.
  1706. * elf.c (_bfd_elf_stringtab_init): Removed.
  1707. (_bfd_elf_compute_section_file_positions): Replace
  1708. bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
  1709. _bfd_stringtab_size with
  1710. elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
  1711. _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
  1712. _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
  1713. st_name.
  1714. (swap_out_syms): Likewise.
  1715. * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
  1716. with elf_strtab_hash. Remove symbuf, symbuf_count,
  1717. symbuf_size and shndxbuf_size.
  1718. (elf_link_flush_output_syms): Removed.
  1719. (elf_link_output_sym): Renamed to ...
  1720. (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
  1721. with _bfd_elf_strtab_add. Don't flush symbols to the file nor
  1722. swap out symbols.
  1723. (elf_link_swap_symbols_out): New.
  1724. (elf_link_output_extsym): Replace elf_link_output_sym with
  1725. elf_link_output_symstrtab.
  1726. (elf_link_input_bfd): Likewise.
  1727. (elf_final_link_free): Replace _bfd_stringtab_free with
  1728. _bfd_elf_strtab_free. Remove symbuf.
  1729. (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
  1730. _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
  1731. symbuf_size nor shndxbuf_size. Initialize strtabsize and
  1732. strtab. Initialize symshndxbuf to -1 when number of sections
  1733. >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
  1734. elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
  1735. call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
  1736. and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
  1737. and _bfd_stringtab_emit with _bfd_elf_strtab_size and
  1738. _bfd_elf_strtab_emit.
  1739. 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
  1740. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
  1741. GCC warning.
  1742. 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
  1743. * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
  1744. space for the first .plt entry.
  1745. (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
  1746. section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
  1747. there are PLT relocations.
  1748. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
  1749. allocate space for the first .plt entry.
  1750. (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
  1751. .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
  1752. there are PLT relocations.
  1753. 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
  1754. PR ld/18591
  1755. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
  1756. R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
  1757. overflow.
  1758. 2015-06-23 Jiong Wang <jiong.wang@arm.com>
  1759. * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
  1760. (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
  1761. relocations against read-only sections.
  1762. 2015-06-18 Nick Clifton <nickc@redhat.com>
  1763. PR 18481
  1764. * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
  1765. 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
  1766. * bfd.c: Change struct bfd_build_id to use bfd_size_type.
  1767. * bfd-in2.h : Regenerate.
  1768. 2015-06-16 Alan Modra <amodra@gmail.com>
  1769. * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
  1770. dynamic relocs.
  1771. 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
  1772. * elf-bfd.h : Remove struct elf_build_id.
  1773. * bfd.c : Add struct bfd_build_id.
  1774. * bfd-in2.h: Regenerate.
  1775. * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
  1776. * libpei.h: Add protoype and macros for
  1777. bfd_XXi_slurp_codeview_record.
  1778. * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
  1779. * peicode.h (pe_bfd_read_buildid): Add.
  1780. (pe_bfd_object_p): Use pe_bfd_read_buildid().
  1781. 2015-06-15 Renlin Li <renlin.li@arm.com>
  1782. * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
  1783. * bfd-in2.h: Regenerate.
  1784. * libbfd.h: Regenerate.
  1785. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  1786. BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
  1787. 2015-06-15 Alan Modra <amodra@gmail.com>
  1788. * cofflink.c (_bfd_coff_generic_relocate_section): Revert
  1789. 2014-03-26 change. Call _bfd_clear_contents for relocs against
  1790. local and global symbols defined in discarded input sections.
  1791. 2015-06-05 Nick Clifton <nickc@redhat.com>
  1792. * elf32-msp430.c (rl78_sym_diff_handler): New function.
  1793. (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
  1794. (msp430x_howto_table): Likewise.
  1795. 2015-06-05 Alan Modra <amodra@gmail.com>
  1796. * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
  1797. relocs with insns moved by --ppc476-workaround. Correct
  1798. output of REL16 relocs.
  1799. 2015-06-01 Jiong Wang <jiong.wang@arm.com>
  1800. * elfnn-aarch64.c (aarch64_reloc_got_type): Support
  1801. BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
  1802. (elfNN_aarch64_final_link_relocate): Ditto.
  1803. (elfNN_aarch64_gc_swap_hook): Ditto.
  1804. (elfNN_aarch64_check_relocs): Ditto.
  1805. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
  1806. 2015-06-01 Jiong Wang <jiong.wang@arm.com>
  1807. * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
  1808. * bfd-in2.h: Regenerate.
  1809. * libbfd.h: Regenerate.
  1810. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  1811. BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
  1812. 2015-06-01 Jiong Wang <jiong.wang@arm.com>
  1813. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
  1814. complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
  1815. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
  1816. PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
  1817. 2015-06-01 Jiong Wang <jiong.wang@arm.com>
  1818. * elfnn-aarch64.c (aarch64_reloc_got_type): Support
  1819. BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
  1820. (elfNN_aarch64_final_link_relocate): Ditto.
  1821. (elfNN_aarch64_gc_swap_hook): Ditto.
  1822. (elfNN_aarch64_check_relocs): Ditto.
  1823. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
  1824. 2015-06-01 Jiong Wang <jiong.wang@arm.com>
  1825. * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
  1826. * bfd-in2.h: Regenerate.
  1827. * libbfd.h: Regenerate.
  1828. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
  1829. BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
  1830. 2015-05-28 Catherine Moore <clm@codesourcery.com>
  1831. Bernd Schmidt <bernds@codesourcery.com>
  1832. Paul Brook <paul@codesourcery.com>
  1833. * bfd-in2.h: Regenerated.
  1834. * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
  1835. (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
  1836. (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
  1837. eh_frame_hdr_info.
  1838. (compact_eh_frame_hdr_info): Declare.
  1839. (eh_frame_hdr_info): Redeclare with union for dwarf-specific
  1840. fields and compact-eh fields.
  1841. (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
  1842. (bfd_elf_section_data): Add eh_frame_entry_field.
  1843. (elf_section_eh_frame_entry): Define.
  1844. (bfd_elf_parse_eh_frame_entries): Declare.
  1845. (_bfd_elf_parse_eh_frame_entry): Declare.
  1846. (_bfd_elf_end_eh_frame_parsing): Declare.
  1847. (_bfd_elf_write_section_eh_frame_entry): Declare.
  1848. (_bfd_elf_eh_frame_entry_present): Declare.
  1849. (_bfd_elf_section_for_symbol): Declare.
  1850. * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
  1851. (bfd_elf_record_eh_frame_entry): New function.
  1852. (_bfd_elf_parse_eh_frame_entry): New function.
  1853. (_bfd_elf_parse_eh_frame): Update hdr_info field references.
  1854. (cmp_eh_frame_hdr): New function.
  1855. (add_eh_frame_hdr_terminator): New function.
  1856. (_bfd_elf_end_eh_frame_parsing): New function.
  1857. (find_merged_cie): Update hdr_info field references.
  1858. (_bfd_elf_discard_section_eh_frame): Likewise.
  1859. (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
  1860. (_bfd_elf_eh_frame_entry_present): New function.
  1861. (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
  1862. (_bfd_elf_write_section_eh_frame_entry): New function.
  1863. (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
  1864. (_bfd_elf_fixup_eh_frame_hdr): New function.
  1865. (write_compact_eh_frame_hdr): New function.
  1866. (write_dwarf_eh_frame_hdr): New function.
  1867. (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
  1868. * elflink.c (_bfd_elf_section_for_symbol): New function.
  1869. (elf_section_ignore_discarded_relocs): Add Compact EH support.
  1870. (elf_link_input_bfd): Likewise.
  1871. (bfd_elf_final_link): Likewise.
  1872. (_bfd_elf_gc_mark): Likewise.
  1873. (bfd_elf_parse_eh_frame_entries): New function.
  1874. (bfd_elf_gc_sections): Add Compact EH support.
  1875. (bfd_elf_discard_info): Likewise.
  1876. * elfxx-mips.c: Include dwarf2.h.
  1877. (_bfd_mips_elf_compact_eh_encoding): New function.
  1878. (_bfd_mips_elf_cant_unwind_opcode): New function.
  1879. * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
  1880. (_bfd_mips_elf_cant_unwind_opcode): Declare.
  1881. (elf_backend_compact_eh_encoding): Define.
  1882. (elf_backend_cant_unwind_opcode): Define.
  1883. * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
  1884. (elf_backend_cant_unwind_opcode): Provide default.
  1885. (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
  1886. elf_backend_cant_unwind_opcode.
  1887. * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
  1888. 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
  1889. PR binutils/18458
  1890. * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
  1891. for now binding only if pointer equality isn't needed.
  1892. (elf_i386_allocate_dynrelocs): Use .plt.got section for now
  1893. binding only if pointer equality isn't needed.
  1894. * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
  1895. section for now binding only if pointer equality isn't needed.
  1896. (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
  1897. binding only if pointer equality isn't needed.
  1898. 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
  1899. PR binutils/18437
  1900. * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
  1901. in .rel.plt/.rela.plt.
  1902. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
  1903. 2015-05-19 Jiong Wang <jiong.wang@arm.com>
  1904. * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
  1905. relocation case labels alphabetically.
  1906. (elfNN_aarch64_final_link_relocate): Ditto.
  1907. (elfNN_aarch64_tls_relax): Ditto.
  1908. (elfNN_aarch64_relocate_section): Ditto.
  1909. (elfNN_aarch64_gc_sweep_hook): Ditto.
  1910. (elfNN_aarch64_check_relocs): Ditto.
  1911. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
  1912. (_bfd_aarch64_elf_resolve_relocation): Ditto.
  1913. 2015-05-18 Jiong Wang <jiong.wang@arm.com>
  1914. * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
  1915. comments.
  1916. 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
  1917. * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
  1918. for now binding.
  1919. (elf_i386_allocate_dynrelocs): Use .plt.got section for now
  1920. binding.
  1921. * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
  1922. section for now binding.
  1923. (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
  1924. binding.
  1925. 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
  1926. * bfd.c (bfd_update_compression_header): Also write the zlib
  1927. header if the SHF_COMPRESSED bit cleared..
  1928. (bfd_check_compression_header): Return the uncompressed size.
  1929. * compress.c (decompress_contents): Don't skip the zlib header.
  1930. (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
  1931. which doesn't have the zlib header.
  1932. (bfd_init_section_decompress_status): Likewise.
  1933. (bfd_get_full_section_contents): Updated.
  1934. (bfd_is_section_compressed): Likewise.
  1935. (bfd_is_section_compressed_with_header): Return the uncompressed
  1936. size.
  1937. * elf.c (_bfd_elf_make_section_from_shdr): Updated.
  1938. * bfd-in2.h: Regenerated.
  1939. 2015-05-14 Jiong Wang <jiong.wang@arm.com>
  1940. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
  1941. check restrictions.
  1942. 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
  1943. * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
  1944. as GOT reference when plt.refcount is not positive.
  1945. 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
  1946. * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
  1947. for the first .plt entry only if needed.
  1948. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
  1949. 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
  1950. * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
  1951. (ALL_MACHINES_CFILES): Likewise.
  1952. * archures.c (bfd_mach_iamcu): New.
  1953. (bfd_mach_i386_iamcu): Likewise.
  1954. (bfd_mach_i386_iamcu_intel_syntax): Likewise.
  1955. (bfd_iamcu_arch): Likewise.
  1956. (bfd_archures_list): Add &bfd_iamcu_arch.
  1957. * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
  1958. i386_elf32_vec.
  1959. (targ_archs): Add bfd_iamcu_arch if needed.
  1960. * configure.ac: Support iamcu_elf32_vec.
  1961. * cpu-iamcu.c: New file.
  1962. * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
  1963. Add support for iamcu_elf32_vec and elf32_iamcu_bed.
  1964. * targets.c (iamcu_elf32_vec): New.
  1965. (_bfd_target_vector): Add iamcu_elf32_vec.
  1966. * Makefile.in: Regenerated.
  1967. * bfd-in2.h: Likewise.
  1968. * configure: Likewise.
  1969. 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
  1970. * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
  1971. 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
  1972. * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
  1973. and output_bfd with abfd.
  1974. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
  1975. 2015-05-06 Toni Spets <toni.spets@iki.fi>
  1976. PR ld/18372
  1977. * peXXigen.c (rsrc_process_section): Skip discarded resource
  1978. sections.
  1979. 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
  1980. * config.bfd: Support i[3-7]86-*-elf*.
  1981. 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
  1982. * elf32-i386.c (elf_backend_post_process_headers): Undef for
  1983. Solaris 2.
  1984. 2015-04-30 Nick Clifton <nickc@redhat.com>
  1985. PR 18317
  1986. * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
  1987. mep_reloc.
  1988. (mep_reloc): Delete unused function.
  1989. 2015-04-29 Nick Clifton <nickc@redhat.com>
  1990. PR 17099
  1991. * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
  1992. relocs.
  1993. 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  1994. * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
  1995. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
  1996. elf_s390_merge_obj_attributes.
  1997. * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
  1998. 2015-04-24 Jiong Wang <jiong.wang@arm.com>
  1999. PR ld/18270
  2000. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
  2001. GOT_NORMAL for both sgot/srelgot section.
  2002. (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
  2003. and generate necessary runtime relocation for GOT entry.
  2004. 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
  2005. PR binutils/18209
  2006. * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
  2007. 2015-04-24 Jiong Wang <jiong.wang@arm.com>
  2008. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
  2009. PC-relative relocation for external symbol.
  2010. 2015-04-24 Nick Clifton <nickc@redhat.com>
  2011. PR 18313
  2012. * compress.c (decompress_contents): Zero initialse the z_stream
  2013. structure.
  2014. 2015-04-24 Nick Clifton <nickc@redhat.com>
  2015. * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
  2016. local labels to include local labels with a numeric suffix and
  2017. fake symbols.
  2018. 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
  2019. PR binutils/18316
  2020. * section.c (SEC_MEP_VLIW): New.
  2021. * bfd-in2.h: Regenerated.
  2022. 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
  2023. PR ld/18277
  2024. * compress.c (bfd_compress_section_contents): Remove the
  2025. write_compress argument.
  2026. (bfd_init_section_compress_status): Updated.
  2027. (bfd_compress_section): Likewise.
  2028. * elf.c (_bfd_elf_set_reloc_sh_name): New.
  2029. (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
  2030. to (unsigned int) -1 if delay_st_name_p is TRUE. Use
  2031. _bfd_elf_set_reloc_sh_name.
  2032. (elf_fake_sections): Don't rename DWARF debug section for
  2033. linker output if it will be compressed. Instead, set
  2034. delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
  2035. (assign_section_numbers): Call _bfd_elf_strtab_addref only if
  2036. sh_name != (unsigned int) -1. Don't finalize nor assign
  2037. shstrtab section here. Delay setting output section names to
  2038. _bfd_elf_write_object_contents.
  2039. (_bfd_elf_compute_section_file_positions): Update comments on
  2040. sh_offset for shstrtab section.
  2041. (assign_file_positions_for_non_load_sections): Set sh_offset to
  2042. -1 for shstrtab section.
  2043. (assign_file_positions_except_relocs): Likewise.
  2044. (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
  2045. when compressing DWARF debug sections. Place shstrtab section
  2046. after DWARF debug sections have been compressed.
  2047. (_bfd_elf_write_object_contents): Setting sh_name for output
  2048. sections.
  2049. 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
  2050. PR binutils/18209
  2051. * bfd.c (bfd): Add is_linker_input.
  2052. * elf.c (convert_debug_to_zdebug): New.
  2053. (convert_zdebug_to_debug): Likewise.
  2054. (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
  2055. .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
  2056. (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
  2057. instead of a pointer to section.
  2058. (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
  2059. is set.
  2060. * section.c (SEC_ELF_RENAME): New.
  2061. * bfd-in2.h: Regenerated.
  2062. 2015-04-23 Alan Modra <amodra@gmail.com>
  2063. * elf64-ppc.c (TOC_BASE_ALIGN): Define.
  2064. (ppc64_elf_next_toc_section): Align multi-got toc base.
  2065. (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
  2066. 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
  2067. PR ld/18289
  2068. * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
  2069. (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
  2070. (elf_i386_create_dynamic_sections): Always allow copy relocs for
  2071. building executables.
  2072. (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
  2073. (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
  2074. (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
  2075. PIE and R_386_GOTOFF.
  2076. (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
  2077. 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
  2078. * elf.c (assign_section_numbers): Always set up sh_name.
  2079. 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
  2080. * elf.c (assign_file_positions_for_non_load_sections): Iterate
  2081. sections by pointer.
  2082. (_bfd_elf_assign_file_positions_for_non_load): Likewise.
  2083. 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
  2084. * bfd-in.h (compressed_debug_section_type): New.
  2085. * compress.c (bfd_compress_section_contents): Add an argument
  2086. for linker write compression and always generate .zdebug_*
  2087. section when linking.
  2088. (bfd_init_section_compress_status): Pass FALSE to
  2089. bfd_compress_section_contents.
  2090. (bfd_compress_section): New function.
  2091. * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
  2092. on DWARF debug sections if COMPRESS_DEBUG is set and rename
  2093. section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
  2094. (assign_file_positions_for_non_load_sections): Set sh_offset
  2095. to -1 if SEC_ELF_COMPRESS is set.
  2096. (assign_file_positions_except_relocs): Likwise.
  2097. (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
  2098. (_bfd_elf_assign_file_positions_for_non_load): This. Change
  2099. return time to bfd_boolean. Compress the section if
  2100. SEC_ELF_COMPRESS is set.
  2101. (_bfd_elf_write_object_contents): Updated.
  2102. (_bfd_elf_set_section_contents): Write section contents to
  2103. the buffer if SEC_ELF_COMPRESS is set.
  2104. * merge.c: Include "elf-bfd.h".
  2105. (sec_merge_emit): Add arguments for contents and offset. Write
  2106. to contents with offset if contents isn't NULL.
  2107. (_bfd_write_merged_section): Write section contents to the
  2108. buffer if SEC_ELF_COMPRESS is set. Pass contents and
  2109. output_offset to sec_merge_emit.
  2110. * elflink.c (bfd_elf_final_link): Allocate the buffer for
  2111. output section contents if SEC_ELF_COMPRESS is set.
  2112. * section.c (SEC_ELF_COMPRESS): New.
  2113. * bfd-in2.h: Regenerated.
  2114. 2015-04-15 Alan Modra <amodra@gmail.com>
  2115. * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
  2116. 2015-04-14 Nick Clifton <nickc@redhat.com>
  2117. * elf32-rl78.c (RL78_OP_REL): New macro.
  2118. (rl78_elf_howto_table): Use it for complex relocs.
  2119. (get_symbol_value): Handle the cases when the info or status
  2120. arguments are NULL.
  2121. (get_romstart): Cache the status returned by get_symbol_value.
  2122. (get_ramstart): Likewise.
  2123. (RL78_STACK_PUSH): Generate an error message if the stack
  2124. overflows.
  2125. (RL78_STACK_POP): Likewise for underflows.
  2126. (rl78_compute_complex_reloc): New function. Contains the basic
  2127. processing code for all RL78 complex relocs.
  2128. (rl78_special_reloc): New function. Provides special reloc
  2129. handling for complex relocs.
  2130. (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
  2131. (rl78_offset_for_reloc): Likewise.
  2132. 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
  2133. PR ld/pr17709
  2134. * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
  2135. info->extern_protected_data when warning copy relocs against
  2136. protected symbols.
  2137. (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
  2138. when checking protected non-function symbols.
  2139. 2015-04-13 John Baldwin <jhb@FreeBSD.org>
  2140. * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
  2141. FreeBSD.
  2142. (elfcore_write_xstatereg): Use correct note name on FreeBSD.
  2143. 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
  2144. PR ld/18250
  2145. * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
  2146. if the object has been claimed by plugin.
  2147. 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
  2148. * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
  2149. with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
  2150. protected data symbol when building shared library.
  2151. * elf64-x86-64.c (elf_x86_64_relocate_section): Check
  2152. R_X86_64_GOTOFF64 against undefined symbol and replace
  2153. SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
  2154. R_X86_64_GOTOFF64 against protected data symbol when building
  2155. shared library.
  2156. 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
  2157. PR ld/pr17709
  2158. * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
  2159. against protected data symbol when building shared library.
  2160. * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
  2161. R_X86_64_GOTOFF64 against protected data symbol when building
  2162. shared library.
  2163. 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
  2164. PR ld/pr15228
  2165. PR ld/pr17709
  2166. * elf-bfd.h (elf_backend_data): Add extern_protected_data.
  2167. * elf32-i386.c (elf_backend_extern_protected_data): New.
  2168. Defined to 1.
  2169. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
  2170. * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
  2171. copy relocs against protected symbols if extern_protected_data
  2172. is true.
  2173. (_bfd_elf_symbol_refs_local_p): Don't return true on protected
  2174. non-function symbols if extern_protected_data is true.
  2175. * elfxx-target.h (elf_backend_extern_protected_data): New.
  2176. Default to 0.
  2177. (elfNN_bed): Initialize extern_protected_data with
  2178. elf_backend_extern_protected_data.
  2179. 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
  2180. * compress.c (bfd_compress_section_contents): Replace bfd_malloc
  2181. and free with bfd_alloc and bfd_release on compressed buffer.
  2182. Release buffer if compressed section isn't smaller.
  2183. 2015-04-10 Alan Modra <amodra@gmail.com>
  2184. PR ld/18222
  2185. * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
  2186. on adding a protected visibility variable to .dynbss.
  2187. 2015-04-10 Alan Modra <amodra@gmail.com>
  2188. Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
  2189. PR ld/pr15228
  2190. PR ld/pr17709
  2191. * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
  2192. * elf32-i386.c (elf_backend_extern_protected_data): Delete.
  2193. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
  2194. * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
  2195. extern_protected_data test.
  2196. (_bfd_elf_symbol_refs_local_p): Likewise.
  2197. * elfxx-target.h (elf_backend_extern_protected_data): Delete.
  2198. (elfNN_bed): Delete elf_backend_extern_protected_data init.
  2199. 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
  2200. * compress.c (bfd_compress_section_contents): Update comments.
  2201. (bfd_init_section_decompress_status): Likewise.
  2202. (bfd_init_section_compress_status): Likewise.
  2203. 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
  2204. * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
  2205. object_flags.
  2206. (TARGET_LITTLE_SYM): Likewise.
  2207. 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
  2208. * elf32-xtensa.c (splay-tree.h): include header.
  2209. (text_action_struct): drop next pointer.
  2210. (text_action_list_struct): drop head pointer, add count and
  2211. tree fields.
  2212. (find_fill_action): instead of linear search in text_action_list
  2213. search in the tree.
  2214. (text_action_compare, action_first, action_next): new functions.
  2215. (text_action_add, text_action_add_literal): instead of linear
  2216. search and insertion insert new node into the tree.
  2217. (removed_by_actions): pass additional parameter: action_list,
  2218. use it to traverse the tree.
  2219. (offset_with_removed_text): pass additional action_list parameter
  2220. to removed_by_actions.
  2221. (map_action_fn_context): new typedef.
  2222. (map_action_fn_context_struct): new structure.
  2223. (map_action_fn): new function.
  2224. (map_removal_by_action): use splay_tree_foreach to build map.
  2225. (find_insn_action): replace linear search in text_action_list
  2226. with series of splay_tree_lookups.
  2227. (print_action, print_action_list_fn): new functions.
  2228. (print_action_list): use splay_tree_foreach.
  2229. (init_xtensa_relax_info): drop action_list.head initialization.
  2230. Initialize the tree.
  2231. (compute_text_actions): use non-zero action_list_count instead of
  2232. non-NULL action list.
  2233. (xlate_map_context): new typedef.
  2234. (xlate_map_context_struct): new structure.
  2235. (xlate_map_fn): new function.
  2236. (build_xlate_map): use splay_tree_foreach to build map.
  2237. (action_remove_bytes_fn): new function.
  2238. (relax_section): use zero action_list_count instead of NULL
  2239. action list. Use splay_tree_foreach to count final section size.
  2240. Drop unused variable 'removed'.
  2241. 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
  2242. * elf32-xtensa.c (removed_literal_map_entry): new typedef.
  2243. (removed_literal_map_entry_struct): new structure.
  2244. (removed_literal_list_struct): add new fields: n_map and map.
  2245. (map_removed_literal, removed_literal_compare): new functions.
  2246. (find_removed_literal): build index array for literals ordered
  2247. by VMA, use binary search to find removed literal.
  2248. 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
  2249. * elf32-xtensa.c (removal_by_action_entry_struct,
  2250. removal_by_action_map_struct): new structures.
  2251. (removal_by_action_entry, removal_by_action_map): new typedefs.
  2252. (text_action_list_struct): add new field: map.
  2253. (map_removal_by_action, removed_by_actions_map,
  2254. offset_with_removed_text_map): new functions.
  2255. (relax_section): replace offset_with_removed_text with
  2256. offset_with_removed_text_map.
  2257. (translate_reloc, relax_property_section, relax_section_symbols):
  2258. replace removed_by_actions with removed_by_actions_map.
  2259. 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
  2260. * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
  2261. reloc_range): new typedef.
  2262. (reloc_range_list_struct, reloc_range_list_entry_struct,
  2263. reloc_range_struct): new structures.
  2264. (reloc_range_compare, build_reloc_ranges,
  2265. reloc_range_list_append, reloc_range_list_remove,
  2266. reloc_range_list_update_range, free_reloc_range_list): new
  2267. functions.
  2268. (compute_text_actions): precompute relocation opcodes before the
  2269. loop. Add relevant_relocs variable, initialize it before the
  2270. loop, pass it to the check_section_ebb_pcrels_fit.
  2271. (check_section_ebb_pcrels_fit): add new parameter:
  2272. relevant_relocs. Update address range in the relevant_relocs if
  2273. it's non-NULL and iterate only over relevant relocations.
  2274. 2015-04-09 Nick Clifton <nickc@redhat.com>
  2275. * elf32-rx.c (describe_flags): Report the settings of the string
  2276. insn using bits.
  2277. (rx_elf_merge_private_bfd_data): Handle merging of the string insn
  2278. using bits.
  2279. 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
  2280. * compress.c (bfd_compress_section_contents): Work around a GCC
  2281. uninitialized warning bug fixed in GCC 4.7.
  2282. 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
  2283. * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
  2284. bit.
  2285. * bfd.c (bfd::flags): Increase size to 18 bits.
  2286. (BFD_COMPRESS_GABI): New.
  2287. (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
  2288. (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
  2289. (bfd_update_compression_header): New fuction.
  2290. (bfd_check_compression_header): Likewise.
  2291. (bfd_get_compression_header_size): Likewise.
  2292. (bfd_is_section_compressed_with_header): Likewise.
  2293. * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
  2294. (bfd_compress_section_contents): Return the uncompressed size if
  2295. the full section contents is compressed successfully. Support
  2296. converting from/to .zdebug* sections.
  2297. (bfd_get_full_section_contents): Call
  2298. bfd_get_compression_header_size to get compression header size.
  2299. (bfd_is_section_compressed): Renamed to ...
  2300. (bfd_is_section_compressed_with_header): This. Add a pointer
  2301. argument to return compression header size.
  2302. (bfd_is_section_compressed): Use it.
  2303. (bfd_init_section_decompress_status): Call
  2304. bfd_get_compression_header_size to get compression header size.
  2305. Return FALSE if uncompressed section size is 0.
  2306. * elf.c (_bfd_elf_make_section_from_shdr): Support converting
  2307. from/to .zdebug* sections.
  2308. * bfd-in2.h: Regenerated.
  2309. 2015-04-07 Alan Modra <amodra@gmail.com>
  2310. * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
  2311. mapped to output .got section.
  2312. 2015-04-07 Alan Modra <amodra@gmail.com>
  2313. * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
  2314. and has_addr16_lo. Make has_sda_refs a bitfield.
  2315. (ppc_elf_check_relocs): Set new flags.
  2316. (ppc_elf_link_hash_table_create): Update default_params.
  2317. (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
  2318. where we won't be making .dynbss entries or editing code. Set
  2319. params->pic_fixup when we'll edit code for protected var access.
  2320. (allocate_dynrelocs): Allocate got entry for edited code and
  2321. discard dyn_relocs.
  2322. (struct ppc_elf_relax_info): Add picfixup_size.
  2323. (ppc_elf_relax_section): Rename struct one_fixup to struct
  2324. one_branch_fixup. Rename fixups to branch_fixups. Size space for
  2325. pic fixups.
  2326. (ppc_elf_relocate_section): Edit non-PIC accessing protected
  2327. visibility variables to PIC. Don't emit dyn_relocs for code
  2328. we've edited.
  2329. * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
  2330. 2015-04-07 Nick Clifton <nickc@redhat.com>
  2331. * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
  2332. local labels as local.
  2333. 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
  2334. * compress.c (get_uncompressed_size): Removed.
  2335. (bfd_compress_section_contents): Use bfd_putb64 to write
  2336. uncompressed section size.
  2337. (bfd_init_section_decompress_status): Replace
  2338. get_uncompressed_size with bfd_getb64.
  2339. 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
  2340. * elf.c (_bfd_elf_init_private_section_data): Also preserve the
  2341. SHF_COMPRESSED bit if not decompress.
  2342. 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
  2343. * compress.c (get_uncompressed_size): New. Extracted from ...
  2344. (bfd_init_section_decompress_status): This. Use it.
  2345. 2015-04-02 Andrew Turner <andrew@freebsd.org>
  2346. * config.bfd: Add aarch64-*-freebsd* target triple.
  2347. 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
  2348. * configure: Regenerated.
  2349. 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
  2350. Marcus Shawcroft <marcus.shawcroft@arm.com>
  2351. Jiong Wang <jiong.wang@arm.com>
  2352. * bfd-in.h (bfd_elf64_aarch64_set_options)
  2353. (bfd_elf32_aarch64_set_options): Add parameter.
  2354. * bfd-in2.h: Regenerated.
  2355. * elfnn-aarch64.c (aarch64_erratum_843419_stub)
  2356. (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
  2357. (_bfd_aarch64_erratum_843419_stub_name)
  2358. (_bfd_aarch64_erratum_843419_fixup)
  2359. (_bfd_aarch64_erratum_843419_scan)
  2360. (_bfd_aarch64_erratum_843419_branch_to_stub)
  2361. (_bfd_aarch64_erratum_843419_p): Define.
  2362. (enum elf_aarch64_stub_type): Define
  2363. aarch64_stub_erratum_843419_veneer.
  2364. (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
  2365. (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
  2366. and fix_erratum_843419_adr.
  2367. (stub_hash_newfunc): Initialize adrp_offset;
  2368. (_bfd_aarch64_add_stub_entry_after): Define.
  2369. (aarch64_map_one_stub, aarch64_build_one_stub)
  2370. (aarch64_size_one_stub): Handle
  2371. aarch64_stub_erratum_843419_veneer.
  2372. (_bfd_aarch64_resize_stubs): Round stub section size.
  2373. (elfNN_aarch64_size_stubs): Add scan for 843419.
  2374. (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
  2375. fix_erratum_843419 and fix_erratum_843419_adr.
  2376. (struct erratum_835769_branch_to_stub_data): Add info.
  2377. (elfNN_aarch64_write_section): Initialise info. Handle 843419.
  2378. (elfNN_aarch64_size_dynamic_sections): Handle 843419.
  2379. * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
  2380. (_bfd_aarch64_sign_extend): Define.
  2381. (reencode_adr_imm): Remove static. Rename to:
  2382. (_bfd_aarch64_reencode_adr_imm): Define.
  2383. (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
  2384. * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
  2385. (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
  2386. (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
  2387. Define.
  2388. 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
  2389. * configure: Regenerated.
  2390. 2015-03-31 Ed Schouten <ed@nuxi.nl>
  2391. * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
  2392. for x86_64-*-cloudabi*.
  2393. * configure.ac: Handle x86_64_elf64_cloudabi_vec.
  2394. * configure: Regenerated.
  2395. * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
  2396. (TARGET_LITTLE_NAME): Likewise.
  2397. (ELF_OSABI): Likewise.
  2398. (elf64_bed): Likewise.
  2399. * targets.c (x86_64_elf64_cloudabi_vec): New.
  2400. (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
  2401. 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
  2402. * configure.ac: Revert the AM_ZLIB change.
  2403. * Makefile.in: Regenerated.
  2404. * aclocal.m4: Likewise.
  2405. * configure: Likewise.
  2406. * doc/Makefile.in: Likewise.
  2407. 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
  2408. PR ld/18169
  2409. * elf-bfd.h (elf_backend_data): Add get_reloc_section.
  2410. (_bfd_elf_get_reloc_section): New.
  2411. * elf.c (_bfd_elf_get_reloc_section): Likewise.
  2412. (assign_section_numbers): Call get_reloc_section to look up the
  2413. section the relocs apply.
  2414. * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
  2415. (elfNN_bed): Initialize get_reloc_section with
  2416. elf_backend_get_reloc_section.
  2417. 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
  2418. * Makefile.am (ZLIB): New.
  2419. (ZLIBINC): Likewise.
  2420. (AM_CFLAGS): Add $(ZLIBINC).
  2421. (libbfd_la_LIBADD): Add $(ZLIB).
  2422. * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
  2423. (decompress_contents): Don't check HAVE_ZLIB_H.
  2424. (bfd_compress_section_contents): Likewise.
  2425. (bfd_get_full_section_contents): Likewise.
  2426. (bfd_init_section_decompress_status): Likewise.
  2427. (bfd_init_section_compress_status): Likewise.
  2428. * configure.ac (AM_ZLIB): Removed.
  2429. (zlibdir): New. AC_SUBST.
  2430. (zlibinc): Likewise.
  2431. Add --with-system-zlib.
  2432. * Makefile.in: Regenerated.
  2433. * acinclude.m4: Likewise.
  2434. * config.in: Likewise.
  2435. * configure: Likewise.
  2436. * doc/Makefile.in: Likewise.
  2437. 2015-03-27 Alan Modra <amodra@gmail.com>
  2438. PR ld/15228
  2439. PR ld/18167
  2440. * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
  2441. protected_def when symbol section is read-only. Adjust all calls.
  2442. * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
  2443. 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
  2444. * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
  2445. _bfd_final_link_relocate with aarch64_relocate.
  2446. 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
  2447. PR ld/18160
  2448. * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
  2449. (bfd_elf_gc_sections): Likewise.
  2450. 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2451. * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
  2452. size for initial branch.
  2453. (elfNN_aarch64_build_stubs): Write initial branch.
  2454. _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
  2455. mapping symbol on initial branch.
  2456. 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2457. * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
  2458. Update erratum count.
  2459. 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
  2460. * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
  2461. first matching debug section.
  2462. 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
  2463. PR gas/18087
  2464. * compress.c (bfd_compress_section_contents): Don't write the
  2465. zlib header and set contents as well as compress_status if
  2466. compression didn't make the section smaller.
  2467. (bfd_init_section_compress_status): Don't check compression
  2468. size here.
  2469. 2015-03-24 Nick Clifton <nickc@redhat.com>
  2470. PR binutils/17512
  2471. * coffgen.c (coff_get_normalized_symtab): Fix test for out of
  2472. range auxiliary sections.
  2473. 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2474. * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
  2475. code into:
  2476. (_bfd_aarch64_get_stub_for_link_section): Define.
  2477. 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2478. * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
  2479. update of section_group[].stub_sec.
  2480. 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2481. * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
  2482. (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
  2483. Delete fixes, fix_table_size and associated code. Call
  2484. _bfd_aarch64_add_stub_entry_in_group. Rename to...
  2485. (bfd_aarch64_erratum_835769_scan): Define.
  2486. (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
  2487. erratum_835769_fix_table_size, i and associated code. Relocate
  2488. call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
  2489. correction. Delete construction of stub entry from
  2490. erratum_835769_fixes array.
  2491. 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2492. * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
  2493. _bfd_aarch64_add_stub_entry_in_group.
  2494. 2015-03-24 Alan Modra <amodra@gmail.com>
  2495. * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
  2496. stubs, even those for undefined weak symbols. Otherwise, don't
  2497. report relocation overflow on branches to undefined strong
  2498. symbols. Fix memory leak.
  2499. * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
  2500. overflow on branches to undefined strong symbols.
  2501. 2015-03-23 Keith Seitz <keiths@redhat.com>
  2502. * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
  2503. missing ';'.
  2504. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2505. * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
  2506. construction into...
  2507. (_bfd_aarch64_erratum_835769_stub_name): Define.
  2508. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2509. * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
  2510. stub resize code into...
  2511. (bfd_aarch64_resize_stubs): Define.
  2512. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2513. * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
  2514. creation code into...
  2515. (bfd_aarch64_create_stub_section): Define.
  2516. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2517. * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
  2518. from elf_aarch64_create_or_find_stub_sec.
  2519. (_bfd_aarch64_add_stub_entry_in_group): Rename from
  2520. elfNN_aarch64_add_stub. Call
  2521. _bfd_aarch64_create_or_find_stub_sec.
  2522. (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
  2523. _bfd_aarch64_add_stub_entry_in_group.
  2524. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2525. * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
  2526. sense of boolean return.
  2527. (elfNN_aarch64_size_stubs): Adjust for above.
  2528. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2529. * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
  2530. Remove unused parameter.
  2531. (elfNN_aarch64_size_stubs): Adjust for above.
  2532. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2533. * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
  2534. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2535. * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
  2536. (num_aarch64_erratum_835769_fixes): Remove.
  2537. (elfNN_aarch64_size_stubs): Remove assignments to above.
  2538. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2539. * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
  2540. to rt2.
  2541. (aarch64_erratum_seqeunce): Rename rtn to rt2.
  2542. 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2543. * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
  2544. 2015-03-19 Nick Clifton <nickc@redhat.com>
  2545. * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
  2546. the RL78 core based upon the flags.
  2547. (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
  2548. flags.
  2549. (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
  2550. (elf32_rl78_machine): Always return bfd_mach_rl78.
  2551. 2015-03-19 Nick Clifton <nickc@redhat.com>
  2552. PR 18078
  2553. * compress.c (bfd_compress_section_contents): Do not define this
  2554. function if it is not used.
  2555. 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
  2556. * compress.c (bfd_compress_section_contents): Make it static.
  2557. * bfd-in2.h: Regenerated.
  2558. 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
  2559. PR ld/16598
  2560. * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
  2561. suitable for the AMD64.
  2562. 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
  2563. Nick Clifton <nickc@redhat.com>
  2564. PR binutils/18087
  2565. * coffgen.c (make_a_section_from_file): Only prepend a z to a
  2566. debug section's name if the section was actually compressed.
  2567. * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
  2568. * compress.c (bfd_init_section_compress_status): Do not compress
  2569. the section if doing so would make it bigger. In such cases leave
  2570. the section alone and return COMPRESS_SECTION_NONE.
  2571. 2015-03-17 Alan Modra <amodra@gmail.com>
  2572. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
  2573. on nothing to do, before malloc of returned symbol array.
  2574. 2015-03-16 Nick Clifton <nickc@redhat.com>
  2575. * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
  2576. stored in the elf_section_data structure then load them as
  2577. necessary.
  2578. 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
  2579. * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
  2580. relocs against code sections.
  2581. * elf32-s390.c: Define elf_backend_sort_relocs_p.
  2582. * elf64-s390.c: Likewise.
  2583. 2015-03-11 Alan Modra <amodra@gmail.com>
  2584. * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
  2585. reverse order. Account for larger size of __tls_get_addr_opt stub.
  2586. 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
  2587. PR ld/16572
  2588. * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
  2589. ELF_ARM_HASENTRY.
  2590. (elf32_arm_print_private_bfd_data): Likewise.
  2591. 2015-03-06 Nick Clifton <nickc@redhat.com>
  2592. PR binutils/17765
  2593. * elflink.c (put_value): Like previous delta, but for the 32-bit
  2594. case.
  2595. 2015-03-05 Nick Clifton <nickc@redhat.com>
  2596. PR binutils/17765
  2597. * elflink.c (put_value): Avoid using an undefined shift
  2598. operation.
  2599. 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
  2600. PR ld/pr15228
  2601. PR ld/pr17709
  2602. * elf-bfd.h (elf_backend_data): Add extern_protected_data.
  2603. * elf32-i386.c (elf_backend_extern_protected_data): New.
  2604. Defined to 1.
  2605. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
  2606. * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
  2607. copy relocs against protected symbols if extern_protected_data
  2608. is true.
  2609. (_bfd_elf_symbol_refs_local_p): Don't return true on protected
  2610. non-function symbols if extern_protected_data is true.
  2611. * elfxx-target.h (elf_backend_extern_protected_data): New.
  2612. Default to 0.
  2613. (elfNN_bed): Initialize extern_protected_data with
  2614. elf_backend_extern_protected_data.
  2615. 2015-03-05 Nick Clifton <nickc@redhat.com>
  2616. PR binutils/18025
  2617. * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
  2618. lookup fails, check for an address bias in the dwarf info, and if
  2619. one exists, retry the lookup with the biased value.
  2620. * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
  2621. Determines if a bias exists bewteen the addresses of functions
  2622. based on DWARF information vs symbol table information.
  2623. * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
  2624. * libbfd.h: Regenerate.
  2625. 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2626. * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
  2627. (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
  2628. (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
  2629. 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2630. * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
  2631. (aarch64_size_one_stub): Likewise.
  2632. (aarch64_map_one_stub): Likewise.
  2633. 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
  2634. * cpu-s390.c (N): New macro.
  2635. (bfd_s390_31_arch): New. Define only if default target word size
  2636. is 64 bits. Otherwise define...
  2637. (bfd_390_64_arch): ...this. Make static.
  2638. (bfd_s390_arch): Define according to the default target word size.
  2639. Let the 'next' field point to the alternate arch.
  2640. 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
  2641. PR gas/17843
  2642. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
  2643. R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
  2644. to be used with MOVK rather than MOVZ.
  2645. 2015-03-03 DJ Delorie <dj@redhat.com>
  2646. * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
  2647. there's a symbol.
  2648. 2015-02-28 Alan Modra <amodra@gmail.com>
  2649. * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
  2650. not PLT_NEW.
  2651. 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
  2652. * elf32-i386.c (need_convert_mov_to_lea): New.
  2653. (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
  2654. (elf_i386_convert_mov_to_lea): Return TRUE if
  2655. need_convert_mov_to_lea is unset.
  2656. * elf64-x86-64.c (need_convert_mov_to_lea): New.
  2657. (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
  2658. (elf_x86_64_convert_mov_to_lea): Return TRUE if
  2659. need_convert_mov_to_lea is unset.
  2660. 2015-02-27 Nick Clifton <nickc@redhat.com>
  2661. PR binutils/17910
  2662. * coffgen.c (_bfd_coff_internal_syment_name): Only check for
  2663. string length overflow when the string table length is actually
  2664. set.
  2665. 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2666. * bfd-in2.h: Regenerate.
  2667. * libbfd.h: Regenerate.
  2668. 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2669. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
  2670. TLSDESC_LD_PREL19 field width and masks.
  2671. (aarch64_tls_transition_without_check)
  2672. (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
  2673. (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
  2674. (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
  2675. BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
  2676. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
  2677. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  2678. 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2679. * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
  2680. tests.
  2681. (aarch64_tls_transition_without_check)
  2682. (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
  2683. (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
  2684. (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
  2685. BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
  2686. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
  2687. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  2688. * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
  2689. 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2690. * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
  2691. (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
  2692. (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
  2693. (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
  2694. (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
  2695. BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
  2696. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
  2697. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  2698. * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
  2699. 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2700. * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
  2701. (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
  2702. (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
  2703. (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
  2704. (elfNN_aarch64_check_relocs): Handle
  2705. BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
  2706. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
  2707. (_bfd_aarch64_elf_resolve_relocation): Likewise.
  2708. 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2709. * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
  2710. 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2711. * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
  2712. (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
  2713. (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
  2714. width.
  2715. 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
  2716. * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
  2717. field width.
  2718. 2015-02-26 Nick Clifton <nickc@redhat.com>
  2719. PR binutils/17512
  2720. * coffcode.h (coff_compute_section_file_positions): Report
  2721. negative page sizes.
  2722. * elf.c (elf_fake_sections): Handle excessive alignmment powers.
  2723. (assign_file_positions_for_non_load_sections): Replace assertion
  2724. with an error message.
  2725. (rewrite_elf_program_header): Handle excessive segment
  2726. alignments.
  2727. * mach-o.c (bfd_mach_o_read_section_32): Likewise.
  2728. (bfd_mach_o_read_section_64): Likewise.
  2729. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
  2730. print a bfd name, not %A.
  2731. 2015-02-26 Alan Modra <amodra@gmail.com>
  2732. * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
  2733. thread-safe stubs for iplt.
  2734. (build_tls_get_addr_stub): Restore r2 immediately after call.
  2735. 2015-02-26 Terry Guo <terry.guo@arm.com>
  2736. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
  2737. merge Tag_ABI_HardFP_use.
  2738. 2015-02-26 Alan Modra <amodra@gmail.com>
  2739. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
  2740. Use text relocs rather than giving an error on trying to use
  2741. .dynbss for protected shared lib vars.
  2742. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
  2743. 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
  2744. * elf32-avr.c (struct elf_avr_section_data): New structure.
  2745. (struct avr_relax_info): New structure.
  2746. (elf_avr_new_section_hook): New function.
  2747. (struct elf_avr_section_data): Add relax_info.
  2748. (get_avr_relax_info): New function.
  2749. (init_avr_relax_info): New function.
  2750. (elf32_avr_relax_delete_bytes): Find next property record before
  2751. deleting bytes. When deleting don't move bytes beyond the next
  2752. property record.
  2753. (avr_elf32_assign_records_to_section): New function.
  2754. (avr_property_record_compare): New function.
  2755. (avr_load_all_property_sections): New function.
  2756. (elf32_avr_relax_section): Load property data. After relaxing the
  2757. section, move any .align directives that have enough deleted bytes
  2758. before them.
  2759. (bfd_elf32_new_section_hook): Define.
  2760. 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
  2761. * elf32-avr.h (struct avr_property_header): New strucure.
  2762. (avr_elf32_load_property_records): Declare.
  2763. (avr_elf32_property_record_name): Declare.
  2764. * elf32-avr.c: Add bfd_stdint.h include.
  2765. (retrieve_local_syms): New function.
  2766. (get_elf_r_symndx_section): New function.
  2767. (get_elf_r_symndx_offset): New function.
  2768. (internal_reloc_compare): New function.
  2769. (struct avr_find_section_data): New structure.
  2770. (avr_is_section_for_address): New function.
  2771. (avr_find_section_for_address): New function.
  2772. (avr_elf32_load_records_from_section): New function.
  2773. (avr_elf32_load_property_records): New function.
  2774. (avr_elf32_property_record_name): New function.
  2775. 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
  2776. * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
  2777. (AVR_PROPERTY_RECORDS_VERSION): Define.
  2778. (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
  2779. (struct avr_property_record): New structure.
  2780. 2015-02-24 Nick Clifton <nickc@redhat.com>
  2781. * elf32-v850.c (v850_set_note): New function. Creates a Renesas
  2782. style note entry.
  2783. (v850_elf_make_note_section): New function. Creates a note
  2784. section.
  2785. (v850_elf_create_sections): New function. Create a note section
  2786. if one is not already present.
  2787. (v850_elf_set_note): New function. Adds a note to a bfd.
  2788. (v850_elf_copy_private_bfd_data): New function. Copies V850
  2789. notes.
  2790. (v850_elf_merge_notes): New function. Merges V850 notes.
  2791. (print_v850_note): New function. Displays a V850 note.
  2792. (v850_elf_print_notes): New function. Displays all notes attached
  2793. to a bfd.
  2794. (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
  2795. (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
  2796. (v850_elf_fake_sections): Set the type of the V850 note section.
  2797. * bfd-in.h (v850_elf_create_sections): Add prototype.
  2798. (v850_elf_set_note): Add prototype.
  2799. * bfd-in2.h: Regenerate.
  2800. 2015-02-24 Nick Clifton <nickc@redhat.com>
  2801. * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
  2802. * configure: Regenerate.
  2803. * config.in: Regenerate.
  2804. * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
  2805. (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
  2806. (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
  2807. is defined.
  2808. 2015-02-24 Nick Clifton <nickc@redhat.com>
  2809. * pdp11.c (set_section_contents): Pad the .text and .data sections
  2810. to their aligned sizes.
  2811. 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
  2812. * config.bfd: Add h8300-*-linux.
  2813. * configure.ac: Add h8300_elf32_linux_vec.
  2814. * configure: Regenerate.
  2815. * elf32-h8300.c: Likewise.
  2816. * targets.c(_bfd_target_vector): Likewise.
  2817. 2015-02-23 Nick Clifton <nickc@redhat.com>
  2818. PR 17914
  2819. * cpu-w65.c: Correct typos in license notice.
  2820. PR 17940
  2821. * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
  2822. symbols at end of sections. Adjust function sizes.
  2823. 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
  2824. * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
  2825. (elfcore_write_s390_vxrs_high): Likewise.
  2826. * elf.c (elfcore_grok_s390_vxrs_low): New function.
  2827. (elfcore_grok_s390_vxrs_high): New function.
  2828. (elfcore_grok_note): Call them.
  2829. (elfcore_write_s390_vxrs_low): New function.
  2830. (elfcore_write_s390_vxrs_high): New function.
  2831. (elfcore_write_register_note): Call them.
  2832. 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
  2833. PR 17995
  2834. * verilog.c (verilog_write_record): Correct buffer size.
  2835. 2015-02-19 Alan Modra <amodra@gmail.com>
  2836. * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
  2837. 2015-02-19 Alan Modra <amodra@gmail.com>
  2838. PR ld/4317
  2839. * elflink.c (elf_link_input_bfd): Drop undefined local syms.
  2840. (elf_link_output_extsym): Drop local and global undefined syms.
  2841. Tidy. Expand comment.
  2842. 2015-02-17 Alan Modra <amodra@gmail.com>
  2843. PR ld/17975
  2844. * elflink.c (struct elf_outext_info): Remove need_second_pass
  2845. and second_pass.
  2846. (elf_link_output_extsym): Delete code handling second forced
  2847. local pass. Move code emitting NULL STT_FILE symbol later, so
  2848. that it can be omitted if forced local is stripped. Don't
  2849. emit the NULL STT_FILE if no file symbols have been output.
  2850. (bfd_elf_final_link): Remove second forced local pass.
  2851. * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
  2852. (ppc_elf_size_dynamic_sections): Likewise.
  2853. * elf64-ppc.c (ppc_build_one_stub): Likewise.
  2854. (build_global_entry_stubs): Likewise.
  2855. (ppc64_elf_build_stubs): Likewise.
  2856. 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
  2857. PR ld/17975
  2858. * elflink.c (elf_link_output_extsym): Only check filesym_count
  2859. when outputting a NULL FILE symbol. Set second_pass_sym to
  2860. h->forced_local && !h->root.linker_def.
  2861. 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
  2862. * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
  2863. on _TLS_MODULE_BASE_.
  2864. * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
  2865. 2015-02-15 Alan Modra <amodra@gmail.com>
  2866. * dwarf2.c (read_rangelist): Correct buffer overflow check
  2867. Whitespace throughout file.
  2868. 2015-02-14 Alan Modra <amodra@gmail.com>
  2869. PR ld/17973
  2870. * bfd.c (struct bfd): Add lto_output.
  2871. * linker.c (_bfd_handle_already_linked): Explicitly test for
  2872. objects added by the lto plugin.
  2873. * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
  2874. no_export flags from archive.
  2875. * archive.c (open_nested_file): New function, setting lto_output
  2876. and no_export, extracted from..
  2877. (find_nested_archive): ..here. Flip params. Rename from
  2878. _bfd_find_nested_archive.
  2879. (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
  2880. (_bfd_look_for_bfd_in_cache): Copy no_export.
  2881. * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
  2882. my_archive->no_export test.
  2883. (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
  2884. Don't use the file name when adding lto_output STT_FILE sym.
  2885. * bfd-in2.h: Regenerate.
  2886. 2015-02-13 Alan Modra <amodra@gmail.com>
  2887. PR binutils/17512
  2888. * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
  2889. now redundant assert.
  2890. 2015-02-12 Nick Clifton <nickc@redhat.com>
  2891. PR binutils/17512
  2892. * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
  2893. (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
  2894. (read_indirect_string, read_alt_indirect_string)
  2895. (read_alt_indirect_ref, read_address, read_abbrevs)
  2896. (read_attribute_value, read_attribute, decode_line_info)
  2897. (find_abstract_instance_name, read_rangelist)
  2898. (scan_unit_for_symbols, parse_comp_unit)
  2899. (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
  2900. end pointers to reading functions and check for offsets taking
  2901. pointers out of range. Replace calls to read_*_leb128 with calls
  2902. to safe_read_leb128.
  2903. (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
  2904. offset.
  2905. * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
  2906. computed file_name address being before the start of the string
  2907. table.
  2908. 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
  2909. PR ld/17878
  2910. * bfd.c (bfd_plugin_format): New.
  2911. (bfd): Add plugin_format and plugin_dummy_bfd.
  2912. * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
  2913. argument to return TRUE if any plugin is found. Set plugin_format.
  2914. (has_plugin): New.
  2915. (bfd_plugin_target_p): New.
  2916. (bfd_plugin_specified_p): Likewise.
  2917. (bfd_plugin_target_p): Likewise.
  2918. (register_ld_plugin_object_p): Likewise.
  2919. (bfd_plugin_set_plugin): Set has_plugin.
  2920. (load_plugin): Cache try_load_plugin result.
  2921. (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
  2922. plugin_format.
  2923. * plugin.h (bfd_plugin_target_p): New.
  2924. (bfd_plugin_specified_p): Likewise.
  2925. (register_ld_plugin_object_p): Likewise.
  2926. * bfd-in2.h: Regenerated.
  2927. 2015-02-11 Pedro Alves <palves@redhat.com>
  2928. * libbfd-in.h [__cplusplus]: Open extern "C" scope.
  2929. * libcoff-in.h [__cplusplus]: Open extern "C" scope.
  2930. * libbfd.h: Regenerate.
  2931. * libcoff.h: Regenerate.
  2932. * elf-bfd.h [__cplusplus]: Wrap in extern "C".
  2933. * mach-o.h [__cplusplus]: Wrap in extern "C".
  2934. * som.h [__cplusplus]: Wrap in extern "C".
  2935. 2015-02-10 Nick Clifton <nickc@redhat.com>
  2936. PR binutils/17512
  2937. * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
  2938. hold the flag bits.
  2939. * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
  2940. size and number of relocs.
  2941. (pe_print_debugdata): Use a 32-bit aligned buffer to store the
  2942. codeview record.
  2943. * versados.c (process_otr): Check the esdid value before using it
  2944. to access the EDATA.
  2945. 2015-02-09 Ed Maste <emaste@freebsd.org>
  2946. * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
  2947. uninitialized and unused variable.
  2948. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
  2949. 2015-02-09 Alan Modra <amodra@gmail.com>
  2950. * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
  2951. tls_sec.
  2952. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
  2953. * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
  2954. 2015-02-09 Alan Modra <amodra@gmail.com>
  2955. * elflink.c: Whitespace, formatting fixes.
  2956. (elf_link_input_bfd): Clarify comment.
  2957. (elf_link_output_extsym): Exclude symbols in linker created
  2958. sections when testing for plugin symbols.
  2959. 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
  2960. PR ld/17935
  2961. * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
  2962. warning for relocation in readonly section for -z text.
  2963. (elf_i386_size_dynamic_sections): Likewise.
  2964. * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
  2965. (elf_x86_64_size_dynamic_sections): Likewise.
  2966. 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
  2967. PR ld/12365
  2968. PR ld/14272
  2969. * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
  2970. (elf_link_input_bfd): Mark the plugin symbol undefined if it is
  2971. referenced from a non-IR file.
  2972. 2015-02-06 Nick Clifton <nickc@redhat.com>
  2973. PR binutils/17512
  2974. * peXXigen.c (rsrc_print_resource_entries): Add range check for
  2975. addresses that wrap around the address space.
  2976. (rsrc_parse_entry): Likewise.
  2977. 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
  2978. PR ld/12365
  2979. PR ld/14272
  2980. * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
  2981. undefined if it is referenced from a non-IR file.
  2982. 2015-02-03 Nick Clifton <nickc@redhat.com>
  2983. PR binutils/17512
  2984. * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
  2985. (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
  2986. index or an out of range fdr index.
  2987. * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
  2988. * elf32-arc.c (arc_info_to_howto_rel): Likewise.
  2989. * elf32-avr.c (avr_info_to_howto_rela): Likewise.
  2990. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
  2991. * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
  2992. * elf32-cris.c (cris_info_to_howto_rela): Likewise.
  2993. * elf32-crx.c (elf_crx_info_to_howto): Likewise.
  2994. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
  2995. * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
  2996. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
  2997. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
  2998. * elf32-frv.c (frv_info_to_howto_rela): Likewise.
  2999. * elf32-i370.c (i370_elf_info_to_howto): Likewise.
  3000. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
  3001. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
  3002. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
  3003. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
  3004. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
  3005. * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
  3006. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
  3007. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
  3008. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
  3009. * elf32-mep.c (mep_info_to_howto_rela): Likewise.
  3010. * elf32-metag.c (metag_info_to_howto_rela): Likewise.
  3011. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
  3012. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
  3013. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
  3014. * elf32-mt.c (mt_info_to_howto_rela): Likewise.
  3015. * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
  3016. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
  3017. * elf32-pj.c (pj_elf_info_to_howto): Likewise.
  3018. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
  3019. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
  3020. * elf32-rx.c (rx_info_to_howto_rela): Likewise.
  3021. * elf32-sh.c (sh_elf_info_to_howto): Likewise.
  3022. * elf32-spu.c (spu_elf_info_to_howto): Likewise.
  3023. * elf32-v850.c (v850_elf_perform_relocation): Likewise.
  3024. * elf32-vax.c (rtype_to_howto): Likewise.
  3025. * elf32-visium.c (visium_info_to_howto_rela): Likewise.
  3026. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
  3027. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
  3028. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
  3029. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
  3030. * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
  3031. (bfd_mach_o_canonicalize_one_reloc): Fix check on out
  3032. of range symbol indicies.
  3033. (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
  3034. (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
  3035. (bfd_mach_o_build_dysymtab): Likewise.
  3036. (bfd_mach_o_write_symtab_content): Set the string table size to
  3037. zero upon error.
  3038. (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
  3039. read fails.
  3040. * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
  3041. fields.
  3042. * tekhex.c (first_phase): Check for src pointer reaching end of
  3043. buffer.
  3044. 2015-02-03 Will Newton <will.newton@linaro.org>
  3045. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
  3046. Set st_value to zero for undefined symbols if the reference
  3047. is weak or pointer_equality_needed is FALSE.
  3048. * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
  3049. comment discussing why we clear st_value for some symbols.
  3050. 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
  3051. * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
  3052. (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
  3053. 2015-01-29 Alan Modra <amodra@gmail.com>
  3054. * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
  3055. optimization. Tidy mask for GOT_TLSGD optimization.
  3056. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
  3057. location of nop zapping high insn too.
  3058. 2015-01-28 Alan Modra <amodra@gmail.com>
  3059. * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
  3060. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
  3061. in .toc indicate xlc compiled code that might require a rw .toc.
  3062. 2015-01-28 James Bowman <james.bowman@ftdichip.com>
  3063. * Makefile.am: Add FT32 files.
  3064. * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
  3065. (bfd_mach_ft32): Define.
  3066. (bfd_ft32_arch): Declare.
  3067. (bfd_archures_list): Add bfd_ft32_arch.
  3068. * config.bfd: Handle FT32.
  3069. * configure.ac: Likewise.
  3070. * cpu-ft32.c: New file.
  3071. * elf32-ft32.c: New file.
  3072. * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
  3073. BFD_RELOC_FT32_18): Define.
  3074. * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
  3075. * bfd-in2.h: Regenerate.
  3076. * libbfd.h: Regenerate.
  3077. * Makefile.in: Regenerate.
  3078. * configure: Regenerate.
  3079. * po/SRC-POTFILES.in: Regenerate.
  3080. 2015-01-27 Nick Clifton <nickc@redhat.com>
  3081. PR binutils/17512
  3082. * pdp11.c (aout_get_external_symbols): Return false if there are
  3083. no symbols.
  3084. * dwarf2.c (concat_filename): Check for an empty directory table.
  3085. (scan_unit_for_symbols): Check for reading off the end of the
  3086. unit.
  3087. (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
  3088. non-string form.
  3089. * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
  3090. available.
  3091. 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
  3092. * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
  3093. 2015-01-22 DJ Delorie <dj@redhat.com>
  3094. * elf32-m32c.c (m32c_apply_reloc_24): New.
  3095. (m32c_elf_howto_table): Use it for R_M32C_24.
  3096. (m32c_elf_relocate_section): Handle R_M32C_24 specially.
  3097. 2015-01-22 Nick Clifton <nickc@redhat.com>
  3098. PR binutils/17512
  3099. * coffcode.h (handle_COMDAT): When searching for the section
  3100. symbol, make sure that there is space left in the symbol table.
  3101. * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
  3102. 2015-01-21 Nick Clifton <nickc@redhat.com>
  3103. PR binutils/17512
  3104. * coffcode.h (coff_set_arch_mach_hook): Check return value from
  3105. bfd_malloc.
  3106. (coff_slurp_line_table): Return FALSE if the line number
  3107. information was corrupt.
  3108. (coff_slurp_symbol_table): Return FALSE if the symbol information
  3109. was corrupt.
  3110. * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
  3111. initialise the fields of the dyld_info structure.
  3112. (bfd_mach_o_build_exec_seg_command): Replace assertion with an
  3113. error message and a return value.
  3114. (bfd_mach_o_layout_commands): Change the function to boolean.
  3115. Return FALSE if the function fails.
  3116. (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
  3117. fails.
  3118. (bfd_mach_o_read_command): Fail if an unrecognised command is
  3119. encountered.
  3120. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
  3121. read fails.
  3122. (slurp_symtab): Check the return from bfd_malloc.
  3123. (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
  3124. encountered an error.
  3125. (_bfd_XXi_final_link_postscript): Fail if a section could not be
  3126. copied.
  3127. * peicode.h (pe_bfd_object_p): Fail if the header could not be
  3128. swapped in.
  3129. * tekhex.c (first_phase): Fail if the section is too big.
  3130. * versados.c (struct esdid): Add content_size field.
  3131. (process_otr): Use and check the new field.
  3132. (versados_get_section_contents): Check that the section exists and
  3133. that the requested data is available.
  3134. 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
  3135. * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
  3136. 2015-01-20 Alan Modra <amodra@gmail.com>
  3137. PR ld/17615
  3138. * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
  3139. ELF_COMMON_DEF syms.
  3140. 2015-01-19 Alan Modra <amodra@gmail.com>
  3141. PR ld/17615
  3142. * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
  3143. linker script assignments too.
  3144. * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
  3145. (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
  3146. 2015-01-19 Alan Modra <amodra@gmail.com>
  3147. * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
  3148. to allow return of first howto.
  3149. * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
  3150. * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
  3151. * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
  3152. * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
  3153. * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
  3154. * elf32-rx.c (rx_reloc_type_lookup): Likewise.
  3155. * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
  3156. * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
  3157. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
  3158. * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
  3159. * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
  3160. (spu_elf_reloc_type_lookup): Adjust to suit.
  3161. 2015-01-19 Alan Modra <amodra@gmail.com>
  3162. * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
  3163. (bfd_get_section_limit): ..here.
  3164. * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
  3165. (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
  3166. * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
  3167. * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
  3168. bfd_reloc_outofrange check.
  3169. * bfd-in2.h: Regenerate.
  3170. * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
  3171. on zero size relocs.
  3172. * ecoff.c (ecoff_reloc_link_order): Likewise.
  3173. * elf32-nds32.c (nds32_relocate_contents): Likewise.
  3174. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  3175. * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
  3176. (_bfd_clear_contents): Likewise.
  3177. * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
  3178. (mips_elf_perform_relocation): Likewise.
  3179. * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
  3180. from malloc on zero size alloc.
  3181. * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
  3182. * elflink.c (elf_reloc_link_order): Likewise.
  3183. * linker.c (_bfd_generic_reloc_link_order): Likewise.
  3184. * pdp11.c (aout_link_reloc_link_order): Likewise.
  3185. * xcofflink.c (xcoff_reloc_link_order): Likewise.
  3186. * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
  3187. bitsize 0, and complain_overflow_dont.
  3188. * coff-sparc.c (coff_sparc_howto_table): Likewise.
  3189. * elf-hppa.h (elf_hppa_howto_table): Likewise.
  3190. * elf-m10200.c (elf_mn10200_howto_table): Likewise.
  3191. * elf-m10300.c (elf_mn10300_howto_table): Likewise.
  3192. * elf32-arc.c (elf_arc_howto_table): Likewise.
  3193. * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
  3194. * elf32-avr.c (elf_avr_howto_table): Likewise.
  3195. * elf32-bfin.c (bfin_howto_table): Likewise.
  3196. * elf32-cr16.c (cr16_elf_howto_table): Likewise.
  3197. * elf32-cris.c (cris_elf_howto_table): Likewise.
  3198. * elf32-crx.c (crx_elf_howto_table): Likewise.
  3199. * elf32-d10v.c (elf_d10v_howto_table): Likewise.
  3200. * elf32-d30v.c (elf_d30v_howto_table): Likewise.
  3201. * elf32-dlx.c (dlx_elf_howto_table): Likewise.
  3202. * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
  3203. * elf32-fr30.c (fr30_elf_howto_table): Likewise.
  3204. * elf32-frv.c (elf32_frv_howto_table): Likewise.
  3205. * elf32-h8300.c (h8_elf_howto_table): Likewise.
  3206. * elf32-i370.c (i370_elf_howto_raw): Likewise.
  3207. * elf32-i386.c (elf_howto_table): Likewise.
  3208. * elf32-i860.c (elf32_i860_howto_table): Likewise.
  3209. * elf32-i960.c (elf32_i960_relocate): Likewise.
  3210. * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
  3211. * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
  3212. * elf32-lm32.c (lm32_elf_howto_table): Likewise.
  3213. * elf32-m32c.c (m32c_elf_howto_table): Likewise.
  3214. * elf32-m32r.c (m32r_elf_howto_table): Likewise.
  3215. * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
  3216. * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
  3217. * elf32-m68k.c (howto_table): Likewise.
  3218. * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
  3219. * elf32-mep.c (mep_elf_howto_table): Likewise.
  3220. * elf32-metag.c (elf_metag_howto_table): Likewise.
  3221. * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
  3222. * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
  3223. * elf32-moxie.c (moxie_elf_howto_table): Likewise.
  3224. * elf32-msp430.c (elf_msp430_howto_table): Likewise.
  3225. * elf32-mt.c (mt_elf_howto_table): Likewise.
  3226. * elf32-nds32.c (nds32_elf_howto_table): Likewise.
  3227. * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
  3228. * elf32-or1k.c (or1k_elf_howto_table): Likewise.
  3229. * elf32-pj.c (pj_elf_howto_table): Likewise.
  3230. * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
  3231. * elf32-rl78.c (rl78_elf_howto_table): Likewise.
  3232. * elf32-rx.c (rx_elf_howto_table): Likewise.
  3233. * elf32-s390.c (elf_howto_table): Likewise.
  3234. * elf32-score.c (elf32_score_howto_table): Likewise.
  3235. * elf32-score7.c (elf32_score_howto_table): Likewise.
  3236. * elf32-sh-relocs.h (R_SH_NONE): Likewise.
  3237. * elf32-spu.c (elf_howto_table): Likewise.
  3238. * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
  3239. * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
  3240. * elf32-v850.c (v850_elf_howto_table): Likewise.
  3241. * elf32-vax.c (howto_table): Likewise.
  3242. * elf32-visium.c (visium_elf_howto_table): Likewise.
  3243. * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
  3244. * elf32-xgate.c (elf_xgate_howto_table): Likewise.
  3245. * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
  3246. * elf32-xtensa.c (elf_howto_table): Likewise.
  3247. * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
  3248. * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
  3249. * elf64-mmix.c (elf_mmix_howto_table): Likewise.
  3250. * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
  3251. * elf64-s390.c (elf_howto_table): Likewise.
  3252. * elf64-sh64.c (sh_elf64_howto_table): Likewise.
  3253. * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
  3254. * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
  3255. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
  3256. (elfNN_aarch64_howto_none): Likewise.
  3257. * elfxx-ia64.c (ia64_howto_table): Likewise.
  3258. * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
  3259. * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
  3260. * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
  3261. 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
  3262. PR ld/17847
  3263. * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
  3264. about -fPIC if the symbol is undefined when building executable.
  3265. 2015-01-15 Nick Clifton <nickc@redhat.com>
  3266. PR binutils/17512
  3267. * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
  3268. error message. Never return an invalid howto pointer.
  3269. * elf32-cr16.c (cr16_info_to_howto): Likewise.
  3270. * elf32-crx.c (elf_crx_info_to_howto): Likewise.
  3271. * elf32-i370.c (i370_elf_info_to_howto): Likewise.
  3272. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
  3273. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
  3274. * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
  3275. * elf32-pj.c (pj_elf_info_to_howto): Likewise.
  3276. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
  3277. * elf32-spu.c (spu_elf_info_to_howto): Likewise.
  3278. * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
  3279. * elf32-vax.c (rtype_to_howto): Likewise.
  3280. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
  3281. * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
  3282. * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
  3283. * elf32-sh.c (sh_elf_info_to_howto): Likewise.
  3284. (sh_elf_reloc): Check that the reloc is in range.
  3285. * reloc.c (bfd_perform_relocation): Check that the section is big
  3286. enough for the entire reloc.
  3287. (bfd_generic_get_relocated_section_contents): Report unexpected
  3288. return values from perform_reloc.
  3289. 2015-01-15 Nick Clifton <nickc@redhat.com>
  3290. * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
  3291. relocs. Include PC-relative adjustment for R_MSP430X_ABS16
  3292. relaxation.
  3293. 2015-01-15 Alan Modra <amodra@gmail.com>
  3294. * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
  3295. any output section matching a linker created dynobj section.
  3296. 2015-01-15 Alan Modra <amodra@gmail.com>
  3297. PR 17842
  3298. * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
  3299. (bfd_elf_final_link): Always create a symbol table when emit_relocs.
  3300. Don't assign symtab file position unless symbols will be output.
  3301. Merge blocks with condition in common. Don't call
  3302. elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
  3303. unless other symbols are output. Move assignment of symtab_shndx
  3304. file position. Localize variable.
  3305. 2015-01-14 Jiong Wang <jiong.wang@arm.com>
  3306. * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
  3307. trying to defer them to runtime.
  3308. 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
  3309. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
  3310. to check if a symbol should be bound symbolically.
  3311. 2015-01-13 Jiong Wang <jiong.wang@arm.com>
  3312. * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
  3313. for TLSLE_MOVW_TPREL_G2.
  3314. 2015-01-13 Jiong Wang <jiong.wang@arm.com>
  3315. PR ld/17415
  3316. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
  3317. R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
  3318. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
  3319. bit mask.
  3320. 2015-01-12 Terry Guo <terry.guo@arm.com>
  3321. * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
  3322. function.
  3323. (_bfd_elf_gc_mark_extra_sections): Use it.
  3324. 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
  3325. PR ld/17827
  3326. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
  3327. only discard space for pc-relative relocs symbols which turn
  3328. out to need copy relocs.
  3329. 2015-01-09 Nick Clifton <nickc@redhat.com>
  3330. * tekhex.c (getvalue): Fix thinko in test for correct extraction
  3331. of value.
  3332. (getsym): Return false if there was not enough data to extract the
  3333. symbol.
  3334. 2015-01-09 Anthony Green <green@moxielogic.com>
  3335. * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
  3336. 2015-01-08 Nick Clifton <nickc@redhat.com>
  3337. * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
  3338. 16-bit absolute BR instructions to 10-bit pc-relative JMP
  3339. instructions.
  3340. 2015-01-08 Nick Clifton <nickc@redhat.com>
  3341. PR binutils/17512
  3342. * coffcode.h (coff_slurp_symbol_table): Return false if we failed
  3343. to load the line table.
  3344. * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
  3345. maxpagesize of 1.
  3346. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
  3347. the Data Directory Size is too large.
  3348. 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
  3349. PR binutils/17512
  3350. * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
  3351. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
  3352. 2015-01-06 Nick Clifton <nickc@redhat.com>
  3353. PR binutils/17512
  3354. * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
  3355. string table.
  3356. * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
  3357. (bfd_perform_relocation): Include the size of the reloc in the
  3358. test for an out of range relocation.
  3359. (bfd_generic_get_relocated_section_contents): Remove reloc range
  3360. test.
  3361. * coff-i860.c (CALC_ADDEND): Always set an addend value.
  3362. * tekhex.c (getvalue): Add an end pointer parameter. Use it to
  3363. avoid reading off the end of the buffer.
  3364. (getsym): Likewise.
  3365. (first_phase): Likewise.
  3366. (pass_over): Pass an end pointer to the invoked function.
  3367. 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
  3368. PR binutils/17512
  3369. * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
  3370. input.
  3371. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
  3372. 2015-01-05 Nick Clifton <nickc@redhat.com>
  3373. PR binutils/17512
  3374. * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
  3375. is at least big enough for the header to be read.
  3376. * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
  3377. * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
  3378. (bfd_mach_o_read_command): Prevetn duplicate error messages about
  3379. unrecognized commands.
  3380. * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
  3381. when indexing into the string table.
  3382. 2015-01-01 Alan Modra <amodra@gmail.com>
  3383. Update year range in copyright notice of all files.
  3384. For older changes see ChangeLog-2014
  3385. Copyright (C) 2015 Free Software Foundation, Inc.
  3386. Copying and distribution of this file, with or without modification,
  3387. are permitted in any medium without royalty provided the copyright
  3388. notice and this notice are preserved.
  3389. Local Variables:
  3390. mode: change-log
  3391. left-margin: 8
  3392. fill-column: 74
  3393. version-control: never
  3394. End: