1 2019-09-10 Nick Clifton <nickc@redhat.com>
4 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
6 (bfd_default_arch_struct): Initialise the new field.
7 * bfd-in2.h: Regenerate.
8 * cpu-aarch64.c: Initialise the new field.
9 * cpu-alpha.c: Likewise.
10 * cpu-arc.c: Likewise.
11 * cpu-arm.c: Likewise.
12 * cpu-avr.c: Likewise.
13 * cpu-bfin.c: Likewise.
14 * cpu-bpf.c: Likewise.
15 * cpu-cr16.c: Likewise.
16 * cpu-cr16c.c: Likewise.
17 * cpu-cris.c: Likewise.
18 * cpu-crx.c: Likewise.
19 * cpu-csky.c: Likewise.
20 * cpu-d10v.c: Likewise.
21 * cpu-d30v.c: Likewise.
22 * cpu-dlx.c: Likewise.
23 * cpu-epiphany.c: Likewise.
24 * cpu-fr30.c: Likewise.
25 * cpu-frv.c: Likewise.
26 * cpu-ft32.c: Likewise.
27 * cpu-h8300.c: Likewise.
28 * cpu-hppa.c: Likewise.
29 * cpu-i386.c: Likewise.
30 * cpu-ia64.c: Likewise.
31 * cpu-iamcu.c: Likewise.
32 * cpu-ip2k.c: Likewise.
33 * cpu-iq2000.c: Likewise.
34 * cpu-k1om.c: Likewise.
35 * cpu-l1om.c: Likewise.
36 * cpu-lm32.c: Likewise.
37 * cpu-m10200.c: Likewise.
38 * cpu-m10300.c: Likewise.
39 * cpu-m32c.c: Likewise.
40 * cpu-m32r.c: Likewise.
41 * cpu-m68hc11.c: Likewise.
42 * cpu-m68hc12.c: Likewise.
43 * cpu-m68k.c: Likewise.
44 * cpu-m9s12x.c: Likewise.
45 * cpu-m9s12xg.c: Likewise.
46 * cpu-mcore.c: Likewise.
47 * cpu-mep.c: Likewise.
48 * cpu-metag.c: Likewise.
49 * cpu-microblaze.c: Likewise.
50 * cpu-mips.c: Likewise.
51 * cpu-mmix.c: Likewise.
52 * cpu-moxie.c: Likewise.
53 * cpu-msp430.c: Likewise.
55 * cpu-nds32.c: Likewise.
56 * cpu-nfp.c: Likewise.
57 * cpu-nios2.c: Likewise.
58 * cpu-ns32k.c: Likewise.
59 * cpu-or1k.c: Likewise.
60 * cpu-pdp11.c: Likewise.
62 * cpu-plugin.c: Likewise.
63 * cpu-powerpc.c: Likewise.
64 * cpu-pru.c: Likewise.
65 * cpu-riscv.c: Likewise.
66 * cpu-rl78.c: Likewise.
67 * cpu-rs6000.c: Likewise.
69 * cpu-s12z.c: Likewise.
70 * cpu-s390.c: Likewise.
71 * cpu-score.c: Likewise.
73 * cpu-sparc.c: Likewise.
74 * cpu-spu.c: Likewise.
75 * cpu-tic30.c: Likewise.
76 * cpu-tic4x.c: Likewise.
77 * cpu-tic54x.c: Likewise.
78 * cpu-tic6x.c: Likewise.
79 * cpu-tic80.c: Likewise.
80 * cpu-tilegx.c: Likewise.
81 * cpu-tilepro.c: Likewise.
82 * cpu-v850.c: Likewise.
83 * cpu-v850_rh850.c: Likewise.
84 * cpu-vax.c: Likewise.
85 * cpu-visium.c: Likewise.
86 * cpu-wasm32.c: Likewise.
87 * cpu-xc16x.c: Likewise.
88 * cpu-xgate.c: Likewise.
89 * cpu-xstormy16.c: Likewise.
90 * cpu-xtensa.c: Likewise.
91 * cpu-z80.c: Likewise.
92 * cpu-z8k.c: Likewise.
94 2019-09-09 Phil Blundell <pb@pbcl.net>
96 binutils 2.33 branch created.
98 2019-09-06 Alan Modra <amodra@gmail.com>
100 * aout-target.h (object_p): Formatting.
101 * bfd-in.h (bfd_get_filename): Don't cast to char*.
102 * corefile.c (generic_core_file_matches_executable_p): Constify
103 variables and remove cast.
104 * bfd-in2.h: Regenerate.
106 2019-09-05 Alan Modra <amodra@gmail.com>
108 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
109 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
110 in the GOT/PLT entry rather than affecting the offset to that
112 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
114 2019-09-05 Alan Modra <amodra@gmail.com>
116 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
117 in second instruction.
118 (ppc64_elf_relocate_section): Likewise.
120 2019-09-05 Alan Modra <amodra@gmail.com>
123 * libbfd-in.h (bfd_strdup): New inline function.
124 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
126 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
127 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
129 (bfd_openstreamr): Use bfd_strdup.
130 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
131 * plugin.c (try_load_plugin): Use bfd_malloc.
132 * libbfd.h: Regenerate.
134 2019-09-02 Alan Modra <amodra@gmail.com>
137 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
139 (read_alt_indirect_string): Likewise.
140 (read_alt_indirect_ref): Likewise.
142 2019-08-31 Jim Wilson <jimw@sifive.com>
145 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
146 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
148 2019-08-30 Jim Wilson <jimw@sifive.com>
150 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
151 error, call bfd_set_error, set ret to FALSE, and goto out label.
153 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
156 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
157 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
159 2019-08-29 Alan Modra <amodra@gmail.com>
162 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
163 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
164 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
167 2019-08-29 Alan Modra <amodra@gmail.com>
169 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
170 on second insn, return it in poff.
171 (ppc64_elf_relocate_section): Add offset to paddi addend for
174 2019-08-28 Jim Wilson <jimw@sifive.com>
176 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
177 section when setting max_alignment. Update comment.
178 (_bfd_riscv_relax_pc): Likewise.
180 2019-08-29 Alan Modra <amodra@gmail.com>
183 * bfd.c (struct bfd): Add no_element_cache.
184 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
185 archive cache when no_element_cache.
186 (bfd_generic_archive_p): Set no_element_cache when opening first
187 element to check format. Close first element too.
188 (do_slurp_bsd_armap): Don't zero ardata->cache here.
189 * bfd-in2.h: Regenerate.
191 2019-08-24 Alan Modra <amodra@gmail.com>
193 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
194 symbols from GOT optimisation.
196 2019-08-23 Stafford Horne <shorne@gmail.com>
198 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
201 2019-08-23 Nick Clifton <nickc@redhat.com>
204 * elf.c (bfd_section_from_shdr): Issue an informative warning
205 message and continue processing other sections after encountering
206 a reloc section for a section which already has other relocs
209 2019-08-23 Alan Modra <amodra@gmail.com>
212 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
213 on error without freeing plts[] contents.
215 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
217 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
219 2019-08-22 Nick Clifton <nickc@redhat.com>
222 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
223 reading data from extra records.
225 2019-08-22 Tamar Christina <tamar.christina@arm.com>
228 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
229 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
230 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
231 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
234 2019-08-22 Alan Modra <amodra@gmail.com>
236 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
237 instead recognize CMSE_PREFIX in symbol name.
238 (elf32_arm_gc_mark_extra_sections): Likewise.
239 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
240 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
242 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
244 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
245 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
247 2019-08-20 Tamar Christina <tamar.christina@arm.com>
249 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
250 elf32_arm_stub_long_branch_v4t_thumb_thumb,
251 elf32_arm_stub_long_branch_v4t_thumb_arm,
252 elf32_arm_stub_short_branch_v4t_thumb_arm,
253 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
254 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
255 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
256 previous instruction.
258 2019-08-19 Tom Tromey <tromey@adacore.com>
260 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
263 2019-08-19 Alan Modra <amodra@gmail.com>
265 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
267 (struct _ppc64_elf_section_data): Likewise.
268 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
269 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
270 than TOC loop. Check PLT16 insns too.
272 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
275 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
276 PC-relative relocations back to ...
277 (elf_x86_64_relocate_section): Here.
279 2019-08-16 Martin Liska <mliska@suse.cz>
282 * elflink.c: Report error only for not relocatable.
283 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
284 here lto_slim_object as it's handled in caller.
286 2019-08-16 Alan Modra <amodra@gmail.com>
288 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
290 2019-08-15 Jim Wilson <jimw@sifive.com>
292 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
293 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
294 to c.li instruction, and use ENCODE_RVC_IMM to set value.
296 2019-08-15 Tom Tromey <tromey@adacore.com>
298 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
301 2019-08-14 Alan Modra <amodra@gmail.com>
304 * dwarf2.c (stash_comp_unit): New function, extracted from..
305 (_bfd_dwarf2_find_nearest_line): ..here.
306 (find_abstract_instance): Parse comp units and decode line info
309 2019-08-14 Alan Modra <amodra@gmail.com>
311 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
312 (comp_unit_find_nearest_line): Use it here..
313 (_bfd_dwarf2_find_symbol_bias): ..and here.
315 2019-08-14 Alan Modra <amodra@gmail.com>
317 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
318 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
319 * coffgen.c (coff_find_nearest_line_with_names): Adjust
320 _bfd_dwarf2_find_nearest_line calls.
321 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
322 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
323 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
324 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
325 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
326 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
327 * libbfd.h: Regenerate.
329 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
331 * elf-bfd.h (struct elf_backend_data): New members.
332 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
333 .gnu.hash section if necessary.
334 (struct collect_gnu_hash_codes): New member.
335 (elf_gnu_hash_process_symidx): New function name.
336 (elf_renumber_gnu_hash_syms): Ignore local and undefined
337 symbols. Record xlat location for every symbol which should have
339 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
340 dynamic section if necessary.
341 (GNU_HASH_SECTION_NAME): New define.
342 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
343 Update the section size info.
344 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
345 (struct mips_elf_link_hash_entry): New member.
346 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
348 (mips_elf_sort_hash_table): Initialize the pointer to the
350 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
351 translation table entry with the symbol dynindx.
352 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
353 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
355 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
357 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
359 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
360 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
362 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
363 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
364 (_bfd_mips_post_process_headers): Mark the ABI version as
365 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
366 but not a .hash section.
367 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
368 position in the translation table, associated with the hash
370 * elfxx-mips.h (literal_reloc_p): Define
371 elf_backend_record_xhash_symbol backend hook.
372 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
375 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
377 * elf64-bpf.c (bpf_elf_relocate_section): New function.
378 (bpf_elf_insn_disp_reloc): Delete function.
379 (elf_backend_relocate_section): Define.
381 2019-08-07 Alan Modra <amodra@gmail.com>
384 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
385 for overflow in expressions involving nsymz.
387 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
389 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
390 two pages in relro presence.
392 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
394 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
395 (get_wsr_lbeg_opcode): New functions.
396 (check_loop_aligned): Detect relaxed loops and adjust loop_len
397 and insn_len for the first actual instruction of the loop.
399 2019-07-30 Alan Modra <amodra@gmail.com>
402 * bfd.c (struct bfd): Add lto_slim_object flag.
403 * bfd-in2.h: Regenerate.
405 2019-07-29 Martin Liska <mliska@suse.cz>
408 * archive.c (_bfd_compute_and_write_armap): Come up with
409 report_plugin_err variable.
410 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
411 * elf.c (struct lto_section): New.
412 (_bfd_elf_make_section_from_shdr): Parse content of
413 .gnu_lto_.lto section.
414 * elflink.c: Report error for a missing LTO plugin.
415 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
417 2019-07-28 Alan Modra <amodra@gmail.com>
421 * elflink.c (elf_link_add_object_symbols): Report an informative
422 error on finding local symbols with index equal or greater than
423 symbol table sh_info. Correct comment. Allow such symbols in
424 dynamic objects. Abort on NULL section for symbol.
426 2019-07-26 Alan Modra <amodra@gmail.com>
428 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
429 (elf_linker): Don't define.
430 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
432 2019-07-25 YunQiang Su <syq@debian.org>
435 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
438 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
440 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
442 (reloc_type_to_name): Fix formating.
443 (arc_elf_object_p): Likewise.
444 (debug_arc_reloc): Likewise.
445 (arc_do_relocation): Likewise.
447 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
449 * elf32-arc.c (bfd_get_32_me): New function.
450 (bfd_put_32_me): Likewise.
451 (arc_elf_relax_section): Likewise.
452 (bfd_elf32_bfd_relax_section): Define.
454 2019-07-24 Alan Modra <amodra@gmail.com>
456 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
457 elf_backend_final_write_processing, don't pass linker arg.
458 (_bfd_elf_final_write_processing): Update prototype.
459 * elf.c (_bfd_elf_write_object_contents): Adjust call.
460 (_bfd_elf_final_write_processing): Return error on incompatible
461 OSABI and has_gnu_osabi. Remove linker arg.
462 * elf-nacl.h (nacl_final_write_processing): Update prototype.
463 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
464 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
465 (_bfd_mips_elf_final_write_processing): Likewise.
466 * elf-hppa.h (elf_hppa_final_write_processing): Return status
467 and remove linker arg.
468 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
469 * elf-nacl.c (nacl_final_write_processing): Likewise.
470 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
471 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
472 * elf32-arm.c (arm_final_write_processing): Likewise.
473 (elf32_arm_final_write_processing): Likewise.
474 (elf32_arm_nacl_final_write_processing): Likewise.
475 (elf32_arm_vxworks_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-mips.c (mips_vxworks_final_write_processing): Likewise.
485 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
486 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
487 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
488 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
489 * elf32-ppc.c (ppc_final_write_processing): Likewise.
490 (ppc_elf_final_write_processing): Likewise.
491 (ppc_elf_vxworks_final_write_processing): Likewise.
492 * elf32-sparc.c (sparc_final_write_processing): Likewise.
493 (elf32_sparc_final_write_processing): Likewise.
494 (elf32_sparc_vxworks_final_write_processing): Likewise.
495 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
496 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
497 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
498 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
499 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
500 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
501 (_bfd_mips_elf_final_write_processing): Likewise.
503 2019-07-24 Alan Modra <amodra@gmail.com>
505 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
507 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
508 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
510 2019-07-24 Alan Modra <amodra@gmail.com>
512 * elf32-visium.c (visium_elf_post_process_headers): Don't set
513 EI_OSABI header byte here.
516 2019-07-23 Alan Modra <amodra@gmail.com>
518 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
519 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
520 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
521 when elf_gnu_osabi_mbind is set.
522 (_bfd_elf_map_sections_to_segments): Likewise.
523 (_bfd_elf_init_private_section_data): Likewise.
524 (_bfd_elf_final_write_processing): Update comment.
525 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
526 (elf_backend_special_sections): Define without .tbss for linux.
528 2019-07-23 Alan Modra <amodra@gmail.com>
530 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
531 Remove none, any, all enums.
532 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
533 (_bfd_elf_final_write_processing): Declare.
534 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
535 elf_backend_final_write_processing.
536 (_bfd_elf_post_process_headers): Move body of function to..
537 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
538 only when not already set. Adjust for rename.
539 * elfxx-target.h (elf_backend_final_write_processing): Default to
540 _bfd_elf_final_write_processing.
541 * elf-hppa.h (elf_hppa_final_write_processing): Call
542 _bfd_elf_final_write_processing.
543 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
544 * elf-nacl.c (nacl_final_write_processing): Likewise.
545 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
546 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
547 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
548 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
549 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
550 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
551 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
552 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
553 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
554 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
555 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
556 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
557 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
558 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
559 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
560 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
561 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
562 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
563 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
564 * elf32-arm.c (arm_final_write_processing): Split out from..
565 (elf32_arm_final_write_processing): ..here. Call
566 _bfd_elf_final_write_processing.
567 (elf32_arm_nacl_final_write_processing): Adjust.
568 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
569 (_bfd_mips_elf_final_write_processing): ..here. Call
570 _bfd_elf_final_write_processing.
571 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
572 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
573 * elf32-ppc.c (ppc_final_write_processing): Split out from..
574 (ppc_elf_final_write_processing): ..here. Call
575 _bfd_elf_final_write_processing.
576 (ppc_elf_vxworks_final_write_processing): Adjust.
577 * elf32-sparc.c (sparc_final_write_processing): Split out from..
578 (elf32_sparc_final_write_processing): ..here. Call
579 _bfd_elf_final_write_processing.
580 (elf32_sparc_vxworks_final_write_processing): Adjust.
581 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
582 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
583 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
584 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
585 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
586 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
587 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
588 * elflink.c (elf_link_add_object_symbols): Likewise.
589 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
592 2019-07-23 Omar Majid <omajid@redhat.com>
594 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
595 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
596 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
598 * peXXigen.c: Add comment about source of .NET magic numbers.
600 2019-07-19 Alan Modra <amodra@gmail.com>
602 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
603 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
604 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
605 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
606 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
607 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
608 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
609 (ppc64_elf_check_relocs): Support pcrel tls relocs.
610 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
611 * bfd-in2.h: Regenerate.
612 * libbfd.h: Regenerate.
614 2019-07-18 Alan Modra <amodra@gmail.com>
616 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
617 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
620 2019-07-18 Alan Modra <amodra@gmail.com>
622 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
623 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
625 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
626 tls_type vars unsigned int.
627 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
628 to select r_type edit.
630 2019-07-18 Alan Modra <amodra@gmail.com>
632 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
634 * elf64-ppc.c (TLS_GDIE): Likewise.
636 2019-07-18 Alan Modra <amodra@gmail.com>
638 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
639 range of tp-relative offsets.
641 2019-07-15 Alan Modra <amodra@gmail.com>
643 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
644 alias is no longer bfd_link_hash_defined, clear the alias.
646 2019-07-13 Alan Modra <amodra@gmail.com>
648 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
650 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
651 (_bfd_elf_init_2_index_sections): Likewise.
652 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
653 relocations for local TLS symbols, use STN_UNDEF as the relocation
655 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
656 leave TLS symbol value in the addend.
658 2019-07-08 Alan Modra <amodra@gmail.com>
661 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
662 size before reading first word.
664 2019-07-02 Nick Clifton <nickc@redhat.com>
667 * elf.c (is_debuginfo_file): New function.
668 (assign_file_positions_for_non_load_sections): Do not warn about
669 allocated sections outside of loadable segments if they are found
671 * elf-bfd.h (is_debuginfo_file): Prototype.
673 2019-07-02 Nick Clifton <nickc@redhat.com>
676 * compress.c (bfd_get_full_section_contents): Do not complain
677 about linker created sections that are larger than the file size.
679 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
681 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
682 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
684 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
686 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
688 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
689 sections when .text section contain secure entry functions
692 2019-07-01 Nick Clifton <nickc@redhat.com>
695 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
696 section VMA in the offset used to update exidx relocs.
698 2019-06-28 Nick Clifton <nickc@redhat.com>
701 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
702 large version reference section.
703 * compress.c (bfd_get_full_section_contents): Check for an
704 uncompressed section whose size is larger than the file size.
706 2019-06-28 Alan Modra <amodra@gmail.com>
708 * format.c (bfd_check_format_matches): Don't match plugin target
709 if another target matches. Expand comment.
710 * targets.c (_bfd_target_vector): Move plugin_vec after all other
711 non-corefile targets, outside !SELECT_VECS.
712 * config.bfd: Don't handle targ=plugin here.
713 * configure.ac: Don't add plugin to enable_targets or handle in
714 target loop setting selvecs and other target vars.
715 * configure: Regenerate.
717 2019-06-26 Nick Clifton <nickc@redhat.com>
720 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
721 messages for failures.
722 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
723 if returning an error value.
725 2019-06-25 Jan Beulich <jbeulich@suse.com>
727 * elf-properties.c (elf_find_and_remove_property): Rename last
728 parameter. Mention it in comment.
730 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
732 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
733 SEC_MERGE or SEC_CODE flags are set.
734 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
735 symtype consistently. Don't include sec_addr (sym_sec) in symval.
736 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
737 Add sec_addr (sym_sec) after handling merge sections.
739 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
742 * elf-properties.c (elf_merge_gnu_property_list): Remove the
743 property after reporting property removal.
745 2019-06-23 Alan Modra <amodra@gmail.com>
748 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
749 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
750 Reduce range of offsets allowed for other GOT relocs.
752 2019-06-23 Alan Modra <amodra@gmail.com>
755 * elfcode.h (elf_object_p): Warning fix.
757 2019-06-21 Alan Modra <amodra@gmail.com>
760 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
762 2019-06-19 Alan Modra <amodra@gmail.com>
765 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
766 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
768 2019-06-19 Alan Modra <amodra@gmail.com>
770 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
771 functions that require r2 valid to use local entry.
772 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
774 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
776 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
777 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
778 with elfNN_aarch64_allocate_local_dynrelocs.
780 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
782 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
784 2019-06-14 Alan Modra <amodra@gmail.com>
786 * Makefile.in: Regenerate.
787 * configure: Regenerate.
789 2019-06-14 Alan Modra <amodra@gmail.com>
791 * elf64-ppc.c: Fix comments involving paddi.
793 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
796 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
797 absent, or the bfd is not in the ELF formart.
798 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
800 2019-06-10 Christos Zoulas <christos@zoulas.com>
803 * elf.c (elfcore_make_auxv_note_section): New function.
804 (elfcore_grok_note): Use it.
805 (elfcore_grok_freebsd_note): Likewise.
806 (elfcore_grok_openbsd_note): Likewise.
807 (elfcore_grok_netbsd_note): Likewise. Plus add support for
808 NT_NETBSDCORE_AUXV notes.
810 2019-06-06 Sudakshina Das <sudi.das@arm.com>
812 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
813 alignment of the new gnu property section.
815 2019-06-06 Sudakshina Das <sudi.das@arm.com>
817 * bfd-in.h: Change comment.
818 * bfd-in2.h: Regenerate.
819 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
820 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
823 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
825 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
826 Remove overflow check.
828 2019-05-28 Alan Modra <amodra@gmail.com>
831 * cofflink.c (coff_link_check_archive_element): Don't assume
832 element is a coff object file after calling add_archive_element.
834 2019-05-28 Alan Modra <amodra@gmail.com>
837 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
838 attempt to set sh_entsize for excluded PLT section.
840 2019-05-28 Alan Modra <amodra@gmail.com>
843 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
844 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
845 allocated in alpha_dynamic_entries_for_reloc.
847 2019-05-28 Alan Modra <amodra@gmail.com>
850 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
851 on NULL output_section.
852 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
854 2019-05-28 Alan Modra <amodra@gmail.com>
857 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
858 entry when MUST_FIND. Abort when MUST_FIND not found.
859 (elf_m68k_get_bfd2got_entry): Likewise.
860 (elf_m68k_relocate_section): Remove now useless assert.
862 2019-05-28 Alan Modra <amodra@gmail.com>
865 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
866 from bfd_link_info, not an output section owner.
867 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
868 (elf_hppa_final_link_relocate): Likewise.
870 2019-05-28 Alan Modra <amodra@gmail.com>
873 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
874 create_object_symbols_section, obj_textsec, obj_datasec or
875 obj_bsssec. Fix other errors in placement.
876 * config.bfd: Obsolete tic30-aout.
878 2019-05-28 Alan Modra <amodra@gmail.com>
881 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
882 end of section list as well as section_count.
883 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
884 section list before returning error.
886 2019-05-27 Alan Modra <amodra@gmail.com>
888 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
890 2019-05-27 Alan Modra <amodra@gmail.com>
893 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
895 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
897 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
898 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
899 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
900 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
901 (elf_backend_merge_symbol_attribute): Define.
903 2019-05-24 Alan Modra <amodra@gmail.com>
905 * po/SRC-POTFILES.in: Regenerate.
907 2019-05-24 Alan Modra <amodra@gmail.com>
909 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
910 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
911 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
912 (struct ppc_link_hash_table): Add powerxx_stubs.
913 (ppc64_elf_check_relocs): Set powerxx_stubs.
914 (build_powerxx_offset, size_powerxx_offset),
915 (num_relocs_for_powerxx_offset),
916 (emit_relocs_for_powerxx_offset): New functions.
917 (plt_stub_size): Size powerxx stubs.
918 (ppc_build_one_stub): Emit powerxx stubs.
919 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
922 2019-05-24 Alan Modra <amodra@gmail.com>
924 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
926 (xlate_pcrel_opt): New function.
927 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
928 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
929 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
931 2019-05-24 Alan Modra <amodra@gmail.com>
933 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
934 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
935 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
936 (BFD_RELOC_PPC64_PLT_PCREL34),
937 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
938 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
939 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
940 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
941 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
942 * elf64-ppc.c (PNOP): Define.
943 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
944 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
945 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
947 (ppc64_elf_prefix_reloc): New function.
948 (struct ppc_link_hash_table): Add notoc_plt.
949 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
950 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
951 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
952 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
953 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
954 possible need for dynamic relocs on non-pcrel powerxx relocs.
955 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
956 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
957 (toc_adjusting_stub_needed): Likewise.
958 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
959 (ppc64_elf_relocate_section): Handle new powerxx relocs.
960 * bfd-in2.h: Regenerate.
961 * libbfd.h: Regenerate.
963 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
965 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
966 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
968 * configure: Regenerate.
970 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
972 * configure: Regenerated.
973 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
974 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
975 (BFD64_BACKENDS): Add elf64-bpf.lo.
976 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
977 * Makefile.in (SOURCE_HFILES): Regenerate.
978 * config.bfd (targ_cpu): Handle bpf-*-* targets.
979 * cpu-bpf.c: New file.
980 * elf64-bpf.c: Likewise.
981 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
983 * archures.c: Define architecture bfd_arch_bpf and machine
985 * reloc.c: Define BFD relocations used by the BPF target.
986 * bfd-in2.h: Regenerated.
987 * libbfd.h: Likewise.
989 2019-05-22 Alan Modra <amodra@gmail.com>
991 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
994 2019-05-22 Alan Modra <amodra@gmail.com>
996 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
997 processing on "size error in section".
999 2019-05-22 Alan Modra <amodra@gmail.com>
1001 * som.c (som_bfd_free_cached_info): Call
1002 _bfd_generic_close_and_cleanup.
1004 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1006 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1007 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1009 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1011 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1012 checks. Search the RELA table for n64 relocations.
1014 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1015 Faraz Shahbazker <fshahbazker@wavecomp.com>
1017 * elfxx-mips.c (LA25_BC): New macro.
1018 (mips_elf_link_hash_table)<compact_branches>: New field.
1019 (STUB_JALRC): New macro.
1020 (mipsr6_o32_exec_plt0_entry_compact): New array.
1021 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1022 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1023 (mipsr6_exec_plt_entry_compact): Likewise.
1024 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1025 when compact_branches is true.
1026 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1027 PLT for MIPSR6 with compact_branches. Do not reorder the
1028 compact branches PLT. Switch the lazy stub for MIPSR6
1029 with compact_branches to use JALRC.
1030 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1031 when compact_branches is true.
1032 (_bfd_mips_elf_compact_branches): New function.
1033 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1035 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1038 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1039 Fix print formatter.
1041 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1044 * elf32-arm.c (get_value_helper): Remove.
1045 (elf32_arm_final_link_relocate): Fix branch future relocations.
1047 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1050 * bfd-in.h (enum erratum_84319_opts): New
1051 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1052 int to enum erratum_84319_opts.
1053 * bfd-in2.h: Regenerate.
1054 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1055 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1056 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1057 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1058 (_bfd_aarch64_resize_stubs): Amend comment.
1059 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1061 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1062 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1064 (clear_erratum_843419_entry): Update erratum conditional.
1066 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1069 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1070 when computing distance_short_enough.
1072 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1075 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1076 Wrap around even if distance equals avr_pc_wrap_around.
1078 2019-05-20 Nick Clifton <nickc@redhat.com>
1080 * po/fr.po: Updated French translation.
1082 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1084 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1086 2019-05-16 Alan Modra <amodra@gmail.com>
1088 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1090 2019-05-15 Alan Modra <amodra@gmail.com>
1092 * elf32-arm.c (elf32_arm_write_section): Don't leave
1093 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1094 unitialised section contents.
1096 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1099 * verilog.c: (VerilogDataWidth): New variable.
1100 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1102 2019-05-08 Nick Clifton <nickc@redhat.com>
1105 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1106 rather than FALSE if encountering a non-ELF file.
1108 2019-05-06 Alan Modra <amodra@gmail.com>
1110 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1112 2019-05-06 Alan Modra <amodra@gmail.com>
1114 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1115 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1116 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1117 * libbfd.h: Regenerate.
1118 * bfd-in2.h: Regenerate.
1120 2019-05-04 Alan Modra <amodra@gmail.com>
1123 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1124 following the standard section names.
1125 (bfd_decode_symclass): Prioritize section flag tests in
1126 decode_section_type before name tests in coff_section_type.
1127 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1128 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1129 their names and choose standard .text section flags for
1132 2019-05-02 Nick Clifton <nickc@redhat.com>
1135 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1136 .gnu.debugaltlink sections as debugging sections.
1138 2019-04-30 Alan Modra <amodra@gmail.com>
1140 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1141 (struct _ppc64_elf_section_data): Likewise.
1142 (ppc64_elf_check_relocs): Set above fields.
1143 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1144 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1147 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1150 * elflink.c (elf_link_output_extsym): Don't complain undefined
1151 weak dynamic reference.
1153 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1155 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1156 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1157 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1158 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1159 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1160 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1161 (elfNN_aarch64_small_plt0_bti_entry): Update.
1162 (elfNN_aarch64_small_plt_bti_entry): Update.
1163 (elfNN_aarch64_small_plt_pac_entry): Update.
1164 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1165 (setup_plt_values): Setup new entries.
1166 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1167 (elfNN_aarch64_plt_sym_val): Likewise.
1169 2019-04-22 Jim Wilson <jimw@sifive.com>
1171 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1173 2019-04-19 Alan Modra <amodra@gmail.com>
1175 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1177 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1179 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1180 building shared object.
1181 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1183 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1186 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1189 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1191 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1193 * bfd-in2.h: Regenerate.
1194 * libbfd.h: Likewise.
1196 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1198 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1199 * bfd-in2.h: Regenerated.
1200 * libbfd.h: Regenerated.
1202 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1204 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1205 * bfd-in2.h: Regenerated.
1206 * libbfd.h: Likewise.
1208 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1210 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1211 * bfd-in2.h: Regenerated.
1212 * libbfd.h: Regenerated.
1213 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1214 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1215 and R_ARM_THM_BF12 together.
1216 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1218 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1220 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1221 * libbfd.h: Regenerated.
1222 * bfd-in2.h: Regenerated.
1223 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1224 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1225 and R_ARM_THM_BF18 together.
1226 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1228 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1230 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1231 * bfd-in2.h: Regenerated.
1232 * libbfd.h: Regenerated.
1233 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1234 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1235 and R_ARM_THM_BF16 together.
1236 (get_value_helper): New reloc helper.
1237 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1239 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1241 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1242 * bfd-in2.h: Regenerate.
1243 * libbfd.h: Regenerate.
1245 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1247 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1248 * bfd-in2.h: Regenerate.
1249 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1250 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1252 (using_thumb2): Likewise.
1253 (using_thumb2_bl): Update assert.
1254 (arch_has_arm_nop): Likewise.
1255 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1256 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1258 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1260 * elf-linker-x86.h (elf_x86_cet_report): New.
1261 (elf_linker_x86_params): Add cet_report.
1262 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1263 missing IBT and SHSTK properties if needed.
1265 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1268 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1269 "h != NULL". Don't check "h != NULL" before calling.
1270 bfd_elf_gc_record_vtentry.
1271 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1272 * elf32-bfin.c (bfin_check_relocs): Likewise.
1273 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1274 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1275 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1276 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1277 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1278 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1279 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1280 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1281 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1282 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1283 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1284 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1285 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1286 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1287 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1288 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1289 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1290 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1291 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1292 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1293 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1294 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1295 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1296 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1297 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1298 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1299 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1300 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1301 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1304 2019-04-11 Alan Modra <amodra@gmail.com>
1307 * elflink.c (elf_link_add_object_symbols): Don't read partial
1308 dynamic entries from fuzzed objects.
1310 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1313 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1314 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1315 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1317 2019-04-10 Michael Forney <mforney@mforney.org>
1320 * doc/chew.c (free_words): Correctly free "push_text" strings.
1322 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1324 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1326 2019-04-08 Alan Modra <amodra@gmail.com>
1328 * configure.ac (elfxx_x86): Define and use.
1329 * configure: Regenerate.
1331 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1333 * elf-linker-x86.h: New file.
1334 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1335 to get x86-specific linker options.
1336 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1337 (elf_x86_64_check_relocs): Likewise.
1338 (elf_x86_64_relocate_section): Likewise.
1339 (elf_x86_64_link_setup_gnu_properties): Likewise.
1340 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1341 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1342 (_bfd_elf_linker_x86_set_options): New function.
1343 * elfxx-x86.h: Include "elf-linker-x86.h".
1344 (elf_x86_link_hash_table): Add params.
1346 2019-04-03 Alan Modra <amodra@gmail.com>
1348 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1349 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1350 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1351 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1352 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1353 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1355 2019-04-02 Jim Wilson <jimw@sifive.com>
1358 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1359 ELF header flags to after check for ELF object file. Loop through
1360 sections looking for code sections, if none, then skip ABI checks.
1362 2019-03-30 Andrew Waterman <andrew@sifive.com>
1364 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1367 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1369 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1370 info->export_dynamic to the conditional.
1372 2019-03-28 Alan Modra <amodra@gmail.com>
1375 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1376 * configure: Regenerate.
1377 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1378 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1379 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1380 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1381 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1383 2019-03-21 Jim Wilson <jimw@sifive.com>
1386 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1387 verify sym non-NULL before using. Add identical check using h.
1389 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1391 * elf-bfd.h (struct elf_backend_data): Add argument to
1392 merge_gnu_properties.
1393 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1394 itself and while calling bed->merge_gnu_properties.
1395 (elf_merge_gnu_property_list): Update the calls for
1396 elf_merge_gnu_properties.
1397 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1398 of --force-bti warning and add argument.
1399 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1401 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1402 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1405 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1407 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1408 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1409 (elf_backend_fixup_gnu_properties): Define for AArch64.
1411 2019-03-18 Alan Modra <amodra@gmail.com>
1414 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1415 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1416 attempt at writing glink stubs only once.
1418 2019-03-16 Alan Modra <amodra@gmail.com>
1421 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1422 (_bfd_elf_rel_local_sym): Likewise.
1423 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1424 section of symbols with unrecognized shndx.
1426 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1429 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1431 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1432 in discarded section.
1434 2019-03-15 Alan Modra <amodra@gmail.com>
1437 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1438 symbol after globals if elf_bad_symtab is not set.
1440 2019-03-15 Alan Modra <amodra@gmail.com>
1443 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1444 (_bfd_elf_rel_local_sym): Likewise.
1446 2019-03-15 Alan Modra <amodra@gmail.com>
1449 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1450 object files with sh_size not a multiple of sh_entsize.
1452 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1455 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1456 input with bad relocation.
1458 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1460 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1462 2019-03-14 Nick Clifton <nickc@redhat.com>
1465 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1466 (save_section_vma): Initialise field to the number of entries in
1468 (section_vma_same): Check that the number of entries in the
1469 sec_vma table matches the number of sections in the bfd.
1471 2019-03-14 Nick Clifton <nickc@redhat.com>
1474 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1475 section owner pointer when adding the default symbol.
1477 2019-03-14 Nick Clifton <nickc@redhat.com>
1480 * elflink.c (elf_link_add_object_symbols): Add new local variable
1481 extversym_end. Initialise it to point to the end of the version
1482 symbol table, if present. Check it when initialising and updating
1485 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1487 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1488 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1489 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1490 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1492 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1493 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1494 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1496 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1497 Szabolcs Nagy <szabolcs.nagy@arm.com>
1499 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1500 (aarch64_bti_pac_info): New.
1501 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1502 (bfd_elf32_aarch64_set_options): Likewise.
1503 * bfd-in2.h: Regenerate
1504 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1505 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1506 (elfNN_aarch64_small_plt0_bti_entry): New.
1507 (elfNN_aarch64_small_plt_bti_entry): New.
1508 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1509 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1510 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1511 tlsdesc_plt_entry_size fields.
1512 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1513 (setup_plt_values): New helper function.
1514 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1516 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1518 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1519 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1520 to plt stubs instead of fixed ones and update filling them according
1521 to the need for bti.
1522 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1523 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1524 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1525 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1526 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1528 (bfd_elfNN_get_synthetic_symtab): Define.
1529 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1530 and mising BTI NOTE SECTION.
1533 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1535 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1536 linker created inputs from merge.
1537 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1538 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1539 (elfNN_aarch64_link_setup_gnu_properties): New.
1540 (elfNN_aarch64_merge_gnu_properties): New.
1541 (elf_backend_setup_gnu_properties): Define for AArch64.
1542 (elf_backend_merge_gnu_properties): Likewise.
1543 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1544 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1545 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1546 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1547 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1548 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1549 (elf_backend_parse_gnu_properties): Define for AArch64.
1551 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1554 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1555 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1557 2019-03-12 Alan Modra <amodra@gmail.com>
1559 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1560 nmemb parameter. Use bfd_alloc2.
1561 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1563 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1564 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1565 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1567 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1568 (assign_section_numbers): Style fix.
1569 (swap_out_syms): Use bfd_malloc2.
1570 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1572 (_bfd_elf_make_empty_symbol): Style fix.
1573 (elfobj_grok_stapsdt_note_1): Formatting.
1574 * elfcode.h (elf_object_p): Use bfd_alloc2.
1575 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1576 (elf_slurp_symbol_table): Use bfd_zalloc2.
1577 (elf_slurp_reloc_table): Use bfd_alloc2.
1578 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1579 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1580 size calculation doesn't overflow.
1581 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1582 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1583 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1585 2019-03-08 Alan Modra <amodra@gmail.com>
1588 * merge.c (merge_strings): Return secinfo. Don't pad section
1590 (_bfd_merge_sections): Pad section to alignment here, if input
1591 sections contributing to merged output all pad to alignment.
1594 2019-03-06 Nick Clifton <nickc@redhat.com>
1596 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1598 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1599 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1601 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1603 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1604 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1607 * elf32-s390.c (allocate_dynrelocs): Update comment.
1609 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1611 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1613 2019-02-28 Nick Clifton <nickc@redhat.com>
1616 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1617 section that is not NUL terminated.
1619 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1622 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1623 by linker when checking copy reloc on protected symbol.
1625 2019-02-24 Alan Modra <amodra@gmail.com>
1628 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1630 2019-02-20 Eric Tsai <erictsai@cadence.com>
1632 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1633 sections between the call site and call destination and adjust
1634 call distance by the largest alignment.
1636 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1638 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1639 * elf.c (elfcore_grok_aarch_pauth): New function.
1640 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1641 (elfcore_write_aarch_pauth): New function.
1642 (elfcore_write_register_note): Check for AArch64 pauth section.
1644 2019-02-20 Alan Modra <amodra@gmail.com>
1647 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1650 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1652 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1653 Darwin hosts, not just or1k.
1654 * configure: Regenerate.
1656 2019-02-20 Alan Modra <amodra@gmail.com>
1659 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1660 sentinel NUL to string buffer nearer to loop where it is used.
1661 Don't go past sentinel when scanning strings, and don't write
1663 * archive.c (do_slurp_coff_armap): Simplify string handling to
1666 2019-02-19 Alan Modra <amodra@gmail.com>
1669 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1670 attempting to prevent read past end of section.
1672 2019-02-18 Alan Modra <amodra@gmail.com>
1675 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1676 PRIx64 to generate warning messages. Print local sym names too.
1678 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1680 * elf32-arc (INIT_SYM_STRING): Delete.
1681 (FINI_SYM_STRING): Likewise.
1682 (init_str): Likewise.
1683 (fini_str): Likewise.
1685 2019-02-08 Alan Modra <amodra@gmail.com>
1687 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1688 for bss-plt" warning to make it an error.
1690 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1693 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1694 reloc_class_ifunc for ifunc symbols.
1695 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1697 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1699 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1700 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1702 2019-02-07 Nick Clifton <nickc@redhat.com>
1704 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1705 into the definitely obsolete list.
1707 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1710 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1711 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1712 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1714 (elf_x86_64_check_relocs): Here.
1715 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1716 to check if a symbol is defined in a non-shared object.
1717 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1719 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1721 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1722 of 'labs' (and fix GCC warning).
1724 2019-01-25 Nick Clifton <nickc@redhat.com>
1726 * po/ru.po: Updated Russian translation.
1728 2019-01-23 Nick Clifton <nickc@redhat.com>
1730 * po/fr.po: Updated French translation.
1732 2019-01-21 Nick Clifton <nickc@redhat.com>
1734 * po/pt.po: Updated Portuguese translation.
1735 * po/uk.po: Updated Ukranian translation.
1737 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1740 * elf32-nds32.c (nds32_relocate_section): Add space between words
1742 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1744 (riscv_i_or_e_p): Likewise.
1745 (riscv_merge_arch_attr_info): Likewise.
1747 2019-01-19 Nick Clifton <nickc@redhat.com>
1749 * version.m4: Reset to 2.32.51
1750 * configure: Regenerate.
1751 * po/bfd.pot: Regenerate.
1753 2018-06-24 Nick Clifton <nickc@redhat.com>
1755 2.32 branch created.
1757 2019-01-16 Kito Cheng <kito@andestech.com>
1759 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1762 2019-01-16 Kito Cheng <kito@andestech.com>
1763 Nelson Chu <nelson@andestech.com>
1765 * elfnn-riscv.c (in_subsets): New.
1766 (out_subsets): Likewise.
1767 (merged_subsets): Likewise.
1768 (riscv_std_ext_p): Likewise.
1769 (riscv_non_std_ext_p): Likewise.
1770 (riscv_std_sv_ext_p): Likewise.
1771 (riscv_non_std_sv_ext_p): Likewise.
1772 (riscv_version_mismatch): Likewise.
1773 (riscv_i_or_e_p): Likewise.
1774 (riscv_merge_std_ext): Likewise.
1775 (riscv_merge_non_std_and_sv_ext): Likewise.
1776 (riscv_merge_arch_attr_info): Likewise.
1777 (riscv_merge_attributes): Likewise.
1778 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1780 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1781 (elf_backend_obj_attrs_vendor): Define.
1782 (elf_backend_obj_attrs_section_type): Likewise.
1783 (elf_backend_obj_attrs_section): Likewise.
1784 (elf_backend_obj_attrs_arg_type): Define as
1785 riscv_elf_obj_attrs_arg_type.
1786 * elfxx-riscv.c (riscv_estimate_digit): New.
1787 (riscv_estimate_arch_strlen1): Likewise.
1788 (riscv_estimate_arch_strlen): Likewise.
1789 (riscv_arch_str1): Likewise.
1790 (riscv_arch_str): Likewise.
1791 * elfxx-riscv.h (riscv_arch_str): Declare.
1793 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1795 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1797 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1798 source field. (md_apply_fix): Apply final fix
1799 to BFD_RELOC_S12Z_OPR.
1800 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1802 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1805 * elf32-s390.c (allocate_dynrelocs): Update comment.
1807 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1809 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1810 * configure: Regenerate.
1812 2019-01-08 Alan Modra <amodra@gmail.com>
1816 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1819 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1821 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1822 * bfd/bfd-in2.h: Regenerate.
1823 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1824 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1826 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1828 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1829 default target, little endian target is more suitable.
1831 2019-01-04 Alan Modra <amodra@gmail.com>
1835 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1837 (EQ_VALUE_IN_FIELD): Likewise.
1838 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1840 2019-01-01 Alan Modra <amodra@gmail.com>
1842 Update year range in copyright notice of all files.
1844 For older changes see ChangeLog-2018
1846 Copyright (C) 2019 Free Software Foundation, Inc.
1848 Copying and distribution of this file, with or without modification,
1849 are permitted in any medium without royalty provided the copyright
1850 notice and this notice are preserved.
1856 version-control: never