1 2019-10-09 Alan Modra <amodra@gmail.com>
4 2019-10-07 Alan Modra <amodra@gmail.com>
5 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
6 space for local got non-tls relocs when PIE.
8 2019-10-04 Alan Modra <amodra@gmail.com>
9 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
10 (ppc64_elf_tls_optimize): Correct is_local condition.
11 (allocate_got): Don't reserve dynamic relocations for any of the
12 tls got relocs in PIEs when the symbol is local.
13 (allocate_dynrelocs): Correct validity test for local sym using
15 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
16 for any of the tls got relocs in PIEs.
17 (ppc64_elf_layout_multitoc): Likewise.
18 (ppc64_elf_relocate_section): Correct validity test for local sym
19 using tlsld_got slot. Don't emit dynamic relocations for any of
20 the tls got relocs in PIEs when the symbol is local.
21 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
22 (got_relocs_needed): Delete.
23 (allocate_dynrelocs): Correct validity test for local sym using
24 tlsld_got slot. Don't reserve dynamic relocations for any of the
25 tls got relocs in PIEs when the symbol is local.
26 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
27 for any of the tls got relocs in PIEs.
28 (ppc_elf_relocate_section): Correct validity test for local sym
29 using tlsld_got slot. Don't emit dynamic relocations for any of
30 the tls got relocs in PIEs when the symbol is local.
32 2019-09-26 Alan Modra <amodra@gmail.com>
34 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
35 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
36 ${bindir}/../lib/bfd-plugins if different.
37 * Makefile.in: Regenerate.
39 2019-09-30 Phil Blundell <pb@pbcl.net>
42 * version.m4 (BFD_VERSION): Set to 2.33.
43 * development.sh (development, experimental): Set to false.
44 * configure, Makefile.in, doc/Makefile.in, po/bfd.pot: Regenerate.
46 2019-09-16 Phil Blundell <pb@pbcl.net>
48 * version.m4: Set version to 2.32.90 for pre-release.
49 * Makefile.in, doc/Makefile.in, configure: Regenerated.
51 2019-09-09 Phil Blundell <pb@pbcl.net>
53 binutils 2.33 branch created.
55 2019-09-06 Alan Modra <amodra@gmail.com>
57 * aout-target.h (object_p): Formatting.
58 * bfd-in.h (bfd_get_filename): Don't cast to char*.
59 * corefile.c (generic_core_file_matches_executable_p): Constify
60 variables and remove cast.
61 * bfd-in2.h: Regenerate.
63 2019-09-05 Alan Modra <amodra@gmail.com>
65 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
66 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
67 in the GOT/PLT entry rather than affecting the offset to that
69 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
71 2019-09-05 Alan Modra <amodra@gmail.com>
73 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
74 in second instruction.
75 (ppc64_elf_relocate_section): Likewise.
77 2019-09-05 Alan Modra <amodra@gmail.com>
80 * libbfd-in.h (bfd_strdup): New inline function.
81 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
83 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
84 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
86 (bfd_openstreamr): Use bfd_strdup.
87 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
88 * plugin.c (try_load_plugin): Use bfd_malloc.
89 * libbfd.h: Regenerate.
91 2019-09-02 Alan Modra <amodra@gmail.com>
94 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
96 (read_alt_indirect_string): Likewise.
97 (read_alt_indirect_ref): Likewise.
99 2019-08-31 Jim Wilson <jimw@sifive.com>
102 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
103 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
105 2019-08-30 Jim Wilson <jimw@sifive.com>
107 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
108 error, call bfd_set_error, set ret to FALSE, and goto out label.
110 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
113 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
114 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
116 2019-08-29 Alan Modra <amodra@gmail.com>
119 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
120 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
121 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
124 2019-08-29 Alan Modra <amodra@gmail.com>
126 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
127 on second insn, return it in poff.
128 (ppc64_elf_relocate_section): Add offset to paddi addend for
131 2019-08-28 Jim Wilson <jimw@sifive.com>
133 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
134 section when setting max_alignment. Update comment.
135 (_bfd_riscv_relax_pc): Likewise.
137 2019-08-29 Alan Modra <amodra@gmail.com>
140 * bfd.c (struct bfd): Add no_element_cache.
141 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
142 archive cache when no_element_cache.
143 (bfd_generic_archive_p): Set no_element_cache when opening first
144 element to check format. Close first element too.
145 (do_slurp_bsd_armap): Don't zero ardata->cache here.
146 * bfd-in2.h: Regenerate.
148 2019-08-24 Alan Modra <amodra@gmail.com>
150 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
151 symbols from GOT optimisation.
153 2019-08-23 Stafford Horne <shorne@gmail.com>
155 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
158 2019-08-23 Nick Clifton <nickc@redhat.com>
161 * elf.c (bfd_section_from_shdr): Issue an informative warning
162 message and continue processing other sections after encountering
163 a reloc section for a section which already has other relocs
166 2019-08-23 Alan Modra <amodra@gmail.com>
169 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
170 on error without freeing plts[] contents.
172 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
174 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
176 2019-08-22 Nick Clifton <nickc@redhat.com>
179 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
180 reading data from extra records.
182 2019-08-22 Tamar Christina <tamar.christina@arm.com>
185 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
186 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
187 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
188 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
191 2019-08-22 Alan Modra <amodra@gmail.com>
193 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
194 instead recognize CMSE_PREFIX in symbol name.
195 (elf32_arm_gc_mark_extra_sections): Likewise.
196 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
197 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
199 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
201 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
202 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
204 2019-08-20 Tamar Christina <tamar.christina@arm.com>
206 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
207 elf32_arm_stub_long_branch_v4t_thumb_thumb,
208 elf32_arm_stub_long_branch_v4t_thumb_arm,
209 elf32_arm_stub_short_branch_v4t_thumb_arm,
210 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
211 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
212 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
213 previous instruction.
215 2019-08-19 Tom Tromey <tromey@adacore.com>
217 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
220 2019-08-19 Alan Modra <amodra@gmail.com>
222 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
224 (struct _ppc64_elf_section_data): Likewise.
225 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
226 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
227 than TOC loop. Check PLT16 insns too.
229 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
232 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
233 PC-relative relocations back to ...
234 (elf_x86_64_relocate_section): Here.
236 2019-08-16 Martin Liska <mliska@suse.cz>
239 * elflink.c: Report error only for not relocatable.
240 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
241 here lto_slim_object as it's handled in caller.
243 2019-08-16 Alan Modra <amodra@gmail.com>
245 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
247 2019-08-15 Jim Wilson <jimw@sifive.com>
249 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
250 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
251 to c.li instruction, and use ENCODE_RVC_IMM to set value.
253 2019-08-15 Tom Tromey <tromey@adacore.com>
255 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
258 2019-08-14 Alan Modra <amodra@gmail.com>
261 * dwarf2.c (stash_comp_unit): New function, extracted from..
262 (_bfd_dwarf2_find_nearest_line): ..here.
263 (find_abstract_instance): Parse comp units and decode line info
266 2019-08-14 Alan Modra <amodra@gmail.com>
268 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
269 (comp_unit_find_nearest_line): Use it here..
270 (_bfd_dwarf2_find_symbol_bias): ..and here.
272 2019-08-14 Alan Modra <amodra@gmail.com>
274 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
275 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
276 * coffgen.c (coff_find_nearest_line_with_names): Adjust
277 _bfd_dwarf2_find_nearest_line calls.
278 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
279 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
280 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
281 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
282 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
283 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
284 * libbfd.h: Regenerate.
286 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
288 * elf-bfd.h (struct elf_backend_data): New members.
289 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
290 .gnu.hash section if necessary.
291 (struct collect_gnu_hash_codes): New member.
292 (elf_gnu_hash_process_symidx): New function name.
293 (elf_renumber_gnu_hash_syms): Ignore local and undefined
294 symbols. Record xlat location for every symbol which should have
296 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
297 dynamic section if necessary.
298 (GNU_HASH_SECTION_NAME): New define.
299 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
300 Update the section size info.
301 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
302 (struct mips_elf_link_hash_entry): New member.
303 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
305 (mips_elf_sort_hash_table): Initialize the pointer to the
307 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
308 translation table entry with the symbol dynindx.
309 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
310 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
312 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
314 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
316 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
317 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
319 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
320 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
321 (_bfd_mips_post_process_headers): Mark the ABI version as
322 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
323 but not a .hash section.
324 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
325 position in the translation table, associated with the hash
327 * elfxx-mips.h (literal_reloc_p): Define
328 elf_backend_record_xhash_symbol backend hook.
329 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
332 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
334 * elf64-bpf.c (bpf_elf_relocate_section): New function.
335 (bpf_elf_insn_disp_reloc): Delete function.
336 (elf_backend_relocate_section): Define.
338 2019-08-07 Alan Modra <amodra@gmail.com>
341 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
342 for overflow in expressions involving nsymz.
344 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
346 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
347 two pages in relro presence.
349 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
351 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
352 (get_wsr_lbeg_opcode): New functions.
353 (check_loop_aligned): Detect relaxed loops and adjust loop_len
354 and insn_len for the first actual instruction of the loop.
356 2019-07-30 Alan Modra <amodra@gmail.com>
359 * bfd.c (struct bfd): Add lto_slim_object flag.
360 * bfd-in2.h: Regenerate.
362 2019-07-29 Martin Liska <mliska@suse.cz>
365 * archive.c (_bfd_compute_and_write_armap): Come up with
366 report_plugin_err variable.
367 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
368 * elf.c (struct lto_section): New.
369 (_bfd_elf_make_section_from_shdr): Parse content of
370 .gnu_lto_.lto section.
371 * elflink.c: Report error for a missing LTO plugin.
372 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
374 2019-07-28 Alan Modra <amodra@gmail.com>
378 * elflink.c (elf_link_add_object_symbols): Report an informative
379 error on finding local symbols with index equal or greater than
380 symbol table sh_info. Correct comment. Allow such symbols in
381 dynamic objects. Abort on NULL section for symbol.
383 2019-07-26 Alan Modra <amodra@gmail.com>
385 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
386 (elf_linker): Don't define.
387 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
389 2019-07-25 YunQiang Su <syq@debian.org>
392 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
395 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
397 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
399 (reloc_type_to_name): Fix formating.
400 (arc_elf_object_p): Likewise.
401 (debug_arc_reloc): Likewise.
402 (arc_do_relocation): Likewise.
404 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
406 * elf32-arc.c (bfd_get_32_me): New function.
407 (bfd_put_32_me): Likewise.
408 (arc_elf_relax_section): Likewise.
409 (bfd_elf32_bfd_relax_section): Define.
411 2019-07-24 Alan Modra <amodra@gmail.com>
413 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
414 elf_backend_final_write_processing, don't pass linker arg.
415 (_bfd_elf_final_write_processing): Update prototype.
416 * elf.c (_bfd_elf_write_object_contents): Adjust call.
417 (_bfd_elf_final_write_processing): Return error on incompatible
418 OSABI and has_gnu_osabi. Remove linker arg.
419 * elf-nacl.h (nacl_final_write_processing): Update prototype.
420 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
421 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
422 (_bfd_mips_elf_final_write_processing): Likewise.
423 * elf-hppa.h (elf_hppa_final_write_processing): Return status
424 and remove linker arg.
425 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
426 * elf-nacl.c (nacl_final_write_processing): Likewise.
427 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
428 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
429 * elf32-arm.c (arm_final_write_processing): Likewise.
430 (elf32_arm_final_write_processing): Likewise.
431 (elf32_arm_nacl_final_write_processing): Likewise.
432 (elf32_arm_vxworks_final_write_processing): Likewise.
433 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
434 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
435 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
436 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
437 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
438 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
439 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
440 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
441 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
442 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
443 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
444 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
445 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
446 * elf32-ppc.c (ppc_final_write_processing): Likewise.
447 (ppc_elf_final_write_processing): Likewise.
448 (ppc_elf_vxworks_final_write_processing): Likewise.
449 * elf32-sparc.c (sparc_final_write_processing): Likewise.
450 (elf32_sparc_final_write_processing): Likewise.
451 (elf32_sparc_vxworks_final_write_processing): Likewise.
452 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
453 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
454 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
455 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
456 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
457 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
458 (_bfd_mips_elf_final_write_processing): Likewise.
460 2019-07-24 Alan Modra <amodra@gmail.com>
462 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
464 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
465 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
467 2019-07-24 Alan Modra <amodra@gmail.com>
469 * elf32-visium.c (visium_elf_post_process_headers): Don't set
470 EI_OSABI header byte here.
473 2019-07-23 Alan Modra <amodra@gmail.com>
475 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
476 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
477 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
478 when elf_gnu_osabi_mbind is set.
479 (_bfd_elf_map_sections_to_segments): Likewise.
480 (_bfd_elf_init_private_section_data): Likewise.
481 (_bfd_elf_final_write_processing): Update comment.
482 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
483 (elf_backend_special_sections): Define without .tbss for linux.
485 2019-07-23 Alan Modra <amodra@gmail.com>
487 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
488 Remove none, any, all enums.
489 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
490 (_bfd_elf_final_write_processing): Declare.
491 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
492 elf_backend_final_write_processing.
493 (_bfd_elf_post_process_headers): Move body of function to..
494 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
495 only when not already set. Adjust for rename.
496 * elfxx-target.h (elf_backend_final_write_processing): Default to
497 _bfd_elf_final_write_processing.
498 * elf-hppa.h (elf_hppa_final_write_processing): Call
499 _bfd_elf_final_write_processing.
500 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
501 * elf-nacl.c (nacl_final_write_processing): Likewise.
502 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
503 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
504 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
505 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
506 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
507 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
508 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
509 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
510 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
511 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
512 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
513 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
514 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
515 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
516 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
517 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
518 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
519 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
520 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
521 * elf32-arm.c (arm_final_write_processing): Split out from..
522 (elf32_arm_final_write_processing): ..here. Call
523 _bfd_elf_final_write_processing.
524 (elf32_arm_nacl_final_write_processing): Adjust.
525 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
526 (_bfd_mips_elf_final_write_processing): ..here. Call
527 _bfd_elf_final_write_processing.
528 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
529 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
530 * elf32-ppc.c (ppc_final_write_processing): Split out from..
531 (ppc_elf_final_write_processing): ..here. Call
532 _bfd_elf_final_write_processing.
533 (ppc_elf_vxworks_final_write_processing): Adjust.
534 * elf32-sparc.c (sparc_final_write_processing): Split out from..
535 (elf32_sparc_final_write_processing): ..here. Call
536 _bfd_elf_final_write_processing.
537 (elf32_sparc_vxworks_final_write_processing): Adjust.
538 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
539 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
540 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
541 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
542 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
543 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
544 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
545 * elflink.c (elf_link_add_object_symbols): Likewise.
546 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
549 2019-07-23 Omar Majid <omajid@redhat.com>
551 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
552 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
553 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
555 * peXXigen.c: Add comment about source of .NET magic numbers.
557 2019-07-19 Alan Modra <amodra@gmail.com>
559 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
560 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
561 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
562 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
563 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
564 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
565 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
566 (ppc64_elf_check_relocs): Support pcrel tls relocs.
567 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
568 * bfd-in2.h: Regenerate.
569 * libbfd.h: Regenerate.
571 2019-07-18 Alan Modra <amodra@gmail.com>
573 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
574 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
577 2019-07-18 Alan Modra <amodra@gmail.com>
579 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
580 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
582 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
583 tls_type vars unsigned int.
584 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
585 to select r_type edit.
587 2019-07-18 Alan Modra <amodra@gmail.com>
589 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
591 * elf64-ppc.c (TLS_GDIE): Likewise.
593 2019-07-18 Alan Modra <amodra@gmail.com>
595 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
596 range of tp-relative offsets.
598 2019-07-15 Alan Modra <amodra@gmail.com>
600 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
601 alias is no longer bfd_link_hash_defined, clear the alias.
603 2019-07-13 Alan Modra <amodra@gmail.com>
605 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
607 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
608 (_bfd_elf_init_2_index_sections): Likewise.
609 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
610 relocations for local TLS symbols, use STN_UNDEF as the relocation
612 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
613 leave TLS symbol value in the addend.
615 2019-07-08 Alan Modra <amodra@gmail.com>
618 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
619 size before reading first word.
621 2019-07-02 Nick Clifton <nickc@redhat.com>
624 * elf.c (is_debuginfo_file): New function.
625 (assign_file_positions_for_non_load_sections): Do not warn about
626 allocated sections outside of loadable segments if they are found
628 * elf-bfd.h (is_debuginfo_file): Prototype.
630 2019-07-02 Nick Clifton <nickc@redhat.com>
633 * compress.c (bfd_get_full_section_contents): Do not complain
634 about linker created sections that are larger than the file size.
636 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
638 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
639 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
641 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
643 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
645 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
646 sections when .text section contain secure entry functions
649 2019-07-01 Nick Clifton <nickc@redhat.com>
652 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
653 section VMA in the offset used to update exidx relocs.
655 2019-06-28 Nick Clifton <nickc@redhat.com>
658 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
659 large version reference section.
660 * compress.c (bfd_get_full_section_contents): Check for an
661 uncompressed section whose size is larger than the file size.
663 2019-06-28 Alan Modra <amodra@gmail.com>
665 * format.c (bfd_check_format_matches): Don't match plugin target
666 if another target matches. Expand comment.
667 * targets.c (_bfd_target_vector): Move plugin_vec after all other
668 non-corefile targets, outside !SELECT_VECS.
669 * config.bfd: Don't handle targ=plugin here.
670 * configure.ac: Don't add plugin to enable_targets or handle in
671 target loop setting selvecs and other target vars.
672 * configure: Regenerate.
674 2019-06-26 Nick Clifton <nickc@redhat.com>
677 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
678 messages for failures.
679 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
680 if returning an error value.
682 2019-06-25 Jan Beulich <jbeulich@suse.com>
684 * elf-properties.c (elf_find_and_remove_property): Rename last
685 parameter. Mention it in comment.
687 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
689 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
690 SEC_MERGE or SEC_CODE flags are set.
691 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
692 symtype consistently. Don't include sec_addr (sym_sec) in symval.
693 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
694 Add sec_addr (sym_sec) after handling merge sections.
696 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
699 * elf-properties.c (elf_merge_gnu_property_list): Remove the
700 property after reporting property removal.
702 2019-06-23 Alan Modra <amodra@gmail.com>
705 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
706 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
707 Reduce range of offsets allowed for other GOT relocs.
709 2019-06-23 Alan Modra <amodra@gmail.com>
712 * elfcode.h (elf_object_p): Warning fix.
714 2019-06-21 Alan Modra <amodra@gmail.com>
717 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
719 2019-06-19 Alan Modra <amodra@gmail.com>
722 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
723 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
725 2019-06-19 Alan Modra <amodra@gmail.com>
727 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
728 functions that require r2 valid to use local entry.
729 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
731 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
733 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
734 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
735 with elfNN_aarch64_allocate_local_dynrelocs.
737 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
739 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
741 2019-06-14 Alan Modra <amodra@gmail.com>
743 * Makefile.in: Regenerate.
744 * configure: Regenerate.
746 2019-06-14 Alan Modra <amodra@gmail.com>
748 * elf64-ppc.c: Fix comments involving paddi.
750 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
753 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
754 absent, or the bfd is not in the ELF formart.
755 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
757 2019-06-10 Christos Zoulas <christos@zoulas.com>
760 * elf.c (elfcore_make_auxv_note_section): New function.
761 (elfcore_grok_note): Use it.
762 (elfcore_grok_freebsd_note): Likewise.
763 (elfcore_grok_openbsd_note): Likewise.
764 (elfcore_grok_netbsd_note): Likewise. Plus add support for
765 NT_NETBSDCORE_AUXV notes.
767 2019-06-06 Sudakshina Das <sudi.das@arm.com>
769 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
770 alignment of the new gnu property section.
772 2019-06-06 Sudakshina Das <sudi.das@arm.com>
774 * bfd-in.h: Change comment.
775 * bfd-in2.h: Regenerate.
776 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
777 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
780 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
782 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
783 Remove overflow check.
785 2019-05-28 Alan Modra <amodra@gmail.com>
788 * cofflink.c (coff_link_check_archive_element): Don't assume
789 element is a coff object file after calling add_archive_element.
791 2019-05-28 Alan Modra <amodra@gmail.com>
794 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
795 attempt to set sh_entsize for excluded PLT section.
797 2019-05-28 Alan Modra <amodra@gmail.com>
800 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
801 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
802 allocated in alpha_dynamic_entries_for_reloc.
804 2019-05-28 Alan Modra <amodra@gmail.com>
807 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
808 on NULL output_section.
809 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
811 2019-05-28 Alan Modra <amodra@gmail.com>
814 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
815 entry when MUST_FIND. Abort when MUST_FIND not found.
816 (elf_m68k_get_bfd2got_entry): Likewise.
817 (elf_m68k_relocate_section): Remove now useless assert.
819 2019-05-28 Alan Modra <amodra@gmail.com>
822 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
823 from bfd_link_info, not an output section owner.
824 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
825 (elf_hppa_final_link_relocate): Likewise.
827 2019-05-28 Alan Modra <amodra@gmail.com>
830 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
831 create_object_symbols_section, obj_textsec, obj_datasec or
832 obj_bsssec. Fix other errors in placement.
833 * config.bfd: Obsolete tic30-aout.
835 2019-05-28 Alan Modra <amodra@gmail.com>
838 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
839 end of section list as well as section_count.
840 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
841 section list before returning error.
843 2019-05-27 Alan Modra <amodra@gmail.com>
845 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
847 2019-05-27 Alan Modra <amodra@gmail.com>
850 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
852 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
854 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
855 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
856 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
857 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
858 (elf_backend_merge_symbol_attribute): Define.
860 2019-05-24 Alan Modra <amodra@gmail.com>
862 * po/SRC-POTFILES.in: Regenerate.
864 2019-05-24 Alan Modra <amodra@gmail.com>
866 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
867 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
868 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
869 (struct ppc_link_hash_table): Add powerxx_stubs.
870 (ppc64_elf_check_relocs): Set powerxx_stubs.
871 (build_powerxx_offset, size_powerxx_offset),
872 (num_relocs_for_powerxx_offset),
873 (emit_relocs_for_powerxx_offset): New functions.
874 (plt_stub_size): Size powerxx stubs.
875 (ppc_build_one_stub): Emit powerxx stubs.
876 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
879 2019-05-24 Alan Modra <amodra@gmail.com>
881 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
883 (xlate_pcrel_opt): New function.
884 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
885 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
886 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
888 2019-05-24 Alan Modra <amodra@gmail.com>
890 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
891 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
892 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
893 (BFD_RELOC_PPC64_PLT_PCREL34),
894 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
895 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
896 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
897 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
898 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
899 * elf64-ppc.c (PNOP): Define.
900 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
901 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
902 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
904 (ppc64_elf_prefix_reloc): New function.
905 (struct ppc_link_hash_table): Add notoc_plt.
906 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
907 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
908 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
909 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
910 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
911 possible need for dynamic relocs on non-pcrel powerxx relocs.
912 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
913 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
914 (toc_adjusting_stub_needed): Likewise.
915 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
916 (ppc64_elf_relocate_section): Handle new powerxx relocs.
917 * bfd-in2.h: Regenerate.
918 * libbfd.h: Regenerate.
920 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
922 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
923 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
925 * configure: Regenerate.
927 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
929 * configure: Regenerated.
930 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
931 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
932 (BFD64_BACKENDS): Add elf64-bpf.lo.
933 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
934 * Makefile.in (SOURCE_HFILES): Regenerate.
935 * config.bfd (targ_cpu): Handle bpf-*-* targets.
936 * cpu-bpf.c: New file.
937 * elf64-bpf.c: Likewise.
938 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
940 * archures.c: Define architecture bfd_arch_bpf and machine
942 * reloc.c: Define BFD relocations used by the BPF target.
943 * bfd-in2.h: Regenerated.
944 * libbfd.h: Likewise.
946 2019-05-22 Alan Modra <amodra@gmail.com>
948 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
951 2019-05-22 Alan Modra <amodra@gmail.com>
953 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
954 processing on "size error in section".
956 2019-05-22 Alan Modra <amodra@gmail.com>
958 * som.c (som_bfd_free_cached_info): Call
959 _bfd_generic_close_and_cleanup.
961 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
963 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
964 for TLS_TPREL_HI16(/LO16) relocations in shared library.
966 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
968 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
969 checks. Search the RELA table for n64 relocations.
971 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
972 Faraz Shahbazker <fshahbazker@wavecomp.com>
974 * elfxx-mips.c (LA25_BC): New macro.
975 (mips_elf_link_hash_table)<compact_branches>: New field.
976 (STUB_JALRC): New macro.
977 (mipsr6_o32_exec_plt0_entry_compact): New array.
978 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
979 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
980 (mipsr6_exec_plt_entry_compact): Likewise.
981 (mips_elf_create_la25_stub): Use BC instead of J for stubs
982 when compact_branches is true.
983 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
984 PLT for MIPSR6 with compact_branches. Do not reorder the
985 compact branches PLT. Switch the lazy stub for MIPSR6
986 with compact_branches to use JALRC.
987 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
988 when compact_branches is true.
989 (_bfd_mips_elf_compact_branches): New function.
990 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
992 2019-05-21 Tamar Christina <tamar.christina@arm.com>
995 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
998 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1001 * elf32-arm.c (get_value_helper): Remove.
1002 (elf32_arm_final_link_relocate): Fix branch future relocations.
1004 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1007 * bfd-in.h (enum erratum_84319_opts): New
1008 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1009 int to enum erratum_84319_opts.
1010 * bfd-in2.h: Regenerate.
1011 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1012 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1013 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1014 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1015 (_bfd_aarch64_resize_stubs): Amend comment.
1016 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1018 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1019 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1021 (clear_erratum_843419_entry): Update erratum conditional.
1023 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1026 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1027 when computing distance_short_enough.
1029 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1032 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1033 Wrap around even if distance equals avr_pc_wrap_around.
1035 2019-05-20 Nick Clifton <nickc@redhat.com>
1037 * po/fr.po: Updated French translation.
1039 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1041 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1043 2019-05-16 Alan Modra <amodra@gmail.com>
1045 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1047 2019-05-15 Alan Modra <amodra@gmail.com>
1049 * elf32-arm.c (elf32_arm_write_section): Don't leave
1050 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1051 unitialised section contents.
1053 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1056 * verilog.c: (VerilogDataWidth): New variable.
1057 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1059 2019-05-08 Nick Clifton <nickc@redhat.com>
1062 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1063 rather than FALSE if encountering a non-ELF file.
1065 2019-05-06 Alan Modra <amodra@gmail.com>
1067 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1069 2019-05-06 Alan Modra <amodra@gmail.com>
1071 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1072 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1073 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1074 * libbfd.h: Regenerate.
1075 * bfd-in2.h: Regenerate.
1077 2019-05-04 Alan Modra <amodra@gmail.com>
1080 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1081 following the standard section names.
1082 (bfd_decode_symclass): Prioritize section flag tests in
1083 decode_section_type before name tests in coff_section_type.
1084 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1085 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1086 their names and choose standard .text section flags for
1089 2019-05-02 Nick Clifton <nickc@redhat.com>
1092 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1093 .gnu.debugaltlink sections as debugging sections.
1095 2019-04-30 Alan Modra <amodra@gmail.com>
1097 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1098 (struct _ppc64_elf_section_data): Likewise.
1099 (ppc64_elf_check_relocs): Set above fields.
1100 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1101 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1104 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1107 * elflink.c (elf_link_output_extsym): Don't complain undefined
1108 weak dynamic reference.
1110 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1112 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1113 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1114 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1115 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1116 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1117 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1118 (elfNN_aarch64_small_plt0_bti_entry): Update.
1119 (elfNN_aarch64_small_plt_bti_entry): Update.
1120 (elfNN_aarch64_small_plt_pac_entry): Update.
1121 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1122 (setup_plt_values): Setup new entries.
1123 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1124 (elfNN_aarch64_plt_sym_val): Likewise.
1126 2019-04-22 Jim Wilson <jimw@sifive.com>
1128 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1130 2019-04-19 Alan Modra <amodra@gmail.com>
1132 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1134 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1136 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1137 building shared object.
1138 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1140 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1143 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1146 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1148 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1150 * bfd-in2.h: Regenerate.
1151 * libbfd.h: Likewise.
1153 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1155 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1156 * bfd-in2.h: Regenerated.
1157 * libbfd.h: Regenerated.
1159 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1161 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1162 * bfd-in2.h: Regenerated.
1163 * libbfd.h: Likewise.
1165 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1167 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1168 * bfd-in2.h: Regenerated.
1169 * libbfd.h: Regenerated.
1170 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1171 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1172 and R_ARM_THM_BF12 together.
1173 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1175 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1177 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1178 * libbfd.h: Regenerated.
1179 * bfd-in2.h: Regenerated.
1180 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1181 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1182 and R_ARM_THM_BF18 together.
1183 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1185 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1187 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1188 * bfd-in2.h: Regenerated.
1189 * libbfd.h: Regenerated.
1190 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1191 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1192 and R_ARM_THM_BF16 together.
1193 (get_value_helper): New reloc helper.
1194 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1196 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1198 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1199 * bfd-in2.h: Regenerate.
1200 * libbfd.h: Regenerate.
1202 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1204 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1205 * bfd-in2.h: Regenerate.
1206 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1207 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1209 (using_thumb2): Likewise.
1210 (using_thumb2_bl): Update assert.
1211 (arch_has_arm_nop): Likewise.
1212 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1213 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1215 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1217 * elf-linker-x86.h (elf_x86_cet_report): New.
1218 (elf_linker_x86_params): Add cet_report.
1219 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1220 missing IBT and SHSTK properties if needed.
1222 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1225 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1226 "h != NULL". Don't check "h != NULL" before calling.
1227 bfd_elf_gc_record_vtentry.
1228 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1229 * elf32-bfin.c (bfin_check_relocs): Likewise.
1230 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1231 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1232 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1233 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1234 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1235 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1236 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1237 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1238 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1239 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1240 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1241 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1242 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1243 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1244 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1245 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1246 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1247 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1248 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1249 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1250 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1251 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1252 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1253 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1254 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1255 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1256 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1257 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1258 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1261 2019-04-11 Alan Modra <amodra@gmail.com>
1264 * elflink.c (elf_link_add_object_symbols): Don't read partial
1265 dynamic entries from fuzzed objects.
1267 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1270 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1271 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1272 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1274 2019-04-10 Michael Forney <mforney@mforney.org>
1277 * doc/chew.c (free_words): Correctly free "push_text" strings.
1279 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1281 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1283 2019-04-08 Alan Modra <amodra@gmail.com>
1285 * configure.ac (elfxx_x86): Define and use.
1286 * configure: Regenerate.
1288 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1290 * elf-linker-x86.h: New file.
1291 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1292 to get x86-specific linker options.
1293 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1294 (elf_x86_64_check_relocs): Likewise.
1295 (elf_x86_64_relocate_section): Likewise.
1296 (elf_x86_64_link_setup_gnu_properties): Likewise.
1297 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1298 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1299 (_bfd_elf_linker_x86_set_options): New function.
1300 * elfxx-x86.h: Include "elf-linker-x86.h".
1301 (elf_x86_link_hash_table): Add params.
1303 2019-04-03 Alan Modra <amodra@gmail.com>
1305 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1306 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1307 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1308 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1309 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1310 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1312 2019-04-02 Jim Wilson <jimw@sifive.com>
1315 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1316 ELF header flags to after check for ELF object file. Loop through
1317 sections looking for code sections, if none, then skip ABI checks.
1319 2019-03-30 Andrew Waterman <andrew@sifive.com>
1321 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1324 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1326 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1327 info->export_dynamic to the conditional.
1329 2019-03-28 Alan Modra <amodra@gmail.com>
1332 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1333 * configure: Regenerate.
1334 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1335 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1336 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1337 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1338 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1340 2019-03-21 Jim Wilson <jimw@sifive.com>
1343 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1344 verify sym non-NULL before using. Add identical check using h.
1346 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1348 * elf-bfd.h (struct elf_backend_data): Add argument to
1349 merge_gnu_properties.
1350 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1351 itself and while calling bed->merge_gnu_properties.
1352 (elf_merge_gnu_property_list): Update the calls for
1353 elf_merge_gnu_properties.
1354 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1355 of --force-bti warning and add argument.
1356 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1358 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1359 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1362 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1364 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1365 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1366 (elf_backend_fixup_gnu_properties): Define for AArch64.
1368 2019-03-18 Alan Modra <amodra@gmail.com>
1371 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1372 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1373 attempt at writing glink stubs only once.
1375 2019-03-16 Alan Modra <amodra@gmail.com>
1378 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1379 (_bfd_elf_rel_local_sym): Likewise.
1380 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1381 section of symbols with unrecognized shndx.
1383 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1386 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1388 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1389 in discarded section.
1391 2019-03-15 Alan Modra <amodra@gmail.com>
1394 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1395 symbol after globals if elf_bad_symtab is not set.
1397 2019-03-15 Alan Modra <amodra@gmail.com>
1400 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1401 (_bfd_elf_rel_local_sym): Likewise.
1403 2019-03-15 Alan Modra <amodra@gmail.com>
1406 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1407 object files with sh_size not a multiple of sh_entsize.
1409 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1412 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1413 input with bad relocation.
1415 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1417 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1419 2019-03-14 Nick Clifton <nickc@redhat.com>
1422 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1423 (save_section_vma): Initialise field to the number of entries in
1425 (section_vma_same): Check that the number of entries in the
1426 sec_vma table matches the number of sections in the bfd.
1428 2019-03-14 Nick Clifton <nickc@redhat.com>
1431 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1432 section owner pointer when adding the default symbol.
1434 2019-03-14 Nick Clifton <nickc@redhat.com>
1437 * elflink.c (elf_link_add_object_symbols): Add new local variable
1438 extversym_end. Initialise it to point to the end of the version
1439 symbol table, if present. Check it when initialising and updating
1442 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1444 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1445 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1446 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1447 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1449 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1450 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1451 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1453 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1454 Szabolcs Nagy <szabolcs.nagy@arm.com>
1456 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1457 (aarch64_bti_pac_info): New.
1458 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1459 (bfd_elf32_aarch64_set_options): Likewise.
1460 * bfd-in2.h: Regenerate
1461 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1462 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1463 (elfNN_aarch64_small_plt0_bti_entry): New.
1464 (elfNN_aarch64_small_plt_bti_entry): New.
1465 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1466 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1467 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1468 tlsdesc_plt_entry_size fields.
1469 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1470 (setup_plt_values): New helper function.
1471 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1473 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1475 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1476 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1477 to plt stubs instead of fixed ones and update filling them according
1478 to the need for bti.
1479 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1480 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1481 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1482 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1483 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1485 (bfd_elfNN_get_synthetic_symtab): Define.
1486 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1487 and mising BTI NOTE SECTION.
1490 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1492 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1493 linker created inputs from merge.
1494 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1495 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1496 (elfNN_aarch64_link_setup_gnu_properties): New.
1497 (elfNN_aarch64_merge_gnu_properties): New.
1498 (elf_backend_setup_gnu_properties): Define for AArch64.
1499 (elf_backend_merge_gnu_properties): Likewise.
1500 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1501 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1502 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1503 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1504 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1505 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1506 (elf_backend_parse_gnu_properties): Define for AArch64.
1508 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1511 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1512 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1514 2019-03-12 Alan Modra <amodra@gmail.com>
1516 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1517 nmemb parameter. Use bfd_alloc2.
1518 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1520 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1521 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1522 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1524 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1525 (assign_section_numbers): Style fix.
1526 (swap_out_syms): Use bfd_malloc2.
1527 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1529 (_bfd_elf_make_empty_symbol): Style fix.
1530 (elfobj_grok_stapsdt_note_1): Formatting.
1531 * elfcode.h (elf_object_p): Use bfd_alloc2.
1532 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1533 (elf_slurp_symbol_table): Use bfd_zalloc2.
1534 (elf_slurp_reloc_table): Use bfd_alloc2.
1535 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1536 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1537 size calculation doesn't overflow.
1538 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1539 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1540 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1542 2019-03-08 Alan Modra <amodra@gmail.com>
1545 * merge.c (merge_strings): Return secinfo. Don't pad section
1547 (_bfd_merge_sections): Pad section to alignment here, if input
1548 sections contributing to merged output all pad to alignment.
1551 2019-03-06 Nick Clifton <nickc@redhat.com>
1553 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1555 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1556 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1558 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1560 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1561 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1564 * elf32-s390.c (allocate_dynrelocs): Update comment.
1566 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1568 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1570 2019-02-28 Nick Clifton <nickc@redhat.com>
1573 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1574 section that is not NUL terminated.
1576 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1579 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1580 by linker when checking copy reloc on protected symbol.
1582 2019-02-24 Alan Modra <amodra@gmail.com>
1585 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1587 2019-02-20 Eric Tsai <erictsai@cadence.com>
1589 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1590 sections between the call site and call destination and adjust
1591 call distance by the largest alignment.
1593 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1595 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1596 * elf.c (elfcore_grok_aarch_pauth): New function.
1597 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1598 (elfcore_write_aarch_pauth): New function.
1599 (elfcore_write_register_note): Check for AArch64 pauth section.
1601 2019-02-20 Alan Modra <amodra@gmail.com>
1604 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1607 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1609 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1610 Darwin hosts, not just or1k.
1611 * configure: Regenerate.
1613 2019-02-20 Alan Modra <amodra@gmail.com>
1616 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1617 sentinel NUL to string buffer nearer to loop where it is used.
1618 Don't go past sentinel when scanning strings, and don't write
1620 * archive.c (do_slurp_coff_armap): Simplify string handling to
1623 2019-02-19 Alan Modra <amodra@gmail.com>
1626 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1627 attempting to prevent read past end of section.
1629 2019-02-18 Alan Modra <amodra@gmail.com>
1632 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1633 PRIx64 to generate warning messages. Print local sym names too.
1635 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1637 * elf32-arc (INIT_SYM_STRING): Delete.
1638 (FINI_SYM_STRING): Likewise.
1639 (init_str): Likewise.
1640 (fini_str): Likewise.
1642 2019-02-08 Alan Modra <amodra@gmail.com>
1644 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1645 for bss-plt" warning to make it an error.
1647 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1650 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1651 reloc_class_ifunc for ifunc symbols.
1652 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1654 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1656 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1657 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1659 2019-02-07 Nick Clifton <nickc@redhat.com>
1661 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1662 into the definitely obsolete list.
1664 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1667 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1668 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1669 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1671 (elf_x86_64_check_relocs): Here.
1672 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1673 to check if a symbol is defined in a non-shared object.
1674 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1676 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1678 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1679 of 'labs' (and fix GCC warning).
1681 2019-01-25 Nick Clifton <nickc@redhat.com>
1683 * po/ru.po: Updated Russian translation.
1685 2019-01-23 Nick Clifton <nickc@redhat.com>
1687 * po/fr.po: Updated French translation.
1689 2019-01-21 Nick Clifton <nickc@redhat.com>
1691 * po/pt.po: Updated Portuguese translation.
1692 * po/uk.po: Updated Ukranian translation.
1694 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1697 * elf32-nds32.c (nds32_relocate_section): Add space between words
1699 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1701 (riscv_i_or_e_p): Likewise.
1702 (riscv_merge_arch_attr_info): Likewise.
1704 2019-01-19 Nick Clifton <nickc@redhat.com>
1706 * version.m4: Reset to 2.32.51
1707 * configure: Regenerate.
1708 * po/bfd.pot: Regenerate.
1710 2018-06-24 Nick Clifton <nickc@redhat.com>
1712 2.32 branch created.
1714 2019-01-16 Kito Cheng <kito@andestech.com>
1716 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1719 2019-01-16 Kito Cheng <kito@andestech.com>
1720 Nelson Chu <nelson@andestech.com>
1722 * elfnn-riscv.c (in_subsets): New.
1723 (out_subsets): Likewise.
1724 (merged_subsets): Likewise.
1725 (riscv_std_ext_p): Likewise.
1726 (riscv_non_std_ext_p): Likewise.
1727 (riscv_std_sv_ext_p): Likewise.
1728 (riscv_non_std_sv_ext_p): Likewise.
1729 (riscv_version_mismatch): Likewise.
1730 (riscv_i_or_e_p): Likewise.
1731 (riscv_merge_std_ext): Likewise.
1732 (riscv_merge_non_std_and_sv_ext): Likewise.
1733 (riscv_merge_arch_attr_info): Likewise.
1734 (riscv_merge_attributes): Likewise.
1735 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1737 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1738 (elf_backend_obj_attrs_vendor): Define.
1739 (elf_backend_obj_attrs_section_type): Likewise.
1740 (elf_backend_obj_attrs_section): Likewise.
1741 (elf_backend_obj_attrs_arg_type): Define as
1742 riscv_elf_obj_attrs_arg_type.
1743 * elfxx-riscv.c (riscv_estimate_digit): New.
1744 (riscv_estimate_arch_strlen1): Likewise.
1745 (riscv_estimate_arch_strlen): Likewise.
1746 (riscv_arch_str1): Likewise.
1747 (riscv_arch_str): Likewise.
1748 * elfxx-riscv.h (riscv_arch_str): Declare.
1750 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1752 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1754 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1755 source field. (md_apply_fix): Apply final fix
1756 to BFD_RELOC_S12Z_OPR.
1757 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1759 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1762 * elf32-s390.c (allocate_dynrelocs): Update comment.
1764 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1766 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1767 * configure: Regenerate.
1769 2019-01-08 Alan Modra <amodra@gmail.com>
1773 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1776 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1778 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1779 * bfd/bfd-in2.h: Regenerate.
1780 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1781 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1783 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1785 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1786 default target, little endian target is more suitable.
1788 2019-01-04 Alan Modra <amodra@gmail.com>
1792 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1794 (EQ_VALUE_IN_FIELD): Likewise.
1795 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1797 2019-01-01 Alan Modra <amodra@gmail.com>
1799 Update year range in copyright notice of all files.
1801 For older changes see ChangeLog-2018
1803 Copyright (C) 2019 Free Software Foundation, Inc.
1805 Copying and distribution of this file, with or without modification,
1806 are permitted in any medium without royalty provided the copyright
1807 notice and this notice are preserved.
1813 version-control: never