ChangeLog-2019 115 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185
  1. 2019-12-31 Alan Modra <amodra@gmail.com>
  2. * vms-alpha.c (_bfd_vms_slurp_eisd): Don't overflow when checking
  3. offset. Don't overflow when checking rec_size, and do allow
  4. rec_size to the end of the buffer. Ensure eisd->type can be
  5. accessed, not just the first 32 bytes. Don't call
  6. _bfd_vms_save_counted_string with zero length remaining. Fail
  7. on empty string section name.
  8. (_bfd_vms_slurp_egsd): Formatting. Catch more reads past end
  9. of record size. Correct remaining length calculation. Fail
  10. on empty string section name. Consolidate error paths.
  11. 2019-12-30 Alan Modra <amodra@gmail.com>
  12. * vms-alpha.c (alpha_vms_free_private): New function, extracted..
  13. (vms_close_and_cleanup): ..from here.
  14. (alpha_vms_object_p): Call alpha_vms_free_private on failure.
  15. 2019-12-30 Alan Modra <amodra@gmail.com>
  16. * coffgen.c (coff_real_object_p): Free malloc'd memory on failure.
  17. 2019-12-30 Alan Modra <amodra@gmail.com>
  18. * archive.c (do_slurp_bsd_armap): Use bfd_alloc rather than
  19. bfd_zalloc when memory is all written after the call.
  20. (do_slurp_coff_armap): Likewise. Set bfd_error on ridiculously
  21. large allocations that overflow bfd_size_type. Use just one
  22. bfd_release on error exit.
  23. (_bfd_slurp_extended_name_table): Use bfd_alloc for extended_names,
  24. clear last byte rather than the entire array. Use bfd_alloc for
  25. string table. Rearrange and simplify code copying file names.
  26. 2019-12-29 Alan Modra <amodra@gmail.com>
  27. * vms-alpha.c (_bfd_vms_slurp_egsd): Make base_addr a bfd_vma.
  28. Limit alignment power. Correct and simplify alignment expression.
  29. (evax_bfd_print_relocation_records): Avoid signed shift left.
  30. 2019-12-29 Alan Modra <amodra@gmail.com>
  31. * vms-misc.c (_bfd_vms_save_sized_string): Add abfd param, make
  32. size a size_t. Use bfd_alloc rather than bfd_malloc.
  33. (_bfd_vms_save_counted_string): Similarly.
  34. * vms.h (_bfd_vms_save_sized_string): Update prototype.
  35. (_bfd_vms_save_counted_string): Likewise.
  36. * vms-alpha.c (_bfd_vms_slurp_ehdr): Adjust
  37. _bfd_vms_save_counted_string and bfd_vms_save_sized_string calls.
  38. (_bfd_vms_slurp_egsd, parse_module): Likewise.
  39. (_bfd_vms_slurp_eisd): Likewise. Check return status.
  40. (alpha_vms_bfd_link_hash_table_free): New function.
  41. (alpha_vms_bfd_link_hash_table_create): Arrange to call it.
  42. (vms_close_and_cleanup): Free more memory. Don't release tdata.
  43. 2019-12-29 Alan Modra <amodra@gmail.com>
  44. * coffcode.h (coff_close_and_cleanup): Redefine to..
  45. * coffgen.c (_bfd_coff_close_and_cleanup): ..this. New function.
  46. * libcoff-in.h (_bfd_coff_close_and_cleanup): Declare.
  47. * libcoff.h: Regenerate.
  48. 2019-12-29 Hannes Domani <ssbssa@yahoo.de>
  49. Alan Modra <amodra@gmail.com>
  50. PR 15350
  51. * bfd.c (bfd_update_compression_header): Write zlib header for
  52. formats other than ELF too.
  53. 2019-12-26 Alan Modra <amodra@gmail.com>
  54. * som.c (setup_sections): Don't overflow space_strings_size. Use
  55. bfd_malloc2 to catch overflow of size calculation.
  56. (som_prep_for_fixups): Use bfd_zalloc2 to catch overflow of size
  57. calculation.
  58. (som_build_and_write_symbol_table): Similarly use bfd_zmalloc2.
  59. (som_slurp_symbol_table): Similarly use bfd_zmalloc2, bfd_malloc2,
  60. and bfd_zalloc2.
  61. (bfd_som_attach_aux_hdr): Use size_t vars for string length.
  62. (som_bfd_count_ar_symbols): Use bfd_malloc2 to catch overflow of
  63. size calculation. Use size_t vars for length and catch overflow.
  64. (som_slurp_armap): Use bfd_alloc2 to catch overflow of size
  65. calculation.
  66. (som_bfd_ar_write_symbol_stuff): Similarly use bfd_zmalloc2 and
  67. bfd_malloc2. Perform size calculations in bfd_size_type.
  68. 2019-12-26 Hannes Domani <ssbssa@yahoo.de>
  69. * peicode.h (pe_bfd_read_buildid): Free data.
  70. 2019-12-23 Alan Modra <amodra@gmail.com>
  71. * vms-alpha.c (add_symbol): Add "max" parameter. Error on string
  72. length larger than max.
  73. (_bfd_vms_slurp_egsd): Ensure record is at least large enough to
  74. read string length byte, error if not. Pass size to add_symbol.
  75. (_bfd_vms_slurp_etir): Don't read past end of buffer when reading
  76. type and length. Allow read of last byte in buffer.
  77. 2019-12-23 Alan Modra <amodra@gmail.com>
  78. * wasm-module.c (wasm_read_leb128): Don't allow oversize shifts.
  79. Catch value overflow. Sign extend only on terminating byte.
  80. 2019-12-20 Alan Modra <amodra@gmail.com>
  81. * xtensa-isa.c (xtensa_insnbuf_from_chars): Avoid signed overflow.
  82. 2019-12-20 Alan Modra <amodra@gmail.com>
  83. * libhppa.h (hppa_field_adjust, bfd_hppa_insn2fmt): Delete forward
  84. declaration. Move ATTRIBUTE_UNUSED to definition.
  85. (sign_extend, low_sign_extend, sign_unext, low_sign_unext),
  86. (re_assemble_3, re_assemble_12, re_assemble_14, re_assemble_16),
  87. (re_assemble_17, re_assemble_21, re_assemble_22): Likewise. Make
  88. args and return value unsigned. Use unsigned variables.
  89. (hppa_rebuild_insn): Similarly.
  90. 2019-12-20 Alan Modra <amodra@gmail.com>
  91. * format.c (bfd_check_format_matches): Free matching_vector when
  92. not returning matching target strings.
  93. 2019-12-20 Alan Modra <amodra@gmail.com>
  94. * coff-alpha.c (alpha_ecoff_read_ar_hdr): Free ar_hdr on error return.
  95. 2019-12-18 Alan Modra <amodra@gmail.com>
  96. * coff-rs6000.c (_bfd_xcoff_slurp_armap): Don't overflow when
  97. checking symbol count against section size. Guard against strlen
  98. running off end of buffer by allocating one more byte and zeroing.
  99. * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
  100. 2019-12-18 Alan Modra <amodra@gmail.com>
  101. * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Use size_t for vars.
  102. * elf64-ppc.c (sym_exists_at): Use size_t for lo, hi and mid.
  103. 2019-12-18 Alan Modra <amodra@gmail.com>
  104. * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): Avoid signed overflow.
  105. * elf32-hppa.c (final_link_relocate): Likewise.
  106. * elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): Likewise.
  107. (_bfd_elf_ppc_at_tprel_transform, is_insn_ds_form): Likewise.
  108. (is_insn_dq_form, ppc_elf_relocate_section): Likewise.
  109. * elf64-ppc.c (ok_lo_toc_insn, ppc64_elf_edit_toc): Likewise.
  110. (ppc64_elf_relocate_section): Likewise.
  111. * elfxx-mips.c (mips_elf_perform_relocation): Likewise.
  112. * netbsd.h (N_SET_FLAGS): Likewise.
  113. 2019-12-17 Alan Modra <amodra@gmail.com>
  114. * coff-tic80.c: Delete file.
  115. * cpu-tic80.c: Delete file.
  116. * archures.c: Remove tic80 support.
  117. * coffcode.h: Likewise.
  118. * coffswap.h: Likewise.
  119. * targets.c: Likewise.
  120. * config.bfd: Likewise.
  121. * configure.ac: Likewise.
  122. * Makefile.am: Likewise.
  123. * Makefile.in: Regenerate.
  124. * bfd-in2.h: Regenerate.
  125. * configure: Regenerate.
  126. * po/SRC-POTFILES.in: Regenerate.
  127. 2019-12-13 Alan Modra <amodra@gmail.com>
  128. PR 25237
  129. * elf.c: (assign_file_positions_for_load_sections): Attempt to
  130. keep meaningless p_offset for PT_LOAD segments without file
  131. contents within file size.
  132. 2019-12-12 Alan Modra <amodra@gmail.com>
  133. * libbfd.c (bfd_get): Don't cast result of bfd_get_8.
  134. * bfd-in2.h: Regenerate.
  135. 2019-12-11 Alan Modra <amodra@gmail.com>
  136. * elf32-rx.c (elf32_rx_relax_section): Avoid signed overflow.
  137. * libaout.h (N_SET_INFO, N_SET_FLAGS): Likewise.
  138. * netbsd.h (write_object_contents): Likewise.
  139. * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
  140. * libhppa.h (HPPA_R_CONSTANT): Don't signed extend with shifts.
  141. (stm32l4xx_create_replacing_stub_vldm): Don't truncate high bits
  142. with shifts.
  143. * elf32-nds32.h (R_NDS32_RELAX_ENTRY_DISABLE_RELAX_FLAG): Define
  144. using 1u shifted left. Ditto for other macros.
  145. * mmo.c (LOP): Make unsigned.
  146. 2019-12-11 Alan Modra <amodra@gmail.com>
  147. * libbfd.c (bfd_get_8): Return a bfd_vma.
  148. (bfd_get_signed_8): Return a bfd_signed_vma.
  149. * bfd-in2.h: Regenerate.
  150. 2019-12-11 Alan Modra <amodra@gmail.com>
  151. * xtensa-modules.c (Field_* functions): Don't mask using shifts.
  152. (Operand_soffsetx4_decode, Operand_simm4_decode),
  153. (Operand_simm8_decode, Operand_simm8x256_decode),
  154. (Operand_simm12b_decode, Operand_label8_decode),
  155. (Operand_label12_decode, Operand_soffset_decode),
  156. (Operand_xt_wbr15_label_decode, Operand_xt_wbr18_label_decode): Don't
  157. sign extend using shifts.
  158. (Operand_immrx4_decode, Operand_uimm16x4_decode): Avoid UB in
  159. constant.
  160. 2019-12-11 Alan Modra <amodra@gmail.com>
  161. * cpu-ia64-opc.c (ext_imms_scaled): Avoid undefined left shift
  162. of negative values by using unsigned vars.
  163. 2019-12-07 Alan Modra <amodra@gmail.com>
  164. PR 25236
  165. * elflink.c (_bfd_elf_link_assign_sym_version): Assign versions
  166. for ELF_COMMON_DEF_P symbols.
  167. (elf_link_output_extsym, _bfd_elf_add_default_symbol): Adjust to
  168. suit.
  169. 2019-12-05 Sandra Loosemore <sandra@codesourcery.com>
  170. Only give FDE encoding warnings if --eh-frame-hdr was specified.
  171. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Make
  172. FDE encoding warning conditional.
  173. 2019-12-05 Nick Clifton <nickc@redhat.com>
  174. PR 25029
  175. * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Ignore empty sections
  176. when computing the sizes stored in the headers.
  177. 2019-12-03 Alan Modra <amodra@gmail.com>
  178. PR 25230
  179. * dwarf2.c (struct dwarf2_debug_file): Add line_table and
  180. abbrev_offsets.
  181. (struct abbrev_offset_entry): New.
  182. (hash_abbrev, eq_abbrev, del_abbrev): New functions.
  183. (read_abbrevs): Check whether we have already read abbrevs at
  184. given offset, and add new offset/abbrev to hash table.
  185. (decode_line_info): Keep line table at offset zero in file struct.
  186. Return this for a cu reusing the same dir/file list.
  187. (find_abstract_instance): Find cu for DW_FORM_GNU_ref_alt.
  188. (_bfd_dwarf2_slurp_debug_info): Create offset/abbrev hash tables.
  189. (_bfd_dwarf2_cleanup_debug_info): Adjust deletion of lines and
  190. abbrevs.
  191. 2019-12-03 Alan Modra <amodra@gmail.com>
  192. PR 25230
  193. * dwarf2.c (struct dwarf2_debug_file): New struct.
  194. (struct dwarf2_debug): Delete fields now in dwarf2_debug_file.
  195. Add f, alt fields.
  196. (struct comp_unit): Add file field.
  197. (read_indirect_string, read_indirect_line_string): Adjust to suit.
  198. (read_alt_indirect_string, read_alt_indirect_ref): Likewise.
  199. (read_debug_ranges, find_abstract_instance, read_rangelist): Likewise.
  200. (_bfd_dwarf2_stash_syms, place_sections): Likewise.
  201. (stash_maybe_update_info_hash_tablse): Likewise.
  202. (stash_verify_info_hash_table): Likewise.
  203. (_bfd_dwarf2_slurp_debug_info): Likewise.
  204. (_bfd_dwarf2_find_symbol_bias): Likewise.
  205. (_bfd_dwarf2_find_nearest_line): Likewise.
  206. (_bfd_dwarf2_cleanup_debug_info): Likewise.
  207. (read_abbrevs): Add file param and adjust. Update calls.
  208. (stash_comp_unit): Likewise.
  209. (decode_line_info): Delete stash param and adjust. Update calls.
  210. (comp_unit_find_nearest_line): Likewise.
  211. (comp_unit_maybe_decode_line_info): Likewise.
  212. (comp_unit_find_line): Likewise.
  213. (parse_comp_unit): Add file and info_ptr param and adjust. Update
  214. calls.
  215. 2019-12-03 Alan Modra <amodra@gmail.com>
  216. * dwarf2.c (read_indirect_string): Don't duplicate offset check
  217. done in read_section.
  218. (read_indirect_line_string): Likewise.
  219. (read_alt_indirect_string): Likewise.
  220. (read_alt_indirect_ref): Likewise.
  221. (read_abbrevs): Likewise. Free memory on all failure paths.
  222. Use correct unsigned type for pointer difference comparison.
  223. 2019-12-03 Alan Modra <amodra@gmail.com>
  224. * dwarf2.c (struct dwarf2_debug): Update comments. Remove sec
  225. and sec_info_ptr.
  226. (_bfd_dwarf2_slurp_debug_info): Don't set sec or sec_info_ptr.
  227. (stash_comp_unit): Likewise.
  228. (read_alt_indirect_ref): Return NULL not FALSE.
  229. 2019-12-03 Alan Modra <amodra@gmail.com>
  230. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Correct function comment.
  231. 2019-11-27 Alan Modra <amodra@gmail.com>
  232. PR 23652
  233. * dwarf2.c (_bfd_dwarf2_stash_syms): Break out of loop on finding
  234. matching section.
  235. (_bfd_dwarf2_find_nearest_line): Return an int, with value 2 when
  236. returning info from the symbol table. Do the _bfd_elf_find_function
  237. search also when !found. Call _bfd_dwarf2_stash_syms regardless of
  238. symbols.
  239. * elf64-alpha.c (elf64_alpha_find_nearest_line): Accept dwarf2
  240. result of 1 only.
  241. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
  242. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
  243. * libbfd.h: Regenerate.
  244. 2019-11-27 Alan Modra <amodra@gmail.com>
  245. PR 23652
  246. * dwarf2.c (_bfd_dwarf2_stash_syms): New function.
  247. (_bfd_dwarf2_find_nearest_line): Use it here, passing syms to
  248. _bfd_elf_find_function. Call _bfd_elf_find_function in cases
  249. where _bfd_elf_find_nearest_line would do so.
  250. * elf.c (_bfd_elf_find_nearest_line): Omit _bfd_elf_find_function
  251. for dwarf2.
  252. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly. Tidy.
  253. * elf32-arm.c (elf32_arm_maybe_function_sym): New function.
  254. (elf_backend_maybe_function_sym): Define.
  255. (arm_elf_find_function, elf32_arm_find_nearest_line): Delete.
  256. (bfd_elf32_find_nearest_line): Don't define.
  257. * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): New function.
  258. (elf_backend_maybe_function_sym): Define.
  259. (aarch64_elf_find_function, elfNN_aarch64_find_nearest_line): Delete.
  260. (bfd_elfNN_find_nearest_line): Don't define.
  261. 2019-11-27 Alan Modra <amodra@gmail.com>
  262. * elf32-sh.c (sh_reloc): Use a bfd_vma insn.
  263. (sh_reloc <R_SH_IND12W>): Divide calculated relocation value
  264. by two before applying to insn. Correct overflow test.
  265. * coff-sh.c (sh_reloc): Likewise.
  266. 2019-11-26 Nick Clifton <nickc@redhat.com>
  267. * elf32-sh.c (sh_elf_reloc): Use a signed_vma when checking for a
  268. negative relocated value.
  269. * coff-sh.c (sh_reloc): Likewise.
  270. 2019-11-25 Alan Modra <amodra@gmail.com>
  271. * archures.c (bfd_octets_per_byte): Tail call
  272. bfd_arch_mach_octets_per_byte.
  273. * coff-arm.c (OCTETS_PER_BYTE): Define.
  274. (coff_arm_reloc): Introduce new "octets" temp. Use OCTETS_PER_BYTE
  275. with section. Correct "addr". Remove ATTRIBUTE_UNUSED.
  276. * coff-i386.c (coff_i386_reloc): Similarly.
  277. * coff-mips.c (mips_reflo_reloc): Similarly.
  278. * coff-x86_64.c (coff_amd64_reloc): Similarly.
  279. * elf32-msp430.c (OCTETS_PER_BYTE): Define.
  280. (rl78_sym_diff_handler): Use OCTETS_PER_BYTE, with section.
  281. * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Similarly.
  282. * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Similarly.
  283. * elf32-pru.c (pru_elf32_do_ldi32_relocate): Similarly.
  284. * elf32-s12z.c (opru18_reloc): Similarly.
  285. * elf32-sh.c (sh_elf_reloc): Similarly.
  286. * elf32-spu.c (spu_elf_rel9): Similarly.
  287. * elf32-xtensa.c (bfd_elf_xtensa_reloc): Similarly.
  288. * elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc),
  289. (ppc64_elf_toc64_reloc): Similarly.
  290. * bfd.c (bfd_get_section_limit): Pass section to bfd_octets_per_byte.
  291. * cofflink.c (_bfd_coff_link_input_bfd),
  292. (_bfd_coff_reloc_link_order): Likewise.
  293. * elf.c (_bfd_elf_section_offset): Likewise.
  294. * elflink.c (resolve_section, bfd_elf_perform_complex_relocation),
  295. (elf_link_input_bfd, elf_reloc_link_order, elf_fixup_link_order),
  296. (bfd_elf_final_link): Likewise.
  297. * elf.c (_bfd_elf_make_section_from_shdr): Don't strncmp twice
  298. to set SEC_ELF_OCTETS.
  299. * reloc.c (bfd_perform_relocation): Tidy SEC_ELF_OCTETS special case.
  300. (bfd_install_relocation): Likewise.
  301. (_bfd_final_link_relocate): Don't recalculate octets.
  302. * syms.c (_bfd_stab_section_find_nearest_line): Introduc new
  303. "octets" temp.
  304. * bfd-in2.h: Regenerate.
  305. 2019-11-25 Christian Eggers <ceggers@gmx.de>
  306. * section.c (struct bfd_section): New flag SEC_ELF_OCTETS.
  307. * archures.c (bfd_octets_per_byte): New parameter sec.
  308. If section is not NULL and SEC_ELF_OCTETS is set, one octet es
  309. returned [ELF targets only].
  310. * bfd.c (bfd_get_section_limit): Provide section parameter to
  311. bfd_octets_per_byte.
  312. * bfd-in2.h: regenerate.
  313. * binary.c (binary_set_section_contents): Move call to
  314. bfd_octets_per_byte into section loop. Provide section parameter
  315. to bfd_octets_per_byte.
  316. * coff-arm.c (coff_arm_reloc): Provide section parameter
  317. to bfd_octets_per_byte.
  318. * coff-i386.c (coff_i386_reloc): likewise.
  319. * coff-mips.c (mips_reflo_reloc): likewise.
  320. * coff-x86_64.c (coff_amd64_reloc): likewise.
  321. * cofflink.c (_bfd_coff_link_input_bfd): likewise.
  322. (_bfd_coff_reloc_link_order): likewise.
  323. * elf.c (_bfd_elf_section_offset): likewise.
  324. (_bfd_elf_make_section_from_shdr): likewise.
  325. Set SEC_ELF_OCTETS for sections with names .gnu.build.attributes,
  326. .debug*, .zdebug* and .note.gnu*.
  327. * elf32-msp430.c (rl78_sym_diff_handler): Provide section parameter
  328. to bfd_octets_per_byte.
  329. * elf32-nds.c (nds32_elf_get_relocated_section_contents): likewise.
  330. * elf32-ppc.c (ppc_elf_addr16_ha_reloc): likewise.
  331. * elf32-pru.c (pru_elf32_do_ldi32_relocate): likewise.
  332. * elf32-s12z.c (opru18_reloc): likewise.
  333. * elf32-sh.c (sh_elf_reloc): likewise.
  334. * elf32-spu.c (spu_elf_rel9): likewise.
  335. * elf32-xtensa.c (bfd_elf_xtensa_reloc): likewise
  336. * elf64-ppc.c (ppc64_elf_brtaken_reloc): likewise.
  337. (ppc64_elf_addr16_ha_reloc): likewise.
  338. (ppc64_elf_toc64_reloc): likewise.
  339. * elflink.c (bfd_elf_final_link): likewise.
  340. (bfd_elf_perform_complex_relocation): likewise.
  341. (elf_fixup_link_order): likewise.
  342. (elf_link_input_bfd): likewise.
  343. (elf_link_sort_relocs): likewise.
  344. (elf_reloc_link_order): likewise.
  345. (resolve_section): likewise.
  346. * linker.c (_bfd_generic_reloc_link_order): likewise.
  347. (bfd_generic_define_common_symbol): likewise.
  348. (default_data_link_order): likewise.
  349. (default_indirect_link_order): likewise.
  350. * srec.c (srec_set_section_contents): likewise.
  351. (srec_write_section): likewise.
  352. * syms.c (_bfd_stab_section_find_nearest_line): likewise.
  353. * reloc.c (_bfd_final_link_relocate): likewise.
  354. (bfd_generic_get_relocated_section_contents): likewise.
  355. (bfd_install_relocation): likewise.
  356. For section which have SEC_ELF_OCTETS set, multiply output_base
  357. and output_offset with bfd_octets_per_byte.
  358. (bfd_perform_relocation): likewise.
  359. 2019-11-21 Alan Modra <amodra@gmail.com>
  360. * elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library
  361. BFDs that have not been loaded.
  362. 2019-11-19 Alan Modra <amodra@gmail.com>
  363. PR 25197
  364. * coffgen.c (coff_find_nearest_line_with_names): Check that C_FILE
  365. u.syment.n_value does point at another C_FILE sym and not into
  366. some auxent that happens to look like a C_FILE. Properly check
  367. for integer overflow and avoid possible pointer wrap-around.
  368. Simplify pr17512 checks.
  369. 2019-11-19 Alan Modra <amodra@gmail.com>
  370. PR 25200
  371. * reloc.c (bfd_default_reloc_type_lookup): Don't BFD_FAIL.
  372. * elf.c (_bfd_elf_validate_reloc): Don't segfault on NULL howto.
  373. 2019-11-18 Alan Modra <amodra@gmail.com>
  374. * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>):
  375. Rename from elf_backend_post_process_headers.
  376. (_bfd_elf_post_process_headers): Delete.
  377. (_bfd_elf_init_file_header): Declare.
  378. * elf.c (_bfd_elf_compute_section_file_positions): Call new function
  379. in place of prep_headers and elf_backend_post_process_headers.
  380. (_bfd_elf_init_file_header): Renamed from prep_headers with
  381. updated args and made global. Delete dead code.
  382. (_bfd_elf_post_process_headers): Delete.
  383. * elf32-arm.c (elf32_arm_init_file_header): Rename from
  384. elf32_arm_post_process_headers and call _bfd_elf_init_file_header.
  385. Return status.
  386. (elf_backend_init_file_header): Define.
  387. (elf_backend_post_process_headers): Don't define.
  388. * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly.
  389. * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly.
  390. * elf32-metag.c (elf_metag_init_file_header): Similarly.
  391. * elf32-spu.c (spu_elf_init_file_header
  392. * elf32-visium.c (visium_elf_init_file_header
  393. * elf64-alpha.c (elf64_alpha_fbsd_init_file_header
  394. * elf64-hppa.c (elf64_hppa_init_file_header
  395. * elf64-ia64-vms.c (elf64_vms_init_file_header
  396. * elfnn-aarch64.c (elfNN_aarch64_init_file_header
  397. * elfnn-ia64.c (elfNN_hpux_init_file_header
  398. * elfxx-mips.c (_bfd_mips_init_file_header
  399. * elfxx-mips.h (_bfd_mips_post_process_headers): Delete.
  400. (_bfd_mips_init_file_header): Declare.
  401. (elf_backend_post_process_headers): Delete.
  402. (elf_backend_init_file_header): Define.
  403. * elfxx-target.h (elf_backend_post_process_headers): Delete.
  404. (elf_backend_init_file_header): Define and use.
  405. * elf32-m68hc12.c (elf_backend_init_file_header): Define.
  406. (elf_backend_post_process_headers): Don't define.
  407. * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete.
  408. (elf32_m68hc11_init_file_header): Declare.
  409. * elf32-ppc.c (elf_backend_post_process_headers): Remove
  410. unnecessary undef.
  411. 2019-11-18 Alan Modra <amodra@gmail.com>
  412. * elf-bfd.h (struct elf_backend_data <elf_backend_modify_headers>):
  413. Rename from elf_backend_modify_program_headers.
  414. (_bfd_elf_modify_headers): Declare.
  415. * elf.c (assign_file_positions_except_relocs): Set
  416. elf_program_header_size. Always call elf_backend_modify_headers.
  417. Extract code modifying file header..
  418. (_bfd_elf_modify_headers): ..to here. New function.
  419. * elf32-arm.c (elf_backend_modify_headers): Renamed from
  420. elf_backend_modify_program_headers.
  421. * elf32-i386.c: Similarly.
  422. * elf64-x86-64.c: Similarly.
  423. * elfxx-target.h: Similarly. Default elf_backend_modify_headers
  424. to _bfd_elf_modify_headers.
  425. * elf-nacl.h (nacl_modify_headers): Rename from
  426. nacl_modify_program_headers.
  427. * elf-nacl.c (nacl_modify_headers): Rename from
  428. nacl_modify_program_headers and call _bfd_elf_modify_headers.
  429. * elf32-rx.c (elf32_rx_modify_headers): Similarly.
  430. * elf32-spu.c (spu_elf_modify_headers): Similarly.
  431. * elfnn-ia64.c (elfNN_ia64_modify_headers): Similarly.
  432. * elf32-sh.c (elf_backend_modify_program_headers): Don't undef.
  433. 2019-11-18 Alan Modra <amodra@gmail.com>
  434. PR 25196
  435. * bfd.c (bfd_error_type): Add bfd_error_sorry.
  436. (bfd_errmsgs): Likewise.
  437. * elf.c (rewrite_elf_program_header): Don't abort on confused
  438. lma/alignment. Replace bfd_error_bad_value with bfd_error_sorry.
  439. (_bfd_elf_validate_reloc): Use bfd_error_sorry.
  440. (_bfd_elf_final_write_processing): Likewise.
  441. * bfd-in2.h: Regenerate.
  442. 2019-11-12 Jim Wilson <jimw@sifive.com>
  443. PR 25181
  444. * elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
  445. foff. If sym_sec->output_section and sec->output_section are the same
  446. and not *ABS* then set max_alignment to that section's alignment.
  447. 2019-11-07 Alan Modra <amodra@gmail.com>
  448. * cpu-cr16c.c: Delete.
  449. * elf32-cr16c.c: Delete.
  450. * Makefile.am,
  451. * archures.c,
  452. * config.bfd,
  453. * configure.ac,
  454. * reloc.c,
  455. * targets.c: Remove cr16c support.
  456. * Makefile.in,
  457. * bfd-in2.h,
  458. * configure,
  459. * libbfd.h,
  460. * po/SRC-POTFILES.in: Regenerate.
  461. 2019-11-05 Tim Rühsen <tim.ruehsen@gmx.de>
  462. * doc/chew.c (add_to_definition): Use correct type when
  463. calculating size of array reallocation.
  464. (nextword): Always initialise the word return parameter.
  465. (compile): Check return value of nextword().
  466. 2019-10-30 Keith Seitz <keiths@redhat.com>
  467. * elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
  468. New field.
  469. (_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
  470. New functions.
  471. (elf_read_notes): Add declaration.
  472. * elf.c (elf_read_notes): Move elf-bfd.h.
  473. (_bfd_elf_core_find_build_id): New function.
  474. (bfd_section_from_phdr): Scan core file PT_LOAD segments for
  475. build-id if none is known.
  476. (elf_parse_notes): For core files, scan for notes.
  477. * elfcore.h (elf_core_file_matches_executable_p): If both
  478. BFDs have identical build-ids, then they match.
  479. (_bfd_elf_core_find_build_id): New function.
  480. * elfxx-target.h (elf_backend_core_find_build_id): Define.
  481. (elfNN_bed): Add elf_backend_core_find_build_id.
  482. 2019-10-29 Andrew Eikum <aeikum@codeweavers.com>
  483. * libcoff-in.h (struct pe_tdata): Add dos_message field.
  484. * libcoff.h: Regenerate.
  485. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
  486. dos_message field rather than initialising it.
  487. (_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
  488. field.
  489. * peicode.h (pe_mkobject): Initialise the dos_message field.
  490. (pe_mkobject_hook): Copy the dos_message field.
  491. (pe_bfd_object_p): Copy the dos_message field.
  492. 2019-10-25 Alan Modra <amodra@gmail.com>
  493. PR 4499
  494. * elf-nacl.c (nacl_modify_segment_map): Set no_sort_lma for all
  495. PT_LOAD segments.
  496. * elf32-spu.c (spu_elf_modify_segment_map): Likewise on overlay
  497. PT_LOAD segments.
  498. * elf.c (elf_sort_segments): New function.
  499. (assign_file_positions_except_relocs): Use shortcuts to elfheader
  500. and elf_tdata. Seek to e_phoff not sizeof_ehdr to write program
  501. headers. Move PT_PHDR check..
  502. (assign_file_positions_for_non_load_sections): ..and code setting
  503. PT_PHDR p_vaddr and p_paddr, and code setting __ehdr_start value..
  504. (assign_file_positions_for_load_sections): ..to here. Sort
  505. PT_LOAD headers. Delete header_pad code. Use actual number of
  506. headers rather than allocated in calculating size for program
  507. headers. Don't assume program headers follow ELF file header.
  508. Simplify pt_load_count code. Only set "off" for PT_LOAD or
  509. PT_NOTE in cores.
  510. (rewrite_elf_program_header): Set p_vaddr_offset for segments
  511. that include file and program headers.
  512. (copy_elf_program_header): Likewise, replacing header_size code.
  513. 2019-10-21 Alan Modra <amodra@gmail.com>
  514. PR 452
  515. * archive.c (normalize): Return file unchanged when
  516. BFD_ARCHIVE_FULL_PATH.
  517. (_bfd_construct_extended_name_table): Pass abfd, the output
  518. bfd, to normalize.
  519. (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
  520. * bfd.c (struct bfd): Make flags a full flagword.
  521. (BFD_ARCHIVE_FULL_PATH): Define.
  522. * bfd-in2.h: Regenerate.
  523. 2019-10-20 John David Anglin <danglin@gcc.gnu.org>
  524. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Provide 8-byte
  525. minimum alignment for .plt section.
  526. 2019-10-19 John David Anglin <danglin@gcc.gnu.org>
  527. * elf32-hppa.c: Revise import stub sequences.
  528. (LONG_BRANCH_STUB_SIZE): Define.
  529. (LONG_BRANCH_SHARED_STUB_SIZE): Define.
  530. (IMPORT_STUB_SIZE): Define.
  531. (IMPORT_SHARED_STUB_SIZE): Define.
  532. (EXPORT_STUB_SIZE): Define.
  533. (plt_stub): Revise to not use register %r22.
  534. (LDO_R1_R22): Define.
  535. (LDW_R22_R21): Define.
  536. (LDW_R22_R19): Define.
  537. (hppa_build_one_stub): Update stub generation and use new defines.
  538. (hppa_size_one_stub): Likewise.
  539. 2019-10-17 Nelson Chu <nelson.chu@sifive.com>
  540. * elfnn-riscv.c (riscv_elf_relocate_section): Report the error message
  541. that user should recompile their code with `fPIC` when linking non-pic
  542. code into shared library.
  543. * elfnn-riscv.c (riscv_elf_relocate_section): Use asprintf to extend
  544. the error message if needed, and then store the result into the
  545. `msg_buf`. Finally, remember to free the unused `msg_buf`. All error
  546. message for the dangerous relocation should be set before we call the
  547. callback function. If we miss the error message since linker runs out
  548. of memory, we should set the default error message for the error.
  549. 2019-10-16 Alan Modra <amodra@gmail.com>
  550. PR 13616
  551. * cpu-powerpc.c (bfd_arch_ppc_nop_fill): New function, use it
  552. for all ppc arch info.
  553. * linker.c (default_data_link_order): Pass info->big_endian to
  554. arch_info->fill function.
  555. 2019-10-15 Alan Modra <amodra@gmail.com>
  556. * elf32-m68hc1x.c (reloc_warning): Add printf attribute.
  557. (elf32_m68hc11_relocate_section): Don't use a variable for format
  558. strings. Delete some unnecessary xgettext:c-format comments.
  559. 2019-10-15 Alan Modra <amodra@gmail.com>
  560. PR 24955
  561. * elf32-arm.c (set_cmse_veneer_addr_from_implib): Use bfd_malloc
  562. rather than xmalloc.
  563. * elf32-m68hc1x.c (reloc_warning): New function.
  564. (elf32_m68hc11_relocate_section): Use it here. Cast bfd_vma values
  565. corresponding to %lx in format strings.
  566. * elf32-nds32.c (nds32_insertion_sort): Use a stack temporary.
  567. 2019-10-15 Alan Modra <amodra@gmail.com>
  568. PR 25100
  569. * elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
  570. 2019-10-15 Alan Modra <amodra@gmail.com>
  571. * bfd.c (bfd_check_compression_header): Check for powers of two
  572. with x == (x & -x).
  573. 2019-10-14 Alan Modra <amodra@gmail.com>
  574. * syms.c (struct indexentry): Add idx field.
  575. (cmpindexentry): Final sort on idx.
  576. (_bfd_stab_section_find_nearest_line): Set idx.
  577. 2019-10-14 Alan Modra <amodra@gmail.com>
  578. * dwarf2.c (struct lookup_funcinfo): Add idx field.
  579. (compare_lookup_funcinfos): Perform final sort on idx.
  580. (build_lookup_funcinfo_table): Set idx.
  581. (compare_sequences): Perform final sort on num_lines.
  582. (build_line_info_table): Set num_lines and line_info_lookup earlier.
  583. (sort_line_sequences): Set num_lines for sort.
  584. 2019-10-14 Alan Modra <amodra@gmail.com>
  585. * elflink.c (elf_sort_symbol): Sort on type and name as well.
  586. (elf_link_add_object_symbols): Style fix.
  587. 2019-10-14 Alan Modra <amodra@gmail.com>
  588. * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
  589. for sections about to be sorted.
  590. (assign_file_positions_for_load_sections): Likewise.
  591. (elf_sort_sections): Don't bother optimising both TOEND case.
  592. * elflink.c (bfd_elf_final_link): Reset target_index.
  593. 2019-10-14 Alan Modra <amodra@gmail.com>
  594. * elflink.c (elf_get_linked_section_vma): Delete.
  595. (compare_link_order): Use elf_linked_to_section and sort by lma,
  596. size, and id.
  597. (elf_fixup_link_order): Use size_t variables where appropriate.
  598. Make use of elf_linked_to_section. Formatting. Properly align
  599. sections.
  600. 2019-10-14 Alan Modra <amodra@gmail.com>
  601. * elf-strtab.c (strrevcmp): Comment.
  602. * merge.c (strrevcmp): Likewise.
  603. * elf64-ppc.c (compare_symbols): Correct final pointer comparison.
  604. Comment on why comparing pointers ensures a stable sort.
  605. * elflink.c (struct elf_symbol): Add void* to union.
  606. (elf_sort_elf_symbol): Ensure a stable sort with pointer comparison.
  607. (elf_sym_name_compare): Likewise.
  608. (bfd_elf_match_symbols_in_sections): Style fix.
  609. (elf_link_sort_cmp1): Comment.
  610. 2019-10-14 Alan Modra <amodra@gmail.com>
  611. PR 24955
  612. * elflink.c (elf_output_implib): Don't use xmalloc. Don't ignore
  613. return value of bfd_alloc2.
  614. * peXXigen.c (_bfd_XXi_write_codeview_record): Don't use xmalloc.
  615. * pef.c (bfd_pef_print_symbol): Likewise. Don't ignore return
  616. value of bfd_get_section_contents.
  617. * som.c (som_write_space_strings): Don't use xmalloc.
  618. (som_write_symbol_strings): Likewise.
  619. 2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
  620. * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
  621. stash->info_hash_status = STASH_INFO_HASH_ON when
  622. stash_maybe_update_info_hash_tables succeeds.
  623. 2019-10-09 Alan Modra <amodra@gmail.com>
  624. PR 25070
  625. * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
  626. total_size calculation.
  627. 2019-10-08 Alan Modra <amodra@gmail.com>
  628. PR 25078
  629. * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
  630. recur_count. Error on recur_count reaching 100 rather than
  631. info_ptr matching orig_info_ptr. Adjust calls.
  632. 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  633. * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
  634. (elf32_msp430_merge_msp430_attributes): Add support for merging
  635. the GNU object attribute for data region.
  636. 2019-10-07 Alan Modra <amodra@gmail.com>
  637. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
  638. space for local got non-tls relocs when PIE.
  639. 2019-10-07 Alan Modra <amodra@gmail.com>
  640. * elflink.c (elf_fixup_link_order): Don't attempt to find
  641. an elf_section for linker created bfd sections.
  642. 2019-10-07 Alan Modra <amodra@gmail.com>
  643. * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
  644. with non-local symbol. Don't double count __tls_get_addr calls
  645. with marker relocs.
  646. * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
  647. 2019-10-07 Alan Modra <amodra@gmail.com>
  648. * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
  649. throughout.
  650. * elf64-ppc.c (nomark_tls_get_addr): Likewise.
  651. 2019-10-04 Alan Modra <amodra@gmail.com>
  652. * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
  653. (ppc64_elf_tls_optimize): Correct is_local condition.
  654. (allocate_got): Don't reserve dynamic relocations for any of the
  655. tls got relocs in PIEs when the symbol is local.
  656. (allocate_dynrelocs): Correct validity test for local sym using
  657. tlsld_got slot.
  658. (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
  659. for any of the tls got relocs in PIEs.
  660. (ppc64_elf_layout_multitoc): Likewise.
  661. (ppc64_elf_relocate_section): Correct validity test for local sym
  662. using tlsld_got slot. Don't emit dynamic relocations for any of
  663. the tls got relocs in PIEs when the symbol is local.
  664. * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
  665. (got_relocs_needed): Delete.
  666. (allocate_dynrelocs): Correct validity test for local sym using
  667. tlsld_got slot. Don't reserve dynamic relocations for any of the
  668. tls got relocs in PIEs when the symbol is local.
  669. (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
  670. for any of the tls got relocs in PIEs.
  671. (ppc_elf_relocate_section): Correct validity test for local sym
  672. using tlsld_got slot. Don't emit dynamic relocations for any of
  673. the tls got relocs in PIEs when the symbol is local.
  674. 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
  675. PR ld/22263
  676. PR ld/25056
  677. * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
  678. bfd_link_pic for TLS checks.
  679. (elf32_arm_final_link_relocate): Likewise.
  680. (allocate_dynrelocs_for_symbol): Likewise.
  681. 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
  682. PR ld/25062
  683. * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
  684. 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
  685. * elf-bfd.h (bfd_section_is_ctf): New inline function.
  686. * elf.c (special_sections_c): Add ".ctf".
  687. (assign_file_positions_for_non_load_sections): Note that
  688. compressed debugging sections etc are not assigned here. Treat
  689. CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
  690. sh_offset -1.
  691. (assign_file_positions_except_relocs): Likewise.
  692. (find_section_in_list): Note that debugging and CTF sections, as
  693. well as reloc sections, are assigned later.
  694. (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
  695. their size and contents updated.
  696. (_bfd_elf_set_section_contents): Skip CTF sections: unlike
  697. compressed sections, they have no uncompressed content to copy at
  698. this stage.
  699. * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
  700. callback right before the strtab is written out.
  701. (bfd_elf_final_link): Don't cache the section contents of CTF
  702. sections: they are not populated yet. Call the emit_ctf callback
  703. right at the end, after all the symbols and strings are flushed
  704. out.
  705. 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
  706. * elf-strtab.c (_bfd_elf_strtab_len): New.
  707. (_bfd_elf_strtab_str): Likewise.
  708. * bfd-elf.h: Declare them.
  709. 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
  710. * elf-bfd.h (bfd_elf_get_str_section): Add.
  711. * elf.c (bfd_elf_get_str_section): No longer static.
  712. 2019-09-26 Alan Modra <amodra@gmail.com>
  713. PR 24262
  714. * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
  715. * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
  716. ${bindir}/../lib/bfd-plugins if different.
  717. * Makefile.in: Regenerate.
  718. 2019-09-23 Alan Modra <amodra@gmail.com>
  719. * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
  720. in choosing between different actions for shared library and
  721. non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
  722. (dec_dynrel_count): Likewise. Account for ifunc special case.
  723. (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
  724. not non-pic.
  725. (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
  726. test.
  727. 2019-09-23 Alan Modra <amodra@gmail.com>
  728. * Makefile.am (SOURCE_HFILES): Add many missing .h files.
  729. * Makefile.in: Regenerate.
  730. * po/SRC-POTFILES.in: Regenerate.
  731. 2019-09-23 Alan Modra <amodra@gmail.com>
  732. * bfd-in.h (bfd_symbol, bfd_section_already_linked),
  733. (bfd_elf_version_tree): Delete forward declarations.
  734. Move other forward decls and remaining elf function decl later.
  735. (bfd_section_already_linked_table_init),
  736. (bfd_section_already_linked_table_free),
  737. (_bfd_handle_already_linked, _bfd_nearby_section),
  738. (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
  739. 2019-09-23 Alan Modra <amodra@gmail.com>
  740. * bfd-in.h: Move ecoff function declarations..
  741. * ecoff-bfd.h: ..to here, new file.
  742. * ecoff.c: Include ecoff-bfd.h.
  743. * ecofflink.c: Likewise.
  744. * elf64-alpha.c: Likewise.
  745. * elfxx-mips.c: Likewise.
  746. * bfd-in2.h: Regenerate.
  747. 2019-09-23 Alan Modra <amodra@gmail.com>
  748. * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
  749. Move most other elf declarations..
  750. * elf-bfd.h: ..to here.
  751. * bfd-in2.h: Regenerate.
  752. 2019-09-23 Alan Modra <amodra@gmail.com>
  753. * bfd-in.h: Move m68k function declaration..
  754. * cpu-m68k.h: ..to here, new file..
  755. * elf32-m68k.h: ..and here, new file.
  756. * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
  757. * bfd-in2.h: Regenerate.
  758. 2019-09-23 Alan Modra <amodra@gmail.com>
  759. * bfd-in.h: Move bfin function declaration..
  760. * elf32-bfin.h: ..to here, new file.
  761. * elf32-bfin.c: Include elf32-bfin.h.
  762. * bfd-in2.h: Regenerate.
  763. 2019-09-23 Alan Modra <amodra@gmail.com>
  764. * bfd-in.h: Move cr16 function declaration..
  765. * elf32-cr16.h: ..to here, new file.
  766. * elf32-cr16.c: Include elf32-cr16.h.
  767. * bfd-in2.h: Regenerate.
  768. 2019-09-23 Alan Modra <amodra@gmail.com>
  769. * bfd-in.h (bfd_sunos_get_needed_list),
  770. (bfd_sunos_record_link_assignment),
  771. (bfd_sunos_size_dynamic_sections),
  772. (bfd_i386linux_size_dynamic_sections),
  773. (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
  774. * bfd-in2.h: Regenerate.
  775. 2019-09-23 Alan Modra <amodra@gmail.com>
  776. * bfd-in.h: Move xcoff function declarations..
  777. * xcofflink.h: ..to here, new file.
  778. * xcofflink.c: Include xcofflink.h.
  779. * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
  780. * bfd-in2.h: Regenerate.
  781. 2019-09-23 Alan Modra <amodra@gmail.com>
  782. * bfd-in.h: Delete coff forward refs and move coff declaration..
  783. * coff-bfd.h: ..to here.
  784. * bfd-in2.h: Regenerate.
  785. 2019-09-23 Alan Modra <amodra@gmail.com>
  786. * bfd-in.h: Move arm declaraions..
  787. * cpu-arm.h: ..to here, new file..
  788. * coff-arm.h: ..and here, new file..
  789. * elf32-arm.h: ..and here, new file.
  790. * cpu-arm.c: Include cpu-arm.h.
  791. * coff-arm.c: Include cpu-arm.h and coff-arm.h.
  792. * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
  793. * pe-arm.c: Move function rename defines later.
  794. * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
  795. * bfd-in2.h: Regenerate.
  796. 2019-09-23 Alan Modra <amodra@gmail.com>
  797. * bfd-in.h: Move tic6x function declaration..
  798. * elf32-tic6x.h: ..to here.
  799. * bfd-in2.h: Regenerate.
  800. 2019-09-23 Alan Modra <amodra@gmail.com>
  801. * bfd-in.h: Move aarch64 declarations and defines..
  802. * cpu-aarch64.h: ..to here, new file..
  803. * elfxx-aarch64.h: ..and here.
  804. * cpu-aarch64.c: Include cpu-aarch64.h.
  805. * elfnn-aarch64.c: Likewise.
  806. * bfd-in2.h: Regenerate.
  807. 2019-09-23 Alan Modra <amodra@gmail.com>
  808. * bfd-in.h: Delete ticoff function declarations.
  809. * coff-tic54x.c (bfd_ticoff_set_section_load_page),
  810. (bfd_ticoff_get_section_load_page): Make static.
  811. * bfd-in2.h: Regenerate.
  812. 2019-09-23 Alan Modra <amodra@gmail.com>
  813. * bfd-in.h: Move h8300 function declaration to..
  814. * cpu-h8300.h: ..here, new file.
  815. * cpu-h8300.c: Include cpu-h8300.h.
  816. * elf32-h8300.c: Likewise.
  817. * bfd-in2.h: Regenerate.
  818. 2019-09-23 Alan Modra <amodra@gmail.com>
  819. * bfd-in.h: Move ia64 function declarations..
  820. * elfxx-ia64.h: ..to here.
  821. * bfd-in2.h: Regenerate.
  822. 2019-09-23 Alan Modra <amodra@gmail.com>
  823. * bfd-in.h: Move v850 function declarations..
  824. * elf32-v850.h: ..to here, new file.
  825. * elf32-v850.c: Include elf32-v850.h.
  826. * bfd-in2.h: Regenerate.
  827. 2019-09-23 Alan Modra <amodra@gmail.com>
  828. * bfd-in.h: Move mips function declaration to..
  829. * elfxx-mips.h: ..here.
  830. * bfd-in2.h: Regenerate.
  831. 2019-09-23 Alan Modra <amodra@gmail.com>
  832. * bfd-in.h: Move csky function declarations to..
  833. * elf32-csky.h: ..here, new file.
  834. * elf32-csky.c: Include elf32-csky.h.
  835. * bfd-in2.h: Regenerate.
  836. 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
  837. * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
  838. (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
  839. Set undefined_weak field from it.
  840. (relax_func_t): New parameter undefined_weak.
  841. (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
  842. (_bfd_riscv_relax_tls_le): Likewise.
  843. (_bfd_riscv_relax_align): Likewise.
  844. (_bfd_riscv_relax_delete): Likewise.
  845. (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
  846. allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
  847. (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
  848. set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
  849. relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
  850. reloc.
  851. (_bfd_riscv_relax_section): New local undefined_weak. Set for
  852. undef weak relocs that can be relaxed. Pass to relax_func call.
  853. 2019-09-20 Alan Modra <amodra@gmail.com>
  854. * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
  855. (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
  856. (bfd_section_userdata, bfd_is_com_section, discarded_section),
  857. (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
  858. * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
  859. (bfd_section_list_remove, bfd_section_list_append),
  860. (bfd_section_list_prepend, bfd_section_list_insert_after),
  861. (bfd_section_list_insert_before, bfd_section_removed_from_list):
  862. New inline functions.
  863. * section.c (bfd_is_und_section, bfd_is_abs_section),
  864. (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
  865. (bfd_section_list_append, bfd_section_list_prepend),
  866. (bfd_section_list_insert_after, bfd_section_list_insert_before),
  867. (bfd_section_removed_from_list): Delete macros.
  868. (bfd_section_name, bfd_section_size, bfd_section_vma),
  869. (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
  870. (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
  871. (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
  872. (discarded_section): New inline functions.
  873. * bfd-in2.h: Regenerate.
  874. 2019-09-20 Alan Modra <amodra@gmail.com>
  875. * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
  876. (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
  877. * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
  878. (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
  879. * targets.c (bfd_asymbol_flavour): Likewise.
  880. * bfd-in2.h: Regenerate.
  881. 2019-09-20 Alan Modra <amodra@gmail.com>
  882. * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
  883. * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
  884. (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
  885. (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
  886. (bfd_get_file_flags, bfd_applicable_file_flags),
  887. (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
  888. (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
  889. (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
  890. (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
  891. * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
  892. (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
  893. (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
  894. (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
  895. (bfd_usrdata, bfd_set_usrdata): New inline functions.
  896. * targets.c (bfd_get_target, bfd_get_flavour),
  897. (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
  898. (bfd_little_endian, bfd_header_big_endian),
  899. (bfd_header_little_endian, bfd_applicable_section_flags),
  900. (bfd_get_symbol_leading_char): New inline functions.
  901. * bfd-in2.h: Regenerate.
  902. 2019-09-20 Alan Modra <amodra@gmail.com>
  903. * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
  904. (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
  905. relocations.
  906. 2019-09-18 Alan Modra <amodra@gmail.com>
  907. * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
  908. (bfd_get_section_lma, bfd_get_section_alignment),
  909. (bfd_get_section_size, bfd_get_section_flags),
  910. (bfd_get_section_userdata): Delete.
  911. (bfd_section_name, bfd_section_size, bfd_section_vma),
  912. (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
  913. (bfd_section_flags, bfd_section_userdata): New.
  914. (bfd_is_com_section): Rename parameter.
  915. * section.c (bfd_set_section_userdata, bfd_set_section_vma),
  916. (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
  917. (bfd_set_section_size): Delete bfd parameter, rename section parameter.
  918. (bfd_set_section_lma): New.
  919. * bfd-in2.h: Regenerate.
  920. * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
  921. update callers.
  922. * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
  923. * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
  924. * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
  925. * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
  926. * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
  927. * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
  928. * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
  929. * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
  930. * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
  931. * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
  932. * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
  933. * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
  934. * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
  935. * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
  936. * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
  937. * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
  938. * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
  939. * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
  940. * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
  941. * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
  942. * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
  943. * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
  944. * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
  945. * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
  946. * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
  947. * xcofflink.c: Update throughout for bfd section macro and function
  948. changes.
  949. 2019-09-18 Alan Modra <amodra@gmail.com>
  950. * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
  951. (bfd_get_output_section): Delete.
  952. (bfd_asymbol_base): Delete.
  953. (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
  954. (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
  955. (bfd_set_asymbol_name): New macro.
  956. * bfd-in2.h: Regenerate.
  957. * aout-cris.c: Update throughout to use bfd_asymbol_section.
  958. * aoutx.h: Likewise.
  959. * cofflink.c: Likewise.
  960. * dwarf2.c: Likewise.
  961. * ecoff.c: Likewise.
  962. * elf.c: Likewise.
  963. * elf32-arm.c: Likewise.
  964. * elf32-mips.c: Likewise.
  965. * elf32-score.c: Likewise.
  966. * elf32-score7.c: Likewise.
  967. * elfn32-mips.c: Likewise.
  968. * elfnn-aarch64.c: Likewise.
  969. * elfxx-mips.c: Likewise.
  970. * linker.c: Likewise.
  971. * pdp11.c: Likewise.
  972. * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
  973. 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
  974. * Makefile.in: Re-generate.
  975. * configure: Re-generate.
  976. * doc/Makefile.in: Re-generate.
  977. 2019-09-18 Alan Modra <amodra@gmail.com>
  978. * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
  979. macros.
  980. * pdp11.c (slurp_symbol_table): Likewise.
  981. * som.c (som_slurp_symbol_table): Likewise.
  982. * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
  983. * coffcode.h (coff_slurp_symbol_table): Likewise.
  984. * cofflink.c (_bfd_coff_final_link): Likewise.
  985. * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
  986. (_bfd_ecoff_slurp_symbolic_info): Likewise.
  987. (_bfd_ecoff_slurp_symbol_table): Likewise.
  988. (_bfd_ecoff_bfd_final_link): Likewise.
  989. * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
  990. * elflink.c (elf_link_output_symstrtab): Likewise.
  991. (bfd_elf_final_link): Likewise.
  992. * peicode.h (pe_ILF_build_a_bfd): Likewise.
  993. * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
  994. * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
  995. start_address or symcount using bfd_get macros.
  996. * coffgen.c (coff_real_object_p): Likewise.
  997. * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
  998. * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
  999. * elfcore.h (elf_core_file_p): Don't set start_address using
  1000. bfd_get macro.
  1001. * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
  1002. using bfd_get macro.
  1003. * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
  1004. * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
  1005. or symcount using bfd_get macros.
  1006. (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
  1007. * syms.c (bfd_set_symtab): Likewise.
  1008. * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
  1009. * archive.c (do_slurp_bsd_armap): Don't set has_armap using
  1010. bfd_has_map macro.
  1011. (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
  1012. * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
  1013. * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
  1014. * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
  1015. * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
  1016. * som.c (som_slurp_armap): Likewise.
  1017. 2019-09-18 Alan Modra <amodra@gmail.com>
  1018. * archures.c (bfd_get_arch): Make param const.
  1019. (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
  1020. (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
  1021. * bfd-in2.h: Regenerate.
  1022. 2019-09-18 Alan Modra <amodra@gmail.com>
  1023. * bfd-in.h (carsym.name): Make const.
  1024. * reloc.c (struct reloc_howto_struct.name): Likewise.
  1025. * targets.c (bfd_target.name): Likewise.!
  1026. * bfd.c (bfd_get_sign_extend_vma): Make variable const.
  1027. * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
  1028. when setting carsym.name.
  1029. * bfd-in2.h: Regenerate.
  1030. 2019-09-18 Alan Modra <amodra@gmail.com>
  1031. * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
  1032. xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
  1033. error status. Adjust calls.
  1034. * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
  1035. Close bfd on failure. Replace xstrdup/bfd_alloc use with
  1036. bfd_malloc. Use bfd_set_filename.
  1037. 2019-09-18 Alan Modra <amodra@gmail.com>
  1038. * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
  1039. (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
  1040. (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
  1041. needs_copy even if all relocs are in rw sections.
  1042. (dec_dynrel_count): Handle TOC16 relocs.
  1043. (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
  1044. (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
  1045. semantic change.
  1046. 2019-09-16 Phil Blundell <pb@pbcl.net>
  1047. * version.m4: Set version to 2.33.50.
  1048. * Makefile.in, configure, doc/Makefile.in: Regenerated.
  1049. 2019-09-11 Tom Tromey <tom@tromey.com>
  1050. * opncls.c (bfd_set_filename): New function.
  1051. * bfd-in2.h: Regenerate.
  1052. 2019-09-11 Alan Modra <amodra@gmail.com>
  1053. * targets.c (struct bfd_target): Add _bfd_group_name.
  1054. (BFD_JUMP_TABLE): Likewise.
  1055. * coffgen.c (bfd_coff_group_name): New function.
  1056. * elf.c (bfd_elf_group_name): New function.
  1057. * linker.c (_bfd_nolink_bfd_group_name): New function.
  1058. * section.c (bfd_generic_group_name): New function.
  1059. * elf-bfd.h (bfd_elf_group_name): Declare.
  1060. * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
  1061. * libcoff-in.h (bfd_coff_group_name): Declare.
  1062. * aout-target.h (MY_bfd_group_name): Define.
  1063. * aout-tic30.c (MY_bfd_group_name): Define.
  1064. * bfd.c (bfd_group_name): Define.
  1065. * binary.c (binary_bfd_group_name): Define.
  1066. * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
  1067. * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
  1068. * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
  1069. * coffcode.h (coff_bfd_group_name): Define.
  1070. * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
  1071. * i386msdos.c (msdos_bfd_group_name): Define.
  1072. * ihex.c (ihex_bfd_group_name): Define.
  1073. * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
  1074. * mmo.c (mmo_bfd_group_name): Define.
  1075. * pef.c (bfd_pef_bfd_group_name): Define.
  1076. * plugin.c (bfd_plugin_bfd_group_name): Define.
  1077. * ppcboot.c (ppcboot_bfd_group_name): Define.
  1078. * som.c (som_bfd_group_name): Define.
  1079. * srec.c (srec_bfd_group_name): Define.
  1080. * tekhex.c (tekhex_bfd_group_name): Define.
  1081. * verilog.c (verilog_bfd_group_name): Define.
  1082. * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
  1083. * xsym.c (bfd_sym_bfd_group_name): Define.
  1084. * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
  1085. (rs6000_xcoff64_aix_vec): Likewise.
  1086. * bfd-in2.h: Regenerate.
  1087. * libbfd.h: Regenerate.
  1088. * libcoff.h: Regenerate.
  1089. 2019-09-10 Nick Clifton <nickc@redhat.com>
  1090. PR 24907
  1091. * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
  1092. field.
  1093. (bfd_default_arch_struct): Initialise the new field.
  1094. * bfd-in2.h: Regenerate.
  1095. * cpu-aarch64.c: Initialise the new field.
  1096. * cpu-alpha.c: Likewise.
  1097. * cpu-arc.c: Likewise.
  1098. * cpu-arm.c: Likewise.
  1099. * cpu-avr.c: Likewise.
  1100. * cpu-bfin.c: Likewise.
  1101. * cpu-bpf.c: Likewise.
  1102. * cpu-cr16.c: Likewise.
  1103. * cpu-cr16c.c: Likewise.
  1104. * cpu-cris.c: Likewise.
  1105. * cpu-crx.c: Likewise.
  1106. * cpu-csky.c: Likewise.
  1107. * cpu-d10v.c: Likewise.
  1108. * cpu-d30v.c: Likewise.
  1109. * cpu-dlx.c: Likewise.
  1110. * cpu-epiphany.c: Likewise.
  1111. * cpu-fr30.c: Likewise.
  1112. * cpu-frv.c: Likewise.
  1113. * cpu-ft32.c: Likewise.
  1114. * cpu-h8300.c: Likewise.
  1115. * cpu-hppa.c: Likewise.
  1116. * cpu-i386.c: Likewise.
  1117. * cpu-ia64.c: Likewise.
  1118. * cpu-iamcu.c: Likewise.
  1119. * cpu-ip2k.c: Likewise.
  1120. * cpu-iq2000.c: Likewise.
  1121. * cpu-k1om.c: Likewise.
  1122. * cpu-l1om.c: Likewise.
  1123. * cpu-lm32.c: Likewise.
  1124. * cpu-m10200.c: Likewise.
  1125. * cpu-m10300.c: Likewise.
  1126. * cpu-m32c.c: Likewise.
  1127. * cpu-m32r.c: Likewise.
  1128. * cpu-m68hc11.c: Likewise.
  1129. * cpu-m68hc12.c: Likewise.
  1130. * cpu-m68k.c: Likewise.
  1131. * cpu-m9s12x.c: Likewise.
  1132. * cpu-m9s12xg.c: Likewise.
  1133. * cpu-mcore.c: Likewise.
  1134. * cpu-mep.c: Likewise.
  1135. * cpu-metag.c: Likewise.
  1136. * cpu-microblaze.c: Likewise.
  1137. * cpu-mips.c: Likewise.
  1138. * cpu-mmix.c: Likewise.
  1139. * cpu-moxie.c: Likewise.
  1140. * cpu-msp430.c: Likewise.
  1141. * cpu-mt.c: Likewise.
  1142. * cpu-nds32.c: Likewise.
  1143. * cpu-nfp.c: Likewise.
  1144. * cpu-nios2.c: Likewise.
  1145. * cpu-ns32k.c: Likewise.
  1146. * cpu-or1k.c: Likewise.
  1147. * cpu-pdp11.c: Likewise.
  1148. * cpu-pj.c: Likewise.
  1149. * cpu-plugin.c: Likewise.
  1150. * cpu-powerpc.c: Likewise.
  1151. * cpu-pru.c: Likewise.
  1152. * cpu-riscv.c: Likewise.
  1153. * cpu-rl78.c: Likewise.
  1154. * cpu-rs6000.c: Likewise.
  1155. * cpu-rx.c: Likewise.
  1156. * cpu-s12z.c: Likewise.
  1157. * cpu-s390.c: Likewise.
  1158. * cpu-score.c: Likewise.
  1159. * cpu-sh.c: Likewise.
  1160. * cpu-sparc.c: Likewise.
  1161. * cpu-spu.c: Likewise.
  1162. * cpu-tic30.c: Likewise.
  1163. * cpu-tic4x.c: Likewise.
  1164. * cpu-tic54x.c: Likewise.
  1165. * cpu-tic6x.c: Likewise.
  1166. * cpu-tic80.c: Likewise.
  1167. * cpu-tilegx.c: Likewise.
  1168. * cpu-tilepro.c: Likewise.
  1169. * cpu-v850.c: Likewise.
  1170. * cpu-v850_rh850.c: Likewise.
  1171. * cpu-vax.c: Likewise.
  1172. * cpu-visium.c: Likewise.
  1173. * cpu-wasm32.c: Likewise.
  1174. * cpu-xc16x.c: Likewise.
  1175. * cpu-xgate.c: Likewise.
  1176. * cpu-xstormy16.c: Likewise.
  1177. * cpu-xtensa.c: Likewise.
  1178. * cpu-z80.c: Likewise.
  1179. * cpu-z8k.c: Likewise.
  1180. 2019-09-09 Phil Blundell <pb@pbcl.net>
  1181. binutils 2.33 branch created.
  1182. 2019-09-06 Alan Modra <amodra@gmail.com>
  1183. * aout-target.h (object_p): Formatting.
  1184. * bfd-in.h (bfd_get_filename): Don't cast to char*.
  1185. * corefile.c (generic_core_file_matches_executable_p): Constify
  1186. variables and remove cast.
  1187. * bfd-in2.h: Regenerate.
  1188. 2019-09-05 Alan Modra <amodra@gmail.com>
  1189. * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
  1190. GOT_PCREL and PLT_PCREL relocs as affecting the value stored
  1191. in the GOT/PLT entry rather than affecting the offset to that
  1192. GOI/PLT entry.
  1193. (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
  1194. 2019-09-05 Alan Modra <amodra@gmail.com>
  1195. * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
  1196. in second instruction.
  1197. (ppc64_elf_relocate_section): Likewise.
  1198. 2019-09-05 Alan Modra <amodra@gmail.com>
  1199. PR 24955
  1200. * libbfd-in.h (bfd_strdup): New inline function.
  1201. * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
  1202. bfd on error.
  1203. * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
  1204. * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
  1205. on error.
  1206. (bfd_openstreamr): Use bfd_strdup.
  1207. (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
  1208. * plugin.c (try_load_plugin): Use bfd_malloc.
  1209. * libbfd.h: Regenerate.
  1210. 2019-09-02 Alan Modra <amodra@gmail.com>
  1211. PR 11983
  1212. * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
  1213. on success. Tidy.
  1214. (read_alt_indirect_string): Likewise.
  1215. (read_alt_indirect_ref): Likewise.
  1216. 2019-08-31 Jim Wilson <jimw@sifive.com>
  1217. PR 23825
  1218. * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
  1219. SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
  1220. 2019-08-30 Jim Wilson <jimw@sifive.com>
  1221. * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
  1222. error, call bfd_set_error, set ret to FALSE, and goto out label.
  1223. 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
  1224. PR ld/24951
  1225. * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
  1226. BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
  1227. 2019-08-29 Alan Modra <amodra@gmail.com>
  1228. PR 24697
  1229. * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
  1230. when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
  1231. R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
  1232. reloc.
  1233. 2019-08-29 Alan Modra <amodra@gmail.com>
  1234. * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
  1235. on second insn, return it in poff.
  1236. (ppc64_elf_relocate_section): Add offset to paddi addend for
  1237. PCREL_OPT.
  1238. 2019-08-28 Jim Wilson <jimw@sifive.com>
  1239. * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
  1240. section when setting max_alignment. Update comment.
  1241. (_bfd_riscv_relax_pc): Likewise.
  1242. 2019-08-29 Alan Modra <amodra@gmail.com>
  1243. PR 24891
  1244. * bfd.c (struct bfd): Add no_element_cache.
  1245. * archive.c (_bfd_get_elt_at_filepos): Don't add element to
  1246. archive cache when no_element_cache.
  1247. (bfd_generic_archive_p): Set no_element_cache when opening first
  1248. element to check format. Close first element too.
  1249. (do_slurp_bsd_armap): Don't zero ardata->cache here.
  1250. * bfd-in2.h: Regenerate.
  1251. 2019-08-24 Alan Modra <amodra@gmail.com>
  1252. * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
  1253. symbols from GOT optimisation.
  1254. 2019-08-23 Stafford Horne <shorne@gmail.com>
  1255. * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
  1256. PLT GOT entries.
  1257. 2019-08-23 Nick Clifton <nickc@redhat.com>
  1258. PR 24456
  1259. * elf.c (bfd_section_from_shdr): Issue an informative warning
  1260. message and continue processing other sections after encountering
  1261. a reloc section for a section which already has other relocs
  1262. associated with it.
  1263. 2019-08-23 Alan Modra <amodra@gmail.com>
  1264. PR 24933
  1265. * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
  1266. on error without freeing plts[] contents.
  1267. 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
  1268. * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
  1269. 2019-08-22 Nick Clifton <nickc@redhat.com>
  1270. PR 24922
  1271. * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
  1272. reading data from extra records.
  1273. 2019-08-22 Tamar Christina <tamar.christina@arm.com>
  1274. PR ld/24601
  1275. * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
  1276. Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
  1277. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
  1278. * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
  1279. for weak TLS.
  1280. 2019-08-22 Alan Modra <amodra@gmail.com>
  1281. * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
  1282. instead recognize CMSE_PREFIX in symbol name.
  1283. (elf32_arm_gc_mark_extra_sections): Likewise.
  1284. (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
  1285. (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
  1286. 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
  1287. * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
  1288. Cortex-A77, cortex-A65AE, and Cortex-A76AE.
  1289. 2019-08-20 Tamar Christina <tamar.christina@arm.com>
  1290. * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
  1291. elf32_arm_stub_long_branch_v4t_thumb_thumb,
  1292. elf32_arm_stub_long_branch_v4t_thumb_arm,
  1293. elf32_arm_stub_short_branch_v4t_thumb_arm,
  1294. elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
  1295. elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
  1296. elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
  1297. previous instruction.
  1298. 2019-08-19 Tom Tromey <tromey@adacore.com>
  1299. * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
  1300. holding symbols.
  1301. 2019-08-19 Alan Modra <amodra@gmail.com>
  1302. * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
  1303. to has_optrel.
  1304. (struct _ppc64_elf_section_data): Likewise.
  1305. (ppc64_elf_check_relocs): Set has_optrel for more relocs.
  1306. (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
  1307. than TOC loop. Check PLT16 insns too.
  1308. 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
  1309. PR ld/24905
  1310. * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
  1311. PC-relative relocations back to ...
  1312. (elf_x86_64_relocate_section): Here.
  1313. 2019-08-16 Martin Liska <mliska@suse.cz>
  1314. PR ld/24912
  1315. * elflink.c: Report error only for not relocatable.
  1316. * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
  1317. here lto_slim_object as it's handled in caller.
  1318. 2019-08-16 Alan Modra <amodra@gmail.com>
  1319. * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
  1320. 2019-08-15 Jim Wilson <jimw@sifive.com>
  1321. * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
  1322. RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
  1323. to c.li instruction, and use ENCODE_RVC_IMM to set value.
  1324. 2019-08-15 Tom Tromey <tromey@adacore.com>
  1325. * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
  1326. of section.
  1327. 2019-08-14 Alan Modra <amodra@gmail.com>
  1328. PR 24623
  1329. * dwarf2.c (stash_comp_unit): New function, extracted from..
  1330. (_bfd_dwarf2_find_nearest_line): ..here.
  1331. (find_abstract_instance): Parse comp units and decode line info
  1332. as needed.
  1333. 2019-08-14 Alan Modra <amodra@gmail.com>
  1334. * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
  1335. (comp_unit_find_nearest_line): Use it here..
  1336. (_bfd_dwarf2_find_symbol_bias): ..and here.
  1337. 2019-08-14 Alan Modra <amodra@gmail.com>
  1338. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
  1339. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
  1340. * coffgen.c (coff_find_nearest_line_with_names): Adjust
  1341. _bfd_dwarf2_find_nearest_line calls.
  1342. * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
  1343. * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
  1344. * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
  1345. * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
  1346. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
  1347. * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
  1348. * libbfd.h: Regenerate.
  1349. 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
  1350. * elf-bfd.h (struct elf_backend_data): New members.
  1351. * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
  1352. .gnu.hash section if necessary.
  1353. (struct collect_gnu_hash_codes): New member.
  1354. (elf_gnu_hash_process_symidx): New function name.
  1355. (elf_renumber_gnu_hash_syms): Ignore local and undefined
  1356. symbols. Record xlat location for every symbol which should have
  1357. a .MIPS.xhash entry.
  1358. (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
  1359. dynamic section if necessary.
  1360. (GNU_HASH_SECTION_NAME): New define.
  1361. (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
  1362. Update the section size info.
  1363. * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
  1364. (struct mips_elf_link_hash_entry): New member.
  1365. (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
  1366. table location.
  1367. (mips_elf_sort_hash_table): Initialize the pointer to the
  1368. .MIPS.xhash section.
  1369. (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
  1370. translation table entry with the symbol dynindx.
  1371. (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
  1372. (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
  1373. info.
  1374. (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
  1375. section.
  1376. (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
  1377. dynamic section.
  1378. (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
  1379. (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
  1380. sh_link info.
  1381. (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
  1382. (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
  1383. (_bfd_mips_post_process_headers): Mark the ABI version as
  1384. MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
  1385. but not a .hash section.
  1386. (_bfd_mips_elf_record_xhash_symbol): New function. Record a
  1387. position in the translation table, associated with the hash
  1388. entry.
  1389. * elfxx-mips.h (literal_reloc_p): Define
  1390. elf_backend_record_xhash_symbol backend hook.
  1391. * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
  1392. backend hook.
  1393. 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
  1394. * elf64-bpf.c (bpf_elf_relocate_section): New function.
  1395. (bpf_elf_insn_disp_reloc): Delete function.
  1396. (elf_backend_relocate_section): Define.
  1397. 2019-08-07 Alan Modra <amodra@gmail.com>
  1398. PR 24644
  1399. * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
  1400. for overflow in expressions involving nsymz.
  1401. 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
  1402. * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
  1403. two pages in relro presence.
  1404. 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
  1405. * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
  1406. (get_wsr_lbeg_opcode): New functions.
  1407. (check_loop_aligned): Detect relaxed loops and adjust loop_len
  1408. and insn_len for the first actual instruction of the loop.
  1409. 2019-07-30 Alan Modra <amodra@gmail.com>
  1410. PR 24768
  1411. * bfd.c (struct bfd): Add lto_slim_object flag.
  1412. * bfd-in2.h: Regenerate.
  1413. 2019-07-29 Martin Liska <mliska@suse.cz>
  1414. PR 24768
  1415. * archive.c (_bfd_compute_and_write_armap): Come up with
  1416. report_plugin_err variable.
  1417. * bfd-in2.h (struct bfd): Add lto_slim_object flag.
  1418. * elf.c (struct lto_section): New.
  1419. (_bfd_elf_make_section_from_shdr): Parse content of
  1420. .gnu_lto_.lto section.
  1421. * elflink.c: Report error for a missing LTO plugin.
  1422. * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
  1423. 2019-07-28 Alan Modra <amodra@gmail.com>
  1424. PR 24857
  1425. PR 24339
  1426. * elflink.c (elf_link_add_object_symbols): Report an informative
  1427. error on finding local symbols with index equal or greater than
  1428. symbol table sh_info. Correct comment. Allow such symbols in
  1429. dynamic objects. Abort on NULL section for symbol.
  1430. 2019-07-26 Alan Modra <amodra@gmail.com>
  1431. * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
  1432. (elf_linker): Don't define.
  1433. * elflink.c (bfd_elf_final_link): Don't set elf_linker.
  1434. 2019-07-25 YunQiang Su <syq@debian.org>
  1435. PR 24832
  1436. * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
  1437. mips inputs.
  1438. 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
  1439. * elf32-arc.c (bfd_get_32_me): Add a small description, fix
  1440. formating.
  1441. (reloc_type_to_name): Fix formating.
  1442. (arc_elf_object_p): Likewise.
  1443. (debug_arc_reloc): Likewise.
  1444. (arc_do_relocation): Likewise.
  1445. 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
  1446. * elf32-arc.c (bfd_get_32_me): New function.
  1447. (bfd_put_32_me): Likewise.
  1448. (arc_elf_relax_section): Likewise.
  1449. (bfd_elf32_bfd_relax_section): Define.
  1450. 2019-07-24 Alan Modra <amodra@gmail.com>
  1451. * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
  1452. elf_backend_final_write_processing, don't pass linker arg.
  1453. (_bfd_elf_final_write_processing): Update prototype.
  1454. * elf.c (_bfd_elf_write_object_contents): Adjust call.
  1455. (_bfd_elf_final_write_processing): Return error on incompatible
  1456. OSABI and has_gnu_osabi. Remove linker arg.
  1457. * elf-nacl.h (nacl_final_write_processing): Update prototype.
  1458. * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
  1459. * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
  1460. (_bfd_mips_elf_final_write_processing): Likewise.
  1461. * elf-hppa.h (elf_hppa_final_write_processing): Return status
  1462. and remove linker arg.
  1463. * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
  1464. * elf-nacl.c (nacl_final_write_processing): Likewise.
  1465. * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
  1466. * elf32-arc.c (arc_elf_final_write_processing): Likewise.
  1467. * elf32-arm.c (arm_final_write_processing): Likewise.
  1468. (elf32_arm_final_write_processing): Likewise.
  1469. (elf32_arm_nacl_final_write_processing): Likewise.
  1470. (elf32_arm_vxworks_final_write_processing): Likewise.
  1471. * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
  1472. * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
  1473. * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
  1474. * elf32-cris.c (cris_elf_final_write_processing): Likewise.
  1475. * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
  1476. * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
  1477. * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
  1478. * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
  1479. * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
  1480. * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
  1481. * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
  1482. * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
  1483. * elf32-pj.c (pj_elf_final_write_processing): Likewise.
  1484. * elf32-ppc.c (ppc_final_write_processing): Likewise.
  1485. (ppc_elf_final_write_processing): Likewise.
  1486. (ppc_elf_vxworks_final_write_processing): Likewise.
  1487. * elf32-sparc.c (sparc_final_write_processing): Likewise.
  1488. (elf32_sparc_final_write_processing): Likewise.
  1489. (elf32_sparc_vxworks_final_write_processing): Likewise.
  1490. * elf32-v850.c (v850_elf_final_write_processing): Likewise.
  1491. * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
  1492. * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
  1493. * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
  1494. * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
  1495. * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
  1496. (_bfd_mips_elf_final_write_processing): Likewise.
  1497. 2019-07-24 Alan Modra <amodra@gmail.com>
  1498. * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
  1499. early.
  1500. * elf32-arc.c (arc_elf_final_write_processing): Likewise.
  1501. * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
  1502. 2019-07-24 Alan Modra <amodra@gmail.com>
  1503. * elf32-visium.c (visium_elf_post_process_headers): Don't set
  1504. EI_OSABI header byte here.
  1505. (ELF_OSABI): Define.
  1506. 2019-07-23 Alan Modra <amodra@gmail.com>
  1507. * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
  1508. * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
  1509. (get_program_header_size): Formatting. Only test SH_GNU_MBIND
  1510. when elf_gnu_osabi_mbind is set.
  1511. (_bfd_elf_map_sections_to_segments): Likewise.
  1512. (_bfd_elf_init_private_section_data): Likewise.
  1513. (_bfd_elf_final_write_processing): Update comment.
  1514. * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
  1515. (elf_backend_special_sections): Define without .tbss for linux.
  1516. 2019-07-23 Alan Modra <amodra@gmail.com>
  1517. * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
  1518. Remove none, any, all enums.
  1519. (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
  1520. (_bfd_elf_final_write_processing): Declare.
  1521. * elf.c (_bfd_elf_write_object_contents): Unconditionally call
  1522. elf_backend_final_write_processing.
  1523. (_bfd_elf_post_process_headers): Move body of function to..
  1524. (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
  1525. only when not already set. Adjust for rename.
  1526. * elfxx-target.h (elf_backend_final_write_processing): Default to
  1527. _bfd_elf_final_write_processing.
  1528. * elf-hppa.h (elf_hppa_final_write_processing): Call
  1529. _bfd_elf_final_write_processing.
  1530. * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
  1531. * elf-nacl.c (nacl_final_write_processing): Likewise.
  1532. * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
  1533. * elf32-arc.c (arc_elf_final_write_processing): Likewise.
  1534. * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
  1535. * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
  1536. * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
  1537. * elf32-cris.c (cris_elf_final_write_processing): Likewise.
  1538. * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
  1539. * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
  1540. * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
  1541. * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
  1542. * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
  1543. * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
  1544. * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
  1545. * elf32-pj.c (pj_elf_final_write_processing): Likewise.
  1546. * elf32-v850.c (v850_elf_final_write_processing): Likewise.
  1547. * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
  1548. * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
  1549. * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
  1550. * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
  1551. * elf32-arm.c (arm_final_write_processing): Split out from..
  1552. (elf32_arm_final_write_processing): ..here. Call
  1553. _bfd_elf_final_write_processing.
  1554. (elf32_arm_nacl_final_write_processing): Adjust.
  1555. * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
  1556. (_bfd_mips_elf_final_write_processing): ..here. Call
  1557. _bfd_elf_final_write_processing.
  1558. * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
  1559. * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
  1560. * elf32-ppc.c (ppc_final_write_processing): Split out from..
  1561. (ppc_elf_final_write_processing): ..here. Call
  1562. _bfd_elf_final_write_processing.
  1563. (ppc_elf_vxworks_final_write_processing): Adjust.
  1564. * elf32-sparc.c (sparc_final_write_processing): Split out from..
  1565. (elf32_sparc_final_write_processing): ..here. Call
  1566. _bfd_elf_final_write_processing.
  1567. (elf32_sparc_vxworks_final_write_processing): Adjust.
  1568. * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
  1569. * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
  1570. * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
  1571. * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
  1572. * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
  1573. * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
  1574. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  1575. * elflink.c (elf_link_add_object_symbols): Likewise.
  1576. (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
  1577. instead.
  1578. 2019-07-23 Omar Majid <omajid@redhat.com>
  1579. * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
  1580. I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
  1581. AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
  1582. AMD64_NETBSD_MAGIC.
  1583. * peXXigen.c: Add comment about source of .NET magic numbers.
  1584. 2019-07-19 Alan Modra <amodra@gmail.com>
  1585. * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
  1586. (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
  1587. (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
  1588. (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
  1589. * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
  1590. (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
  1591. (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
  1592. (ppc64_elf_check_relocs): Support pcrel tls relocs.
  1593. (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
  1594. * bfd-in2.h: Regenerate.
  1595. * libbfd.h: Regenerate.
  1596. 2019-07-18 Alan Modra <amodra@gmail.com>
  1597. * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
  1598. a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
  1599. match test.
  1600. 2019-07-18 Alan Modra <amodra@gmail.com>
  1601. * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
  1602. (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
  1603. is more than 8 bits.
  1604. (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
  1605. tls_type vars unsigned int.
  1606. (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
  1607. to select r_type edit.
  1608. 2019-07-18 Alan Modra <amodra@gmail.com>
  1609. * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
  1610. Correct comment.
  1611. * elf64-ppc.c (TLS_GDIE): Likewise.
  1612. 2019-07-18 Alan Modra <amodra@gmail.com>
  1613. * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
  1614. range of tp-relative offsets.
  1615. 2019-07-15 Alan Modra <amodra@gmail.com>
  1616. * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
  1617. alias is no longer bfd_link_hash_defined, clear the alias.
  1618. 2019-07-13 Alan Modra <amodra@gmail.com>
  1619. * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
  1620. tls_sec.
  1621. (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
  1622. (_bfd_elf_init_2_index_sections): Likewise.
  1623. * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
  1624. relocations for local TLS symbols, use STN_UNDEF as the relocation
  1625. symbol.
  1626. * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
  1627. leave TLS symbol value in the addend.
  1628. 2019-07-08 Alan Modra <amodra@gmail.com>
  1629. PR 24785
  1630. * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
  1631. size before reading first word.
  1632. 2019-07-02 Nick Clifton <nickc@redhat.com>
  1633. PR 24717
  1634. * elf.c (is_debuginfo_file): New function.
  1635. (assign_file_positions_for_non_load_sections): Do not warn about
  1636. allocated sections outside of loadable segments if they are found
  1637. in a debuginfo file.
  1638. * elf-bfd.h (is_debuginfo_file): Prototype.
  1639. 2019-07-02 Nick Clifton <nickc@redhat.com>
  1640. PR 24753
  1641. * compress.c (bfd_get_full_section_contents): Do not complain
  1642. about linker created sections that are larger than the file size.
  1643. 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
  1644. * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
  1645. (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
  1646. for CMSE stubs.
  1647. (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
  1648. 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
  1649. * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
  1650. sections when .text section contain secure entry functions
  1651. is marked.
  1652. 2019-07-01 Nick Clifton <nickc@redhat.com>
  1653. PR 23839
  1654. * elf32-arm.c (elf32_arm_update_relocs): Do not include the
  1655. section VMA in the offset used to update exidx relocs.
  1656. 2019-06-28 Nick Clifton <nickc@redhat.com>
  1657. PR 24708
  1658. * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
  1659. large version reference section.
  1660. * compress.c (bfd_get_full_section_contents): Check for an
  1661. uncompressed section whose size is larger than the file size.
  1662. 2019-06-28 Alan Modra <amodra@gmail.com>
  1663. * format.c (bfd_check_format_matches): Don't match plugin target
  1664. if another target matches. Expand comment.
  1665. * targets.c (_bfd_target_vector): Move plugin_vec after all other
  1666. non-corefile targets, outside !SELECT_VECS.
  1667. * config.bfd: Don't handle targ=plugin here.
  1668. * configure.ac: Don't add plugin to enable_targets or handle in
  1669. target loop setting selvecs and other target vars.
  1670. * configure: Regenerate.
  1671. 2019-06-26 Nick Clifton <nickc@redhat.com>
  1672. PR 24703
  1673. * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
  1674. messages for failures.
  1675. * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
  1676. if returning an error value.
  1677. 2019-06-25 Jan Beulich <jbeulich@suse.com>
  1678. * elf-properties.c (elf_find_and_remove_property): Rename last
  1679. parameter. Mention it in comment.
  1680. 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
  1681. * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
  1682. SEC_MERGE or SEC_CODE flags are set.
  1683. (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
  1684. symtype consistently. Don't include sec_addr (sym_sec) in symval.
  1685. Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
  1686. Add sec_addr (sym_sec) after handling merge sections.
  1687. 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
  1688. PR ld/24721
  1689. * elf-properties.c (elf_merge_gnu_property_list): Remove the
  1690. property after reporting property removal.
  1691. 2019-06-23 Alan Modra <amodra@gmail.com>
  1692. PR 24704
  1693. * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
  1694. (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
  1695. Reduce range of offsets allowed for other GOT relocs.
  1696. 2019-06-23 Alan Modra <amodra@gmail.com>
  1697. PR 24689
  1698. * elfcode.h (elf_object_p): Warning fix.
  1699. 2019-06-21 Alan Modra <amodra@gmail.com>
  1700. PR 24689
  1701. * elfcode.h (elf_object_p): Check type of e_shstrndx section.
  1702. 2019-06-19 Alan Modra <amodra@gmail.com>
  1703. PR 24697
  1704. * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
  1705. R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
  1706. 2019-06-19 Alan Modra <amodra@gmail.com>
  1707. * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
  1708. functions that require r2 valid to use local entry.
  1709. (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
  1710. 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
  1711. * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
  1712. (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
  1713. with elfNN_aarch64_allocate_local_dynrelocs.
  1714. 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
  1715. * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
  1716. 2019-06-14 Alan Modra <amodra@gmail.com>
  1717. * Makefile.in: Regenerate.
  1718. * configure: Regenerate.
  1719. 2019-06-14 Alan Modra <amodra@gmail.com>
  1720. * elf64-ppc.c: Fix comments involving paddi.
  1721. 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
  1722. PR 24643
  1723. * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
  1724. absent, or the bfd is not in the ELF formart.
  1725. * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
  1726. 2019-06-10 Christos Zoulas <christos@zoulas.com>
  1727. PR 24650
  1728. * elf.c (elfcore_make_auxv_note_section): New function.
  1729. (elfcore_grok_note): Use it.
  1730. (elfcore_grok_freebsd_note): Likewise.
  1731. (elfcore_grok_openbsd_note): Likewise.
  1732. (elfcore_grok_netbsd_note): Likewise. Plus add support for
  1733. NT_NETBSDCORE_AUXV notes.
  1734. 2019-06-06 Sudakshina Das <sudi.das@arm.com>
  1735. * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
  1736. alignment of the new gnu property section.
  1737. 2019-06-06 Sudakshina Das <sudi.das@arm.com>
  1738. * bfd-in.h: Change comment.
  1739. * bfd-in2.h: Regenerate.
  1740. * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
  1741. * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
  1742. Likwise.
  1743. 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
  1744. * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
  1745. Remove overflow check.
  1746. 2019-05-28 Alan Modra <amodra@gmail.com>
  1747. PR 24596
  1748. * cofflink.c (coff_link_check_archive_element): Don't assume
  1749. element is a coff object file after calling add_archive_element.
  1750. 2019-05-28 Alan Modra <amodra@gmail.com>
  1751. PR 24596
  1752. * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
  1753. attempt to set sh_entsize for excluded PLT section.
  1754. 2019-05-28 Alan Modra <amodra@gmail.com>
  1755. PR 24596
  1756. * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
  1757. to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
  1758. allocated in alpha_dynamic_entries_for_reloc.
  1759. 2019-05-28 Alan Modra <amodra@gmail.com>
  1760. PR 24596
  1761. * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
  1762. on NULL output_section.
  1763. * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
  1764. 2019-05-28 Alan Modra <amodra@gmail.com>
  1765. PR 24596
  1766. * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
  1767. entry when MUST_FIND. Abort when MUST_FIND not found.
  1768. (elf_m68k_get_bfd2got_entry): Likewise.
  1769. (elf_m68k_relocate_section): Remove now useless assert.
  1770. 2019-05-28 Alan Modra <amodra@gmail.com>
  1771. PR 24596
  1772. * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
  1773. from bfd_link_info, not an output section owner.
  1774. (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
  1775. (elf_hppa_final_link_relocate): Likewise.
  1776. 2019-05-28 Alan Modra <amodra@gmail.com>
  1777. PR 24596
  1778. * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
  1779. create_object_symbols_section, obj_textsec, obj_datasec or
  1780. obj_bsssec. Fix other errors in placement.
  1781. * config.bfd: Obsolete tic30-aout.
  1782. 2019-05-28 Alan Modra <amodra@gmail.com>
  1783. PR 24596
  1784. * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
  1785. end of section list as well as section_count.
  1786. * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
  1787. section list before returning error.
  1788. 2019-05-27 Alan Modra <amodra@gmail.com>
  1789. * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
  1790. 2019-05-27 Alan Modra <amodra@gmail.com>
  1791. PR 24596
  1792. * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
  1793. 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
  1794. * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
  1795. (struct elf_aarch64_link_hash_table): Add variant_pcs member.
  1796. (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
  1797. (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
  1798. (elf_backend_merge_symbol_attribute): Define.
  1799. 2019-05-24 Alan Modra <amodra@gmail.com>
  1800. * po/SRC-POTFILES.in: Regenerate.
  1801. 2019-05-24 Alan Modra <amodra@gmail.com>
  1802. * elf64-ppc.c: Comment on powerxx _notoc stub variants.
  1803. (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
  1804. (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
  1805. (struct ppc_link_hash_table): Add powerxx_stubs.
  1806. (ppc64_elf_check_relocs): Set powerxx_stubs.
  1807. (build_powerxx_offset, size_powerxx_offset),
  1808. (num_relocs_for_powerxx_offset),
  1809. (emit_relocs_for_powerxx_offset): New functions.
  1810. (plt_stub_size): Size powerxx stubs.
  1811. (ppc_build_one_stub): Emit powerxx stubs.
  1812. (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
  1813. powerxx stubs.
  1814. 2019-05-24 Alan Modra <amodra@gmail.com>
  1815. * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
  1816. R_PPC64_GOT_PCREL34.
  1817. (xlate_pcrel_opt): New function.
  1818. (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
  1819. (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
  1820. for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
  1821. 2019-05-24 Alan Modra <amodra@gmail.com>
  1822. * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
  1823. (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
  1824. (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
  1825. (BFD_RELOC_PPC64_PLT_PCREL34),
  1826. (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
  1827. (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
  1828. (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
  1829. (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
  1830. (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
  1831. * elf64-ppc.c (PNOP): Define.
  1832. (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
  1833. (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
  1834. (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
  1835. relocs.
  1836. (ppc64_elf_prefix_reloc): New function.
  1837. (struct ppc_link_hash_table): Add notoc_plt.
  1838. (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
  1839. (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
  1840. R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
  1841. (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
  1842. has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
  1843. possible need for dynamic relocs on non-pcrel powerxx relocs.
  1844. (dec_dynrel_count): Handle non-pcrel powerxx relocs.
  1845. (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
  1846. (toc_adjusting_stub_needed): Likewise.
  1847. (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
  1848. (ppc64_elf_relocate_section): Handle new powerxx relocs.
  1849. * bfd-in2.h: Regenerate.
  1850. * libbfd.h: Regenerate.
  1851. 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
  1852. * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
  1853. * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
  1854. bpf_elf64_be_vec.
  1855. * configure: Regenerate.
  1856. 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
  1857. * configure: Regenerated.
  1858. * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
  1859. (ALL_MACHINES_CFILES): Add cpu-bpf.c.
  1860. (BFD64_BACKENDS): Add elf64-bpf.lo.
  1861. (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
  1862. * Makefile.in (SOURCE_HFILES): Regenerate.
  1863. * config.bfd (targ_cpu): Handle bpf-*-* targets.
  1864. * cpu-bpf.c: New file.
  1865. * elf64-bpf.c: Likewise.
  1866. * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
  1867. bpf_elf64_le_vec.
  1868. * archures.c: Define architecture bfd_arch_bpf and machine
  1869. bfd_arch_bpf.
  1870. * reloc.c: Define BFD relocations used by the BPF target.
  1871. * bfd-in2.h: Regenerated.
  1872. * libbfd.h: Likewise.
  1873. 2019-05-22 Alan Modra <amodra@gmail.com>
  1874. * elf32-arm.c (arm_allocate_glue_section_space): Clear section
  1875. contents.
  1876. 2019-05-22 Alan Modra <amodra@gmail.com>
  1877. * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
  1878. processing on "size error in section".
  1879. 2019-05-22 Alan Modra <amodra@gmail.com>
  1880. * som.c (som_bfd_free_cached_info): Call
  1881. _bfd_generic_close_and_cleanup.
  1882. 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
  1883. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
  1884. for TLS_TPREL_HI16(/LO16) relocations in shared library.
  1885. 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
  1886. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
  1887. checks. Search the RELA table for n64 relocations.
  1888. 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
  1889. Faraz Shahbazker <fshahbazker@wavecomp.com>
  1890. * elfxx-mips.c (LA25_BC): New macro.
  1891. (mips_elf_link_hash_table)<compact_branches>: New field.
  1892. (STUB_JALRC): New macro.
  1893. (mipsr6_o32_exec_plt0_entry_compact): New array.
  1894. (mipsr6_n32_exec_plt0_entry_compact): Likewise.
  1895. (mipsr6_n64_exec_plt0_entry_compact): Likewise.
  1896. (mipsr6_exec_plt_entry_compact): Likewise.
  1897. (mips_elf_create_la25_stub): Use BC instead of J for stubs
  1898. when compact_branches is true.
  1899. (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
  1900. PLT for MIPSR6 with compact_branches. Do not reorder the
  1901. compact branches PLT. Switch the lazy stub for MIPSR6
  1902. with compact_branches to use JALRC.
  1903. (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
  1904. when compact_branches is true.
  1905. (_bfd_mips_elf_compact_branches): New function.
  1906. * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
  1907. 2019-05-21 Tamar Christina <tamar.christina@arm.com>
  1908. PR ld/24373
  1909. * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
  1910. Fix print formatter.
  1911. 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
  1912. PR 24460
  1913. * elf32-arm.c (get_value_helper): Remove.
  1914. (elf32_arm_final_link_relocate): Fix branch future relocations.
  1915. 2019-05-21 Tamar Christina <tamar.christina@arm.com>
  1916. PR ld/24373
  1917. * bfd-in.h (enum erratum_84319_opts): New
  1918. (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
  1919. int to enum erratum_84319_opts.
  1920. * bfd-in2.h: Regenerate.
  1921. * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
  1922. fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
  1923. (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
  1924. (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
  1925. (_bfd_aarch64_resize_stubs): Amend comment.
  1926. (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
  1927. requested.
  1928. (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
  1929. (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
  1930. erratum workaround.
  1931. (clear_erratum_843419_entry): Update erratum conditional.
  1932. 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
  1933. PR ld/24571
  1934. * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
  1935. when computing distance_short_enough.
  1936. 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
  1937. PR ld/24564
  1938. * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
  1939. Wrap around even if distance equals avr_pc_wrap_around.
  1940. 2019-05-20 Nick Clifton <nickc@redhat.com>
  1941. * po/fr.po: Updated French translation.
  1942. 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
  1943. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
  1944. 2019-05-16 Alan Modra <amodra@gmail.com>
  1945. * elf32-arm.c (elf32_arm_write_section): Revert last change.
  1946. 2019-05-15 Alan Modra <amodra@gmail.com>
  1947. * elf32-arm.c (elf32_arm_write_section): Don't leave
  1948. error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
  1949. unitialised section contents.
  1950. 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
  1951. PR 19921
  1952. * verilog.c: (VerilogDataWidth): New variable.
  1953. (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
  1954. 2019-05-08 Nick Clifton <nickc@redhat.com>
  1955. PR 24523
  1956. * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
  1957. rather than FALSE if encountering a non-ELF file.
  1958. 2019-05-06 Alan Modra <amodra@gmail.com>
  1959. * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
  1960. 2019-05-06 Alan Modra <amodra@gmail.com>
  1961. * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
  1962. (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
  1963. Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
  1964. * libbfd.h: Regenerate.
  1965. * bfd-in2.h: Regenerate.
  1966. 2019-05-04 Alan Modra <amodra@gmail.com>
  1967. PR 24511
  1968. * syms.c (coff_section_type): Only allow '.', '$' and numeric
  1969. following the standard section names.
  1970. (bfd_decode_symclass): Prioritize section flag tests in
  1971. decode_section_type before name tests in coff_section_type.
  1972. * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
  1973. and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
  1974. their names and choose standard .text section flags for
  1975. fake_section.
  1976. 2019-05-02 Nick Clifton <nickc@redhat.com>
  1977. PR 24493
  1978. * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
  1979. .gnu.debugaltlink sections as debugging sections.
  1980. 2019-04-30 Alan Modra <amodra@gmail.com>
  1981. * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
  1982. (struct _ppc64_elf_section_data): Likewise.
  1983. (ppc64_elf_check_relocs): Set above fields.
  1984. (ppc64_elf_edit_toc): Add a pass over GOT relocs.
  1985. (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
  1986. when possible.
  1987. 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
  1988. PR ld/24486
  1989. * elflink.c (elf_link_output_extsym): Don't complain undefined
  1990. weak dynamic reference.
  1991. 2019-04-25 Sudakshina Das <sudi.das@arm.com>
  1992. * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
  1993. (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
  1994. (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
  1995. (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
  1996. (elfNN_aarch64_small_plt0_pac_entry): Remove.
  1997. (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
  1998. (elfNN_aarch64_small_plt0_bti_entry): Update.
  1999. (elfNN_aarch64_small_plt_bti_entry): Update.
  2000. (elfNN_aarch64_small_plt_pac_entry): Update.
  2001. (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
  2002. (setup_plt_values): Setup new entries.
  2003. (elfNN_aarch64_finish_dynamic_sections): Remove size change.
  2004. (elfNN_aarch64_plt_sym_val): Likewise.
  2005. 2019-04-22 Jim Wilson <jimw@sifive.com>
  2006. * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
  2007. 2019-04-19 Alan Modra <amodra@gmail.com>
  2008. * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
  2009. 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
  2010. * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
  2011. building shared object.
  2012. * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
  2013. 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
  2014. PR ld/24458
  2015. * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
  2016. linker_def.
  2017. 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
  2018. * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
  2019. relocation.
  2020. * bfd-in2.h: Regenerate.
  2021. * libbfd.h: Likewise.
  2022. 2019-04-15 Sudakshina Das <sudi.das@arm.com>
  2023. * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
  2024. * bfd-in2.h: Regenerated.
  2025. * libbfd.h: Regenerated.
  2026. 2019-04-15 Sudakshina Das <sudi.das@arm.com>
  2027. * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
  2028. * bfd-in2.h: Regenerated.
  2029. * libbfd.h: Likewise.
  2030. 2019-04-15 Sudakshina Das <sudi.das@arm.com>
  2031. * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
  2032. * bfd-in2.h: Regenerated.
  2033. * libbfd.h: Regenerated.
  2034. * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
  2035. (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
  2036. and R_ARM_THM_BF12 together.
  2037. (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
  2038. 2019-04-15 Sudakshina Das <sudi.das@arm.com>
  2039. * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
  2040. * libbfd.h: Regenerated.
  2041. * bfd-in2.h: Regenerated.
  2042. * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
  2043. (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
  2044. and R_ARM_THM_BF18 together.
  2045. (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
  2046. 2019-04-15 Sudakshina Das <sudi.das@arm.com>
  2047. * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
  2048. * bfd-in2.h: Regenerated.
  2049. * libbfd.h: Regenerated.
  2050. * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
  2051. (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
  2052. and R_ARM_THM_BF16 together.
  2053. (get_value_helper): New reloc helper.
  2054. (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
  2055. 2019-04-15 Sudakshina Das <sudi.das@arm.com>
  2056. * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
  2057. * bfd-in2.h: Regenerate.
  2058. * libbfd.h: Regenerate.
  2059. 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
  2060. * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
  2061. * bfd-in2.h: Regenerate.
  2062. * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
  2063. * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
  2064. and update assert.
  2065. (using_thumb2): Likewise.
  2066. (using_thumb2_bl): Update assert.
  2067. (arch_has_arm_nop): Likewise.
  2068. (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
  2069. (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
  2070. 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
  2071. * elf-linker-x86.h (elf_x86_cet_report): New.
  2072. (elf_linker_x86_params): Add cet_report.
  2073. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
  2074. missing IBT and SHSTK properties if needed.
  2075. 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
  2076. PR ld/24436
  2077. * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
  2078. "h != NULL". Don't check "h != NULL" before calling.
  2079. bfd_elf_gc_record_vtentry.
  2080. * elf32-arm.c (elf32_arm_check_relocs): Likewise.
  2081. * elf32-bfin.c (bfin_check_relocs): Likewise.
  2082. * elf32-cris.c (cris_elf_check_relocs): Likewise.
  2083. * elf32-csky.c (csky_elf_check_relocs): Likewise.
  2084. * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
  2085. * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
  2086. * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
  2087. * elf32-frv.c (elf32_frv_check_relocs): Likewise.
  2088. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
  2089. * elf32-i386.c (elf_i386_check_relocs): Likewise.
  2090. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
  2091. * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
  2092. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
  2093. * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
  2094. * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
  2095. * elf32-metag.c (elf_metag_check_relocs): Likewise.
  2096. * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
  2097. * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
  2098. * elf32-s390.c (elf_s390_check_relocs): Likewise.
  2099. * elf32-sh.c (sh_elf_check_relocs): Likewise.
  2100. * elf32-v850.c (v850_elf_check_relocs): Likewise.
  2101. * elf32-vax.c (elf_vax_check_relocs): Likewise.
  2102. * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
  2103. * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
  2104. * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
  2105. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
  2106. * elf64-s390.c (elf_s390_check_relocs): Likewise.
  2107. * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
  2108. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
  2109. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
  2110. * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
  2111. VTENTRY entry.
  2112. 2019-04-11 Alan Modra <amodra@gmail.com>
  2113. PR 24435
  2114. * elflink.c (elf_link_add_object_symbols): Don't read partial
  2115. dynamic entries from fuzzed objects.
  2116. 2019-04-11 Tamar Christina <tamar.christina@arm.com>
  2117. PR ld/24302
  2118. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
  2119. DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
  2120. (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
  2121. 2019-04-10 Michael Forney <mforney@mforney.org>
  2122. PR 24427
  2123. * doc/chew.c (free_words): Correctly free "push_text" strings.
  2124. 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
  2125. * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
  2126. 2019-04-08 Alan Modra <amodra@gmail.com>
  2127. * configure.ac (elfxx_x86): Define and use.
  2128. * configure: Regenerate.
  2129. 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
  2130. * elf-linker-x86.h: New file.
  2131. * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
  2132. to get x86-specific linker options.
  2133. * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
  2134. (elf_x86_64_check_relocs): Likewise.
  2135. (elf_x86_64_relocate_section): Likewise.
  2136. (elf_x86_64_link_setup_gnu_properties): Likewise.
  2137. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
  2138. (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
  2139. (_bfd_elf_linker_x86_set_options): New function.
  2140. * elfxx-x86.h: Include "elf-linker-x86.h".
  2141. (elf_x86_link_hash_table): Add params.
  2142. 2019-04-03 Alan Modra <amodra@gmail.com>
  2143. * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
  2144. * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
  2145. * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
  2146. * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
  2147. * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
  2148. * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
  2149. 2019-04-02 Jim Wilson <jimw@sifive.com>
  2150. PR 24389
  2151. * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
  2152. ELF header flags to after check for ELF object file. Loop through
  2153. sections looking for code sections, if none, then skip ABI checks.
  2154. 2019-03-30 Andrew Waterman <andrew@sifive.com>
  2155. * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
  2156. rd == X_RA case.
  2157. 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
  2158. * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
  2159. info->export_dynamic to the conditional.
  2160. 2019-03-28 Alan Modra <amodra@gmail.com>
  2161. PR 24392
  2162. * configure.ac: Invoke AC_CHECK_SIZEOF(int).
  2163. * configure: Regenerate.
  2164. * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
  2165. workaround with SIZEOF_LONG vs. SIZEOF_INT check.
  2166. * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
  2167. * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
  2168. * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
  2169. 2019-03-21 Jim Wilson <jimw@sifive.com>
  2170. PR 24365
  2171. * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
  2172. verify sym non-NULL before using. Add identical check using h.
  2173. 2019-03-21 Sudakshina Das <sudi.das@arm.com>
  2174. * elf-bfd.h (struct elf_backend_data): Add argument to
  2175. merge_gnu_properties.
  2176. * elf-properties.c (elf_merge_gnu_properties): Add argument to
  2177. itself and while calling bed->merge_gnu_properties.
  2178. (elf_merge_gnu_property_list): Update the calls for
  2179. elf_merge_gnu_properties.
  2180. * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
  2181. of --force-bti warning and add argument.
  2182. * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
  2183. warning.
  2184. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
  2185. * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
  2186. declaration.
  2187. 2019-03-20 Sudakshina Das <sudi.das@arm.com>
  2188. * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
  2189. * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
  2190. (elf_backend_fixup_gnu_properties): Define for AArch64.
  2191. 2019-03-18 Alan Modra <amodra@gmail.com>
  2192. PR 24355
  2193. * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
  2194. for local iplt syms with ent->plt.offset == -1. Remove ineffective
  2195. attempt at writing glink stubs only once.
  2196. 2019-03-16 Alan Modra <amodra@gmail.com>
  2197. PR 24337
  2198. * elf.c (_bfd_elf_rela_local_sym): Revert last change.
  2199. (_bfd_elf_rel_local_sym): Likewise.
  2200. * elflink.c (elf_link_input_bfd): Use bfd_und_section for
  2201. section of symbols with unrecognized shndx.
  2202. 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
  2203. PR ld/24267
  2204. * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
  2205. section.
  2206. * cofflink.c (coff_link_add_symbols): Check for symbols defined
  2207. in discarded section.
  2208. 2019-03-15 Alan Modra <amodra@gmail.com>
  2209. PR 24339
  2210. * elflink.c (elf_link_add_object_symbols): Bail out on a local
  2211. symbol after globals if elf_bad_symtab is not set.
  2212. 2019-03-15 Alan Modra <amodra@gmail.com>
  2213. PR 24337
  2214. * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
  2215. (_bfd_elf_rel_local_sym): Likewise.
  2216. 2019-03-15 Alan Modra <amodra@gmail.com>
  2217. PR 24336
  2218. * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
  2219. object files with sh_size not a multiple of sh_entsize.
  2220. 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
  2221. PR ld/24338
  2222. * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
  2223. input with bad relocation.
  2224. 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
  2225. * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
  2226. 2019-03-14 Nick Clifton <nickc@redhat.com>
  2227. PR 24334
  2228. * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
  2229. (save_section_vma): Initialise field to the number of entries in
  2230. the sec_vma table.
  2231. (section_vma_same): Check that the number of entries in the
  2232. sec_vma table matches the number of sections in the bfd.
  2233. 2019-03-14 Nick Clifton <nickc@redhat.com>
  2234. PR 24333
  2235. * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
  2236. section owner pointer when adding the default symbol.
  2237. 2019-03-14 Nick Clifton <nickc@redhat.com>
  2238. PR 24332
  2239. * elflink.c (elf_link_add_object_symbols): Add new local variable
  2240. extversym_end. Initialise it to point to the end of the version
  2241. symbol table, if present. Check it when initialising and updating
  2242. the ever pointer.
  2243. 2019-03-13 Sudakshina Das <sudi.das@arm.com>
  2244. * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
  2245. (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
  2246. (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
  2247. (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
  2248. and PLT_PAC_PLT.
  2249. (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
  2250. (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
  2251. (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
  2252. 2019-03-13 Sudakshina Das <sudi.das@arm.com>
  2253. Szabolcs Nagy <szabolcs.nagy@arm.com>
  2254. * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
  2255. (aarch64_bti_pac_info): New.
  2256. (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
  2257. (bfd_elf32_aarch64_set_options): Likewise.
  2258. * bfd-in2.h: Regenerate
  2259. * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
  2260. (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
  2261. (elfNN_aarch64_small_plt0_bti_entry): New.
  2262. (elfNN_aarch64_small_plt_bti_entry): New.
  2263. (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
  2264. (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
  2265. (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
  2266. tlsdesc_plt_entry_size fields.
  2267. (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
  2268. (setup_plt_values): New helper function.
  2269. (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
  2270. bti enable type.
  2271. (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
  2272. fixed macros.
  2273. (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
  2274. (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
  2275. to plt stubs instead of fixed ones and update filling them according
  2276. to the need for bti.
  2277. (elfNN_aarch64_init_small_plt0_entry): Likewise.
  2278. (elfNN_aarch64_finish_dynamic_sections): Likewise.
  2279. (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
  2280. (elfNN_aarch64_plt_sym_val): Update size accordingly.
  2281. (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
  2282. is set.
  2283. (bfd_elfNN_get_synthetic_symtab): Define.
  2284. (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
  2285. and mising BTI NOTE SECTION.
  2286. 2019-03-13 Sudakshina Das <sudi.das@arm.com>
  2287. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
  2288. linker created inputs from merge.
  2289. * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
  2290. GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
  2291. (elfNN_aarch64_link_setup_gnu_properties): New.
  2292. (elfNN_aarch64_merge_gnu_properties): New.
  2293. (elf_backend_setup_gnu_properties): Define for AArch64.
  2294. (elf_backend_merge_gnu_properties): Likewise.
  2295. * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
  2296. (_bfd_aarch64_elf_parse_gnu_properties): Define.
  2297. (_bfd_aarch64_elf_merge_gnu_properties): Define.
  2298. * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
  2299. (_bfd_aarch64_elf_parse_gnu_properties): Declare.
  2300. (_bfd_aarch64_elf_merge_gnu_properties): Declare.
  2301. (elf_backend_parse_gnu_properties): Define for AArch64.
  2302. 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
  2303. PR ld/24322
  2304. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
  2305. merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
  2306. 2019-03-12 Alan Modra <amodra@gmail.com>
  2307. * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
  2308. nmemb parameter. Use bfd_alloc2.
  2309. (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
  2310. Delete assertion.
  2311. (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
  2312. (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
  2313. * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
  2314. doesn't overflow.
  2315. * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
  2316. (assign_section_numbers): Style fix.
  2317. (swap_out_syms): Use bfd_malloc2.
  2318. (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
  2319. overflow.
  2320. (_bfd_elf_make_empty_symbol): Style fix.
  2321. (elfobj_grok_stapsdt_note_1): Formatting.
  2322. * elfcode.h (elf_object_p): Use bfd_alloc2.
  2323. (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
  2324. (elf_slurp_symbol_table): Use bfd_zalloc2.
  2325. (elf_slurp_reloc_table): Use bfd_alloc2.
  2326. (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
  2327. * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
  2328. size calculation doesn't overflow.
  2329. (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
  2330. * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
  2331. * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
  2332. 2019-03-08 Alan Modra <amodra@gmail.com>
  2333. PR 24311
  2334. * merge.c (merge_strings): Return secinfo. Don't pad section
  2335. to alignment here.
  2336. (_bfd_merge_sections): Pad section to alignment here, if input
  2337. sections contributing to merged output all pad to alignment.
  2338. Formatting.
  2339. 2019-03-06 Nick Clifton <nickc@redhat.com>
  2340. * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
  2341. table pointer.
  2342. * coffgen.c (coff_find_nearest_line_with_names): Do not call
  2343. _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
  2344. 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
  2345. This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
  2346. 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
  2347. PR 20113
  2348. * elf32-s390.c (allocate_dynrelocs): Update comment.
  2349. 2019-02-28 Tamar Christina <tamar.christina@arm.com>
  2350. * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
  2351. 2019-02-28 Nick Clifton <nickc@redhat.com>
  2352. PR 24273
  2353. * elf.c (bfd_elf_string_from_elf_section): Check for a string
  2354. section that is not NUL terminated.
  2355. 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
  2356. PR ld/24276
  2357. * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
  2358. by linker when checking copy reloc on protected symbol.
  2359. 2019-02-24 Alan Modra <amodra@gmail.com>
  2360. PR 24144
  2361. * pdp11.c (set_section_contents): Revert 2015-02-24 change.
  2362. 2019-02-20 Eric Tsai <erictsai@cadence.com>
  2363. * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
  2364. sections between the call site and call destination and adjust
  2365. call distance by the largest alignment.
  2366. 2019-02-20 Alan Hayward <alan.hayward@arm.com>
  2367. * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
  2368. * elf.c (elfcore_grok_aarch_pauth): New function.
  2369. (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
  2370. (elfcore_write_aarch_pauth): New function.
  2371. (elfcore_write_register_note): Check for AArch64 pauth section.
  2372. 2019-02-20 Alan Modra <amodra@gmail.com>
  2373. PR 24225
  2374. * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
  2375. return value.
  2376. 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
  2377. * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
  2378. Darwin hosts, not just or1k.
  2379. * configure: Regenerate.
  2380. 2019-02-20 Alan Modra <amodra@gmail.com>
  2381. PR 24236
  2382. * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
  2383. sentinel NUL to string buffer nearer to loop where it is used.
  2384. Don't go past sentinel when scanning strings, and don't write
  2385. NUL again.
  2386. * archive.c (do_slurp_coff_armap): Simplify string handling to
  2387. archive64.c style.
  2388. 2019-02-19 Alan Modra <amodra@gmail.com>
  2389. PR 24235
  2390. * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
  2391. attempting to prevent read past end of section.
  2392. 2019-02-18 Alan Modra <amodra@gmail.com>
  2393. PR 24225
  2394. * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
  2395. PRIx64 to generate warning messages. Print local sym names too.
  2396. 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
  2397. * elf32-arc (INIT_SYM_STRING): Delete.
  2398. (FINI_SYM_STRING): Likewise.
  2399. (init_str): Likewise.
  2400. (fini_str): Likewise.
  2401. 2019-02-08 Alan Modra <amodra@gmail.com>
  2402. * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
  2403. for bss-plt" warning to make it an error.
  2404. 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
  2405. PR ld/18841
  2406. * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
  2407. reloc_class_ifunc for ifunc symbols.
  2408. * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
  2409. 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
  2410. * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
  2411. <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
  2412. 2019-02-07 Nick Clifton <nickc@redhat.com>
  2413. * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
  2414. into the definitely obsolete list.
  2415. 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
  2416. PR ld/24151
  2417. * elf64-x86-64.c (elf_x86_64_need_pic): Check
  2418. SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
  2419. (elf_x86_64_relocate_section): Move PIC check for PC-relative
  2420. relocations to ...
  2421. (elf_x86_64_check_relocs): Here.
  2422. (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
  2423. to check if a symbol is defined in a non-shared object.
  2424. * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
  2425. 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
  2426. * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
  2427. of 'labs' (and fix GCC warning).
  2428. 2019-01-25 Nick Clifton <nickc@redhat.com>
  2429. * po/ru.po: Updated Russian translation.
  2430. 2019-01-23 Nick Clifton <nickc@redhat.com>
  2431. * po/fr.po: Updated French translation.
  2432. 2019-01-21 Nick Clifton <nickc@redhat.com>
  2433. * po/pt.po: Updated Portuguese translation.
  2434. * po/uk.po: Updated Ukranian translation.
  2435. 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
  2436. PR 24108
  2437. * elf32-nds32.c (nds32_relocate_section): Add space between words
  2438. in error message.
  2439. * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
  2440. error message.
  2441. (riscv_i_or_e_p): Likewise.
  2442. (riscv_merge_arch_attr_info): Likewise.
  2443. 2019-01-19 Nick Clifton <nickc@redhat.com>
  2444. * version.m4: Reset to 2.32.51
  2445. * configure: Regenerate.
  2446. * po/bfd.pot: Regenerate.
  2447. 2018-06-24 Nick Clifton <nickc@redhat.com>
  2448. 2.32 branch created.
  2449. 2019-01-16 Kito Cheng <kito@andestech.com>
  2450. * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
  2451. for OBJ_ATTR_PROC.
  2452. 2019-01-16 Kito Cheng <kito@andestech.com>
  2453. Nelson Chu <nelson@andestech.com>
  2454. * elfnn-riscv.c (in_subsets): New.
  2455. (out_subsets): Likewise.
  2456. (merged_subsets): Likewise.
  2457. (riscv_std_ext_p): Likewise.
  2458. (riscv_non_std_ext_p): Likewise.
  2459. (riscv_std_sv_ext_p): Likewise.
  2460. (riscv_non_std_sv_ext_p): Likewise.
  2461. (riscv_version_mismatch): Likewise.
  2462. (riscv_i_or_e_p): Likewise.
  2463. (riscv_merge_std_ext): Likewise.
  2464. (riscv_merge_non_std_and_sv_ext): Likewise.
  2465. (riscv_merge_arch_attr_info): Likewise.
  2466. (riscv_merge_attributes): Likewise.
  2467. (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
  2468. * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
  2469. (elf_backend_obj_attrs_vendor): Define.
  2470. (elf_backend_obj_attrs_section_type): Likewise.
  2471. (elf_backend_obj_attrs_section): Likewise.
  2472. (elf_backend_obj_attrs_arg_type): Define as
  2473. riscv_elf_obj_attrs_arg_type.
  2474. * elfxx-riscv.c (riscv_estimate_digit): New.
  2475. (riscv_estimate_arch_strlen1): Likewise.
  2476. (riscv_estimate_arch_strlen): Likewise.
  2477. (riscv_arch_str1): Likewise.
  2478. (riscv_arch_str): Likewise.
  2479. * elfxx-riscv.h (riscv_arch_str): Declare.
  2480. 2019-01-14 John Darrington <john@darrington.wattle.id.au>
  2481. * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
  2482. * libbfd.h: regen.
  2483. * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
  2484. source field. (md_apply_fix): Apply final fix
  2485. to BFD_RELOC_S12Z_OPR.
  2486. * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
  2487. 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
  2488. PR 20113
  2489. * elf32-s390.c (allocate_dynrelocs): Update comment.
  2490. 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
  2491. * warning.m4: Adjust egrep pattern for non-GNU compilers.
  2492. * configure: Regenerate.
  2493. 2019-01-08 Alan Modra <amodra@gmail.com>
  2494. PR 23699
  2495. PR 24065
  2496. * ihex.c (ihex_write_object_contents): Properly check 32-bit
  2497. address range.
  2498. 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
  2499. * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
  2500. * bfd/bfd-in2.h: Regenerate.
  2501. * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
  2502. * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
  2503. 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
  2504. * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
  2505. default target, little endian target is more suitable.
  2506. 2019-01-04 Alan Modra <amodra@gmail.com>
  2507. PR 24061
  2508. PR 21786
  2509. * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
  2510. adjust all callers.
  2511. (EQ_VALUE_IN_FIELD): Likewise.
  2512. * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
  2513. 2019-01-01 Alan Modra <amodra@gmail.com>
  2514. Update year range in copyright notice of all files.
  2515. For older changes see ChangeLog-2018
  2516. Copyright (C) 2019 Free Software Foundation, Inc.
  2517. Copying and distribution of this file, with or without modification,
  2518. are permitted in any medium without royalty provided the copyright
  2519. notice and this notice are preserved.
  2520. Local Variables:
  2521. mode: change-log
  2522. left-margin: 8
  2523. fill-column: 74
  2524. version-control: never
  2525. End: