1 2019-10-09 Alan Modra <amodra@gmail.com>
4 2019-09-26 Alan Modra <amodra@gmail.com>
6 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
7 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
8 ${bindir}/../lib/bfd-plugins if different.
9 * Makefile.in: Regenerate.
11 2019-09-30 Phil Blundell <pb@pbcl.net>
14 * version.m4 (BFD_VERSION): Set to 2.33.
15 * development.sh (development, experimental): Set to false.
16 * configure, Makefile.in, doc/Makefile.in, po/bfd.pot: Regenerate.
18 2019-09-16 Phil Blundell <pb@pbcl.net>
20 * version.m4: Set version to 2.32.90 for pre-release.
21 * Makefile.in, doc/Makefile.in, configure: Regenerated.
23 2019-09-09 Phil Blundell <pb@pbcl.net>
25 binutils 2.33 branch created.
27 2019-09-06 Alan Modra <amodra@gmail.com>
29 * aout-target.h (object_p): Formatting.
30 * bfd-in.h (bfd_get_filename): Don't cast to char*.
31 * corefile.c (generic_core_file_matches_executable_p): Constify
32 variables and remove cast.
33 * bfd-in2.h: Regenerate.
35 2019-09-05 Alan Modra <amodra@gmail.com>
37 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
38 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
39 in the GOT/PLT entry rather than affecting the offset to that
41 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
43 2019-09-05 Alan Modra <amodra@gmail.com>
45 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
46 in second instruction.
47 (ppc64_elf_relocate_section): Likewise.
49 2019-09-05 Alan Modra <amodra@gmail.com>
52 * libbfd-in.h (bfd_strdup): New inline function.
53 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
55 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
56 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
58 (bfd_openstreamr): Use bfd_strdup.
59 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
60 * plugin.c (try_load_plugin): Use bfd_malloc.
61 * libbfd.h: Regenerate.
63 2019-09-02 Alan Modra <amodra@gmail.com>
66 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
68 (read_alt_indirect_string): Likewise.
69 (read_alt_indirect_ref): Likewise.
71 2019-08-31 Jim Wilson <jimw@sifive.com>
74 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
75 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
77 2019-08-30 Jim Wilson <jimw@sifive.com>
79 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
80 error, call bfd_set_error, set ret to FALSE, and goto out label.
82 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
85 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
86 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
88 2019-08-29 Alan Modra <amodra@gmail.com>
91 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
92 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
93 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
96 2019-08-29 Alan Modra <amodra@gmail.com>
98 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
99 on second insn, return it in poff.
100 (ppc64_elf_relocate_section): Add offset to paddi addend for
103 2019-08-28 Jim Wilson <jimw@sifive.com>
105 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
106 section when setting max_alignment. Update comment.
107 (_bfd_riscv_relax_pc): Likewise.
109 2019-08-29 Alan Modra <amodra@gmail.com>
112 * bfd.c (struct bfd): Add no_element_cache.
113 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
114 archive cache when no_element_cache.
115 (bfd_generic_archive_p): Set no_element_cache when opening first
116 element to check format. Close first element too.
117 (do_slurp_bsd_armap): Don't zero ardata->cache here.
118 * bfd-in2.h: Regenerate.
120 2019-08-24 Alan Modra <amodra@gmail.com>
122 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
123 symbols from GOT optimisation.
125 2019-08-23 Stafford Horne <shorne@gmail.com>
127 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
130 2019-08-23 Nick Clifton <nickc@redhat.com>
133 * elf.c (bfd_section_from_shdr): Issue an informative warning
134 message and continue processing other sections after encountering
135 a reloc section for a section which already has other relocs
138 2019-08-23 Alan Modra <amodra@gmail.com>
141 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
142 on error without freeing plts[] contents.
144 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
146 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
148 2019-08-22 Nick Clifton <nickc@redhat.com>
151 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
152 reading data from extra records.
154 2019-08-22 Tamar Christina <tamar.christina@arm.com>
157 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
158 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
159 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
160 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
163 2019-08-22 Alan Modra <amodra@gmail.com>
165 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
166 instead recognize CMSE_PREFIX in symbol name.
167 (elf32_arm_gc_mark_extra_sections): Likewise.
168 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
169 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
171 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
173 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
174 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
176 2019-08-20 Tamar Christina <tamar.christina@arm.com>
178 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
179 elf32_arm_stub_long_branch_v4t_thumb_thumb,
180 elf32_arm_stub_long_branch_v4t_thumb_arm,
181 elf32_arm_stub_short_branch_v4t_thumb_arm,
182 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
183 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
184 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
185 previous instruction.
187 2019-08-19 Tom Tromey <tromey@adacore.com>
189 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
192 2019-08-19 Alan Modra <amodra@gmail.com>
194 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
196 (struct _ppc64_elf_section_data): Likewise.
197 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
198 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
199 than TOC loop. Check PLT16 insns too.
201 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
204 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
205 PC-relative relocations back to ...
206 (elf_x86_64_relocate_section): Here.
208 2019-08-16 Martin Liska <mliska@suse.cz>
211 * elflink.c: Report error only for not relocatable.
212 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
213 here lto_slim_object as it's handled in caller.
215 2019-08-16 Alan Modra <amodra@gmail.com>
217 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
219 2019-08-15 Jim Wilson <jimw@sifive.com>
221 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
222 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
223 to c.li instruction, and use ENCODE_RVC_IMM to set value.
225 2019-08-15 Tom Tromey <tromey@adacore.com>
227 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
230 2019-08-14 Alan Modra <amodra@gmail.com>
233 * dwarf2.c (stash_comp_unit): New function, extracted from..
234 (_bfd_dwarf2_find_nearest_line): ..here.
235 (find_abstract_instance): Parse comp units and decode line info
238 2019-08-14 Alan Modra <amodra@gmail.com>
240 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
241 (comp_unit_find_nearest_line): Use it here..
242 (_bfd_dwarf2_find_symbol_bias): ..and here.
244 2019-08-14 Alan Modra <amodra@gmail.com>
246 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
247 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
248 * coffgen.c (coff_find_nearest_line_with_names): Adjust
249 _bfd_dwarf2_find_nearest_line calls.
250 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
251 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
252 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
253 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
254 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
255 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
256 * libbfd.h: Regenerate.
258 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
260 * elf-bfd.h (struct elf_backend_data): New members.
261 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
262 .gnu.hash section if necessary.
263 (struct collect_gnu_hash_codes): New member.
264 (elf_gnu_hash_process_symidx): New function name.
265 (elf_renumber_gnu_hash_syms): Ignore local and undefined
266 symbols. Record xlat location for every symbol which should have
268 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
269 dynamic section if necessary.
270 (GNU_HASH_SECTION_NAME): New define.
271 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
272 Update the section size info.
273 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
274 (struct mips_elf_link_hash_entry): New member.
275 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
277 (mips_elf_sort_hash_table): Initialize the pointer to the
279 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
280 translation table entry with the symbol dynindx.
281 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
282 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
284 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
286 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
288 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
289 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
291 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
292 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
293 (_bfd_mips_post_process_headers): Mark the ABI version as
294 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
295 but not a .hash section.
296 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
297 position in the translation table, associated with the hash
299 * elfxx-mips.h (literal_reloc_p): Define
300 elf_backend_record_xhash_symbol backend hook.
301 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
304 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
306 * elf64-bpf.c (bpf_elf_relocate_section): New function.
307 (bpf_elf_insn_disp_reloc): Delete function.
308 (elf_backend_relocate_section): Define.
310 2019-08-07 Alan Modra <amodra@gmail.com>
313 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
314 for overflow in expressions involving nsymz.
316 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
318 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
319 two pages in relro presence.
321 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
323 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
324 (get_wsr_lbeg_opcode): New functions.
325 (check_loop_aligned): Detect relaxed loops and adjust loop_len
326 and insn_len for the first actual instruction of the loop.
328 2019-07-30 Alan Modra <amodra@gmail.com>
331 * bfd.c (struct bfd): Add lto_slim_object flag.
332 * bfd-in2.h: Regenerate.
334 2019-07-29 Martin Liska <mliska@suse.cz>
337 * archive.c (_bfd_compute_and_write_armap): Come up with
338 report_plugin_err variable.
339 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
340 * elf.c (struct lto_section): New.
341 (_bfd_elf_make_section_from_shdr): Parse content of
342 .gnu_lto_.lto section.
343 * elflink.c: Report error for a missing LTO plugin.
344 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
346 2019-07-28 Alan Modra <amodra@gmail.com>
350 * elflink.c (elf_link_add_object_symbols): Report an informative
351 error on finding local symbols with index equal or greater than
352 symbol table sh_info. Correct comment. Allow such symbols in
353 dynamic objects. Abort on NULL section for symbol.
355 2019-07-26 Alan Modra <amodra@gmail.com>
357 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
358 (elf_linker): Don't define.
359 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
361 2019-07-25 YunQiang Su <syq@debian.org>
364 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
367 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
369 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
371 (reloc_type_to_name): Fix formating.
372 (arc_elf_object_p): Likewise.
373 (debug_arc_reloc): Likewise.
374 (arc_do_relocation): Likewise.
376 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
378 * elf32-arc.c (bfd_get_32_me): New function.
379 (bfd_put_32_me): Likewise.
380 (arc_elf_relax_section): Likewise.
381 (bfd_elf32_bfd_relax_section): Define.
383 2019-07-24 Alan Modra <amodra@gmail.com>
385 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
386 elf_backend_final_write_processing, don't pass linker arg.
387 (_bfd_elf_final_write_processing): Update prototype.
388 * elf.c (_bfd_elf_write_object_contents): Adjust call.
389 (_bfd_elf_final_write_processing): Return error on incompatible
390 OSABI and has_gnu_osabi. Remove linker arg.
391 * elf-nacl.h (nacl_final_write_processing): Update prototype.
392 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
393 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
394 (_bfd_mips_elf_final_write_processing): Likewise.
395 * elf-hppa.h (elf_hppa_final_write_processing): Return status
396 and remove linker arg.
397 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
398 * elf-nacl.c (nacl_final_write_processing): Likewise.
399 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
400 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
401 * elf32-arm.c (arm_final_write_processing): Likewise.
402 (elf32_arm_final_write_processing): Likewise.
403 (elf32_arm_nacl_final_write_processing): Likewise.
404 (elf32_arm_vxworks_final_write_processing): Likewise.
405 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
406 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
407 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
408 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
409 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
410 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
411 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
412 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
413 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
414 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
415 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
416 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
417 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
418 * elf32-ppc.c (ppc_final_write_processing): Likewise.
419 (ppc_elf_final_write_processing): Likewise.
420 (ppc_elf_vxworks_final_write_processing): Likewise.
421 * elf32-sparc.c (sparc_final_write_processing): Likewise.
422 (elf32_sparc_final_write_processing): Likewise.
423 (elf32_sparc_vxworks_final_write_processing): Likewise.
424 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
425 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
426 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
427 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
428 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
429 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
430 (_bfd_mips_elf_final_write_processing): Likewise.
432 2019-07-24 Alan Modra <amodra@gmail.com>
434 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
436 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
437 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
439 2019-07-24 Alan Modra <amodra@gmail.com>
441 * elf32-visium.c (visium_elf_post_process_headers): Don't set
442 EI_OSABI header byte here.
445 2019-07-23 Alan Modra <amodra@gmail.com>
447 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
448 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
449 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
450 when elf_gnu_osabi_mbind is set.
451 (_bfd_elf_map_sections_to_segments): Likewise.
452 (_bfd_elf_init_private_section_data): Likewise.
453 (_bfd_elf_final_write_processing): Update comment.
454 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
455 (elf_backend_special_sections): Define without .tbss for linux.
457 2019-07-23 Alan Modra <amodra@gmail.com>
459 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
460 Remove none, any, all enums.
461 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
462 (_bfd_elf_final_write_processing): Declare.
463 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
464 elf_backend_final_write_processing.
465 (_bfd_elf_post_process_headers): Move body of function to..
466 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
467 only when not already set. Adjust for rename.
468 * elfxx-target.h (elf_backend_final_write_processing): Default to
469 _bfd_elf_final_write_processing.
470 * elf-hppa.h (elf_hppa_final_write_processing): Call
471 _bfd_elf_final_write_processing.
472 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
473 * elf-nacl.c (nacl_final_write_processing): Likewise.
474 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
475 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
476 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
477 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
478 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
479 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
480 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
481 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
482 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
483 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
484 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
485 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
486 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
487 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
488 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
489 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
490 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
491 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
492 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
493 * elf32-arm.c (arm_final_write_processing): Split out from..
494 (elf32_arm_final_write_processing): ..here. Call
495 _bfd_elf_final_write_processing.
496 (elf32_arm_nacl_final_write_processing): Adjust.
497 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
498 (_bfd_mips_elf_final_write_processing): ..here. Call
499 _bfd_elf_final_write_processing.
500 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
501 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
502 * elf32-ppc.c (ppc_final_write_processing): Split out from..
503 (ppc_elf_final_write_processing): ..here. Call
504 _bfd_elf_final_write_processing.
505 (ppc_elf_vxworks_final_write_processing): Adjust.
506 * elf32-sparc.c (sparc_final_write_processing): Split out from..
507 (elf32_sparc_final_write_processing): ..here. Call
508 _bfd_elf_final_write_processing.
509 (elf32_sparc_vxworks_final_write_processing): Adjust.
510 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
511 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
512 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
513 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
514 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
515 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
516 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
517 * elflink.c (elf_link_add_object_symbols): Likewise.
518 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
521 2019-07-23 Omar Majid <omajid@redhat.com>
523 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
524 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
525 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
527 * peXXigen.c: Add comment about source of .NET magic numbers.
529 2019-07-19 Alan Modra <amodra@gmail.com>
531 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
532 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
533 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
534 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
535 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
536 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
537 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
538 (ppc64_elf_check_relocs): Support pcrel tls relocs.
539 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
540 * bfd-in2.h: Regenerate.
541 * libbfd.h: Regenerate.
543 2019-07-18 Alan Modra <amodra@gmail.com>
545 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
546 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
549 2019-07-18 Alan Modra <amodra@gmail.com>
551 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
552 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
554 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
555 tls_type vars unsigned int.
556 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
557 to select r_type edit.
559 2019-07-18 Alan Modra <amodra@gmail.com>
561 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
563 * elf64-ppc.c (TLS_GDIE): Likewise.
565 2019-07-18 Alan Modra <amodra@gmail.com>
567 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
568 range of tp-relative offsets.
570 2019-07-15 Alan Modra <amodra@gmail.com>
572 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
573 alias is no longer bfd_link_hash_defined, clear the alias.
575 2019-07-13 Alan Modra <amodra@gmail.com>
577 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
579 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
580 (_bfd_elf_init_2_index_sections): Likewise.
581 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
582 relocations for local TLS symbols, use STN_UNDEF as the relocation
584 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
585 leave TLS symbol value in the addend.
587 2019-07-08 Alan Modra <amodra@gmail.com>
590 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
591 size before reading first word.
593 2019-07-02 Nick Clifton <nickc@redhat.com>
596 * elf.c (is_debuginfo_file): New function.
597 (assign_file_positions_for_non_load_sections): Do not warn about
598 allocated sections outside of loadable segments if they are found
600 * elf-bfd.h (is_debuginfo_file): Prototype.
602 2019-07-02 Nick Clifton <nickc@redhat.com>
605 * compress.c (bfd_get_full_section_contents): Do not complain
606 about linker created sections that are larger than the file size.
608 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
610 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
611 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
613 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
615 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
617 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
618 sections when .text section contain secure entry functions
621 2019-07-01 Nick Clifton <nickc@redhat.com>
624 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
625 section VMA in the offset used to update exidx relocs.
627 2019-06-28 Nick Clifton <nickc@redhat.com>
630 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
631 large version reference section.
632 * compress.c (bfd_get_full_section_contents): Check for an
633 uncompressed section whose size is larger than the file size.
635 2019-06-28 Alan Modra <amodra@gmail.com>
637 * format.c (bfd_check_format_matches): Don't match plugin target
638 if another target matches. Expand comment.
639 * targets.c (_bfd_target_vector): Move plugin_vec after all other
640 non-corefile targets, outside !SELECT_VECS.
641 * config.bfd: Don't handle targ=plugin here.
642 * configure.ac: Don't add plugin to enable_targets or handle in
643 target loop setting selvecs and other target vars.
644 * configure: Regenerate.
646 2019-06-26 Nick Clifton <nickc@redhat.com>
649 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
650 messages for failures.
651 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
652 if returning an error value.
654 2019-06-25 Jan Beulich <jbeulich@suse.com>
656 * elf-properties.c (elf_find_and_remove_property): Rename last
657 parameter. Mention it in comment.
659 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
661 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
662 SEC_MERGE or SEC_CODE flags are set.
663 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
664 symtype consistently. Don't include sec_addr (sym_sec) in symval.
665 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
666 Add sec_addr (sym_sec) after handling merge sections.
668 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
671 * elf-properties.c (elf_merge_gnu_property_list): Remove the
672 property after reporting property removal.
674 2019-06-23 Alan Modra <amodra@gmail.com>
677 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
678 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
679 Reduce range of offsets allowed for other GOT relocs.
681 2019-06-23 Alan Modra <amodra@gmail.com>
684 * elfcode.h (elf_object_p): Warning fix.
686 2019-06-21 Alan Modra <amodra@gmail.com>
689 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
691 2019-06-19 Alan Modra <amodra@gmail.com>
694 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
695 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
697 2019-06-19 Alan Modra <amodra@gmail.com>
699 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
700 functions that require r2 valid to use local entry.
701 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
703 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
705 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
706 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
707 with elfNN_aarch64_allocate_local_dynrelocs.
709 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
711 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
713 2019-06-14 Alan Modra <amodra@gmail.com>
715 * Makefile.in: Regenerate.
716 * configure: Regenerate.
718 2019-06-14 Alan Modra <amodra@gmail.com>
720 * elf64-ppc.c: Fix comments involving paddi.
722 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
725 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
726 absent, or the bfd is not in the ELF formart.
727 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
729 2019-06-10 Christos Zoulas <christos@zoulas.com>
732 * elf.c (elfcore_make_auxv_note_section): New function.
733 (elfcore_grok_note): Use it.
734 (elfcore_grok_freebsd_note): Likewise.
735 (elfcore_grok_openbsd_note): Likewise.
736 (elfcore_grok_netbsd_note): Likewise. Plus add support for
737 NT_NETBSDCORE_AUXV notes.
739 2019-06-06 Sudakshina Das <sudi.das@arm.com>
741 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
742 alignment of the new gnu property section.
744 2019-06-06 Sudakshina Das <sudi.das@arm.com>
746 * bfd-in.h: Change comment.
747 * bfd-in2.h: Regenerate.
748 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
749 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
752 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
754 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
755 Remove overflow check.
757 2019-05-28 Alan Modra <amodra@gmail.com>
760 * cofflink.c (coff_link_check_archive_element): Don't assume
761 element is a coff object file after calling add_archive_element.
763 2019-05-28 Alan Modra <amodra@gmail.com>
766 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
767 attempt to set sh_entsize for excluded PLT section.
769 2019-05-28 Alan Modra <amodra@gmail.com>
772 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
773 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
774 allocated in alpha_dynamic_entries_for_reloc.
776 2019-05-28 Alan Modra <amodra@gmail.com>
779 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
780 on NULL output_section.
781 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
783 2019-05-28 Alan Modra <amodra@gmail.com>
786 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
787 entry when MUST_FIND. Abort when MUST_FIND not found.
788 (elf_m68k_get_bfd2got_entry): Likewise.
789 (elf_m68k_relocate_section): Remove now useless assert.
791 2019-05-28 Alan Modra <amodra@gmail.com>
794 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
795 from bfd_link_info, not an output section owner.
796 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
797 (elf_hppa_final_link_relocate): Likewise.
799 2019-05-28 Alan Modra <amodra@gmail.com>
802 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
803 create_object_symbols_section, obj_textsec, obj_datasec or
804 obj_bsssec. Fix other errors in placement.
805 * config.bfd: Obsolete tic30-aout.
807 2019-05-28 Alan Modra <amodra@gmail.com>
810 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
811 end of section list as well as section_count.
812 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
813 section list before returning error.
815 2019-05-27 Alan Modra <amodra@gmail.com>
817 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
819 2019-05-27 Alan Modra <amodra@gmail.com>
822 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
824 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
826 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
827 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
828 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
829 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
830 (elf_backend_merge_symbol_attribute): Define.
832 2019-05-24 Alan Modra <amodra@gmail.com>
834 * po/SRC-POTFILES.in: Regenerate.
836 2019-05-24 Alan Modra <amodra@gmail.com>
838 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
839 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
840 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
841 (struct ppc_link_hash_table): Add powerxx_stubs.
842 (ppc64_elf_check_relocs): Set powerxx_stubs.
843 (build_powerxx_offset, size_powerxx_offset),
844 (num_relocs_for_powerxx_offset),
845 (emit_relocs_for_powerxx_offset): New functions.
846 (plt_stub_size): Size powerxx stubs.
847 (ppc_build_one_stub): Emit powerxx stubs.
848 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
851 2019-05-24 Alan Modra <amodra@gmail.com>
853 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
855 (xlate_pcrel_opt): New function.
856 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
857 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
858 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
860 2019-05-24 Alan Modra <amodra@gmail.com>
862 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
863 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
864 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
865 (BFD_RELOC_PPC64_PLT_PCREL34),
866 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
867 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
868 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
869 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
870 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
871 * elf64-ppc.c (PNOP): Define.
872 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
873 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
874 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
876 (ppc64_elf_prefix_reloc): New function.
877 (struct ppc_link_hash_table): Add notoc_plt.
878 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
879 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
880 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
881 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
882 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
883 possible need for dynamic relocs on non-pcrel powerxx relocs.
884 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
885 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
886 (toc_adjusting_stub_needed): Likewise.
887 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
888 (ppc64_elf_relocate_section): Handle new powerxx relocs.
889 * bfd-in2.h: Regenerate.
890 * libbfd.h: Regenerate.
892 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
894 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
895 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
897 * configure: Regenerate.
899 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
901 * configure: Regenerated.
902 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
903 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
904 (BFD64_BACKENDS): Add elf64-bpf.lo.
905 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
906 * Makefile.in (SOURCE_HFILES): Regenerate.
907 * config.bfd (targ_cpu): Handle bpf-*-* targets.
908 * cpu-bpf.c: New file.
909 * elf64-bpf.c: Likewise.
910 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
912 * archures.c: Define architecture bfd_arch_bpf and machine
914 * reloc.c: Define BFD relocations used by the BPF target.
915 * bfd-in2.h: Regenerated.
916 * libbfd.h: Likewise.
918 2019-05-22 Alan Modra <amodra@gmail.com>
920 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
923 2019-05-22 Alan Modra <amodra@gmail.com>
925 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
926 processing on "size error in section".
928 2019-05-22 Alan Modra <amodra@gmail.com>
930 * som.c (som_bfd_free_cached_info): Call
931 _bfd_generic_close_and_cleanup.
933 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
935 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
936 for TLS_TPREL_HI16(/LO16) relocations in shared library.
938 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
940 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
941 checks. Search the RELA table for n64 relocations.
943 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
944 Faraz Shahbazker <fshahbazker@wavecomp.com>
946 * elfxx-mips.c (LA25_BC): New macro.
947 (mips_elf_link_hash_table)<compact_branches>: New field.
948 (STUB_JALRC): New macro.
949 (mipsr6_o32_exec_plt0_entry_compact): New array.
950 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
951 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
952 (mipsr6_exec_plt_entry_compact): Likewise.
953 (mips_elf_create_la25_stub): Use BC instead of J for stubs
954 when compact_branches is true.
955 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
956 PLT for MIPSR6 with compact_branches. Do not reorder the
957 compact branches PLT. Switch the lazy stub for MIPSR6
958 with compact_branches to use JALRC.
959 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
960 when compact_branches is true.
961 (_bfd_mips_elf_compact_branches): New function.
962 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
964 2019-05-21 Tamar Christina <tamar.christina@arm.com>
967 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
970 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
973 * elf32-arm.c (get_value_helper): Remove.
974 (elf32_arm_final_link_relocate): Fix branch future relocations.
976 2019-05-21 Tamar Christina <tamar.christina@arm.com>
979 * bfd-in.h (enum erratum_84319_opts): New
980 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
981 int to enum erratum_84319_opts.
982 * bfd-in2.h: Regenerate.
983 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
984 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
985 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
986 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
987 (_bfd_aarch64_resize_stubs): Amend comment.
988 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
990 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
991 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
993 (clear_erratum_843419_entry): Update erratum conditional.
995 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
998 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
999 when computing distance_short_enough.
1001 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1004 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1005 Wrap around even if distance equals avr_pc_wrap_around.
1007 2019-05-20 Nick Clifton <nickc@redhat.com>
1009 * po/fr.po: Updated French translation.
1011 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1013 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1015 2019-05-16 Alan Modra <amodra@gmail.com>
1017 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1019 2019-05-15 Alan Modra <amodra@gmail.com>
1021 * elf32-arm.c (elf32_arm_write_section): Don't leave
1022 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1023 unitialised section contents.
1025 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1028 * verilog.c: (VerilogDataWidth): New variable.
1029 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1031 2019-05-08 Nick Clifton <nickc@redhat.com>
1034 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1035 rather than FALSE if encountering a non-ELF file.
1037 2019-05-06 Alan Modra <amodra@gmail.com>
1039 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1041 2019-05-06 Alan Modra <amodra@gmail.com>
1043 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1044 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1045 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1046 * libbfd.h: Regenerate.
1047 * bfd-in2.h: Regenerate.
1049 2019-05-04 Alan Modra <amodra@gmail.com>
1052 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1053 following the standard section names.
1054 (bfd_decode_symclass): Prioritize section flag tests in
1055 decode_section_type before name tests in coff_section_type.
1056 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1057 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1058 their names and choose standard .text section flags for
1061 2019-05-02 Nick Clifton <nickc@redhat.com>
1064 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1065 .gnu.debugaltlink sections as debugging sections.
1067 2019-04-30 Alan Modra <amodra@gmail.com>
1069 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1070 (struct _ppc64_elf_section_data): Likewise.
1071 (ppc64_elf_check_relocs): Set above fields.
1072 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1073 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1076 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1079 * elflink.c (elf_link_output_extsym): Don't complain undefined
1080 weak dynamic reference.
1082 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1084 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1085 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1086 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1087 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1088 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1089 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1090 (elfNN_aarch64_small_plt0_bti_entry): Update.
1091 (elfNN_aarch64_small_plt_bti_entry): Update.
1092 (elfNN_aarch64_small_plt_pac_entry): Update.
1093 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1094 (setup_plt_values): Setup new entries.
1095 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1096 (elfNN_aarch64_plt_sym_val): Likewise.
1098 2019-04-22 Jim Wilson <jimw@sifive.com>
1100 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1102 2019-04-19 Alan Modra <amodra@gmail.com>
1104 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1106 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1108 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1109 building shared object.
1110 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1112 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1115 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1118 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1120 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1122 * bfd-in2.h: Regenerate.
1123 * libbfd.h: Likewise.
1125 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1127 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1128 * bfd-in2.h: Regenerated.
1129 * libbfd.h: Regenerated.
1131 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1133 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1134 * bfd-in2.h: Regenerated.
1135 * libbfd.h: Likewise.
1137 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1139 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1140 * bfd-in2.h: Regenerated.
1141 * libbfd.h: Regenerated.
1142 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1143 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1144 and R_ARM_THM_BF12 together.
1145 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1147 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1149 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1150 * libbfd.h: Regenerated.
1151 * bfd-in2.h: Regenerated.
1152 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1153 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1154 and R_ARM_THM_BF18 together.
1155 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1157 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1159 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1160 * bfd-in2.h: Regenerated.
1161 * libbfd.h: Regenerated.
1162 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1163 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1164 and R_ARM_THM_BF16 together.
1165 (get_value_helper): New reloc helper.
1166 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1168 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1170 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1171 * bfd-in2.h: Regenerate.
1172 * libbfd.h: Regenerate.
1174 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1176 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1177 * bfd-in2.h: Regenerate.
1178 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1179 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1181 (using_thumb2): Likewise.
1182 (using_thumb2_bl): Update assert.
1183 (arch_has_arm_nop): Likewise.
1184 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1185 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1187 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1189 * elf-linker-x86.h (elf_x86_cet_report): New.
1190 (elf_linker_x86_params): Add cet_report.
1191 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1192 missing IBT and SHSTK properties if needed.
1194 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1197 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1198 "h != NULL". Don't check "h != NULL" before calling.
1199 bfd_elf_gc_record_vtentry.
1200 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1201 * elf32-bfin.c (bfin_check_relocs): Likewise.
1202 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1203 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1204 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1205 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1206 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1207 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1208 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1209 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1210 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1211 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1212 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1213 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1214 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1215 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1216 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1217 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1218 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1219 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1220 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1221 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1222 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1223 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1224 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1225 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1226 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1227 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1228 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1229 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1230 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1233 2019-04-11 Alan Modra <amodra@gmail.com>
1236 * elflink.c (elf_link_add_object_symbols): Don't read partial
1237 dynamic entries from fuzzed objects.
1239 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1242 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1243 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1244 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1246 2019-04-10 Michael Forney <mforney@mforney.org>
1249 * doc/chew.c (free_words): Correctly free "push_text" strings.
1251 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1253 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1255 2019-04-08 Alan Modra <amodra@gmail.com>
1257 * configure.ac (elfxx_x86): Define and use.
1258 * configure: Regenerate.
1260 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1262 * elf-linker-x86.h: New file.
1263 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1264 to get x86-specific linker options.
1265 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1266 (elf_x86_64_check_relocs): Likewise.
1267 (elf_x86_64_relocate_section): Likewise.
1268 (elf_x86_64_link_setup_gnu_properties): Likewise.
1269 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1270 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1271 (_bfd_elf_linker_x86_set_options): New function.
1272 * elfxx-x86.h: Include "elf-linker-x86.h".
1273 (elf_x86_link_hash_table): Add params.
1275 2019-04-03 Alan Modra <amodra@gmail.com>
1277 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1278 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1279 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1280 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1281 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1282 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1284 2019-04-02 Jim Wilson <jimw@sifive.com>
1287 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1288 ELF header flags to after check for ELF object file. Loop through
1289 sections looking for code sections, if none, then skip ABI checks.
1291 2019-03-30 Andrew Waterman <andrew@sifive.com>
1293 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1296 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1298 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1299 info->export_dynamic to the conditional.
1301 2019-03-28 Alan Modra <amodra@gmail.com>
1304 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1305 * configure: Regenerate.
1306 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1307 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1308 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1309 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1310 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1312 2019-03-21 Jim Wilson <jimw@sifive.com>
1315 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1316 verify sym non-NULL before using. Add identical check using h.
1318 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1320 * elf-bfd.h (struct elf_backend_data): Add argument to
1321 merge_gnu_properties.
1322 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1323 itself and while calling bed->merge_gnu_properties.
1324 (elf_merge_gnu_property_list): Update the calls for
1325 elf_merge_gnu_properties.
1326 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1327 of --force-bti warning and add argument.
1328 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1330 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1331 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1334 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1336 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1337 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1338 (elf_backend_fixup_gnu_properties): Define for AArch64.
1340 2019-03-18 Alan Modra <amodra@gmail.com>
1343 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1344 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1345 attempt at writing glink stubs only once.
1347 2019-03-16 Alan Modra <amodra@gmail.com>
1350 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1351 (_bfd_elf_rel_local_sym): Likewise.
1352 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1353 section of symbols with unrecognized shndx.
1355 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1358 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1360 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1361 in discarded section.
1363 2019-03-15 Alan Modra <amodra@gmail.com>
1366 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1367 symbol after globals if elf_bad_symtab is not set.
1369 2019-03-15 Alan Modra <amodra@gmail.com>
1372 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1373 (_bfd_elf_rel_local_sym): Likewise.
1375 2019-03-15 Alan Modra <amodra@gmail.com>
1378 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1379 object files with sh_size not a multiple of sh_entsize.
1381 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1384 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1385 input with bad relocation.
1387 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1389 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1391 2019-03-14 Nick Clifton <nickc@redhat.com>
1394 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1395 (save_section_vma): Initialise field to the number of entries in
1397 (section_vma_same): Check that the number of entries in the
1398 sec_vma table matches the number of sections in the bfd.
1400 2019-03-14 Nick Clifton <nickc@redhat.com>
1403 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1404 section owner pointer when adding the default symbol.
1406 2019-03-14 Nick Clifton <nickc@redhat.com>
1409 * elflink.c (elf_link_add_object_symbols): Add new local variable
1410 extversym_end. Initialise it to point to the end of the version
1411 symbol table, if present. Check it when initialising and updating
1414 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1416 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1417 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1418 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1419 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1421 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1422 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1423 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1425 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1426 Szabolcs Nagy <szabolcs.nagy@arm.com>
1428 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1429 (aarch64_bti_pac_info): New.
1430 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1431 (bfd_elf32_aarch64_set_options): Likewise.
1432 * bfd-in2.h: Regenerate
1433 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1434 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1435 (elfNN_aarch64_small_plt0_bti_entry): New.
1436 (elfNN_aarch64_small_plt_bti_entry): New.
1437 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1438 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1439 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1440 tlsdesc_plt_entry_size fields.
1441 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1442 (setup_plt_values): New helper function.
1443 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1445 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1447 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1448 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1449 to plt stubs instead of fixed ones and update filling them according
1450 to the need for bti.
1451 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1452 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1453 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1454 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1455 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1457 (bfd_elfNN_get_synthetic_symtab): Define.
1458 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1459 and mising BTI NOTE SECTION.
1462 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1464 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1465 linker created inputs from merge.
1466 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1467 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1468 (elfNN_aarch64_link_setup_gnu_properties): New.
1469 (elfNN_aarch64_merge_gnu_properties): New.
1470 (elf_backend_setup_gnu_properties): Define for AArch64.
1471 (elf_backend_merge_gnu_properties): Likewise.
1472 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1473 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1474 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1475 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1476 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1477 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1478 (elf_backend_parse_gnu_properties): Define for AArch64.
1480 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1483 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1484 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1486 2019-03-12 Alan Modra <amodra@gmail.com>
1488 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1489 nmemb parameter. Use bfd_alloc2.
1490 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1492 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1493 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1494 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1496 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1497 (assign_section_numbers): Style fix.
1498 (swap_out_syms): Use bfd_malloc2.
1499 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1501 (_bfd_elf_make_empty_symbol): Style fix.
1502 (elfobj_grok_stapsdt_note_1): Formatting.
1503 * elfcode.h (elf_object_p): Use bfd_alloc2.
1504 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1505 (elf_slurp_symbol_table): Use bfd_zalloc2.
1506 (elf_slurp_reloc_table): Use bfd_alloc2.
1507 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1508 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1509 size calculation doesn't overflow.
1510 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1511 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1512 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1514 2019-03-08 Alan Modra <amodra@gmail.com>
1517 * merge.c (merge_strings): Return secinfo. Don't pad section
1519 (_bfd_merge_sections): Pad section to alignment here, if input
1520 sections contributing to merged output all pad to alignment.
1523 2019-03-06 Nick Clifton <nickc@redhat.com>
1525 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1527 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1528 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1530 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1532 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1533 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1536 * elf32-s390.c (allocate_dynrelocs): Update comment.
1538 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1540 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1542 2019-02-28 Nick Clifton <nickc@redhat.com>
1545 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1546 section that is not NUL terminated.
1548 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1551 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1552 by linker when checking copy reloc on protected symbol.
1554 2019-02-24 Alan Modra <amodra@gmail.com>
1557 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1559 2019-02-20 Eric Tsai <erictsai@cadence.com>
1561 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1562 sections between the call site and call destination and adjust
1563 call distance by the largest alignment.
1565 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1567 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1568 * elf.c (elfcore_grok_aarch_pauth): New function.
1569 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1570 (elfcore_write_aarch_pauth): New function.
1571 (elfcore_write_register_note): Check for AArch64 pauth section.
1573 2019-02-20 Alan Modra <amodra@gmail.com>
1576 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1579 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1581 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1582 Darwin hosts, not just or1k.
1583 * configure: Regenerate.
1585 2019-02-20 Alan Modra <amodra@gmail.com>
1588 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1589 sentinel NUL to string buffer nearer to loop where it is used.
1590 Don't go past sentinel when scanning strings, and don't write
1592 * archive.c (do_slurp_coff_armap): Simplify string handling to
1595 2019-02-19 Alan Modra <amodra@gmail.com>
1598 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1599 attempting to prevent read past end of section.
1601 2019-02-18 Alan Modra <amodra@gmail.com>
1604 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1605 PRIx64 to generate warning messages. Print local sym names too.
1607 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1609 * elf32-arc (INIT_SYM_STRING): Delete.
1610 (FINI_SYM_STRING): Likewise.
1611 (init_str): Likewise.
1612 (fini_str): Likewise.
1614 2019-02-08 Alan Modra <amodra@gmail.com>
1616 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1617 for bss-plt" warning to make it an error.
1619 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1622 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1623 reloc_class_ifunc for ifunc symbols.
1624 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1626 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1628 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1629 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1631 2019-02-07 Nick Clifton <nickc@redhat.com>
1633 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1634 into the definitely obsolete list.
1636 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1639 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1640 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1641 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1643 (elf_x86_64_check_relocs): Here.
1644 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1645 to check if a symbol is defined in a non-shared object.
1646 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1648 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1650 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1651 of 'labs' (and fix GCC warning).
1653 2019-01-25 Nick Clifton <nickc@redhat.com>
1655 * po/ru.po: Updated Russian translation.
1657 2019-01-23 Nick Clifton <nickc@redhat.com>
1659 * po/fr.po: Updated French translation.
1661 2019-01-21 Nick Clifton <nickc@redhat.com>
1663 * po/pt.po: Updated Portuguese translation.
1664 * po/uk.po: Updated Ukranian translation.
1666 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1669 * elf32-nds32.c (nds32_relocate_section): Add space between words
1671 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1673 (riscv_i_or_e_p): Likewise.
1674 (riscv_merge_arch_attr_info): Likewise.
1676 2019-01-19 Nick Clifton <nickc@redhat.com>
1678 * version.m4: Reset to 2.32.51
1679 * configure: Regenerate.
1680 * po/bfd.pot: Regenerate.
1682 2018-06-24 Nick Clifton <nickc@redhat.com>
1684 2.32 branch created.
1686 2019-01-16 Kito Cheng <kito@andestech.com>
1688 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1691 2019-01-16 Kito Cheng <kito@andestech.com>
1692 Nelson Chu <nelson@andestech.com>
1694 * elfnn-riscv.c (in_subsets): New.
1695 (out_subsets): Likewise.
1696 (merged_subsets): Likewise.
1697 (riscv_std_ext_p): Likewise.
1698 (riscv_non_std_ext_p): Likewise.
1699 (riscv_std_sv_ext_p): Likewise.
1700 (riscv_non_std_sv_ext_p): Likewise.
1701 (riscv_version_mismatch): Likewise.
1702 (riscv_i_or_e_p): Likewise.
1703 (riscv_merge_std_ext): Likewise.
1704 (riscv_merge_non_std_and_sv_ext): Likewise.
1705 (riscv_merge_arch_attr_info): Likewise.
1706 (riscv_merge_attributes): Likewise.
1707 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1709 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1710 (elf_backend_obj_attrs_vendor): Define.
1711 (elf_backend_obj_attrs_section_type): Likewise.
1712 (elf_backend_obj_attrs_section): Likewise.
1713 (elf_backend_obj_attrs_arg_type): Define as
1714 riscv_elf_obj_attrs_arg_type.
1715 * elfxx-riscv.c (riscv_estimate_digit): New.
1716 (riscv_estimate_arch_strlen1): Likewise.
1717 (riscv_estimate_arch_strlen): Likewise.
1718 (riscv_arch_str1): Likewise.
1719 (riscv_arch_str): Likewise.
1720 * elfxx-riscv.h (riscv_arch_str): Declare.
1722 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1724 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1726 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1727 source field. (md_apply_fix): Apply final fix
1728 to BFD_RELOC_S12Z_OPR.
1729 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1731 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1734 * elf32-s390.c (allocate_dynrelocs): Update comment.
1736 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1738 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1739 * configure: Regenerate.
1741 2019-01-08 Alan Modra <amodra@gmail.com>
1745 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1748 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1750 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1751 * bfd/bfd-in2.h: Regenerate.
1752 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1753 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1755 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1757 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1758 default target, little endian target is more suitable.
1760 2019-01-04 Alan Modra <amodra@gmail.com>
1764 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1766 (EQ_VALUE_IN_FIELD): Likewise.
1767 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1769 2019-01-01 Alan Modra <amodra@gmail.com>
1771 Update year range in copyright notice of all files.
1773 For older changes see ChangeLog-2018
1775 Copyright (C) 2019 Free Software Foundation, Inc.
1777 Copying and distribution of this file, with or without modification,
1778 are permitted in any medium without royalty provided the copyright
1779 notice and this notice are preserved.
1785 version-control: never