1 2019-10-09 Alan Modra <amodra@gmail.com>
4 2019-10-07 Alan Modra <amodra@gmail.com>
5 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
7 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
9 2019-10-07 Alan Modra <amodra@gmail.com>
10 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
11 space for local got non-tls relocs when PIE.
13 2019-10-04 Alan Modra <amodra@gmail.com>
14 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
15 (ppc64_elf_tls_optimize): Correct is_local condition.
16 (allocate_got): Don't reserve dynamic relocations for any of the
17 tls got relocs in PIEs when the symbol is local.
18 (allocate_dynrelocs): Correct validity test for local sym using
20 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
21 for any of the tls got relocs in PIEs.
22 (ppc64_elf_layout_multitoc): Likewise.
23 (ppc64_elf_relocate_section): Correct validity test for local sym
24 using tlsld_got slot. Don't emit dynamic relocations for any of
25 the tls got relocs in PIEs when the symbol is local.
26 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
27 (got_relocs_needed): Delete.
28 (allocate_dynrelocs): Correct validity test for local sym using
29 tlsld_got slot. Don't reserve dynamic relocations for any of the
30 tls got relocs in PIEs when the symbol is local.
31 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
32 for any of the tls got relocs in PIEs.
33 (ppc_elf_relocate_section): Correct validity test for local sym
34 using tlsld_got slot. Don't emit dynamic relocations for any of
35 the tls got relocs in PIEs when the symbol is local.
37 2019-09-26 Alan Modra <amodra@gmail.com>
39 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
40 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
41 ${bindir}/../lib/bfd-plugins if different.
42 * Makefile.in: Regenerate.
44 2019-09-30 Phil Blundell <pb@pbcl.net>
47 * version.m4 (BFD_VERSION): Set to 2.33.
48 * development.sh (development, experimental): Set to false.
49 * configure, Makefile.in, doc/Makefile.in, po/bfd.pot: Regenerate.
51 2019-09-16 Phil Blundell <pb@pbcl.net>
53 * version.m4: Set version to 2.32.90 for pre-release.
54 * Makefile.in, doc/Makefile.in, configure: Regenerated.
56 2019-09-09 Phil Blundell <pb@pbcl.net>
58 binutils 2.33 branch created.
60 2019-09-06 Alan Modra <amodra@gmail.com>
62 * aout-target.h (object_p): Formatting.
63 * bfd-in.h (bfd_get_filename): Don't cast to char*.
64 * corefile.c (generic_core_file_matches_executable_p): Constify
65 variables and remove cast.
66 * bfd-in2.h: Regenerate.
68 2019-09-05 Alan Modra <amodra@gmail.com>
70 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
71 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
72 in the GOT/PLT entry rather than affecting the offset to that
74 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
76 2019-09-05 Alan Modra <amodra@gmail.com>
78 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
79 in second instruction.
80 (ppc64_elf_relocate_section): Likewise.
82 2019-09-05 Alan Modra <amodra@gmail.com>
85 * libbfd-in.h (bfd_strdup): New inline function.
86 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
88 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
89 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
91 (bfd_openstreamr): Use bfd_strdup.
92 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
93 * plugin.c (try_load_plugin): Use bfd_malloc.
94 * libbfd.h: Regenerate.
96 2019-09-02 Alan Modra <amodra@gmail.com>
99 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
101 (read_alt_indirect_string): Likewise.
102 (read_alt_indirect_ref): Likewise.
104 2019-08-31 Jim Wilson <jimw@sifive.com>
107 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
108 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
110 2019-08-30 Jim Wilson <jimw@sifive.com>
112 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
113 error, call bfd_set_error, set ret to FALSE, and goto out label.
115 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
118 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
119 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
121 2019-08-29 Alan Modra <amodra@gmail.com>
124 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
125 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
126 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
129 2019-08-29 Alan Modra <amodra@gmail.com>
131 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
132 on second insn, return it in poff.
133 (ppc64_elf_relocate_section): Add offset to paddi addend for
136 2019-08-28 Jim Wilson <jimw@sifive.com>
138 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
139 section when setting max_alignment. Update comment.
140 (_bfd_riscv_relax_pc): Likewise.
142 2019-08-29 Alan Modra <amodra@gmail.com>
145 * bfd.c (struct bfd): Add no_element_cache.
146 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
147 archive cache when no_element_cache.
148 (bfd_generic_archive_p): Set no_element_cache when opening first
149 element to check format. Close first element too.
150 (do_slurp_bsd_armap): Don't zero ardata->cache here.
151 * bfd-in2.h: Regenerate.
153 2019-08-24 Alan Modra <amodra@gmail.com>
155 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
156 symbols from GOT optimisation.
158 2019-08-23 Stafford Horne <shorne@gmail.com>
160 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
163 2019-08-23 Nick Clifton <nickc@redhat.com>
166 * elf.c (bfd_section_from_shdr): Issue an informative warning
167 message and continue processing other sections after encountering
168 a reloc section for a section which already has other relocs
171 2019-08-23 Alan Modra <amodra@gmail.com>
174 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
175 on error without freeing plts[] contents.
177 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
179 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
181 2019-08-22 Nick Clifton <nickc@redhat.com>
184 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
185 reading data from extra records.
187 2019-08-22 Tamar Christina <tamar.christina@arm.com>
190 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
191 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
192 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
193 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
196 2019-08-22 Alan Modra <amodra@gmail.com>
198 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
199 instead recognize CMSE_PREFIX in symbol name.
200 (elf32_arm_gc_mark_extra_sections): Likewise.
201 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
202 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
204 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
206 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
207 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
209 2019-08-20 Tamar Christina <tamar.christina@arm.com>
211 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
212 elf32_arm_stub_long_branch_v4t_thumb_thumb,
213 elf32_arm_stub_long_branch_v4t_thumb_arm,
214 elf32_arm_stub_short_branch_v4t_thumb_arm,
215 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
216 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
217 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
218 previous instruction.
220 2019-08-19 Tom Tromey <tromey@adacore.com>
222 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
225 2019-08-19 Alan Modra <amodra@gmail.com>
227 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
229 (struct _ppc64_elf_section_data): Likewise.
230 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
231 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
232 than TOC loop. Check PLT16 insns too.
234 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
237 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
238 PC-relative relocations back to ...
239 (elf_x86_64_relocate_section): Here.
241 2019-08-16 Martin Liska <mliska@suse.cz>
244 * elflink.c: Report error only for not relocatable.
245 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
246 here lto_slim_object as it's handled in caller.
248 2019-08-16 Alan Modra <amodra@gmail.com>
250 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
252 2019-08-15 Jim Wilson <jimw@sifive.com>
254 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
255 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
256 to c.li instruction, and use ENCODE_RVC_IMM to set value.
258 2019-08-15 Tom Tromey <tromey@adacore.com>
260 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
263 2019-08-14 Alan Modra <amodra@gmail.com>
266 * dwarf2.c (stash_comp_unit): New function, extracted from..
267 (_bfd_dwarf2_find_nearest_line): ..here.
268 (find_abstract_instance): Parse comp units and decode line info
271 2019-08-14 Alan Modra <amodra@gmail.com>
273 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
274 (comp_unit_find_nearest_line): Use it here..
275 (_bfd_dwarf2_find_symbol_bias): ..and here.
277 2019-08-14 Alan Modra <amodra@gmail.com>
279 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
280 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
281 * coffgen.c (coff_find_nearest_line_with_names): Adjust
282 _bfd_dwarf2_find_nearest_line calls.
283 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
284 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
285 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
286 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
287 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
288 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
289 * libbfd.h: Regenerate.
291 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
293 * elf-bfd.h (struct elf_backend_data): New members.
294 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
295 .gnu.hash section if necessary.
296 (struct collect_gnu_hash_codes): New member.
297 (elf_gnu_hash_process_symidx): New function name.
298 (elf_renumber_gnu_hash_syms): Ignore local and undefined
299 symbols. Record xlat location for every symbol which should have
301 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
302 dynamic section if necessary.
303 (GNU_HASH_SECTION_NAME): New define.
304 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
305 Update the section size info.
306 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
307 (struct mips_elf_link_hash_entry): New member.
308 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
310 (mips_elf_sort_hash_table): Initialize the pointer to the
312 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
313 translation table entry with the symbol dynindx.
314 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
315 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
317 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
319 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
321 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
322 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
324 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
325 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
326 (_bfd_mips_post_process_headers): Mark the ABI version as
327 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
328 but not a .hash section.
329 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
330 position in the translation table, associated with the hash
332 * elfxx-mips.h (literal_reloc_p): Define
333 elf_backend_record_xhash_symbol backend hook.
334 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
337 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
339 * elf64-bpf.c (bpf_elf_relocate_section): New function.
340 (bpf_elf_insn_disp_reloc): Delete function.
341 (elf_backend_relocate_section): Define.
343 2019-08-07 Alan Modra <amodra@gmail.com>
346 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
347 for overflow in expressions involving nsymz.
349 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
351 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
352 two pages in relro presence.
354 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
356 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
357 (get_wsr_lbeg_opcode): New functions.
358 (check_loop_aligned): Detect relaxed loops and adjust loop_len
359 and insn_len for the first actual instruction of the loop.
361 2019-07-30 Alan Modra <amodra@gmail.com>
364 * bfd.c (struct bfd): Add lto_slim_object flag.
365 * bfd-in2.h: Regenerate.
367 2019-07-29 Martin Liska <mliska@suse.cz>
370 * archive.c (_bfd_compute_and_write_armap): Come up with
371 report_plugin_err variable.
372 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
373 * elf.c (struct lto_section): New.
374 (_bfd_elf_make_section_from_shdr): Parse content of
375 .gnu_lto_.lto section.
376 * elflink.c: Report error for a missing LTO plugin.
377 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
379 2019-07-28 Alan Modra <amodra@gmail.com>
383 * elflink.c (elf_link_add_object_symbols): Report an informative
384 error on finding local symbols with index equal or greater than
385 symbol table sh_info. Correct comment. Allow such symbols in
386 dynamic objects. Abort on NULL section for symbol.
388 2019-07-26 Alan Modra <amodra@gmail.com>
390 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
391 (elf_linker): Don't define.
392 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
394 2019-07-25 YunQiang Su <syq@debian.org>
397 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
400 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
402 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
404 (reloc_type_to_name): Fix formating.
405 (arc_elf_object_p): Likewise.
406 (debug_arc_reloc): Likewise.
407 (arc_do_relocation): Likewise.
409 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
411 * elf32-arc.c (bfd_get_32_me): New function.
412 (bfd_put_32_me): Likewise.
413 (arc_elf_relax_section): Likewise.
414 (bfd_elf32_bfd_relax_section): Define.
416 2019-07-24 Alan Modra <amodra@gmail.com>
418 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
419 elf_backend_final_write_processing, don't pass linker arg.
420 (_bfd_elf_final_write_processing): Update prototype.
421 * elf.c (_bfd_elf_write_object_contents): Adjust call.
422 (_bfd_elf_final_write_processing): Return error on incompatible
423 OSABI and has_gnu_osabi. Remove linker arg.
424 * elf-nacl.h (nacl_final_write_processing): Update prototype.
425 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
426 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
427 (_bfd_mips_elf_final_write_processing): Likewise.
428 * elf-hppa.h (elf_hppa_final_write_processing): Return status
429 and remove linker arg.
430 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
431 * elf-nacl.c (nacl_final_write_processing): Likewise.
432 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
433 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
434 * elf32-arm.c (arm_final_write_processing): Likewise.
435 (elf32_arm_final_write_processing): Likewise.
436 (elf32_arm_nacl_final_write_processing): Likewise.
437 (elf32_arm_vxworks_final_write_processing): Likewise.
438 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
439 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
440 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
441 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
442 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
443 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
444 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
445 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
446 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
447 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
448 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
449 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
450 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
451 * elf32-ppc.c (ppc_final_write_processing): Likewise.
452 (ppc_elf_final_write_processing): Likewise.
453 (ppc_elf_vxworks_final_write_processing): Likewise.
454 * elf32-sparc.c (sparc_final_write_processing): Likewise.
455 (elf32_sparc_final_write_processing): Likewise.
456 (elf32_sparc_vxworks_final_write_processing): Likewise.
457 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
458 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
459 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
460 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
461 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
462 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
463 (_bfd_mips_elf_final_write_processing): Likewise.
465 2019-07-24 Alan Modra <amodra@gmail.com>
467 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
469 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
470 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
472 2019-07-24 Alan Modra <amodra@gmail.com>
474 * elf32-visium.c (visium_elf_post_process_headers): Don't set
475 EI_OSABI header byte here.
478 2019-07-23 Alan Modra <amodra@gmail.com>
480 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
481 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
482 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
483 when elf_gnu_osabi_mbind is set.
484 (_bfd_elf_map_sections_to_segments): Likewise.
485 (_bfd_elf_init_private_section_data): Likewise.
486 (_bfd_elf_final_write_processing): Update comment.
487 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
488 (elf_backend_special_sections): Define without .tbss for linux.
490 2019-07-23 Alan Modra <amodra@gmail.com>
492 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
493 Remove none, any, all enums.
494 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
495 (_bfd_elf_final_write_processing): Declare.
496 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
497 elf_backend_final_write_processing.
498 (_bfd_elf_post_process_headers): Move body of function to..
499 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
500 only when not already set. Adjust for rename.
501 * elfxx-target.h (elf_backend_final_write_processing): Default to
502 _bfd_elf_final_write_processing.
503 * elf-hppa.h (elf_hppa_final_write_processing): Call
504 _bfd_elf_final_write_processing.
505 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
506 * elf-nacl.c (nacl_final_write_processing): Likewise.
507 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
508 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
509 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
510 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
511 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
512 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
513 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
514 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
515 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
516 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
517 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
518 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
519 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
520 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
521 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
522 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
523 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
524 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
525 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
526 * elf32-arm.c (arm_final_write_processing): Split out from..
527 (elf32_arm_final_write_processing): ..here. Call
528 _bfd_elf_final_write_processing.
529 (elf32_arm_nacl_final_write_processing): Adjust.
530 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
531 (_bfd_mips_elf_final_write_processing): ..here. Call
532 _bfd_elf_final_write_processing.
533 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
534 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
535 * elf32-ppc.c (ppc_final_write_processing): Split out from..
536 (ppc_elf_final_write_processing): ..here. Call
537 _bfd_elf_final_write_processing.
538 (ppc_elf_vxworks_final_write_processing): Adjust.
539 * elf32-sparc.c (sparc_final_write_processing): Split out from..
540 (elf32_sparc_final_write_processing): ..here. Call
541 _bfd_elf_final_write_processing.
542 (elf32_sparc_vxworks_final_write_processing): Adjust.
543 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
544 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
545 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
546 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
547 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
548 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
549 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
550 * elflink.c (elf_link_add_object_symbols): Likewise.
551 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
554 2019-07-23 Omar Majid <omajid@redhat.com>
556 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
557 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
558 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
560 * peXXigen.c: Add comment about source of .NET magic numbers.
562 2019-07-19 Alan Modra <amodra@gmail.com>
564 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
565 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
566 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
567 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
568 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
569 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
570 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
571 (ppc64_elf_check_relocs): Support pcrel tls relocs.
572 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
573 * bfd-in2.h: Regenerate.
574 * libbfd.h: Regenerate.
576 2019-07-18 Alan Modra <amodra@gmail.com>
578 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
579 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
582 2019-07-18 Alan Modra <amodra@gmail.com>
584 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
585 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
587 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
588 tls_type vars unsigned int.
589 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
590 to select r_type edit.
592 2019-07-18 Alan Modra <amodra@gmail.com>
594 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
596 * elf64-ppc.c (TLS_GDIE): Likewise.
598 2019-07-18 Alan Modra <amodra@gmail.com>
600 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
601 range of tp-relative offsets.
603 2019-07-15 Alan Modra <amodra@gmail.com>
605 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
606 alias is no longer bfd_link_hash_defined, clear the alias.
608 2019-07-13 Alan Modra <amodra@gmail.com>
610 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
612 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
613 (_bfd_elf_init_2_index_sections): Likewise.
614 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
615 relocations for local TLS symbols, use STN_UNDEF as the relocation
617 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
618 leave TLS symbol value in the addend.
620 2019-07-08 Alan Modra <amodra@gmail.com>
623 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
624 size before reading first word.
626 2019-07-02 Nick Clifton <nickc@redhat.com>
629 * elf.c (is_debuginfo_file): New function.
630 (assign_file_positions_for_non_load_sections): Do not warn about
631 allocated sections outside of loadable segments if they are found
633 * elf-bfd.h (is_debuginfo_file): Prototype.
635 2019-07-02 Nick Clifton <nickc@redhat.com>
638 * compress.c (bfd_get_full_section_contents): Do not complain
639 about linker created sections that are larger than the file size.
641 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
643 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
644 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
646 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
648 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
650 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
651 sections when .text section contain secure entry functions
654 2019-07-01 Nick Clifton <nickc@redhat.com>
657 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
658 section VMA in the offset used to update exidx relocs.
660 2019-06-28 Nick Clifton <nickc@redhat.com>
663 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
664 large version reference section.
665 * compress.c (bfd_get_full_section_contents): Check for an
666 uncompressed section whose size is larger than the file size.
668 2019-06-28 Alan Modra <amodra@gmail.com>
670 * format.c (bfd_check_format_matches): Don't match plugin target
671 if another target matches. Expand comment.
672 * targets.c (_bfd_target_vector): Move plugin_vec after all other
673 non-corefile targets, outside !SELECT_VECS.
674 * config.bfd: Don't handle targ=plugin here.
675 * configure.ac: Don't add plugin to enable_targets or handle in
676 target loop setting selvecs and other target vars.
677 * configure: Regenerate.
679 2019-06-26 Nick Clifton <nickc@redhat.com>
682 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
683 messages for failures.
684 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
685 if returning an error value.
687 2019-06-25 Jan Beulich <jbeulich@suse.com>
689 * elf-properties.c (elf_find_and_remove_property): Rename last
690 parameter. Mention it in comment.
692 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
694 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
695 SEC_MERGE or SEC_CODE flags are set.
696 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
697 symtype consistently. Don't include sec_addr (sym_sec) in symval.
698 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
699 Add sec_addr (sym_sec) after handling merge sections.
701 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
704 * elf-properties.c (elf_merge_gnu_property_list): Remove the
705 property after reporting property removal.
707 2019-06-23 Alan Modra <amodra@gmail.com>
710 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
711 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
712 Reduce range of offsets allowed for other GOT relocs.
714 2019-06-23 Alan Modra <amodra@gmail.com>
717 * elfcode.h (elf_object_p): Warning fix.
719 2019-06-21 Alan Modra <amodra@gmail.com>
722 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
724 2019-06-19 Alan Modra <amodra@gmail.com>
727 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
728 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
730 2019-06-19 Alan Modra <amodra@gmail.com>
732 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
733 functions that require r2 valid to use local entry.
734 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
736 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
738 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
739 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
740 with elfNN_aarch64_allocate_local_dynrelocs.
742 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
744 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
746 2019-06-14 Alan Modra <amodra@gmail.com>
748 * Makefile.in: Regenerate.
749 * configure: Regenerate.
751 2019-06-14 Alan Modra <amodra@gmail.com>
753 * elf64-ppc.c: Fix comments involving paddi.
755 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
758 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
759 absent, or the bfd is not in the ELF formart.
760 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
762 2019-06-10 Christos Zoulas <christos@zoulas.com>
765 * elf.c (elfcore_make_auxv_note_section): New function.
766 (elfcore_grok_note): Use it.
767 (elfcore_grok_freebsd_note): Likewise.
768 (elfcore_grok_openbsd_note): Likewise.
769 (elfcore_grok_netbsd_note): Likewise. Plus add support for
770 NT_NETBSDCORE_AUXV notes.
772 2019-06-06 Sudakshina Das <sudi.das@arm.com>
774 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
775 alignment of the new gnu property section.
777 2019-06-06 Sudakshina Das <sudi.das@arm.com>
779 * bfd-in.h: Change comment.
780 * bfd-in2.h: Regenerate.
781 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
782 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
785 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
787 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
788 Remove overflow check.
790 2019-05-28 Alan Modra <amodra@gmail.com>
793 * cofflink.c (coff_link_check_archive_element): Don't assume
794 element is a coff object file after calling add_archive_element.
796 2019-05-28 Alan Modra <amodra@gmail.com>
799 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
800 attempt to set sh_entsize for excluded PLT section.
802 2019-05-28 Alan Modra <amodra@gmail.com>
805 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
806 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
807 allocated in alpha_dynamic_entries_for_reloc.
809 2019-05-28 Alan Modra <amodra@gmail.com>
812 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
813 on NULL output_section.
814 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
816 2019-05-28 Alan Modra <amodra@gmail.com>
819 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
820 entry when MUST_FIND. Abort when MUST_FIND not found.
821 (elf_m68k_get_bfd2got_entry): Likewise.
822 (elf_m68k_relocate_section): Remove now useless assert.
824 2019-05-28 Alan Modra <amodra@gmail.com>
827 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
828 from bfd_link_info, not an output section owner.
829 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
830 (elf_hppa_final_link_relocate): Likewise.
832 2019-05-28 Alan Modra <amodra@gmail.com>
835 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
836 create_object_symbols_section, obj_textsec, obj_datasec or
837 obj_bsssec. Fix other errors in placement.
838 * config.bfd: Obsolete tic30-aout.
840 2019-05-28 Alan Modra <amodra@gmail.com>
843 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
844 end of section list as well as section_count.
845 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
846 section list before returning error.
848 2019-05-27 Alan Modra <amodra@gmail.com>
850 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
852 2019-05-27 Alan Modra <amodra@gmail.com>
855 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
857 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
859 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
860 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
861 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
862 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
863 (elf_backend_merge_symbol_attribute): Define.
865 2019-05-24 Alan Modra <amodra@gmail.com>
867 * po/SRC-POTFILES.in: Regenerate.
869 2019-05-24 Alan Modra <amodra@gmail.com>
871 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
872 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
873 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
874 (struct ppc_link_hash_table): Add powerxx_stubs.
875 (ppc64_elf_check_relocs): Set powerxx_stubs.
876 (build_powerxx_offset, size_powerxx_offset),
877 (num_relocs_for_powerxx_offset),
878 (emit_relocs_for_powerxx_offset): New functions.
879 (plt_stub_size): Size powerxx stubs.
880 (ppc_build_one_stub): Emit powerxx stubs.
881 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
884 2019-05-24 Alan Modra <amodra@gmail.com>
886 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
888 (xlate_pcrel_opt): New function.
889 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
890 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
891 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
893 2019-05-24 Alan Modra <amodra@gmail.com>
895 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
896 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
897 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
898 (BFD_RELOC_PPC64_PLT_PCREL34),
899 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
900 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
901 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
902 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
903 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
904 * elf64-ppc.c (PNOP): Define.
905 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
906 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
907 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
909 (ppc64_elf_prefix_reloc): New function.
910 (struct ppc_link_hash_table): Add notoc_plt.
911 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
912 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
913 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
914 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
915 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
916 possible need for dynamic relocs on non-pcrel powerxx relocs.
917 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
918 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
919 (toc_adjusting_stub_needed): Likewise.
920 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
921 (ppc64_elf_relocate_section): Handle new powerxx relocs.
922 * bfd-in2.h: Regenerate.
923 * libbfd.h: Regenerate.
925 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
927 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
928 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
930 * configure: Regenerate.
932 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
934 * configure: Regenerated.
935 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
936 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
937 (BFD64_BACKENDS): Add elf64-bpf.lo.
938 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
939 * Makefile.in (SOURCE_HFILES): Regenerate.
940 * config.bfd (targ_cpu): Handle bpf-*-* targets.
941 * cpu-bpf.c: New file.
942 * elf64-bpf.c: Likewise.
943 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
945 * archures.c: Define architecture bfd_arch_bpf and machine
947 * reloc.c: Define BFD relocations used by the BPF target.
948 * bfd-in2.h: Regenerated.
949 * libbfd.h: Likewise.
951 2019-05-22 Alan Modra <amodra@gmail.com>
953 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
956 2019-05-22 Alan Modra <amodra@gmail.com>
958 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
959 processing on "size error in section".
961 2019-05-22 Alan Modra <amodra@gmail.com>
963 * som.c (som_bfd_free_cached_info): Call
964 _bfd_generic_close_and_cleanup.
966 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
968 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
969 for TLS_TPREL_HI16(/LO16) relocations in shared library.
971 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
973 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
974 checks. Search the RELA table for n64 relocations.
976 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
977 Faraz Shahbazker <fshahbazker@wavecomp.com>
979 * elfxx-mips.c (LA25_BC): New macro.
980 (mips_elf_link_hash_table)<compact_branches>: New field.
981 (STUB_JALRC): New macro.
982 (mipsr6_o32_exec_plt0_entry_compact): New array.
983 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
984 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
985 (mipsr6_exec_plt_entry_compact): Likewise.
986 (mips_elf_create_la25_stub): Use BC instead of J for stubs
987 when compact_branches is true.
988 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
989 PLT for MIPSR6 with compact_branches. Do not reorder the
990 compact branches PLT. Switch the lazy stub for MIPSR6
991 with compact_branches to use JALRC.
992 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
993 when compact_branches is true.
994 (_bfd_mips_elf_compact_branches): New function.
995 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
997 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1000 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1001 Fix print formatter.
1003 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1006 * elf32-arm.c (get_value_helper): Remove.
1007 (elf32_arm_final_link_relocate): Fix branch future relocations.
1009 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1012 * bfd-in.h (enum erratum_84319_opts): New
1013 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1014 int to enum erratum_84319_opts.
1015 * bfd-in2.h: Regenerate.
1016 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1017 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1018 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1019 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1020 (_bfd_aarch64_resize_stubs): Amend comment.
1021 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1023 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1024 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1026 (clear_erratum_843419_entry): Update erratum conditional.
1028 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1031 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1032 when computing distance_short_enough.
1034 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1037 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1038 Wrap around even if distance equals avr_pc_wrap_around.
1040 2019-05-20 Nick Clifton <nickc@redhat.com>
1042 * po/fr.po: Updated French translation.
1044 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1046 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1048 2019-05-16 Alan Modra <amodra@gmail.com>
1050 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1052 2019-05-15 Alan Modra <amodra@gmail.com>
1054 * elf32-arm.c (elf32_arm_write_section): Don't leave
1055 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1056 unitialised section contents.
1058 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1061 * verilog.c: (VerilogDataWidth): New variable.
1062 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1064 2019-05-08 Nick Clifton <nickc@redhat.com>
1067 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1068 rather than FALSE if encountering a non-ELF file.
1070 2019-05-06 Alan Modra <amodra@gmail.com>
1072 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1074 2019-05-06 Alan Modra <amodra@gmail.com>
1076 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1077 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1078 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1079 * libbfd.h: Regenerate.
1080 * bfd-in2.h: Regenerate.
1082 2019-05-04 Alan Modra <amodra@gmail.com>
1085 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1086 following the standard section names.
1087 (bfd_decode_symclass): Prioritize section flag tests in
1088 decode_section_type before name tests in coff_section_type.
1089 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1090 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1091 their names and choose standard .text section flags for
1094 2019-05-02 Nick Clifton <nickc@redhat.com>
1097 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1098 .gnu.debugaltlink sections as debugging sections.
1100 2019-04-30 Alan Modra <amodra@gmail.com>
1102 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1103 (struct _ppc64_elf_section_data): Likewise.
1104 (ppc64_elf_check_relocs): Set above fields.
1105 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1106 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1109 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1112 * elflink.c (elf_link_output_extsym): Don't complain undefined
1113 weak dynamic reference.
1115 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1117 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1118 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1119 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1120 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1121 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1122 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1123 (elfNN_aarch64_small_plt0_bti_entry): Update.
1124 (elfNN_aarch64_small_plt_bti_entry): Update.
1125 (elfNN_aarch64_small_plt_pac_entry): Update.
1126 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1127 (setup_plt_values): Setup new entries.
1128 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1129 (elfNN_aarch64_plt_sym_val): Likewise.
1131 2019-04-22 Jim Wilson <jimw@sifive.com>
1133 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1135 2019-04-19 Alan Modra <amodra@gmail.com>
1137 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1139 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1141 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1142 building shared object.
1143 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1145 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1148 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1151 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1153 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1155 * bfd-in2.h: Regenerate.
1156 * libbfd.h: Likewise.
1158 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1160 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1161 * bfd-in2.h: Regenerated.
1162 * libbfd.h: Regenerated.
1164 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1166 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1167 * bfd-in2.h: Regenerated.
1168 * libbfd.h: Likewise.
1170 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1172 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1173 * bfd-in2.h: Regenerated.
1174 * libbfd.h: Regenerated.
1175 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1176 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1177 and R_ARM_THM_BF12 together.
1178 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1180 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1182 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1183 * libbfd.h: Regenerated.
1184 * bfd-in2.h: Regenerated.
1185 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1186 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1187 and R_ARM_THM_BF18 together.
1188 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1190 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1192 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1193 * bfd-in2.h: Regenerated.
1194 * libbfd.h: Regenerated.
1195 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1196 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1197 and R_ARM_THM_BF16 together.
1198 (get_value_helper): New reloc helper.
1199 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1201 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1203 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1204 * bfd-in2.h: Regenerate.
1205 * libbfd.h: Regenerate.
1207 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1209 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1210 * bfd-in2.h: Regenerate.
1211 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1212 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1214 (using_thumb2): Likewise.
1215 (using_thumb2_bl): Update assert.
1216 (arch_has_arm_nop): Likewise.
1217 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1218 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1220 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1222 * elf-linker-x86.h (elf_x86_cet_report): New.
1223 (elf_linker_x86_params): Add cet_report.
1224 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1225 missing IBT and SHSTK properties if needed.
1227 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1230 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1231 "h != NULL". Don't check "h != NULL" before calling.
1232 bfd_elf_gc_record_vtentry.
1233 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1234 * elf32-bfin.c (bfin_check_relocs): Likewise.
1235 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1236 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1237 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1238 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1239 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1240 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1241 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1242 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1243 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1244 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1245 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1246 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1247 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1248 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1249 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1250 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1251 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1252 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1253 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1254 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1255 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1256 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1257 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1258 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1259 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1260 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1261 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1262 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1263 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1266 2019-04-11 Alan Modra <amodra@gmail.com>
1269 * elflink.c (elf_link_add_object_symbols): Don't read partial
1270 dynamic entries from fuzzed objects.
1272 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1275 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1276 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1277 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1279 2019-04-10 Michael Forney <mforney@mforney.org>
1282 * doc/chew.c (free_words): Correctly free "push_text" strings.
1284 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1286 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1288 2019-04-08 Alan Modra <amodra@gmail.com>
1290 * configure.ac (elfxx_x86): Define and use.
1291 * configure: Regenerate.
1293 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1295 * elf-linker-x86.h: New file.
1296 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1297 to get x86-specific linker options.
1298 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1299 (elf_x86_64_check_relocs): Likewise.
1300 (elf_x86_64_relocate_section): Likewise.
1301 (elf_x86_64_link_setup_gnu_properties): Likewise.
1302 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1303 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1304 (_bfd_elf_linker_x86_set_options): New function.
1305 * elfxx-x86.h: Include "elf-linker-x86.h".
1306 (elf_x86_link_hash_table): Add params.
1308 2019-04-03 Alan Modra <amodra@gmail.com>
1310 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1311 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1312 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1313 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1314 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1315 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1317 2019-04-02 Jim Wilson <jimw@sifive.com>
1320 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1321 ELF header flags to after check for ELF object file. Loop through
1322 sections looking for code sections, if none, then skip ABI checks.
1324 2019-03-30 Andrew Waterman <andrew@sifive.com>
1326 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1329 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1331 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1332 info->export_dynamic to the conditional.
1334 2019-03-28 Alan Modra <amodra@gmail.com>
1337 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1338 * configure: Regenerate.
1339 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1340 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1341 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1342 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1343 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1345 2019-03-21 Jim Wilson <jimw@sifive.com>
1348 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1349 verify sym non-NULL before using. Add identical check using h.
1351 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1353 * elf-bfd.h (struct elf_backend_data): Add argument to
1354 merge_gnu_properties.
1355 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1356 itself and while calling bed->merge_gnu_properties.
1357 (elf_merge_gnu_property_list): Update the calls for
1358 elf_merge_gnu_properties.
1359 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1360 of --force-bti warning and add argument.
1361 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1363 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1364 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1367 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1369 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1370 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1371 (elf_backend_fixup_gnu_properties): Define for AArch64.
1373 2019-03-18 Alan Modra <amodra@gmail.com>
1376 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1377 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1378 attempt at writing glink stubs only once.
1380 2019-03-16 Alan Modra <amodra@gmail.com>
1383 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1384 (_bfd_elf_rel_local_sym): Likewise.
1385 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1386 section of symbols with unrecognized shndx.
1388 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1391 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1393 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1394 in discarded section.
1396 2019-03-15 Alan Modra <amodra@gmail.com>
1399 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1400 symbol after globals if elf_bad_symtab is not set.
1402 2019-03-15 Alan Modra <amodra@gmail.com>
1405 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1406 (_bfd_elf_rel_local_sym): Likewise.
1408 2019-03-15 Alan Modra <amodra@gmail.com>
1411 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1412 object files with sh_size not a multiple of sh_entsize.
1414 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1417 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1418 input with bad relocation.
1420 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1422 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1424 2019-03-14 Nick Clifton <nickc@redhat.com>
1427 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1428 (save_section_vma): Initialise field to the number of entries in
1430 (section_vma_same): Check that the number of entries in the
1431 sec_vma table matches the number of sections in the bfd.
1433 2019-03-14 Nick Clifton <nickc@redhat.com>
1436 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1437 section owner pointer when adding the default symbol.
1439 2019-03-14 Nick Clifton <nickc@redhat.com>
1442 * elflink.c (elf_link_add_object_symbols): Add new local variable
1443 extversym_end. Initialise it to point to the end of the version
1444 symbol table, if present. Check it when initialising and updating
1447 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1449 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1450 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1451 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1452 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1454 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1455 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1456 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1458 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1459 Szabolcs Nagy <szabolcs.nagy@arm.com>
1461 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1462 (aarch64_bti_pac_info): New.
1463 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1464 (bfd_elf32_aarch64_set_options): Likewise.
1465 * bfd-in2.h: Regenerate
1466 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1467 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1468 (elfNN_aarch64_small_plt0_bti_entry): New.
1469 (elfNN_aarch64_small_plt_bti_entry): New.
1470 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1471 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1472 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1473 tlsdesc_plt_entry_size fields.
1474 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1475 (setup_plt_values): New helper function.
1476 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1478 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1480 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1481 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1482 to plt stubs instead of fixed ones and update filling them according
1483 to the need for bti.
1484 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1485 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1486 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1487 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1488 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1490 (bfd_elfNN_get_synthetic_symtab): Define.
1491 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1492 and mising BTI NOTE SECTION.
1495 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1497 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1498 linker created inputs from merge.
1499 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1500 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1501 (elfNN_aarch64_link_setup_gnu_properties): New.
1502 (elfNN_aarch64_merge_gnu_properties): New.
1503 (elf_backend_setup_gnu_properties): Define for AArch64.
1504 (elf_backend_merge_gnu_properties): Likewise.
1505 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1506 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1507 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1508 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1509 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1510 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1511 (elf_backend_parse_gnu_properties): Define for AArch64.
1513 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1516 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1517 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1519 2019-03-12 Alan Modra <amodra@gmail.com>
1521 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1522 nmemb parameter. Use bfd_alloc2.
1523 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1525 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1526 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1527 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1529 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1530 (assign_section_numbers): Style fix.
1531 (swap_out_syms): Use bfd_malloc2.
1532 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1534 (_bfd_elf_make_empty_symbol): Style fix.
1535 (elfobj_grok_stapsdt_note_1): Formatting.
1536 * elfcode.h (elf_object_p): Use bfd_alloc2.
1537 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1538 (elf_slurp_symbol_table): Use bfd_zalloc2.
1539 (elf_slurp_reloc_table): Use bfd_alloc2.
1540 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1541 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1542 size calculation doesn't overflow.
1543 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1544 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1545 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1547 2019-03-08 Alan Modra <amodra@gmail.com>
1550 * merge.c (merge_strings): Return secinfo. Don't pad section
1552 (_bfd_merge_sections): Pad section to alignment here, if input
1553 sections contributing to merged output all pad to alignment.
1556 2019-03-06 Nick Clifton <nickc@redhat.com>
1558 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1560 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1561 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1563 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1565 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1566 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1569 * elf32-s390.c (allocate_dynrelocs): Update comment.
1571 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1573 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1575 2019-02-28 Nick Clifton <nickc@redhat.com>
1578 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1579 section that is not NUL terminated.
1581 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1584 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1585 by linker when checking copy reloc on protected symbol.
1587 2019-02-24 Alan Modra <amodra@gmail.com>
1590 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1592 2019-02-20 Eric Tsai <erictsai@cadence.com>
1594 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1595 sections between the call site and call destination and adjust
1596 call distance by the largest alignment.
1598 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1600 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1601 * elf.c (elfcore_grok_aarch_pauth): New function.
1602 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1603 (elfcore_write_aarch_pauth): New function.
1604 (elfcore_write_register_note): Check for AArch64 pauth section.
1606 2019-02-20 Alan Modra <amodra@gmail.com>
1609 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1612 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1614 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1615 Darwin hosts, not just or1k.
1616 * configure: Regenerate.
1618 2019-02-20 Alan Modra <amodra@gmail.com>
1621 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1622 sentinel NUL to string buffer nearer to loop where it is used.
1623 Don't go past sentinel when scanning strings, and don't write
1625 * archive.c (do_slurp_coff_armap): Simplify string handling to
1628 2019-02-19 Alan Modra <amodra@gmail.com>
1631 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1632 attempting to prevent read past end of section.
1634 2019-02-18 Alan Modra <amodra@gmail.com>
1637 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1638 PRIx64 to generate warning messages. Print local sym names too.
1640 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1642 * elf32-arc (INIT_SYM_STRING): Delete.
1643 (FINI_SYM_STRING): Likewise.
1644 (init_str): Likewise.
1645 (fini_str): Likewise.
1647 2019-02-08 Alan Modra <amodra@gmail.com>
1649 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1650 for bss-plt" warning to make it an error.
1652 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1655 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1656 reloc_class_ifunc for ifunc symbols.
1657 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1659 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1661 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1662 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1664 2019-02-07 Nick Clifton <nickc@redhat.com>
1666 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1667 into the definitely obsolete list.
1669 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1672 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1673 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1674 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1676 (elf_x86_64_check_relocs): Here.
1677 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1678 to check if a symbol is defined in a non-shared object.
1679 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1681 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1683 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1684 of 'labs' (and fix GCC warning).
1686 2019-01-25 Nick Clifton <nickc@redhat.com>
1688 * po/ru.po: Updated Russian translation.
1690 2019-01-23 Nick Clifton <nickc@redhat.com>
1692 * po/fr.po: Updated French translation.
1694 2019-01-21 Nick Clifton <nickc@redhat.com>
1696 * po/pt.po: Updated Portuguese translation.
1697 * po/uk.po: Updated Ukranian translation.
1699 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1702 * elf32-nds32.c (nds32_relocate_section): Add space between words
1704 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1706 (riscv_i_or_e_p): Likewise.
1707 (riscv_merge_arch_attr_info): Likewise.
1709 2019-01-19 Nick Clifton <nickc@redhat.com>
1711 * version.m4: Reset to 2.32.51
1712 * configure: Regenerate.
1713 * po/bfd.pot: Regenerate.
1715 2018-06-24 Nick Clifton <nickc@redhat.com>
1717 2.32 branch created.
1719 2019-01-16 Kito Cheng <kito@andestech.com>
1721 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1724 2019-01-16 Kito Cheng <kito@andestech.com>
1725 Nelson Chu <nelson@andestech.com>
1727 * elfnn-riscv.c (in_subsets): New.
1728 (out_subsets): Likewise.
1729 (merged_subsets): Likewise.
1730 (riscv_std_ext_p): Likewise.
1731 (riscv_non_std_ext_p): Likewise.
1732 (riscv_std_sv_ext_p): Likewise.
1733 (riscv_non_std_sv_ext_p): Likewise.
1734 (riscv_version_mismatch): Likewise.
1735 (riscv_i_or_e_p): Likewise.
1736 (riscv_merge_std_ext): Likewise.
1737 (riscv_merge_non_std_and_sv_ext): Likewise.
1738 (riscv_merge_arch_attr_info): Likewise.
1739 (riscv_merge_attributes): Likewise.
1740 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1742 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1743 (elf_backend_obj_attrs_vendor): Define.
1744 (elf_backend_obj_attrs_section_type): Likewise.
1745 (elf_backend_obj_attrs_section): Likewise.
1746 (elf_backend_obj_attrs_arg_type): Define as
1747 riscv_elf_obj_attrs_arg_type.
1748 * elfxx-riscv.c (riscv_estimate_digit): New.
1749 (riscv_estimate_arch_strlen1): Likewise.
1750 (riscv_estimate_arch_strlen): Likewise.
1751 (riscv_arch_str1): Likewise.
1752 (riscv_arch_str): Likewise.
1753 * elfxx-riscv.h (riscv_arch_str): Declare.
1755 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1757 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1759 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1760 source field. (md_apply_fix): Apply final fix
1761 to BFD_RELOC_S12Z_OPR.
1762 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1764 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1767 * elf32-s390.c (allocate_dynrelocs): Update comment.
1769 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1771 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1772 * configure: Regenerate.
1774 2019-01-08 Alan Modra <amodra@gmail.com>
1778 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1781 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1783 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1784 * bfd/bfd-in2.h: Regenerate.
1785 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1786 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1788 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1790 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1791 default target, little endian target is more suitable.
1793 2019-01-04 Alan Modra <amodra@gmail.com>
1797 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1799 (EQ_VALUE_IN_FIELD): Likewise.
1800 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1802 2019-01-01 Alan Modra <amodra@gmail.com>
1804 Update year range in copyright notice of all files.
1806 For older changes see ChangeLog-2018
1808 Copyright (C) 2019 Free Software Foundation, Inc.
1810 Copying and distribution of this file, with or without modification,
1811 are permitted in any medium without royalty provided the copyright
1812 notice and this notice are preserved.
1818 version-control: never