1 2019-10-12 Nick Clifton <nickc@redhat.com>
4 * version.m4 (BFD_VERSION) Set to 2.33.1
5 * po/bfd.pot: Regenerate.
7 2019-10-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
10 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
13 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
14 bfd_link_pic for TLS checks.
15 (elf32_arm_final_link_relocate): Likewise.
16 (allocate_dynrelocs_for_symbol): Likewise.
18 2019-10-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
21 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
23 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
25 2019-10-09 Alan Modra <amodra@gmail.com>
28 2019-10-07 Alan Modra <amodra@gmail.com>
29 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
30 with non-local symbol. Don't double count __tls_get_addr calls
32 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
34 2019-10-07 Alan Modra <amodra@gmail.com>
35 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
37 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
39 2019-10-07 Alan Modra <amodra@gmail.com>
40 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
41 space for local got non-tls relocs when PIE.
43 2019-10-04 Alan Modra <amodra@gmail.com>
44 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
45 (ppc64_elf_tls_optimize): Correct is_local condition.
46 (allocate_got): Don't reserve dynamic relocations for any of the
47 tls got relocs in PIEs when the symbol is local.
48 (allocate_dynrelocs): Correct validity test for local sym using
50 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
51 for any of the tls got relocs in PIEs.
52 (ppc64_elf_layout_multitoc): Likewise.
53 (ppc64_elf_relocate_section): Correct validity test for local sym
54 using tlsld_got slot. Don't emit dynamic relocations for any of
55 the tls got relocs in PIEs when the symbol is local.
56 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
57 (got_relocs_needed): Delete.
58 (allocate_dynrelocs): Correct validity test for local sym using
59 tlsld_got slot. Don't reserve dynamic relocations for any of the
60 tls got relocs in PIEs when the symbol is local.
61 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
62 for any of the tls got relocs in PIEs.
63 (ppc_elf_relocate_section): Correct validity test for local sym
64 using tlsld_got slot. Don't emit dynamic relocations for any of
65 the tls got relocs in PIEs when the symbol is local.
67 2019-09-26 Alan Modra <amodra@gmail.com>
69 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
70 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
71 ${bindir}/../lib/bfd-plugins if different.
72 * Makefile.in: Regenerate.
74 2019-09-30 Phil Blundell <pb@pbcl.net>
77 * version.m4 (BFD_VERSION): Set to 2.33.
78 * development.sh (development, experimental): Set to false.
79 * configure, Makefile.in, doc/Makefile.in, po/bfd.pot: Regenerate.
81 2019-09-16 Phil Blundell <pb@pbcl.net>
83 * version.m4: Set version to 2.32.90 for pre-release.
84 * Makefile.in, doc/Makefile.in, configure: Regenerated.
86 2019-09-09 Phil Blundell <pb@pbcl.net>
88 binutils 2.33 branch created.
90 2019-09-06 Alan Modra <amodra@gmail.com>
92 * aout-target.h (object_p): Formatting.
93 * bfd-in.h (bfd_get_filename): Don't cast to char*.
94 * corefile.c (generic_core_file_matches_executable_p): Constify
95 variables and remove cast.
96 * bfd-in2.h: Regenerate.
98 2019-09-05 Alan Modra <amodra@gmail.com>
100 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
101 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
102 in the GOT/PLT entry rather than affecting the offset to that
104 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
106 2019-09-05 Alan Modra <amodra@gmail.com>
108 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
109 in second instruction.
110 (ppc64_elf_relocate_section): Likewise.
112 2019-09-05 Alan Modra <amodra@gmail.com>
115 * libbfd-in.h (bfd_strdup): New inline function.
116 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
118 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
119 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
121 (bfd_openstreamr): Use bfd_strdup.
122 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
123 * plugin.c (try_load_plugin): Use bfd_malloc.
124 * libbfd.h: Regenerate.
126 2019-09-02 Alan Modra <amodra@gmail.com>
129 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
131 (read_alt_indirect_string): Likewise.
132 (read_alt_indirect_ref): Likewise.
134 2019-08-31 Jim Wilson <jimw@sifive.com>
137 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
138 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
140 2019-08-30 Jim Wilson <jimw@sifive.com>
142 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
143 error, call bfd_set_error, set ret to FALSE, and goto out label.
145 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
148 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
149 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
151 2019-08-29 Alan Modra <amodra@gmail.com>
154 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
155 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
156 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
159 2019-08-29 Alan Modra <amodra@gmail.com>
161 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
162 on second insn, return it in poff.
163 (ppc64_elf_relocate_section): Add offset to paddi addend for
166 2019-08-28 Jim Wilson <jimw@sifive.com>
168 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
169 section when setting max_alignment. Update comment.
170 (_bfd_riscv_relax_pc): Likewise.
172 2019-08-29 Alan Modra <amodra@gmail.com>
175 * bfd.c (struct bfd): Add no_element_cache.
176 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
177 archive cache when no_element_cache.
178 (bfd_generic_archive_p): Set no_element_cache when opening first
179 element to check format. Close first element too.
180 (do_slurp_bsd_armap): Don't zero ardata->cache here.
181 * bfd-in2.h: Regenerate.
183 2019-08-24 Alan Modra <amodra@gmail.com>
185 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
186 symbols from GOT optimisation.
188 2019-08-23 Stafford Horne <shorne@gmail.com>
190 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
193 2019-08-23 Nick Clifton <nickc@redhat.com>
196 * elf.c (bfd_section_from_shdr): Issue an informative warning
197 message and continue processing other sections after encountering
198 a reloc section for a section which already has other relocs
201 2019-08-23 Alan Modra <amodra@gmail.com>
204 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
205 on error without freeing plts[] contents.
207 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
209 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
211 2019-08-22 Nick Clifton <nickc@redhat.com>
214 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
215 reading data from extra records.
217 2019-08-22 Tamar Christina <tamar.christina@arm.com>
220 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
221 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
222 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
223 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
226 2019-08-22 Alan Modra <amodra@gmail.com>
228 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
229 instead recognize CMSE_PREFIX in symbol name.
230 (elf32_arm_gc_mark_extra_sections): Likewise.
231 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
232 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
234 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
236 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
237 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
239 2019-08-20 Tamar Christina <tamar.christina@arm.com>
241 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
242 elf32_arm_stub_long_branch_v4t_thumb_thumb,
243 elf32_arm_stub_long_branch_v4t_thumb_arm,
244 elf32_arm_stub_short_branch_v4t_thumb_arm,
245 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
246 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
247 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
248 previous instruction.
250 2019-08-19 Tom Tromey <tromey@adacore.com>
252 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
255 2019-08-19 Alan Modra <amodra@gmail.com>
257 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
259 (struct _ppc64_elf_section_data): Likewise.
260 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
261 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
262 than TOC loop. Check PLT16 insns too.
264 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
267 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
268 PC-relative relocations back to ...
269 (elf_x86_64_relocate_section): Here.
271 2019-08-16 Martin Liska <mliska@suse.cz>
274 * elflink.c: Report error only for not relocatable.
275 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
276 here lto_slim_object as it's handled in caller.
278 2019-08-16 Alan Modra <amodra@gmail.com>
280 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
282 2019-08-15 Jim Wilson <jimw@sifive.com>
284 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
285 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
286 to c.li instruction, and use ENCODE_RVC_IMM to set value.
288 2019-08-15 Tom Tromey <tromey@adacore.com>
290 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
293 2019-08-14 Alan Modra <amodra@gmail.com>
296 * dwarf2.c (stash_comp_unit): New function, extracted from..
297 (_bfd_dwarf2_find_nearest_line): ..here.
298 (find_abstract_instance): Parse comp units and decode line info
301 2019-08-14 Alan Modra <amodra@gmail.com>
303 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
304 (comp_unit_find_nearest_line): Use it here..
305 (_bfd_dwarf2_find_symbol_bias): ..and here.
307 2019-08-14 Alan Modra <amodra@gmail.com>
309 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
310 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
311 * coffgen.c (coff_find_nearest_line_with_names): Adjust
312 _bfd_dwarf2_find_nearest_line calls.
313 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
314 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
315 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
316 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
317 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
318 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
319 * libbfd.h: Regenerate.
321 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
323 * elf-bfd.h (struct elf_backend_data): New members.
324 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
325 .gnu.hash section if necessary.
326 (struct collect_gnu_hash_codes): New member.
327 (elf_gnu_hash_process_symidx): New function name.
328 (elf_renumber_gnu_hash_syms): Ignore local and undefined
329 symbols. Record xlat location for every symbol which should have
331 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
332 dynamic section if necessary.
333 (GNU_HASH_SECTION_NAME): New define.
334 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
335 Update the section size info.
336 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
337 (struct mips_elf_link_hash_entry): New member.
338 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
340 (mips_elf_sort_hash_table): Initialize the pointer to the
342 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
343 translation table entry with the symbol dynindx.
344 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
345 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
347 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
349 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
351 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
352 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
354 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
355 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
356 (_bfd_mips_post_process_headers): Mark the ABI version as
357 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
358 but not a .hash section.
359 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
360 position in the translation table, associated with the hash
362 * elfxx-mips.h (literal_reloc_p): Define
363 elf_backend_record_xhash_symbol backend hook.
364 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
367 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
369 * elf64-bpf.c (bpf_elf_relocate_section): New function.
370 (bpf_elf_insn_disp_reloc): Delete function.
371 (elf_backend_relocate_section): Define.
373 2019-08-07 Alan Modra <amodra@gmail.com>
376 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
377 for overflow in expressions involving nsymz.
379 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
381 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
382 two pages in relro presence.
384 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
386 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
387 (get_wsr_lbeg_opcode): New functions.
388 (check_loop_aligned): Detect relaxed loops and adjust loop_len
389 and insn_len for the first actual instruction of the loop.
391 2019-07-30 Alan Modra <amodra@gmail.com>
394 * bfd.c (struct bfd): Add lto_slim_object flag.
395 * bfd-in2.h: Regenerate.
397 2019-07-29 Martin Liska <mliska@suse.cz>
400 * archive.c (_bfd_compute_and_write_armap): Come up with
401 report_plugin_err variable.
402 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
403 * elf.c (struct lto_section): New.
404 (_bfd_elf_make_section_from_shdr): Parse content of
405 .gnu_lto_.lto section.
406 * elflink.c: Report error for a missing LTO plugin.
407 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
409 2019-07-28 Alan Modra <amodra@gmail.com>
413 * elflink.c (elf_link_add_object_symbols): Report an informative
414 error on finding local symbols with index equal or greater than
415 symbol table sh_info. Correct comment. Allow such symbols in
416 dynamic objects. Abort on NULL section for symbol.
418 2019-07-26 Alan Modra <amodra@gmail.com>
420 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
421 (elf_linker): Don't define.
422 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
424 2019-07-25 YunQiang Su <syq@debian.org>
427 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
430 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
432 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
434 (reloc_type_to_name): Fix formating.
435 (arc_elf_object_p): Likewise.
436 (debug_arc_reloc): Likewise.
437 (arc_do_relocation): Likewise.
439 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
441 * elf32-arc.c (bfd_get_32_me): New function.
442 (bfd_put_32_me): Likewise.
443 (arc_elf_relax_section): Likewise.
444 (bfd_elf32_bfd_relax_section): Define.
446 2019-07-24 Alan Modra <amodra@gmail.com>
448 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
449 elf_backend_final_write_processing, don't pass linker arg.
450 (_bfd_elf_final_write_processing): Update prototype.
451 * elf.c (_bfd_elf_write_object_contents): Adjust call.
452 (_bfd_elf_final_write_processing): Return error on incompatible
453 OSABI and has_gnu_osabi. Remove linker arg.
454 * elf-nacl.h (nacl_final_write_processing): Update prototype.
455 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
456 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
457 (_bfd_mips_elf_final_write_processing): Likewise.
458 * elf-hppa.h (elf_hppa_final_write_processing): Return status
459 and remove linker arg.
460 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
461 * elf-nacl.c (nacl_final_write_processing): Likewise.
462 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
463 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
464 * elf32-arm.c (arm_final_write_processing): Likewise.
465 (elf32_arm_final_write_processing): Likewise.
466 (elf32_arm_nacl_final_write_processing): Likewise.
467 (elf32_arm_vxworks_final_write_processing): Likewise.
468 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
469 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
470 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
471 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
472 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
473 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
474 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
475 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
476 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
477 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
478 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
479 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
480 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
481 * elf32-ppc.c (ppc_final_write_processing): Likewise.
482 (ppc_elf_final_write_processing): Likewise.
483 (ppc_elf_vxworks_final_write_processing): Likewise.
484 * elf32-sparc.c (sparc_final_write_processing): Likewise.
485 (elf32_sparc_final_write_processing): Likewise.
486 (elf32_sparc_vxworks_final_write_processing): Likewise.
487 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
488 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
489 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
490 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
491 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
492 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
493 (_bfd_mips_elf_final_write_processing): Likewise.
495 2019-07-24 Alan Modra <amodra@gmail.com>
497 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
499 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
500 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
502 2019-07-24 Alan Modra <amodra@gmail.com>
504 * elf32-visium.c (visium_elf_post_process_headers): Don't set
505 EI_OSABI header byte here.
508 2019-07-23 Alan Modra <amodra@gmail.com>
510 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
511 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
512 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
513 when elf_gnu_osabi_mbind is set.
514 (_bfd_elf_map_sections_to_segments): Likewise.
515 (_bfd_elf_init_private_section_data): Likewise.
516 (_bfd_elf_final_write_processing): Update comment.
517 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
518 (elf_backend_special_sections): Define without .tbss for linux.
520 2019-07-23 Alan Modra <amodra@gmail.com>
522 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
523 Remove none, any, all enums.
524 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
525 (_bfd_elf_final_write_processing): Declare.
526 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
527 elf_backend_final_write_processing.
528 (_bfd_elf_post_process_headers): Move body of function to..
529 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
530 only when not already set. Adjust for rename.
531 * elfxx-target.h (elf_backend_final_write_processing): Default to
532 _bfd_elf_final_write_processing.
533 * elf-hppa.h (elf_hppa_final_write_processing): Call
534 _bfd_elf_final_write_processing.
535 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
536 * elf-nacl.c (nacl_final_write_processing): Likewise.
537 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
538 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
539 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
540 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
541 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
542 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
543 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
544 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
545 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
546 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
547 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
548 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
549 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
550 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
551 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
552 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
553 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
554 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
555 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
556 * elf32-arm.c (arm_final_write_processing): Split out from..
557 (elf32_arm_final_write_processing): ..here. Call
558 _bfd_elf_final_write_processing.
559 (elf32_arm_nacl_final_write_processing): Adjust.
560 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
561 (_bfd_mips_elf_final_write_processing): ..here. Call
562 _bfd_elf_final_write_processing.
563 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
564 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
565 * elf32-ppc.c (ppc_final_write_processing): Split out from..
566 (ppc_elf_final_write_processing): ..here. Call
567 _bfd_elf_final_write_processing.
568 (ppc_elf_vxworks_final_write_processing): Adjust.
569 * elf32-sparc.c (sparc_final_write_processing): Split out from..
570 (elf32_sparc_final_write_processing): ..here. Call
571 _bfd_elf_final_write_processing.
572 (elf32_sparc_vxworks_final_write_processing): Adjust.
573 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
574 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
575 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
576 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
577 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
578 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
579 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
580 * elflink.c (elf_link_add_object_symbols): Likewise.
581 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
584 2019-07-23 Omar Majid <omajid@redhat.com>
586 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
587 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
588 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
590 * peXXigen.c: Add comment about source of .NET magic numbers.
592 2019-07-19 Alan Modra <amodra@gmail.com>
594 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
595 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
596 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
597 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
598 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
599 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
600 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
601 (ppc64_elf_check_relocs): Support pcrel tls relocs.
602 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
603 * bfd-in2.h: Regenerate.
604 * libbfd.h: Regenerate.
606 2019-07-18 Alan Modra <amodra@gmail.com>
608 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
609 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
612 2019-07-18 Alan Modra <amodra@gmail.com>
614 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
615 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
617 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
618 tls_type vars unsigned int.
619 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
620 to select r_type edit.
622 2019-07-18 Alan Modra <amodra@gmail.com>
624 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
626 * elf64-ppc.c (TLS_GDIE): Likewise.
628 2019-07-18 Alan Modra <amodra@gmail.com>
630 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
631 range of tp-relative offsets.
633 2019-07-15 Alan Modra <amodra@gmail.com>
635 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
636 alias is no longer bfd_link_hash_defined, clear the alias.
638 2019-07-13 Alan Modra <amodra@gmail.com>
640 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
642 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
643 (_bfd_elf_init_2_index_sections): Likewise.
644 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
645 relocations for local TLS symbols, use STN_UNDEF as the relocation
647 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
648 leave TLS symbol value in the addend.
650 2019-07-08 Alan Modra <amodra@gmail.com>
653 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
654 size before reading first word.
656 2019-07-02 Nick Clifton <nickc@redhat.com>
659 * elf.c (is_debuginfo_file): New function.
660 (assign_file_positions_for_non_load_sections): Do not warn about
661 allocated sections outside of loadable segments if they are found
663 * elf-bfd.h (is_debuginfo_file): Prototype.
665 2019-07-02 Nick Clifton <nickc@redhat.com>
668 * compress.c (bfd_get_full_section_contents): Do not complain
669 about linker created sections that are larger than the file size.
671 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
673 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
674 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
676 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
678 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
680 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
681 sections when .text section contain secure entry functions
684 2019-07-01 Nick Clifton <nickc@redhat.com>
687 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
688 section VMA in the offset used to update exidx relocs.
690 2019-06-28 Nick Clifton <nickc@redhat.com>
693 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
694 large version reference section.
695 * compress.c (bfd_get_full_section_contents): Check for an
696 uncompressed section whose size is larger than the file size.
698 2019-06-28 Alan Modra <amodra@gmail.com>
700 * format.c (bfd_check_format_matches): Don't match plugin target
701 if another target matches. Expand comment.
702 * targets.c (_bfd_target_vector): Move plugin_vec after all other
703 non-corefile targets, outside !SELECT_VECS.
704 * config.bfd: Don't handle targ=plugin here.
705 * configure.ac: Don't add plugin to enable_targets or handle in
706 target loop setting selvecs and other target vars.
707 * configure: Regenerate.
709 2019-06-26 Nick Clifton <nickc@redhat.com>
712 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
713 messages for failures.
714 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
715 if returning an error value.
717 2019-06-25 Jan Beulich <jbeulich@suse.com>
719 * elf-properties.c (elf_find_and_remove_property): Rename last
720 parameter. Mention it in comment.
722 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
724 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
725 SEC_MERGE or SEC_CODE flags are set.
726 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
727 symtype consistently. Don't include sec_addr (sym_sec) in symval.
728 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
729 Add sec_addr (sym_sec) after handling merge sections.
731 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
734 * elf-properties.c (elf_merge_gnu_property_list): Remove the
735 property after reporting property removal.
737 2019-06-23 Alan Modra <amodra@gmail.com>
740 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
741 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
742 Reduce range of offsets allowed for other GOT relocs.
744 2019-06-23 Alan Modra <amodra@gmail.com>
747 * elfcode.h (elf_object_p): Warning fix.
749 2019-06-21 Alan Modra <amodra@gmail.com>
752 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
754 2019-06-19 Alan Modra <amodra@gmail.com>
757 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
758 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
760 2019-06-19 Alan Modra <amodra@gmail.com>
762 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
763 functions that require r2 valid to use local entry.
764 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
766 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
768 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
769 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
770 with elfNN_aarch64_allocate_local_dynrelocs.
772 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
774 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
776 2019-06-14 Alan Modra <amodra@gmail.com>
778 * Makefile.in: Regenerate.
779 * configure: Regenerate.
781 2019-06-14 Alan Modra <amodra@gmail.com>
783 * elf64-ppc.c: Fix comments involving paddi.
785 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
788 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
789 absent, or the bfd is not in the ELF formart.
790 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
792 2019-06-10 Christos Zoulas <christos@zoulas.com>
795 * elf.c (elfcore_make_auxv_note_section): New function.
796 (elfcore_grok_note): Use it.
797 (elfcore_grok_freebsd_note): Likewise.
798 (elfcore_grok_openbsd_note): Likewise.
799 (elfcore_grok_netbsd_note): Likewise. Plus add support for
800 NT_NETBSDCORE_AUXV notes.
802 2019-06-06 Sudakshina Das <sudi.das@arm.com>
804 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
805 alignment of the new gnu property section.
807 2019-06-06 Sudakshina Das <sudi.das@arm.com>
809 * bfd-in.h: Change comment.
810 * bfd-in2.h: Regenerate.
811 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
812 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
815 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
817 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
818 Remove overflow check.
820 2019-05-28 Alan Modra <amodra@gmail.com>
823 * cofflink.c (coff_link_check_archive_element): Don't assume
824 element is a coff object file after calling add_archive_element.
826 2019-05-28 Alan Modra <amodra@gmail.com>
829 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
830 attempt to set sh_entsize for excluded PLT section.
832 2019-05-28 Alan Modra <amodra@gmail.com>
835 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
836 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
837 allocated in alpha_dynamic_entries_for_reloc.
839 2019-05-28 Alan Modra <amodra@gmail.com>
842 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
843 on NULL output_section.
844 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
846 2019-05-28 Alan Modra <amodra@gmail.com>
849 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
850 entry when MUST_FIND. Abort when MUST_FIND not found.
851 (elf_m68k_get_bfd2got_entry): Likewise.
852 (elf_m68k_relocate_section): Remove now useless assert.
854 2019-05-28 Alan Modra <amodra@gmail.com>
857 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
858 from bfd_link_info, not an output section owner.
859 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
860 (elf_hppa_final_link_relocate): Likewise.
862 2019-05-28 Alan Modra <amodra@gmail.com>
865 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
866 create_object_symbols_section, obj_textsec, obj_datasec or
867 obj_bsssec. Fix other errors in placement.
868 * config.bfd: Obsolete tic30-aout.
870 2019-05-28 Alan Modra <amodra@gmail.com>
873 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
874 end of section list as well as section_count.
875 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
876 section list before returning error.
878 2019-05-27 Alan Modra <amodra@gmail.com>
880 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
882 2019-05-27 Alan Modra <amodra@gmail.com>
885 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
887 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
889 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
890 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
891 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
892 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
893 (elf_backend_merge_symbol_attribute): Define.
895 2019-05-24 Alan Modra <amodra@gmail.com>
897 * po/SRC-POTFILES.in: Regenerate.
899 2019-05-24 Alan Modra <amodra@gmail.com>
901 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
902 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
903 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
904 (struct ppc_link_hash_table): Add powerxx_stubs.
905 (ppc64_elf_check_relocs): Set powerxx_stubs.
906 (build_powerxx_offset, size_powerxx_offset),
907 (num_relocs_for_powerxx_offset),
908 (emit_relocs_for_powerxx_offset): New functions.
909 (plt_stub_size): Size powerxx stubs.
910 (ppc_build_one_stub): Emit powerxx stubs.
911 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
914 2019-05-24 Alan Modra <amodra@gmail.com>
916 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
918 (xlate_pcrel_opt): New function.
919 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
920 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
921 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
923 2019-05-24 Alan Modra <amodra@gmail.com>
925 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
926 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
927 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
928 (BFD_RELOC_PPC64_PLT_PCREL34),
929 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
930 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
931 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
932 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
933 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
934 * elf64-ppc.c (PNOP): Define.
935 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
936 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
937 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
939 (ppc64_elf_prefix_reloc): New function.
940 (struct ppc_link_hash_table): Add notoc_plt.
941 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
942 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
943 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
944 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
945 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
946 possible need for dynamic relocs on non-pcrel powerxx relocs.
947 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
948 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
949 (toc_adjusting_stub_needed): Likewise.
950 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
951 (ppc64_elf_relocate_section): Handle new powerxx relocs.
952 * bfd-in2.h: Regenerate.
953 * libbfd.h: Regenerate.
955 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
957 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
958 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
960 * configure: Regenerate.
962 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
964 * configure: Regenerated.
965 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
966 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
967 (BFD64_BACKENDS): Add elf64-bpf.lo.
968 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
969 * Makefile.in (SOURCE_HFILES): Regenerate.
970 * config.bfd (targ_cpu): Handle bpf-*-* targets.
971 * cpu-bpf.c: New file.
972 * elf64-bpf.c: Likewise.
973 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
975 * archures.c: Define architecture bfd_arch_bpf and machine
977 * reloc.c: Define BFD relocations used by the BPF target.
978 * bfd-in2.h: Regenerated.
979 * libbfd.h: Likewise.
981 2019-05-22 Alan Modra <amodra@gmail.com>
983 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
986 2019-05-22 Alan Modra <amodra@gmail.com>
988 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
989 processing on "size error in section".
991 2019-05-22 Alan Modra <amodra@gmail.com>
993 * som.c (som_bfd_free_cached_info): Call
994 _bfd_generic_close_and_cleanup.
996 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
998 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
999 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1001 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1003 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1004 checks. Search the RELA table for n64 relocations.
1006 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1007 Faraz Shahbazker <fshahbazker@wavecomp.com>
1009 * elfxx-mips.c (LA25_BC): New macro.
1010 (mips_elf_link_hash_table)<compact_branches>: New field.
1011 (STUB_JALRC): New macro.
1012 (mipsr6_o32_exec_plt0_entry_compact): New array.
1013 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1014 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1015 (mipsr6_exec_plt_entry_compact): Likewise.
1016 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1017 when compact_branches is true.
1018 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1019 PLT for MIPSR6 with compact_branches. Do not reorder the
1020 compact branches PLT. Switch the lazy stub for MIPSR6
1021 with compact_branches to use JALRC.
1022 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1023 when compact_branches is true.
1024 (_bfd_mips_elf_compact_branches): New function.
1025 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1027 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1030 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1031 Fix print formatter.
1033 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1036 * elf32-arm.c (get_value_helper): Remove.
1037 (elf32_arm_final_link_relocate): Fix branch future relocations.
1039 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1042 * bfd-in.h (enum erratum_84319_opts): New
1043 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1044 int to enum erratum_84319_opts.
1045 * bfd-in2.h: Regenerate.
1046 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1047 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1048 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1049 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1050 (_bfd_aarch64_resize_stubs): Amend comment.
1051 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1053 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1054 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1056 (clear_erratum_843419_entry): Update erratum conditional.
1058 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1061 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1062 when computing distance_short_enough.
1064 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1067 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1068 Wrap around even if distance equals avr_pc_wrap_around.
1070 2019-05-20 Nick Clifton <nickc@redhat.com>
1072 * po/fr.po: Updated French translation.
1074 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1076 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1078 2019-05-16 Alan Modra <amodra@gmail.com>
1080 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1082 2019-05-15 Alan Modra <amodra@gmail.com>
1084 * elf32-arm.c (elf32_arm_write_section): Don't leave
1085 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1086 unitialised section contents.
1088 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1091 * verilog.c: (VerilogDataWidth): New variable.
1092 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1094 2019-05-08 Nick Clifton <nickc@redhat.com>
1097 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1098 rather than FALSE if encountering a non-ELF file.
1100 2019-05-06 Alan Modra <amodra@gmail.com>
1102 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1104 2019-05-06 Alan Modra <amodra@gmail.com>
1106 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1107 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1108 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1109 * libbfd.h: Regenerate.
1110 * bfd-in2.h: Regenerate.
1112 2019-05-04 Alan Modra <amodra@gmail.com>
1115 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1116 following the standard section names.
1117 (bfd_decode_symclass): Prioritize section flag tests in
1118 decode_section_type before name tests in coff_section_type.
1119 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1120 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1121 their names and choose standard .text section flags for
1124 2019-05-02 Nick Clifton <nickc@redhat.com>
1127 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1128 .gnu.debugaltlink sections as debugging sections.
1130 2019-04-30 Alan Modra <amodra@gmail.com>
1132 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1133 (struct _ppc64_elf_section_data): Likewise.
1134 (ppc64_elf_check_relocs): Set above fields.
1135 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1136 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1139 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1142 * elflink.c (elf_link_output_extsym): Don't complain undefined
1143 weak dynamic reference.
1145 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1147 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1148 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1149 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1150 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1151 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1152 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1153 (elfNN_aarch64_small_plt0_bti_entry): Update.
1154 (elfNN_aarch64_small_plt_bti_entry): Update.
1155 (elfNN_aarch64_small_plt_pac_entry): Update.
1156 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1157 (setup_plt_values): Setup new entries.
1158 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1159 (elfNN_aarch64_plt_sym_val): Likewise.
1161 2019-04-22 Jim Wilson <jimw@sifive.com>
1163 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1165 2019-04-19 Alan Modra <amodra@gmail.com>
1167 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1169 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1171 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1172 building shared object.
1173 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1175 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1178 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1181 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1183 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1185 * bfd-in2.h: Regenerate.
1186 * libbfd.h: Likewise.
1188 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1190 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1191 * bfd-in2.h: Regenerated.
1192 * libbfd.h: Regenerated.
1194 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1196 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1197 * bfd-in2.h: Regenerated.
1198 * libbfd.h: Likewise.
1200 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1202 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1203 * bfd-in2.h: Regenerated.
1204 * libbfd.h: Regenerated.
1205 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1206 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1207 and R_ARM_THM_BF12 together.
1208 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1210 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1212 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1213 * libbfd.h: Regenerated.
1214 * bfd-in2.h: Regenerated.
1215 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1216 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1217 and R_ARM_THM_BF18 together.
1218 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1220 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1222 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1223 * bfd-in2.h: Regenerated.
1224 * libbfd.h: Regenerated.
1225 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1226 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1227 and R_ARM_THM_BF16 together.
1228 (get_value_helper): New reloc helper.
1229 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1231 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1233 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1234 * bfd-in2.h: Regenerate.
1235 * libbfd.h: Regenerate.
1237 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1239 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1240 * bfd-in2.h: Regenerate.
1241 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1242 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1244 (using_thumb2): Likewise.
1245 (using_thumb2_bl): Update assert.
1246 (arch_has_arm_nop): Likewise.
1247 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1248 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1250 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1252 * elf-linker-x86.h (elf_x86_cet_report): New.
1253 (elf_linker_x86_params): Add cet_report.
1254 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1255 missing IBT and SHSTK properties if needed.
1257 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1260 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1261 "h != NULL". Don't check "h != NULL" before calling.
1262 bfd_elf_gc_record_vtentry.
1263 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1264 * elf32-bfin.c (bfin_check_relocs): Likewise.
1265 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1266 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1267 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1268 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1269 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1270 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1271 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1272 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1273 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1274 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1275 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1276 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1277 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1278 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1279 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1280 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1281 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1282 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1283 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1284 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1285 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1286 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1287 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1288 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1289 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1290 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1291 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1292 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1293 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1296 2019-04-11 Alan Modra <amodra@gmail.com>
1299 * elflink.c (elf_link_add_object_symbols): Don't read partial
1300 dynamic entries from fuzzed objects.
1302 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1305 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1306 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1307 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1309 2019-04-10 Michael Forney <mforney@mforney.org>
1312 * doc/chew.c (free_words): Correctly free "push_text" strings.
1314 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1316 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1318 2019-04-08 Alan Modra <amodra@gmail.com>
1320 * configure.ac (elfxx_x86): Define and use.
1321 * configure: Regenerate.
1323 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1325 * elf-linker-x86.h: New file.
1326 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1327 to get x86-specific linker options.
1328 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1329 (elf_x86_64_check_relocs): Likewise.
1330 (elf_x86_64_relocate_section): Likewise.
1331 (elf_x86_64_link_setup_gnu_properties): Likewise.
1332 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1333 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1334 (_bfd_elf_linker_x86_set_options): New function.
1335 * elfxx-x86.h: Include "elf-linker-x86.h".
1336 (elf_x86_link_hash_table): Add params.
1338 2019-04-03 Alan Modra <amodra@gmail.com>
1340 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1341 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1342 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1343 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1344 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1345 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1347 2019-04-02 Jim Wilson <jimw@sifive.com>
1350 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1351 ELF header flags to after check for ELF object file. Loop through
1352 sections looking for code sections, if none, then skip ABI checks.
1354 2019-03-30 Andrew Waterman <andrew@sifive.com>
1356 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1359 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1361 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1362 info->export_dynamic to the conditional.
1364 2019-03-28 Alan Modra <amodra@gmail.com>
1367 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1368 * configure: Regenerate.
1369 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1370 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1371 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1372 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1373 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1375 2019-03-21 Jim Wilson <jimw@sifive.com>
1378 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1379 verify sym non-NULL before using. Add identical check using h.
1381 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1383 * elf-bfd.h (struct elf_backend_data): Add argument to
1384 merge_gnu_properties.
1385 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1386 itself and while calling bed->merge_gnu_properties.
1387 (elf_merge_gnu_property_list): Update the calls for
1388 elf_merge_gnu_properties.
1389 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1390 of --force-bti warning and add argument.
1391 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1393 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1394 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1397 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1399 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1400 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1401 (elf_backend_fixup_gnu_properties): Define for AArch64.
1403 2019-03-18 Alan Modra <amodra@gmail.com>
1406 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1407 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1408 attempt at writing glink stubs only once.
1410 2019-03-16 Alan Modra <amodra@gmail.com>
1413 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1414 (_bfd_elf_rel_local_sym): Likewise.
1415 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1416 section of symbols with unrecognized shndx.
1418 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1421 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1423 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1424 in discarded section.
1426 2019-03-15 Alan Modra <amodra@gmail.com>
1429 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1430 symbol after globals if elf_bad_symtab is not set.
1432 2019-03-15 Alan Modra <amodra@gmail.com>
1435 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1436 (_bfd_elf_rel_local_sym): Likewise.
1438 2019-03-15 Alan Modra <amodra@gmail.com>
1441 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1442 object files with sh_size not a multiple of sh_entsize.
1444 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1447 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1448 input with bad relocation.
1450 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1452 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1454 2019-03-14 Nick Clifton <nickc@redhat.com>
1457 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1458 (save_section_vma): Initialise field to the number of entries in
1460 (section_vma_same): Check that the number of entries in the
1461 sec_vma table matches the number of sections in the bfd.
1463 2019-03-14 Nick Clifton <nickc@redhat.com>
1466 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1467 section owner pointer when adding the default symbol.
1469 2019-03-14 Nick Clifton <nickc@redhat.com>
1472 * elflink.c (elf_link_add_object_symbols): Add new local variable
1473 extversym_end. Initialise it to point to the end of the version
1474 symbol table, if present. Check it when initialising and updating
1477 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1479 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1480 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1481 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1482 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1484 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1485 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1486 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1488 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1489 Szabolcs Nagy <szabolcs.nagy@arm.com>
1491 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1492 (aarch64_bti_pac_info): New.
1493 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1494 (bfd_elf32_aarch64_set_options): Likewise.
1495 * bfd-in2.h: Regenerate
1496 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1497 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1498 (elfNN_aarch64_small_plt0_bti_entry): New.
1499 (elfNN_aarch64_small_plt_bti_entry): New.
1500 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1501 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1502 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1503 tlsdesc_plt_entry_size fields.
1504 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1505 (setup_plt_values): New helper function.
1506 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1508 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1510 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1511 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1512 to plt stubs instead of fixed ones and update filling them according
1513 to the need for bti.
1514 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1515 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1516 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1517 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1518 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1520 (bfd_elfNN_get_synthetic_symtab): Define.
1521 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1522 and mising BTI NOTE SECTION.
1525 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1527 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1528 linker created inputs from merge.
1529 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1530 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1531 (elfNN_aarch64_link_setup_gnu_properties): New.
1532 (elfNN_aarch64_merge_gnu_properties): New.
1533 (elf_backend_setup_gnu_properties): Define for AArch64.
1534 (elf_backend_merge_gnu_properties): Likewise.
1535 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1536 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1537 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1538 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1539 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1540 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1541 (elf_backend_parse_gnu_properties): Define for AArch64.
1543 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1546 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1547 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1549 2019-03-12 Alan Modra <amodra@gmail.com>
1551 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1552 nmemb parameter. Use bfd_alloc2.
1553 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1555 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1556 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1557 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1559 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1560 (assign_section_numbers): Style fix.
1561 (swap_out_syms): Use bfd_malloc2.
1562 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1564 (_bfd_elf_make_empty_symbol): Style fix.
1565 (elfobj_grok_stapsdt_note_1): Formatting.
1566 * elfcode.h (elf_object_p): Use bfd_alloc2.
1567 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1568 (elf_slurp_symbol_table): Use bfd_zalloc2.
1569 (elf_slurp_reloc_table): Use bfd_alloc2.
1570 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1571 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1572 size calculation doesn't overflow.
1573 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1574 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1575 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1577 2019-03-08 Alan Modra <amodra@gmail.com>
1580 * merge.c (merge_strings): Return secinfo. Don't pad section
1582 (_bfd_merge_sections): Pad section to alignment here, if input
1583 sections contributing to merged output all pad to alignment.
1586 2019-03-06 Nick Clifton <nickc@redhat.com>
1588 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1590 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1591 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1593 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1595 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1596 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1599 * elf32-s390.c (allocate_dynrelocs): Update comment.
1601 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1603 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1605 2019-02-28 Nick Clifton <nickc@redhat.com>
1608 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1609 section that is not NUL terminated.
1611 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1614 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1615 by linker when checking copy reloc on protected symbol.
1617 2019-02-24 Alan Modra <amodra@gmail.com>
1620 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1622 2019-02-20 Eric Tsai <erictsai@cadence.com>
1624 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1625 sections between the call site and call destination and adjust
1626 call distance by the largest alignment.
1628 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1630 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1631 * elf.c (elfcore_grok_aarch_pauth): New function.
1632 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1633 (elfcore_write_aarch_pauth): New function.
1634 (elfcore_write_register_note): Check for AArch64 pauth section.
1636 2019-02-20 Alan Modra <amodra@gmail.com>
1639 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1642 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1644 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1645 Darwin hosts, not just or1k.
1646 * configure: Regenerate.
1648 2019-02-20 Alan Modra <amodra@gmail.com>
1651 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1652 sentinel NUL to string buffer nearer to loop where it is used.
1653 Don't go past sentinel when scanning strings, and don't write
1655 * archive.c (do_slurp_coff_armap): Simplify string handling to
1658 2019-02-19 Alan Modra <amodra@gmail.com>
1661 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1662 attempting to prevent read past end of section.
1664 2019-02-18 Alan Modra <amodra@gmail.com>
1667 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1668 PRIx64 to generate warning messages. Print local sym names too.
1670 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1672 * elf32-arc (INIT_SYM_STRING): Delete.
1673 (FINI_SYM_STRING): Likewise.
1674 (init_str): Likewise.
1675 (fini_str): Likewise.
1677 2019-02-08 Alan Modra <amodra@gmail.com>
1679 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1680 for bss-plt" warning to make it an error.
1682 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1685 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1686 reloc_class_ifunc for ifunc symbols.
1687 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1689 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1691 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1692 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1694 2019-02-07 Nick Clifton <nickc@redhat.com>
1696 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1697 into the definitely obsolete list.
1699 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1702 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1703 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1704 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1706 (elf_x86_64_check_relocs): Here.
1707 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1708 to check if a symbol is defined in a non-shared object.
1709 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1711 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1713 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1714 of 'labs' (and fix GCC warning).
1716 2019-01-25 Nick Clifton <nickc@redhat.com>
1718 * po/ru.po: Updated Russian translation.
1720 2019-01-23 Nick Clifton <nickc@redhat.com>
1722 * po/fr.po: Updated French translation.
1724 2019-01-21 Nick Clifton <nickc@redhat.com>
1726 * po/pt.po: Updated Portuguese translation.
1727 * po/uk.po: Updated Ukranian translation.
1729 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1732 * elf32-nds32.c (nds32_relocate_section): Add space between words
1734 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1736 (riscv_i_or_e_p): Likewise.
1737 (riscv_merge_arch_attr_info): Likewise.
1739 2019-01-19 Nick Clifton <nickc@redhat.com>
1741 * version.m4: Reset to 2.32.51
1742 * configure: Regenerate.
1743 * po/bfd.pot: Regenerate.
1745 2018-06-24 Nick Clifton <nickc@redhat.com>
1747 2.32 branch created.
1749 2019-01-16 Kito Cheng <kito@andestech.com>
1751 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1754 2019-01-16 Kito Cheng <kito@andestech.com>
1755 Nelson Chu <nelson@andestech.com>
1757 * elfnn-riscv.c (in_subsets): New.
1758 (out_subsets): Likewise.
1759 (merged_subsets): Likewise.
1760 (riscv_std_ext_p): Likewise.
1761 (riscv_non_std_ext_p): Likewise.
1762 (riscv_std_sv_ext_p): Likewise.
1763 (riscv_non_std_sv_ext_p): Likewise.
1764 (riscv_version_mismatch): Likewise.
1765 (riscv_i_or_e_p): Likewise.
1766 (riscv_merge_std_ext): Likewise.
1767 (riscv_merge_non_std_and_sv_ext): Likewise.
1768 (riscv_merge_arch_attr_info): Likewise.
1769 (riscv_merge_attributes): Likewise.
1770 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1772 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1773 (elf_backend_obj_attrs_vendor): Define.
1774 (elf_backend_obj_attrs_section_type): Likewise.
1775 (elf_backend_obj_attrs_section): Likewise.
1776 (elf_backend_obj_attrs_arg_type): Define as
1777 riscv_elf_obj_attrs_arg_type.
1778 * elfxx-riscv.c (riscv_estimate_digit): New.
1779 (riscv_estimate_arch_strlen1): Likewise.
1780 (riscv_estimate_arch_strlen): Likewise.
1781 (riscv_arch_str1): Likewise.
1782 (riscv_arch_str): Likewise.
1783 * elfxx-riscv.h (riscv_arch_str): Declare.
1785 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1787 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1789 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1790 source field. (md_apply_fix): Apply final fix
1791 to BFD_RELOC_S12Z_OPR.
1792 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1794 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1797 * elf32-s390.c (allocate_dynrelocs): Update comment.
1799 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1801 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1802 * configure: Regenerate.
1804 2019-01-08 Alan Modra <amodra@gmail.com>
1808 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1811 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1813 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1814 * bfd/bfd-in2.h: Regenerate.
1815 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1816 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1818 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1820 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1821 default target, little endian target is more suitable.
1823 2019-01-04 Alan Modra <amodra@gmail.com>
1827 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1829 (EQ_VALUE_IN_FIELD): Likewise.
1830 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1832 2019-01-01 Alan Modra <amodra@gmail.com>
1834 Update year range in copyright notice of all files.
1836 For older changes see ChangeLog-2018
1838 Copyright (C) 2019 Free Software Foundation, Inc.
1840 Copying and distribution of this file, with or without modification,
1841 are permitted in any medium without royalty provided the copyright
1842 notice and this notice are preserved.
1848 version-control: never