1 2019-10-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
4 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
6 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
8 2019-10-09 Alan Modra <amodra@gmail.com>
11 2019-10-07 Alan Modra <amodra@gmail.com>
12 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
13 with non-local symbol. Don't double count __tls_get_addr calls
15 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
17 2019-10-07 Alan Modra <amodra@gmail.com>
18 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
20 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
22 2019-10-07 Alan Modra <amodra@gmail.com>
23 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
24 space for local got non-tls relocs when PIE.
26 2019-10-04 Alan Modra <amodra@gmail.com>
27 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
28 (ppc64_elf_tls_optimize): Correct is_local condition.
29 (allocate_got): Don't reserve dynamic relocations for any of the
30 tls got relocs in PIEs when the symbol is local.
31 (allocate_dynrelocs): Correct validity test for local sym using
33 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
34 for any of the tls got relocs in PIEs.
35 (ppc64_elf_layout_multitoc): Likewise.
36 (ppc64_elf_relocate_section): Correct validity test for local sym
37 using tlsld_got slot. Don't emit dynamic relocations for any of
38 the tls got relocs in PIEs when the symbol is local.
39 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
40 (got_relocs_needed): Delete.
41 (allocate_dynrelocs): Correct validity test for local sym using
42 tlsld_got slot. Don't reserve dynamic relocations for any of the
43 tls got relocs in PIEs when the symbol is local.
44 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
45 for any of the tls got relocs in PIEs.
46 (ppc_elf_relocate_section): Correct validity test for local sym
47 using tlsld_got slot. Don't emit dynamic relocations for any of
48 the tls got relocs in PIEs when the symbol is local.
50 2019-09-26 Alan Modra <amodra@gmail.com>
52 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
53 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
54 ${bindir}/../lib/bfd-plugins if different.
55 * Makefile.in: Regenerate.
57 2019-09-30 Phil Blundell <pb@pbcl.net>
60 * version.m4 (BFD_VERSION): Set to 2.33.
61 * development.sh (development, experimental): Set to false.
62 * configure, Makefile.in, doc/Makefile.in, po/bfd.pot: Regenerate.
64 2019-09-16 Phil Blundell <pb@pbcl.net>
66 * version.m4: Set version to 2.32.90 for pre-release.
67 * Makefile.in, doc/Makefile.in, configure: Regenerated.
69 2019-09-09 Phil Blundell <pb@pbcl.net>
71 binutils 2.33 branch created.
73 2019-09-06 Alan Modra <amodra@gmail.com>
75 * aout-target.h (object_p): Formatting.
76 * bfd-in.h (bfd_get_filename): Don't cast to char*.
77 * corefile.c (generic_core_file_matches_executable_p): Constify
78 variables and remove cast.
79 * bfd-in2.h: Regenerate.
81 2019-09-05 Alan Modra <amodra@gmail.com>
83 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
84 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
85 in the GOT/PLT entry rather than affecting the offset to that
87 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
89 2019-09-05 Alan Modra <amodra@gmail.com>
91 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
92 in second instruction.
93 (ppc64_elf_relocate_section): Likewise.
95 2019-09-05 Alan Modra <amodra@gmail.com>
98 * libbfd-in.h (bfd_strdup): New inline function.
99 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
101 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
102 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
104 (bfd_openstreamr): Use bfd_strdup.
105 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
106 * plugin.c (try_load_plugin): Use bfd_malloc.
107 * libbfd.h: Regenerate.
109 2019-09-02 Alan Modra <amodra@gmail.com>
112 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
114 (read_alt_indirect_string): Likewise.
115 (read_alt_indirect_ref): Likewise.
117 2019-08-31 Jim Wilson <jimw@sifive.com>
120 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
121 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
123 2019-08-30 Jim Wilson <jimw@sifive.com>
125 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
126 error, call bfd_set_error, set ret to FALSE, and goto out label.
128 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
131 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
132 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
134 2019-08-29 Alan Modra <amodra@gmail.com>
137 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
138 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
139 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
142 2019-08-29 Alan Modra <amodra@gmail.com>
144 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
145 on second insn, return it in poff.
146 (ppc64_elf_relocate_section): Add offset to paddi addend for
149 2019-08-28 Jim Wilson <jimw@sifive.com>
151 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
152 section when setting max_alignment. Update comment.
153 (_bfd_riscv_relax_pc): Likewise.
155 2019-08-29 Alan Modra <amodra@gmail.com>
158 * bfd.c (struct bfd): Add no_element_cache.
159 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
160 archive cache when no_element_cache.
161 (bfd_generic_archive_p): Set no_element_cache when opening first
162 element to check format. Close first element too.
163 (do_slurp_bsd_armap): Don't zero ardata->cache here.
164 * bfd-in2.h: Regenerate.
166 2019-08-24 Alan Modra <amodra@gmail.com>
168 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
169 symbols from GOT optimisation.
171 2019-08-23 Stafford Horne <shorne@gmail.com>
173 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
176 2019-08-23 Nick Clifton <nickc@redhat.com>
179 * elf.c (bfd_section_from_shdr): Issue an informative warning
180 message and continue processing other sections after encountering
181 a reloc section for a section which already has other relocs
184 2019-08-23 Alan Modra <amodra@gmail.com>
187 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
188 on error without freeing plts[] contents.
190 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
192 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
194 2019-08-22 Nick Clifton <nickc@redhat.com>
197 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
198 reading data from extra records.
200 2019-08-22 Tamar Christina <tamar.christina@arm.com>
203 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
204 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
205 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
206 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
209 2019-08-22 Alan Modra <amodra@gmail.com>
211 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
212 instead recognize CMSE_PREFIX in symbol name.
213 (elf32_arm_gc_mark_extra_sections): Likewise.
214 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
215 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
217 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
219 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
220 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
222 2019-08-20 Tamar Christina <tamar.christina@arm.com>
224 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
225 elf32_arm_stub_long_branch_v4t_thumb_thumb,
226 elf32_arm_stub_long_branch_v4t_thumb_arm,
227 elf32_arm_stub_short_branch_v4t_thumb_arm,
228 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
229 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
230 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
231 previous instruction.
233 2019-08-19 Tom Tromey <tromey@adacore.com>
235 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
238 2019-08-19 Alan Modra <amodra@gmail.com>
240 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
242 (struct _ppc64_elf_section_data): Likewise.
243 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
244 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
245 than TOC loop. Check PLT16 insns too.
247 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
250 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
251 PC-relative relocations back to ...
252 (elf_x86_64_relocate_section): Here.
254 2019-08-16 Martin Liska <mliska@suse.cz>
257 * elflink.c: Report error only for not relocatable.
258 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
259 here lto_slim_object as it's handled in caller.
261 2019-08-16 Alan Modra <amodra@gmail.com>
263 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
265 2019-08-15 Jim Wilson <jimw@sifive.com>
267 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
268 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
269 to c.li instruction, and use ENCODE_RVC_IMM to set value.
271 2019-08-15 Tom Tromey <tromey@adacore.com>
273 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
276 2019-08-14 Alan Modra <amodra@gmail.com>
279 * dwarf2.c (stash_comp_unit): New function, extracted from..
280 (_bfd_dwarf2_find_nearest_line): ..here.
281 (find_abstract_instance): Parse comp units and decode line info
284 2019-08-14 Alan Modra <amodra@gmail.com>
286 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
287 (comp_unit_find_nearest_line): Use it here..
288 (_bfd_dwarf2_find_symbol_bias): ..and here.
290 2019-08-14 Alan Modra <amodra@gmail.com>
292 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
293 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
294 * coffgen.c (coff_find_nearest_line_with_names): Adjust
295 _bfd_dwarf2_find_nearest_line calls.
296 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
297 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
298 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
299 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
300 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
301 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
302 * libbfd.h: Regenerate.
304 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
306 * elf-bfd.h (struct elf_backend_data): New members.
307 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
308 .gnu.hash section if necessary.
309 (struct collect_gnu_hash_codes): New member.
310 (elf_gnu_hash_process_symidx): New function name.
311 (elf_renumber_gnu_hash_syms): Ignore local and undefined
312 symbols. Record xlat location for every symbol which should have
314 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
315 dynamic section if necessary.
316 (GNU_HASH_SECTION_NAME): New define.
317 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
318 Update the section size info.
319 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
320 (struct mips_elf_link_hash_entry): New member.
321 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
323 (mips_elf_sort_hash_table): Initialize the pointer to the
325 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
326 translation table entry with the symbol dynindx.
327 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
328 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
330 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
332 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
334 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
335 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
337 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
338 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
339 (_bfd_mips_post_process_headers): Mark the ABI version as
340 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
341 but not a .hash section.
342 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
343 position in the translation table, associated with the hash
345 * elfxx-mips.h (literal_reloc_p): Define
346 elf_backend_record_xhash_symbol backend hook.
347 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
350 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
352 * elf64-bpf.c (bpf_elf_relocate_section): New function.
353 (bpf_elf_insn_disp_reloc): Delete function.
354 (elf_backend_relocate_section): Define.
356 2019-08-07 Alan Modra <amodra@gmail.com>
359 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
360 for overflow in expressions involving nsymz.
362 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
364 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
365 two pages in relro presence.
367 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
369 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
370 (get_wsr_lbeg_opcode): New functions.
371 (check_loop_aligned): Detect relaxed loops and adjust loop_len
372 and insn_len for the first actual instruction of the loop.
374 2019-07-30 Alan Modra <amodra@gmail.com>
377 * bfd.c (struct bfd): Add lto_slim_object flag.
378 * bfd-in2.h: Regenerate.
380 2019-07-29 Martin Liska <mliska@suse.cz>
383 * archive.c (_bfd_compute_and_write_armap): Come up with
384 report_plugin_err variable.
385 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
386 * elf.c (struct lto_section): New.
387 (_bfd_elf_make_section_from_shdr): Parse content of
388 .gnu_lto_.lto section.
389 * elflink.c: Report error for a missing LTO plugin.
390 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
392 2019-07-28 Alan Modra <amodra@gmail.com>
396 * elflink.c (elf_link_add_object_symbols): Report an informative
397 error on finding local symbols with index equal or greater than
398 symbol table sh_info. Correct comment. Allow such symbols in
399 dynamic objects. Abort on NULL section for symbol.
401 2019-07-26 Alan Modra <amodra@gmail.com>
403 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
404 (elf_linker): Don't define.
405 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
407 2019-07-25 YunQiang Su <syq@debian.org>
410 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
413 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
415 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
417 (reloc_type_to_name): Fix formating.
418 (arc_elf_object_p): Likewise.
419 (debug_arc_reloc): Likewise.
420 (arc_do_relocation): Likewise.
422 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
424 * elf32-arc.c (bfd_get_32_me): New function.
425 (bfd_put_32_me): Likewise.
426 (arc_elf_relax_section): Likewise.
427 (bfd_elf32_bfd_relax_section): Define.
429 2019-07-24 Alan Modra <amodra@gmail.com>
431 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
432 elf_backend_final_write_processing, don't pass linker arg.
433 (_bfd_elf_final_write_processing): Update prototype.
434 * elf.c (_bfd_elf_write_object_contents): Adjust call.
435 (_bfd_elf_final_write_processing): Return error on incompatible
436 OSABI and has_gnu_osabi. Remove linker arg.
437 * elf-nacl.h (nacl_final_write_processing): Update prototype.
438 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
439 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
440 (_bfd_mips_elf_final_write_processing): Likewise.
441 * elf-hppa.h (elf_hppa_final_write_processing): Return status
442 and remove linker arg.
443 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
444 * elf-nacl.c (nacl_final_write_processing): Likewise.
445 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
446 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
447 * elf32-arm.c (arm_final_write_processing): Likewise.
448 (elf32_arm_final_write_processing): Likewise.
449 (elf32_arm_nacl_final_write_processing): Likewise.
450 (elf32_arm_vxworks_final_write_processing): Likewise.
451 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
452 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
453 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
454 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
455 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
456 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
457 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
458 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
459 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
460 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
461 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
462 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
463 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
464 * elf32-ppc.c (ppc_final_write_processing): Likewise.
465 (ppc_elf_final_write_processing): Likewise.
466 (ppc_elf_vxworks_final_write_processing): Likewise.
467 * elf32-sparc.c (sparc_final_write_processing): Likewise.
468 (elf32_sparc_final_write_processing): Likewise.
469 (elf32_sparc_vxworks_final_write_processing): Likewise.
470 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
471 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
472 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
473 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
474 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
475 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
476 (_bfd_mips_elf_final_write_processing): Likewise.
478 2019-07-24 Alan Modra <amodra@gmail.com>
480 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
482 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
483 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
485 2019-07-24 Alan Modra <amodra@gmail.com>
487 * elf32-visium.c (visium_elf_post_process_headers): Don't set
488 EI_OSABI header byte here.
491 2019-07-23 Alan Modra <amodra@gmail.com>
493 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
494 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
495 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
496 when elf_gnu_osabi_mbind is set.
497 (_bfd_elf_map_sections_to_segments): Likewise.
498 (_bfd_elf_init_private_section_data): Likewise.
499 (_bfd_elf_final_write_processing): Update comment.
500 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
501 (elf_backend_special_sections): Define without .tbss for linux.
503 2019-07-23 Alan Modra <amodra@gmail.com>
505 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
506 Remove none, any, all enums.
507 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
508 (_bfd_elf_final_write_processing): Declare.
509 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
510 elf_backend_final_write_processing.
511 (_bfd_elf_post_process_headers): Move body of function to..
512 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
513 only when not already set. Adjust for rename.
514 * elfxx-target.h (elf_backend_final_write_processing): Default to
515 _bfd_elf_final_write_processing.
516 * elf-hppa.h (elf_hppa_final_write_processing): Call
517 _bfd_elf_final_write_processing.
518 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
519 * elf-nacl.c (nacl_final_write_processing): Likewise.
520 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
521 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
522 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
523 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
524 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
525 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
526 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
527 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
528 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
529 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
530 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
531 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
532 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
533 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
534 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
535 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
536 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
537 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
538 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
539 * elf32-arm.c (arm_final_write_processing): Split out from..
540 (elf32_arm_final_write_processing): ..here. Call
541 _bfd_elf_final_write_processing.
542 (elf32_arm_nacl_final_write_processing): Adjust.
543 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
544 (_bfd_mips_elf_final_write_processing): ..here. Call
545 _bfd_elf_final_write_processing.
546 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
547 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
548 * elf32-ppc.c (ppc_final_write_processing): Split out from..
549 (ppc_elf_final_write_processing): ..here. Call
550 _bfd_elf_final_write_processing.
551 (ppc_elf_vxworks_final_write_processing): Adjust.
552 * elf32-sparc.c (sparc_final_write_processing): Split out from..
553 (elf32_sparc_final_write_processing): ..here. Call
554 _bfd_elf_final_write_processing.
555 (elf32_sparc_vxworks_final_write_processing): Adjust.
556 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
557 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
558 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
559 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
560 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
561 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
562 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
563 * elflink.c (elf_link_add_object_symbols): Likewise.
564 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
567 2019-07-23 Omar Majid <omajid@redhat.com>
569 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
570 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
571 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
573 * peXXigen.c: Add comment about source of .NET magic numbers.
575 2019-07-19 Alan Modra <amodra@gmail.com>
577 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
578 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
579 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
580 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
581 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
582 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
583 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
584 (ppc64_elf_check_relocs): Support pcrel tls relocs.
585 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
586 * bfd-in2.h: Regenerate.
587 * libbfd.h: Regenerate.
589 2019-07-18 Alan Modra <amodra@gmail.com>
591 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
592 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
595 2019-07-18 Alan Modra <amodra@gmail.com>
597 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
598 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
600 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
601 tls_type vars unsigned int.
602 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
603 to select r_type edit.
605 2019-07-18 Alan Modra <amodra@gmail.com>
607 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
609 * elf64-ppc.c (TLS_GDIE): Likewise.
611 2019-07-18 Alan Modra <amodra@gmail.com>
613 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
614 range of tp-relative offsets.
616 2019-07-15 Alan Modra <amodra@gmail.com>
618 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
619 alias is no longer bfd_link_hash_defined, clear the alias.
621 2019-07-13 Alan Modra <amodra@gmail.com>
623 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
625 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
626 (_bfd_elf_init_2_index_sections): Likewise.
627 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
628 relocations for local TLS symbols, use STN_UNDEF as the relocation
630 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
631 leave TLS symbol value in the addend.
633 2019-07-08 Alan Modra <amodra@gmail.com>
636 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
637 size before reading first word.
639 2019-07-02 Nick Clifton <nickc@redhat.com>
642 * elf.c (is_debuginfo_file): New function.
643 (assign_file_positions_for_non_load_sections): Do not warn about
644 allocated sections outside of loadable segments if they are found
646 * elf-bfd.h (is_debuginfo_file): Prototype.
648 2019-07-02 Nick Clifton <nickc@redhat.com>
651 * compress.c (bfd_get_full_section_contents): Do not complain
652 about linker created sections that are larger than the file size.
654 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
656 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
657 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
659 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
661 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
663 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
664 sections when .text section contain secure entry functions
667 2019-07-01 Nick Clifton <nickc@redhat.com>
670 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
671 section VMA in the offset used to update exidx relocs.
673 2019-06-28 Nick Clifton <nickc@redhat.com>
676 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
677 large version reference section.
678 * compress.c (bfd_get_full_section_contents): Check for an
679 uncompressed section whose size is larger than the file size.
681 2019-06-28 Alan Modra <amodra@gmail.com>
683 * format.c (bfd_check_format_matches): Don't match plugin target
684 if another target matches. Expand comment.
685 * targets.c (_bfd_target_vector): Move plugin_vec after all other
686 non-corefile targets, outside !SELECT_VECS.
687 * config.bfd: Don't handle targ=plugin here.
688 * configure.ac: Don't add plugin to enable_targets or handle in
689 target loop setting selvecs and other target vars.
690 * configure: Regenerate.
692 2019-06-26 Nick Clifton <nickc@redhat.com>
695 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
696 messages for failures.
697 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
698 if returning an error value.
700 2019-06-25 Jan Beulich <jbeulich@suse.com>
702 * elf-properties.c (elf_find_and_remove_property): Rename last
703 parameter. Mention it in comment.
705 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
707 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
708 SEC_MERGE or SEC_CODE flags are set.
709 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
710 symtype consistently. Don't include sec_addr (sym_sec) in symval.
711 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
712 Add sec_addr (sym_sec) after handling merge sections.
714 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
717 * elf-properties.c (elf_merge_gnu_property_list): Remove the
718 property after reporting property removal.
720 2019-06-23 Alan Modra <amodra@gmail.com>
723 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
724 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
725 Reduce range of offsets allowed for other GOT relocs.
727 2019-06-23 Alan Modra <amodra@gmail.com>
730 * elfcode.h (elf_object_p): Warning fix.
732 2019-06-21 Alan Modra <amodra@gmail.com>
735 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
737 2019-06-19 Alan Modra <amodra@gmail.com>
740 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
741 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
743 2019-06-19 Alan Modra <amodra@gmail.com>
745 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
746 functions that require r2 valid to use local entry.
747 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
749 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
751 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
752 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
753 with elfNN_aarch64_allocate_local_dynrelocs.
755 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
757 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
759 2019-06-14 Alan Modra <amodra@gmail.com>
761 * Makefile.in: Regenerate.
762 * configure: Regenerate.
764 2019-06-14 Alan Modra <amodra@gmail.com>
766 * elf64-ppc.c: Fix comments involving paddi.
768 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
771 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
772 absent, or the bfd is not in the ELF formart.
773 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
775 2019-06-10 Christos Zoulas <christos@zoulas.com>
778 * elf.c (elfcore_make_auxv_note_section): New function.
779 (elfcore_grok_note): Use it.
780 (elfcore_grok_freebsd_note): Likewise.
781 (elfcore_grok_openbsd_note): Likewise.
782 (elfcore_grok_netbsd_note): Likewise. Plus add support for
783 NT_NETBSDCORE_AUXV notes.
785 2019-06-06 Sudakshina Das <sudi.das@arm.com>
787 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
788 alignment of the new gnu property section.
790 2019-06-06 Sudakshina Das <sudi.das@arm.com>
792 * bfd-in.h: Change comment.
793 * bfd-in2.h: Regenerate.
794 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
795 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
798 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
800 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
801 Remove overflow check.
803 2019-05-28 Alan Modra <amodra@gmail.com>
806 * cofflink.c (coff_link_check_archive_element): Don't assume
807 element is a coff object file after calling add_archive_element.
809 2019-05-28 Alan Modra <amodra@gmail.com>
812 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
813 attempt to set sh_entsize for excluded PLT section.
815 2019-05-28 Alan Modra <amodra@gmail.com>
818 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
819 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
820 allocated in alpha_dynamic_entries_for_reloc.
822 2019-05-28 Alan Modra <amodra@gmail.com>
825 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
826 on NULL output_section.
827 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
829 2019-05-28 Alan Modra <amodra@gmail.com>
832 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
833 entry when MUST_FIND. Abort when MUST_FIND not found.
834 (elf_m68k_get_bfd2got_entry): Likewise.
835 (elf_m68k_relocate_section): Remove now useless assert.
837 2019-05-28 Alan Modra <amodra@gmail.com>
840 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
841 from bfd_link_info, not an output section owner.
842 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
843 (elf_hppa_final_link_relocate): Likewise.
845 2019-05-28 Alan Modra <amodra@gmail.com>
848 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
849 create_object_symbols_section, obj_textsec, obj_datasec or
850 obj_bsssec. Fix other errors in placement.
851 * config.bfd: Obsolete tic30-aout.
853 2019-05-28 Alan Modra <amodra@gmail.com>
856 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
857 end of section list as well as section_count.
858 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
859 section list before returning error.
861 2019-05-27 Alan Modra <amodra@gmail.com>
863 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
865 2019-05-27 Alan Modra <amodra@gmail.com>
868 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
870 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
872 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
873 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
874 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
875 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
876 (elf_backend_merge_symbol_attribute): Define.
878 2019-05-24 Alan Modra <amodra@gmail.com>
880 * po/SRC-POTFILES.in: Regenerate.
882 2019-05-24 Alan Modra <amodra@gmail.com>
884 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
885 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
886 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
887 (struct ppc_link_hash_table): Add powerxx_stubs.
888 (ppc64_elf_check_relocs): Set powerxx_stubs.
889 (build_powerxx_offset, size_powerxx_offset),
890 (num_relocs_for_powerxx_offset),
891 (emit_relocs_for_powerxx_offset): New functions.
892 (plt_stub_size): Size powerxx stubs.
893 (ppc_build_one_stub): Emit powerxx stubs.
894 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
897 2019-05-24 Alan Modra <amodra@gmail.com>
899 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
901 (xlate_pcrel_opt): New function.
902 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
903 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
904 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
906 2019-05-24 Alan Modra <amodra@gmail.com>
908 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
909 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
910 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
911 (BFD_RELOC_PPC64_PLT_PCREL34),
912 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
913 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
914 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
915 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
916 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
917 * elf64-ppc.c (PNOP): Define.
918 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
919 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
920 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
922 (ppc64_elf_prefix_reloc): New function.
923 (struct ppc_link_hash_table): Add notoc_plt.
924 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
925 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
926 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
927 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
928 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
929 possible need for dynamic relocs on non-pcrel powerxx relocs.
930 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
931 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
932 (toc_adjusting_stub_needed): Likewise.
933 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
934 (ppc64_elf_relocate_section): Handle new powerxx relocs.
935 * bfd-in2.h: Regenerate.
936 * libbfd.h: Regenerate.
938 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
940 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
941 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
943 * configure: Regenerate.
945 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
947 * configure: Regenerated.
948 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
949 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
950 (BFD64_BACKENDS): Add elf64-bpf.lo.
951 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
952 * Makefile.in (SOURCE_HFILES): Regenerate.
953 * config.bfd (targ_cpu): Handle bpf-*-* targets.
954 * cpu-bpf.c: New file.
955 * elf64-bpf.c: Likewise.
956 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
958 * archures.c: Define architecture bfd_arch_bpf and machine
960 * reloc.c: Define BFD relocations used by the BPF target.
961 * bfd-in2.h: Regenerated.
962 * libbfd.h: Likewise.
964 2019-05-22 Alan Modra <amodra@gmail.com>
966 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
969 2019-05-22 Alan Modra <amodra@gmail.com>
971 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
972 processing on "size error in section".
974 2019-05-22 Alan Modra <amodra@gmail.com>
976 * som.c (som_bfd_free_cached_info): Call
977 _bfd_generic_close_and_cleanup.
979 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
981 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
982 for TLS_TPREL_HI16(/LO16) relocations in shared library.
984 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
986 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
987 checks. Search the RELA table for n64 relocations.
989 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
990 Faraz Shahbazker <fshahbazker@wavecomp.com>
992 * elfxx-mips.c (LA25_BC): New macro.
993 (mips_elf_link_hash_table)<compact_branches>: New field.
994 (STUB_JALRC): New macro.
995 (mipsr6_o32_exec_plt0_entry_compact): New array.
996 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
997 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
998 (mipsr6_exec_plt_entry_compact): Likewise.
999 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1000 when compact_branches is true.
1001 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1002 PLT for MIPSR6 with compact_branches. Do not reorder the
1003 compact branches PLT. Switch the lazy stub for MIPSR6
1004 with compact_branches to use JALRC.
1005 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1006 when compact_branches is true.
1007 (_bfd_mips_elf_compact_branches): New function.
1008 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1010 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1013 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1014 Fix print formatter.
1016 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1019 * elf32-arm.c (get_value_helper): Remove.
1020 (elf32_arm_final_link_relocate): Fix branch future relocations.
1022 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1025 * bfd-in.h (enum erratum_84319_opts): New
1026 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1027 int to enum erratum_84319_opts.
1028 * bfd-in2.h: Regenerate.
1029 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1030 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1031 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1032 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1033 (_bfd_aarch64_resize_stubs): Amend comment.
1034 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1036 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1037 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1039 (clear_erratum_843419_entry): Update erratum conditional.
1041 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1044 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1045 when computing distance_short_enough.
1047 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1050 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1051 Wrap around even if distance equals avr_pc_wrap_around.
1053 2019-05-20 Nick Clifton <nickc@redhat.com>
1055 * po/fr.po: Updated French translation.
1057 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1059 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1061 2019-05-16 Alan Modra <amodra@gmail.com>
1063 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1065 2019-05-15 Alan Modra <amodra@gmail.com>
1067 * elf32-arm.c (elf32_arm_write_section): Don't leave
1068 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1069 unitialised section contents.
1071 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1074 * verilog.c: (VerilogDataWidth): New variable.
1075 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1077 2019-05-08 Nick Clifton <nickc@redhat.com>
1080 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1081 rather than FALSE if encountering a non-ELF file.
1083 2019-05-06 Alan Modra <amodra@gmail.com>
1085 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1087 2019-05-06 Alan Modra <amodra@gmail.com>
1089 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1090 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1091 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1092 * libbfd.h: Regenerate.
1093 * bfd-in2.h: Regenerate.
1095 2019-05-04 Alan Modra <amodra@gmail.com>
1098 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1099 following the standard section names.
1100 (bfd_decode_symclass): Prioritize section flag tests in
1101 decode_section_type before name tests in coff_section_type.
1102 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1103 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1104 their names and choose standard .text section flags for
1107 2019-05-02 Nick Clifton <nickc@redhat.com>
1110 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1111 .gnu.debugaltlink sections as debugging sections.
1113 2019-04-30 Alan Modra <amodra@gmail.com>
1115 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1116 (struct _ppc64_elf_section_data): Likewise.
1117 (ppc64_elf_check_relocs): Set above fields.
1118 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1119 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1122 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1125 * elflink.c (elf_link_output_extsym): Don't complain undefined
1126 weak dynamic reference.
1128 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1130 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1131 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1132 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1133 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1134 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1135 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1136 (elfNN_aarch64_small_plt0_bti_entry): Update.
1137 (elfNN_aarch64_small_plt_bti_entry): Update.
1138 (elfNN_aarch64_small_plt_pac_entry): Update.
1139 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1140 (setup_plt_values): Setup new entries.
1141 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1142 (elfNN_aarch64_plt_sym_val): Likewise.
1144 2019-04-22 Jim Wilson <jimw@sifive.com>
1146 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1148 2019-04-19 Alan Modra <amodra@gmail.com>
1150 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1152 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1154 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1155 building shared object.
1156 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1158 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1161 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1164 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1166 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1168 * bfd-in2.h: Regenerate.
1169 * libbfd.h: Likewise.
1171 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1173 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1174 * bfd-in2.h: Regenerated.
1175 * libbfd.h: Regenerated.
1177 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1179 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1180 * bfd-in2.h: Regenerated.
1181 * libbfd.h: Likewise.
1183 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1185 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1186 * bfd-in2.h: Regenerated.
1187 * libbfd.h: Regenerated.
1188 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1189 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1190 and R_ARM_THM_BF12 together.
1191 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1193 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1195 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1196 * libbfd.h: Regenerated.
1197 * bfd-in2.h: Regenerated.
1198 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1199 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1200 and R_ARM_THM_BF18 together.
1201 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1203 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1205 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1206 * bfd-in2.h: Regenerated.
1207 * libbfd.h: Regenerated.
1208 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1209 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1210 and R_ARM_THM_BF16 together.
1211 (get_value_helper): New reloc helper.
1212 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1214 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1216 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1217 * bfd-in2.h: Regenerate.
1218 * libbfd.h: Regenerate.
1220 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1222 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1223 * bfd-in2.h: Regenerate.
1224 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1225 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1227 (using_thumb2): Likewise.
1228 (using_thumb2_bl): Update assert.
1229 (arch_has_arm_nop): Likewise.
1230 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1231 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1233 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1235 * elf-linker-x86.h (elf_x86_cet_report): New.
1236 (elf_linker_x86_params): Add cet_report.
1237 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1238 missing IBT and SHSTK properties if needed.
1240 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1243 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1244 "h != NULL". Don't check "h != NULL" before calling.
1245 bfd_elf_gc_record_vtentry.
1246 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1247 * elf32-bfin.c (bfin_check_relocs): Likewise.
1248 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1249 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1250 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1251 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1252 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1253 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1254 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1255 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1256 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1257 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1258 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1259 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1260 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1261 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1262 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1263 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1264 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1265 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1266 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1267 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1268 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1269 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1270 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1271 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1272 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1273 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1274 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1275 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1276 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1279 2019-04-11 Alan Modra <amodra@gmail.com>
1282 * elflink.c (elf_link_add_object_symbols): Don't read partial
1283 dynamic entries from fuzzed objects.
1285 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1288 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1289 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1290 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1292 2019-04-10 Michael Forney <mforney@mforney.org>
1295 * doc/chew.c (free_words): Correctly free "push_text" strings.
1297 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1299 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1301 2019-04-08 Alan Modra <amodra@gmail.com>
1303 * configure.ac (elfxx_x86): Define and use.
1304 * configure: Regenerate.
1306 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1308 * elf-linker-x86.h: New file.
1309 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1310 to get x86-specific linker options.
1311 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1312 (elf_x86_64_check_relocs): Likewise.
1313 (elf_x86_64_relocate_section): Likewise.
1314 (elf_x86_64_link_setup_gnu_properties): Likewise.
1315 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1316 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1317 (_bfd_elf_linker_x86_set_options): New function.
1318 * elfxx-x86.h: Include "elf-linker-x86.h".
1319 (elf_x86_link_hash_table): Add params.
1321 2019-04-03 Alan Modra <amodra@gmail.com>
1323 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1324 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1325 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1326 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1327 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1328 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1330 2019-04-02 Jim Wilson <jimw@sifive.com>
1333 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1334 ELF header flags to after check for ELF object file. Loop through
1335 sections looking for code sections, if none, then skip ABI checks.
1337 2019-03-30 Andrew Waterman <andrew@sifive.com>
1339 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1342 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1344 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1345 info->export_dynamic to the conditional.
1347 2019-03-28 Alan Modra <amodra@gmail.com>
1350 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1351 * configure: Regenerate.
1352 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1353 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1354 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1355 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1356 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1358 2019-03-21 Jim Wilson <jimw@sifive.com>
1361 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1362 verify sym non-NULL before using. Add identical check using h.
1364 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1366 * elf-bfd.h (struct elf_backend_data): Add argument to
1367 merge_gnu_properties.
1368 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1369 itself and while calling bed->merge_gnu_properties.
1370 (elf_merge_gnu_property_list): Update the calls for
1371 elf_merge_gnu_properties.
1372 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1373 of --force-bti warning and add argument.
1374 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1376 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1377 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1380 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1382 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1383 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1384 (elf_backend_fixup_gnu_properties): Define for AArch64.
1386 2019-03-18 Alan Modra <amodra@gmail.com>
1389 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1390 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1391 attempt at writing glink stubs only once.
1393 2019-03-16 Alan Modra <amodra@gmail.com>
1396 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1397 (_bfd_elf_rel_local_sym): Likewise.
1398 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1399 section of symbols with unrecognized shndx.
1401 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1404 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1406 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1407 in discarded section.
1409 2019-03-15 Alan Modra <amodra@gmail.com>
1412 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1413 symbol after globals if elf_bad_symtab is not set.
1415 2019-03-15 Alan Modra <amodra@gmail.com>
1418 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1419 (_bfd_elf_rel_local_sym): Likewise.
1421 2019-03-15 Alan Modra <amodra@gmail.com>
1424 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1425 object files with sh_size not a multiple of sh_entsize.
1427 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1430 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1431 input with bad relocation.
1433 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1435 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1437 2019-03-14 Nick Clifton <nickc@redhat.com>
1440 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1441 (save_section_vma): Initialise field to the number of entries in
1443 (section_vma_same): Check that the number of entries in the
1444 sec_vma table matches the number of sections in the bfd.
1446 2019-03-14 Nick Clifton <nickc@redhat.com>
1449 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1450 section owner pointer when adding the default symbol.
1452 2019-03-14 Nick Clifton <nickc@redhat.com>
1455 * elflink.c (elf_link_add_object_symbols): Add new local variable
1456 extversym_end. Initialise it to point to the end of the version
1457 symbol table, if present. Check it when initialising and updating
1460 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1462 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1463 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1464 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1465 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1467 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1468 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1469 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1471 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1472 Szabolcs Nagy <szabolcs.nagy@arm.com>
1474 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1475 (aarch64_bti_pac_info): New.
1476 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1477 (bfd_elf32_aarch64_set_options): Likewise.
1478 * bfd-in2.h: Regenerate
1479 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1480 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1481 (elfNN_aarch64_small_plt0_bti_entry): New.
1482 (elfNN_aarch64_small_plt_bti_entry): New.
1483 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1484 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1485 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1486 tlsdesc_plt_entry_size fields.
1487 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1488 (setup_plt_values): New helper function.
1489 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1491 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1493 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1494 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1495 to plt stubs instead of fixed ones and update filling them according
1496 to the need for bti.
1497 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1498 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1499 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1500 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1501 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1503 (bfd_elfNN_get_synthetic_symtab): Define.
1504 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1505 and mising BTI NOTE SECTION.
1508 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1510 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1511 linker created inputs from merge.
1512 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1513 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1514 (elfNN_aarch64_link_setup_gnu_properties): New.
1515 (elfNN_aarch64_merge_gnu_properties): New.
1516 (elf_backend_setup_gnu_properties): Define for AArch64.
1517 (elf_backend_merge_gnu_properties): Likewise.
1518 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1519 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1520 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1521 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1522 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1523 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1524 (elf_backend_parse_gnu_properties): Define for AArch64.
1526 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1529 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1530 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1532 2019-03-12 Alan Modra <amodra@gmail.com>
1534 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1535 nmemb parameter. Use bfd_alloc2.
1536 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1538 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1539 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1540 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1542 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1543 (assign_section_numbers): Style fix.
1544 (swap_out_syms): Use bfd_malloc2.
1545 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1547 (_bfd_elf_make_empty_symbol): Style fix.
1548 (elfobj_grok_stapsdt_note_1): Formatting.
1549 * elfcode.h (elf_object_p): Use bfd_alloc2.
1550 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1551 (elf_slurp_symbol_table): Use bfd_zalloc2.
1552 (elf_slurp_reloc_table): Use bfd_alloc2.
1553 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1554 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1555 size calculation doesn't overflow.
1556 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1557 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1558 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1560 2019-03-08 Alan Modra <amodra@gmail.com>
1563 * merge.c (merge_strings): Return secinfo. Don't pad section
1565 (_bfd_merge_sections): Pad section to alignment here, if input
1566 sections contributing to merged output all pad to alignment.
1569 2019-03-06 Nick Clifton <nickc@redhat.com>
1571 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1573 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1574 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1576 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1578 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1579 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1582 * elf32-s390.c (allocate_dynrelocs): Update comment.
1584 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1586 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1588 2019-02-28 Nick Clifton <nickc@redhat.com>
1591 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1592 section that is not NUL terminated.
1594 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1597 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1598 by linker when checking copy reloc on protected symbol.
1600 2019-02-24 Alan Modra <amodra@gmail.com>
1603 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1605 2019-02-20 Eric Tsai <erictsai@cadence.com>
1607 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1608 sections between the call site and call destination and adjust
1609 call distance by the largest alignment.
1611 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1613 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1614 * elf.c (elfcore_grok_aarch_pauth): New function.
1615 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1616 (elfcore_write_aarch_pauth): New function.
1617 (elfcore_write_register_note): Check for AArch64 pauth section.
1619 2019-02-20 Alan Modra <amodra@gmail.com>
1622 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1625 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1627 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1628 Darwin hosts, not just or1k.
1629 * configure: Regenerate.
1631 2019-02-20 Alan Modra <amodra@gmail.com>
1634 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1635 sentinel NUL to string buffer nearer to loop where it is used.
1636 Don't go past sentinel when scanning strings, and don't write
1638 * archive.c (do_slurp_coff_armap): Simplify string handling to
1641 2019-02-19 Alan Modra <amodra@gmail.com>
1644 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1645 attempting to prevent read past end of section.
1647 2019-02-18 Alan Modra <amodra@gmail.com>
1650 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1651 PRIx64 to generate warning messages. Print local sym names too.
1653 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1655 * elf32-arc (INIT_SYM_STRING): Delete.
1656 (FINI_SYM_STRING): Likewise.
1657 (init_str): Likewise.
1658 (fini_str): Likewise.
1660 2019-02-08 Alan Modra <amodra@gmail.com>
1662 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1663 for bss-plt" warning to make it an error.
1665 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1668 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1669 reloc_class_ifunc for ifunc symbols.
1670 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1672 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1674 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1675 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1677 2019-02-07 Nick Clifton <nickc@redhat.com>
1679 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1680 into the definitely obsolete list.
1682 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1685 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1686 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1687 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1689 (elf_x86_64_check_relocs): Here.
1690 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1691 to check if a symbol is defined in a non-shared object.
1692 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1694 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1696 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1697 of 'labs' (and fix GCC warning).
1699 2019-01-25 Nick Clifton <nickc@redhat.com>
1701 * po/ru.po: Updated Russian translation.
1703 2019-01-23 Nick Clifton <nickc@redhat.com>
1705 * po/fr.po: Updated French translation.
1707 2019-01-21 Nick Clifton <nickc@redhat.com>
1709 * po/pt.po: Updated Portuguese translation.
1710 * po/uk.po: Updated Ukranian translation.
1712 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1715 * elf32-nds32.c (nds32_relocate_section): Add space between words
1717 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1719 (riscv_i_or_e_p): Likewise.
1720 (riscv_merge_arch_attr_info): Likewise.
1722 2019-01-19 Nick Clifton <nickc@redhat.com>
1724 * version.m4: Reset to 2.32.51
1725 * configure: Regenerate.
1726 * po/bfd.pot: Regenerate.
1728 2018-06-24 Nick Clifton <nickc@redhat.com>
1730 2.32 branch created.
1732 2019-01-16 Kito Cheng <kito@andestech.com>
1734 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1737 2019-01-16 Kito Cheng <kito@andestech.com>
1738 Nelson Chu <nelson@andestech.com>
1740 * elfnn-riscv.c (in_subsets): New.
1741 (out_subsets): Likewise.
1742 (merged_subsets): Likewise.
1743 (riscv_std_ext_p): Likewise.
1744 (riscv_non_std_ext_p): Likewise.
1745 (riscv_std_sv_ext_p): Likewise.
1746 (riscv_non_std_sv_ext_p): Likewise.
1747 (riscv_version_mismatch): Likewise.
1748 (riscv_i_or_e_p): Likewise.
1749 (riscv_merge_std_ext): Likewise.
1750 (riscv_merge_non_std_and_sv_ext): Likewise.
1751 (riscv_merge_arch_attr_info): Likewise.
1752 (riscv_merge_attributes): Likewise.
1753 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1755 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1756 (elf_backend_obj_attrs_vendor): Define.
1757 (elf_backend_obj_attrs_section_type): Likewise.
1758 (elf_backend_obj_attrs_section): Likewise.
1759 (elf_backend_obj_attrs_arg_type): Define as
1760 riscv_elf_obj_attrs_arg_type.
1761 * elfxx-riscv.c (riscv_estimate_digit): New.
1762 (riscv_estimate_arch_strlen1): Likewise.
1763 (riscv_estimate_arch_strlen): Likewise.
1764 (riscv_arch_str1): Likewise.
1765 (riscv_arch_str): Likewise.
1766 * elfxx-riscv.h (riscv_arch_str): Declare.
1768 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1770 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1772 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1773 source field. (md_apply_fix): Apply final fix
1774 to BFD_RELOC_S12Z_OPR.
1775 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1777 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1780 * elf32-s390.c (allocate_dynrelocs): Update comment.
1782 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1784 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1785 * configure: Regenerate.
1787 2019-01-08 Alan Modra <amodra@gmail.com>
1791 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1794 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1796 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1797 * bfd/bfd-in2.h: Regenerate.
1798 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1799 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1801 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1803 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1804 default target, little endian target is more suitable.
1806 2019-01-04 Alan Modra <amodra@gmail.com>
1810 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1812 (EQ_VALUE_IN_FIELD): Likewise.
1813 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1815 2019-01-01 Alan Modra <amodra@gmail.com>
1817 Update year range in copyright notice of all files.
1819 For older changes see ChangeLog-2018
1821 Copyright (C) 2019 Free Software Foundation, Inc.
1823 Copying and distribution of this file, with or without modification,
1824 are permitted in any medium without royalty provided the copyright
1825 notice and this notice are preserved.
1831 version-control: never