1 2019-09-11 Alan Modra <amodra@gmail.com>
3 * targets.c (struct bfd_target): Add _bfd_group_name.
4 (BFD_JUMP_TABLE): Likewise.
5 * coffgen.c (bfd_coff_group_name): New function.
6 * elf.c (bfd_elf_group_name): New function.
7 * linker.c (_bfd_nolink_bfd_group_name): New function.
8 * section.c (bfd_generic_group_name): New function.
9 * elf-bfd.h (bfd_elf_group_name): Declare.
10 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
11 * libcoff-in.h (bfd_coff_group_name): Declare.
12 * aout-target.h (MY_bfd_group_name): Define.
13 * aout-tic30.c (MY_bfd_group_name): Define.
14 * bfd.c (bfd_group_name): Define.
15 * binary.c (binary_bfd_group_name): Define.
16 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
17 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
18 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
19 * coffcode.h (coff_bfd_group_name): Define.
20 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
21 * i386msdos.c (msdos_bfd_group_name): Define.
22 * ihex.c (ihex_bfd_group_name): Define.
23 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
24 * mmo.c (mmo_bfd_group_name): Define.
25 * pef.c (bfd_pef_bfd_group_name): Define.
26 * plugin.c (bfd_plugin_bfd_group_name): Define.
27 * ppcboot.c (ppcboot_bfd_group_name): Define.
28 * som.c (som_bfd_group_name): Define.
29 * srec.c (srec_bfd_group_name): Define.
30 * tekhex.c (tekhex_bfd_group_name): Define.
31 * verilog.c (verilog_bfd_group_name): Define.
32 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
33 * xsym.c (bfd_sym_bfd_group_name): Define.
34 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
35 (rs6000_xcoff64_aix_vec): Likewise.
36 * bfd-in2.h: Regenerate.
37 * libbfd.h: Regenerate.
38 * libcoff.h: Regenerate.
40 2019-09-10 Nick Clifton <nickc@redhat.com>
43 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
45 (bfd_default_arch_struct): Initialise the new field.
46 * bfd-in2.h: Regenerate.
47 * cpu-aarch64.c: Initialise the new field.
48 * cpu-alpha.c: Likewise.
49 * cpu-arc.c: Likewise.
50 * cpu-arm.c: Likewise.
51 * cpu-avr.c: Likewise.
52 * cpu-bfin.c: Likewise.
53 * cpu-bpf.c: Likewise.
54 * cpu-cr16.c: Likewise.
55 * cpu-cr16c.c: Likewise.
56 * cpu-cris.c: Likewise.
57 * cpu-crx.c: Likewise.
58 * cpu-csky.c: Likewise.
59 * cpu-d10v.c: Likewise.
60 * cpu-d30v.c: Likewise.
61 * cpu-dlx.c: Likewise.
62 * cpu-epiphany.c: Likewise.
63 * cpu-fr30.c: Likewise.
64 * cpu-frv.c: Likewise.
65 * cpu-ft32.c: Likewise.
66 * cpu-h8300.c: Likewise.
67 * cpu-hppa.c: Likewise.
68 * cpu-i386.c: Likewise.
69 * cpu-ia64.c: Likewise.
70 * cpu-iamcu.c: Likewise.
71 * cpu-ip2k.c: Likewise.
72 * cpu-iq2000.c: Likewise.
73 * cpu-k1om.c: Likewise.
74 * cpu-l1om.c: Likewise.
75 * cpu-lm32.c: Likewise.
76 * cpu-m10200.c: Likewise.
77 * cpu-m10300.c: Likewise.
78 * cpu-m32c.c: Likewise.
79 * cpu-m32r.c: Likewise.
80 * cpu-m68hc11.c: Likewise.
81 * cpu-m68hc12.c: Likewise.
82 * cpu-m68k.c: Likewise.
83 * cpu-m9s12x.c: Likewise.
84 * cpu-m9s12xg.c: Likewise.
85 * cpu-mcore.c: Likewise.
86 * cpu-mep.c: Likewise.
87 * cpu-metag.c: Likewise.
88 * cpu-microblaze.c: Likewise.
89 * cpu-mips.c: Likewise.
90 * cpu-mmix.c: Likewise.
91 * cpu-moxie.c: Likewise.
92 * cpu-msp430.c: Likewise.
94 * cpu-nds32.c: Likewise.
95 * cpu-nfp.c: Likewise.
96 * cpu-nios2.c: Likewise.
97 * cpu-ns32k.c: Likewise.
98 * cpu-or1k.c: Likewise.
99 * cpu-pdp11.c: Likewise.
100 * cpu-pj.c: Likewise.
101 * cpu-plugin.c: Likewise.
102 * cpu-powerpc.c: Likewise.
103 * cpu-pru.c: Likewise.
104 * cpu-riscv.c: Likewise.
105 * cpu-rl78.c: Likewise.
106 * cpu-rs6000.c: Likewise.
107 * cpu-rx.c: Likewise.
108 * cpu-s12z.c: Likewise.
109 * cpu-s390.c: Likewise.
110 * cpu-score.c: Likewise.
111 * cpu-sh.c: Likewise.
112 * cpu-sparc.c: Likewise.
113 * cpu-spu.c: Likewise.
114 * cpu-tic30.c: Likewise.
115 * cpu-tic4x.c: Likewise.
116 * cpu-tic54x.c: Likewise.
117 * cpu-tic6x.c: Likewise.
118 * cpu-tic80.c: Likewise.
119 * cpu-tilegx.c: Likewise.
120 * cpu-tilepro.c: Likewise.
121 * cpu-v850.c: Likewise.
122 * cpu-v850_rh850.c: Likewise.
123 * cpu-vax.c: Likewise.
124 * cpu-visium.c: Likewise.
125 * cpu-wasm32.c: Likewise.
126 * cpu-xc16x.c: Likewise.
127 * cpu-xgate.c: Likewise.
128 * cpu-xstormy16.c: Likewise.
129 * cpu-xtensa.c: Likewise.
130 * cpu-z80.c: Likewise.
131 * cpu-z8k.c: Likewise.
133 2019-09-09 Phil Blundell <pb@pbcl.net>
135 binutils 2.33 branch created.
137 2019-09-06 Alan Modra <amodra@gmail.com>
139 * aout-target.h (object_p): Formatting.
140 * bfd-in.h (bfd_get_filename): Don't cast to char*.
141 * corefile.c (generic_core_file_matches_executable_p): Constify
142 variables and remove cast.
143 * bfd-in2.h: Regenerate.
145 2019-09-05 Alan Modra <amodra@gmail.com>
147 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
148 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
149 in the GOT/PLT entry rather than affecting the offset to that
151 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
153 2019-09-05 Alan Modra <amodra@gmail.com>
155 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
156 in second instruction.
157 (ppc64_elf_relocate_section): Likewise.
159 2019-09-05 Alan Modra <amodra@gmail.com>
162 * libbfd-in.h (bfd_strdup): New inline function.
163 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
165 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
166 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
168 (bfd_openstreamr): Use bfd_strdup.
169 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
170 * plugin.c (try_load_plugin): Use bfd_malloc.
171 * libbfd.h: Regenerate.
173 2019-09-02 Alan Modra <amodra@gmail.com>
176 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
178 (read_alt_indirect_string): Likewise.
179 (read_alt_indirect_ref): Likewise.
181 2019-08-31 Jim Wilson <jimw@sifive.com>
184 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
185 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
187 2019-08-30 Jim Wilson <jimw@sifive.com>
189 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
190 error, call bfd_set_error, set ret to FALSE, and goto out label.
192 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
195 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
196 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
198 2019-08-29 Alan Modra <amodra@gmail.com>
201 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
202 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
203 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
206 2019-08-29 Alan Modra <amodra@gmail.com>
208 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
209 on second insn, return it in poff.
210 (ppc64_elf_relocate_section): Add offset to paddi addend for
213 2019-08-28 Jim Wilson <jimw@sifive.com>
215 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
216 section when setting max_alignment. Update comment.
217 (_bfd_riscv_relax_pc): Likewise.
219 2019-08-29 Alan Modra <amodra@gmail.com>
222 * bfd.c (struct bfd): Add no_element_cache.
223 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
224 archive cache when no_element_cache.
225 (bfd_generic_archive_p): Set no_element_cache when opening first
226 element to check format. Close first element too.
227 (do_slurp_bsd_armap): Don't zero ardata->cache here.
228 * bfd-in2.h: Regenerate.
230 2019-08-24 Alan Modra <amodra@gmail.com>
232 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
233 symbols from GOT optimisation.
235 2019-08-23 Stafford Horne <shorne@gmail.com>
237 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
240 2019-08-23 Nick Clifton <nickc@redhat.com>
243 * elf.c (bfd_section_from_shdr): Issue an informative warning
244 message and continue processing other sections after encountering
245 a reloc section for a section which already has other relocs
248 2019-08-23 Alan Modra <amodra@gmail.com>
251 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
252 on error without freeing plts[] contents.
254 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
256 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
258 2019-08-22 Nick Clifton <nickc@redhat.com>
261 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
262 reading data from extra records.
264 2019-08-22 Tamar Christina <tamar.christina@arm.com>
267 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
268 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
269 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
270 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
273 2019-08-22 Alan Modra <amodra@gmail.com>
275 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
276 instead recognize CMSE_PREFIX in symbol name.
277 (elf32_arm_gc_mark_extra_sections): Likewise.
278 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
279 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
281 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
283 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
284 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
286 2019-08-20 Tamar Christina <tamar.christina@arm.com>
288 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
289 elf32_arm_stub_long_branch_v4t_thumb_thumb,
290 elf32_arm_stub_long_branch_v4t_thumb_arm,
291 elf32_arm_stub_short_branch_v4t_thumb_arm,
292 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
293 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
294 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
295 previous instruction.
297 2019-08-19 Tom Tromey <tromey@adacore.com>
299 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
302 2019-08-19 Alan Modra <amodra@gmail.com>
304 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
306 (struct _ppc64_elf_section_data): Likewise.
307 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
308 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
309 than TOC loop. Check PLT16 insns too.
311 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
314 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
315 PC-relative relocations back to ...
316 (elf_x86_64_relocate_section): Here.
318 2019-08-16 Martin Liska <mliska@suse.cz>
321 * elflink.c: Report error only for not relocatable.
322 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
323 here lto_slim_object as it's handled in caller.
325 2019-08-16 Alan Modra <amodra@gmail.com>
327 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
329 2019-08-15 Jim Wilson <jimw@sifive.com>
331 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
332 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
333 to c.li instruction, and use ENCODE_RVC_IMM to set value.
335 2019-08-15 Tom Tromey <tromey@adacore.com>
337 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
340 2019-08-14 Alan Modra <amodra@gmail.com>
343 * dwarf2.c (stash_comp_unit): New function, extracted from..
344 (_bfd_dwarf2_find_nearest_line): ..here.
345 (find_abstract_instance): Parse comp units and decode line info
348 2019-08-14 Alan Modra <amodra@gmail.com>
350 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
351 (comp_unit_find_nearest_line): Use it here..
352 (_bfd_dwarf2_find_symbol_bias): ..and here.
354 2019-08-14 Alan Modra <amodra@gmail.com>
356 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
357 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
358 * coffgen.c (coff_find_nearest_line_with_names): Adjust
359 _bfd_dwarf2_find_nearest_line calls.
360 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
361 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
362 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
363 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
364 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
365 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
366 * libbfd.h: Regenerate.
368 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
370 * elf-bfd.h (struct elf_backend_data): New members.
371 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
372 .gnu.hash section if necessary.
373 (struct collect_gnu_hash_codes): New member.
374 (elf_gnu_hash_process_symidx): New function name.
375 (elf_renumber_gnu_hash_syms): Ignore local and undefined
376 symbols. Record xlat location for every symbol which should have
378 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
379 dynamic section if necessary.
380 (GNU_HASH_SECTION_NAME): New define.
381 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
382 Update the section size info.
383 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
384 (struct mips_elf_link_hash_entry): New member.
385 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
387 (mips_elf_sort_hash_table): Initialize the pointer to the
389 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
390 translation table entry with the symbol dynindx.
391 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
392 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
394 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
396 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
398 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
399 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
401 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
402 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
403 (_bfd_mips_post_process_headers): Mark the ABI version as
404 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
405 but not a .hash section.
406 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
407 position in the translation table, associated with the hash
409 * elfxx-mips.h (literal_reloc_p): Define
410 elf_backend_record_xhash_symbol backend hook.
411 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
414 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
416 * elf64-bpf.c (bpf_elf_relocate_section): New function.
417 (bpf_elf_insn_disp_reloc): Delete function.
418 (elf_backend_relocate_section): Define.
420 2019-08-07 Alan Modra <amodra@gmail.com>
423 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
424 for overflow in expressions involving nsymz.
426 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
428 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
429 two pages in relro presence.
431 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
433 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
434 (get_wsr_lbeg_opcode): New functions.
435 (check_loop_aligned): Detect relaxed loops and adjust loop_len
436 and insn_len for the first actual instruction of the loop.
438 2019-07-30 Alan Modra <amodra@gmail.com>
441 * bfd.c (struct bfd): Add lto_slim_object flag.
442 * bfd-in2.h: Regenerate.
444 2019-07-29 Martin Liska <mliska@suse.cz>
447 * archive.c (_bfd_compute_and_write_armap): Come up with
448 report_plugin_err variable.
449 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
450 * elf.c (struct lto_section): New.
451 (_bfd_elf_make_section_from_shdr): Parse content of
452 .gnu_lto_.lto section.
453 * elflink.c: Report error for a missing LTO plugin.
454 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
456 2019-07-28 Alan Modra <amodra@gmail.com>
460 * elflink.c (elf_link_add_object_symbols): Report an informative
461 error on finding local symbols with index equal or greater than
462 symbol table sh_info. Correct comment. Allow such symbols in
463 dynamic objects. Abort on NULL section for symbol.
465 2019-07-26 Alan Modra <amodra@gmail.com>
467 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
468 (elf_linker): Don't define.
469 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
471 2019-07-25 YunQiang Su <syq@debian.org>
474 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
477 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
479 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
481 (reloc_type_to_name): Fix formating.
482 (arc_elf_object_p): Likewise.
483 (debug_arc_reloc): Likewise.
484 (arc_do_relocation): Likewise.
486 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
488 * elf32-arc.c (bfd_get_32_me): New function.
489 (bfd_put_32_me): Likewise.
490 (arc_elf_relax_section): Likewise.
491 (bfd_elf32_bfd_relax_section): Define.
493 2019-07-24 Alan Modra <amodra@gmail.com>
495 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
496 elf_backend_final_write_processing, don't pass linker arg.
497 (_bfd_elf_final_write_processing): Update prototype.
498 * elf.c (_bfd_elf_write_object_contents): Adjust call.
499 (_bfd_elf_final_write_processing): Return error on incompatible
500 OSABI and has_gnu_osabi. Remove linker arg.
501 * elf-nacl.h (nacl_final_write_processing): Update prototype.
502 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
503 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
504 (_bfd_mips_elf_final_write_processing): Likewise.
505 * elf-hppa.h (elf_hppa_final_write_processing): Return status
506 and remove linker arg.
507 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
508 * elf-nacl.c (nacl_final_write_processing): Likewise.
509 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
510 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
511 * elf32-arm.c (arm_final_write_processing): Likewise.
512 (elf32_arm_final_write_processing): Likewise.
513 (elf32_arm_nacl_final_write_processing): Likewise.
514 (elf32_arm_vxworks_final_write_processing): Likewise.
515 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
516 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
517 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
518 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
519 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
520 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
521 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
522 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
523 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
524 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
525 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
526 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
527 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
528 * elf32-ppc.c (ppc_final_write_processing): Likewise.
529 (ppc_elf_final_write_processing): Likewise.
530 (ppc_elf_vxworks_final_write_processing): Likewise.
531 * elf32-sparc.c (sparc_final_write_processing): Likewise.
532 (elf32_sparc_final_write_processing): Likewise.
533 (elf32_sparc_vxworks_final_write_processing): Likewise.
534 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
535 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
536 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
537 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
538 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
539 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
540 (_bfd_mips_elf_final_write_processing): Likewise.
542 2019-07-24 Alan Modra <amodra@gmail.com>
544 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
546 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
547 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
549 2019-07-24 Alan Modra <amodra@gmail.com>
551 * elf32-visium.c (visium_elf_post_process_headers): Don't set
552 EI_OSABI header byte here.
555 2019-07-23 Alan Modra <amodra@gmail.com>
557 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
558 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
559 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
560 when elf_gnu_osabi_mbind is set.
561 (_bfd_elf_map_sections_to_segments): Likewise.
562 (_bfd_elf_init_private_section_data): Likewise.
563 (_bfd_elf_final_write_processing): Update comment.
564 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
565 (elf_backend_special_sections): Define without .tbss for linux.
567 2019-07-23 Alan Modra <amodra@gmail.com>
569 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
570 Remove none, any, all enums.
571 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
572 (_bfd_elf_final_write_processing): Declare.
573 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
574 elf_backend_final_write_processing.
575 (_bfd_elf_post_process_headers): Move body of function to..
576 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
577 only when not already set. Adjust for rename.
578 * elfxx-target.h (elf_backend_final_write_processing): Default to
579 _bfd_elf_final_write_processing.
580 * elf-hppa.h (elf_hppa_final_write_processing): Call
581 _bfd_elf_final_write_processing.
582 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
583 * elf-nacl.c (nacl_final_write_processing): Likewise.
584 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
585 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
586 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
587 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
588 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
589 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
590 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
591 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
592 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
593 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
594 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
595 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
596 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
597 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
598 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
599 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
600 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
601 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
602 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
603 * elf32-arm.c (arm_final_write_processing): Split out from..
604 (elf32_arm_final_write_processing): ..here. Call
605 _bfd_elf_final_write_processing.
606 (elf32_arm_nacl_final_write_processing): Adjust.
607 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
608 (_bfd_mips_elf_final_write_processing): ..here. Call
609 _bfd_elf_final_write_processing.
610 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
611 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
612 * elf32-ppc.c (ppc_final_write_processing): Split out from..
613 (ppc_elf_final_write_processing): ..here. Call
614 _bfd_elf_final_write_processing.
615 (ppc_elf_vxworks_final_write_processing): Adjust.
616 * elf32-sparc.c (sparc_final_write_processing): Split out from..
617 (elf32_sparc_final_write_processing): ..here. Call
618 _bfd_elf_final_write_processing.
619 (elf32_sparc_vxworks_final_write_processing): Adjust.
620 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
621 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
622 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
623 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
624 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
625 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
626 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
627 * elflink.c (elf_link_add_object_symbols): Likewise.
628 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
631 2019-07-23 Omar Majid <omajid@redhat.com>
633 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
634 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
635 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
637 * peXXigen.c: Add comment about source of .NET magic numbers.
639 2019-07-19 Alan Modra <amodra@gmail.com>
641 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
642 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
643 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
644 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
645 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
646 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
647 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
648 (ppc64_elf_check_relocs): Support pcrel tls relocs.
649 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
650 * bfd-in2.h: Regenerate.
651 * libbfd.h: Regenerate.
653 2019-07-18 Alan Modra <amodra@gmail.com>
655 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
656 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
659 2019-07-18 Alan Modra <amodra@gmail.com>
661 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
662 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
664 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
665 tls_type vars unsigned int.
666 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
667 to select r_type edit.
669 2019-07-18 Alan Modra <amodra@gmail.com>
671 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
673 * elf64-ppc.c (TLS_GDIE): Likewise.
675 2019-07-18 Alan Modra <amodra@gmail.com>
677 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
678 range of tp-relative offsets.
680 2019-07-15 Alan Modra <amodra@gmail.com>
682 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
683 alias is no longer bfd_link_hash_defined, clear the alias.
685 2019-07-13 Alan Modra <amodra@gmail.com>
687 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
689 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
690 (_bfd_elf_init_2_index_sections): Likewise.
691 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
692 relocations for local TLS symbols, use STN_UNDEF as the relocation
694 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
695 leave TLS symbol value in the addend.
697 2019-07-08 Alan Modra <amodra@gmail.com>
700 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
701 size before reading first word.
703 2019-07-02 Nick Clifton <nickc@redhat.com>
706 * elf.c (is_debuginfo_file): New function.
707 (assign_file_positions_for_non_load_sections): Do not warn about
708 allocated sections outside of loadable segments if they are found
710 * elf-bfd.h (is_debuginfo_file): Prototype.
712 2019-07-02 Nick Clifton <nickc@redhat.com>
715 * compress.c (bfd_get_full_section_contents): Do not complain
716 about linker created sections that are larger than the file size.
718 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
720 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
721 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
723 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
725 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
727 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
728 sections when .text section contain secure entry functions
731 2019-07-01 Nick Clifton <nickc@redhat.com>
734 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
735 section VMA in the offset used to update exidx relocs.
737 2019-06-28 Nick Clifton <nickc@redhat.com>
740 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
741 large version reference section.
742 * compress.c (bfd_get_full_section_contents): Check for an
743 uncompressed section whose size is larger than the file size.
745 2019-06-28 Alan Modra <amodra@gmail.com>
747 * format.c (bfd_check_format_matches): Don't match plugin target
748 if another target matches. Expand comment.
749 * targets.c (_bfd_target_vector): Move plugin_vec after all other
750 non-corefile targets, outside !SELECT_VECS.
751 * config.bfd: Don't handle targ=plugin here.
752 * configure.ac: Don't add plugin to enable_targets or handle in
753 target loop setting selvecs and other target vars.
754 * configure: Regenerate.
756 2019-06-26 Nick Clifton <nickc@redhat.com>
759 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
760 messages for failures.
761 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
762 if returning an error value.
764 2019-06-25 Jan Beulich <jbeulich@suse.com>
766 * elf-properties.c (elf_find_and_remove_property): Rename last
767 parameter. Mention it in comment.
769 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
771 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
772 SEC_MERGE or SEC_CODE flags are set.
773 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
774 symtype consistently. Don't include sec_addr (sym_sec) in symval.
775 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
776 Add sec_addr (sym_sec) after handling merge sections.
778 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
781 * elf-properties.c (elf_merge_gnu_property_list): Remove the
782 property after reporting property removal.
784 2019-06-23 Alan Modra <amodra@gmail.com>
787 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
788 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
789 Reduce range of offsets allowed for other GOT relocs.
791 2019-06-23 Alan Modra <amodra@gmail.com>
794 * elfcode.h (elf_object_p): Warning fix.
796 2019-06-21 Alan Modra <amodra@gmail.com>
799 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
801 2019-06-19 Alan Modra <amodra@gmail.com>
804 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
805 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
807 2019-06-19 Alan Modra <amodra@gmail.com>
809 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
810 functions that require r2 valid to use local entry.
811 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
813 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
815 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
816 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
817 with elfNN_aarch64_allocate_local_dynrelocs.
819 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
821 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
823 2019-06-14 Alan Modra <amodra@gmail.com>
825 * Makefile.in: Regenerate.
826 * configure: Regenerate.
828 2019-06-14 Alan Modra <amodra@gmail.com>
830 * elf64-ppc.c: Fix comments involving paddi.
832 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
835 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
836 absent, or the bfd is not in the ELF formart.
837 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
839 2019-06-10 Christos Zoulas <christos@zoulas.com>
842 * elf.c (elfcore_make_auxv_note_section): New function.
843 (elfcore_grok_note): Use it.
844 (elfcore_grok_freebsd_note): Likewise.
845 (elfcore_grok_openbsd_note): Likewise.
846 (elfcore_grok_netbsd_note): Likewise. Plus add support for
847 NT_NETBSDCORE_AUXV notes.
849 2019-06-06 Sudakshina Das <sudi.das@arm.com>
851 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
852 alignment of the new gnu property section.
854 2019-06-06 Sudakshina Das <sudi.das@arm.com>
856 * bfd-in.h: Change comment.
857 * bfd-in2.h: Regenerate.
858 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
859 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
862 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
864 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
865 Remove overflow check.
867 2019-05-28 Alan Modra <amodra@gmail.com>
870 * cofflink.c (coff_link_check_archive_element): Don't assume
871 element is a coff object file after calling add_archive_element.
873 2019-05-28 Alan Modra <amodra@gmail.com>
876 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
877 attempt to set sh_entsize for excluded PLT section.
879 2019-05-28 Alan Modra <amodra@gmail.com>
882 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
883 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
884 allocated in alpha_dynamic_entries_for_reloc.
886 2019-05-28 Alan Modra <amodra@gmail.com>
889 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
890 on NULL output_section.
891 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
893 2019-05-28 Alan Modra <amodra@gmail.com>
896 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
897 entry when MUST_FIND. Abort when MUST_FIND not found.
898 (elf_m68k_get_bfd2got_entry): Likewise.
899 (elf_m68k_relocate_section): Remove now useless assert.
901 2019-05-28 Alan Modra <amodra@gmail.com>
904 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
905 from bfd_link_info, not an output section owner.
906 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
907 (elf_hppa_final_link_relocate): Likewise.
909 2019-05-28 Alan Modra <amodra@gmail.com>
912 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
913 create_object_symbols_section, obj_textsec, obj_datasec or
914 obj_bsssec. Fix other errors in placement.
915 * config.bfd: Obsolete tic30-aout.
917 2019-05-28 Alan Modra <amodra@gmail.com>
920 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
921 end of section list as well as section_count.
922 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
923 section list before returning error.
925 2019-05-27 Alan Modra <amodra@gmail.com>
927 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
929 2019-05-27 Alan Modra <amodra@gmail.com>
932 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
934 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
936 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
937 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
938 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
939 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
940 (elf_backend_merge_symbol_attribute): Define.
942 2019-05-24 Alan Modra <amodra@gmail.com>
944 * po/SRC-POTFILES.in: Regenerate.
946 2019-05-24 Alan Modra <amodra@gmail.com>
948 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
949 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
950 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
951 (struct ppc_link_hash_table): Add powerxx_stubs.
952 (ppc64_elf_check_relocs): Set powerxx_stubs.
953 (build_powerxx_offset, size_powerxx_offset),
954 (num_relocs_for_powerxx_offset),
955 (emit_relocs_for_powerxx_offset): New functions.
956 (plt_stub_size): Size powerxx stubs.
957 (ppc_build_one_stub): Emit powerxx stubs.
958 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
961 2019-05-24 Alan Modra <amodra@gmail.com>
963 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
965 (xlate_pcrel_opt): New function.
966 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
967 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
968 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
970 2019-05-24 Alan Modra <amodra@gmail.com>
972 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
973 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
974 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
975 (BFD_RELOC_PPC64_PLT_PCREL34),
976 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
977 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
978 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
979 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
980 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
981 * elf64-ppc.c (PNOP): Define.
982 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
983 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
984 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
986 (ppc64_elf_prefix_reloc): New function.
987 (struct ppc_link_hash_table): Add notoc_plt.
988 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
989 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
990 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
991 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
992 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
993 possible need for dynamic relocs on non-pcrel powerxx relocs.
994 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
995 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
996 (toc_adjusting_stub_needed): Likewise.
997 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
998 (ppc64_elf_relocate_section): Handle new powerxx relocs.
999 * bfd-in2.h: Regenerate.
1000 * libbfd.h: Regenerate.
1002 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1004 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1005 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1007 * configure: Regenerate.
1009 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1011 * configure: Regenerated.
1012 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1013 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1014 (BFD64_BACKENDS): Add elf64-bpf.lo.
1015 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1016 * Makefile.in (SOURCE_HFILES): Regenerate.
1017 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1018 * cpu-bpf.c: New file.
1019 * elf64-bpf.c: Likewise.
1020 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1022 * archures.c: Define architecture bfd_arch_bpf and machine
1024 * reloc.c: Define BFD relocations used by the BPF target.
1025 * bfd-in2.h: Regenerated.
1026 * libbfd.h: Likewise.
1028 2019-05-22 Alan Modra <amodra@gmail.com>
1030 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1033 2019-05-22 Alan Modra <amodra@gmail.com>
1035 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1036 processing on "size error in section".
1038 2019-05-22 Alan Modra <amodra@gmail.com>
1040 * som.c (som_bfd_free_cached_info): Call
1041 _bfd_generic_close_and_cleanup.
1043 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1045 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1046 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1048 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1050 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1051 checks. Search the RELA table for n64 relocations.
1053 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1054 Faraz Shahbazker <fshahbazker@wavecomp.com>
1056 * elfxx-mips.c (LA25_BC): New macro.
1057 (mips_elf_link_hash_table)<compact_branches>: New field.
1058 (STUB_JALRC): New macro.
1059 (mipsr6_o32_exec_plt0_entry_compact): New array.
1060 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1061 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1062 (mipsr6_exec_plt_entry_compact): Likewise.
1063 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1064 when compact_branches is true.
1065 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1066 PLT for MIPSR6 with compact_branches. Do not reorder the
1067 compact branches PLT. Switch the lazy stub for MIPSR6
1068 with compact_branches to use JALRC.
1069 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1070 when compact_branches is true.
1071 (_bfd_mips_elf_compact_branches): New function.
1072 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1074 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1077 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1078 Fix print formatter.
1080 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1083 * elf32-arm.c (get_value_helper): Remove.
1084 (elf32_arm_final_link_relocate): Fix branch future relocations.
1086 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1089 * bfd-in.h (enum erratum_84319_opts): New
1090 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1091 int to enum erratum_84319_opts.
1092 * bfd-in2.h: Regenerate.
1093 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1094 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1095 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1096 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1097 (_bfd_aarch64_resize_stubs): Amend comment.
1098 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1100 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1101 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1103 (clear_erratum_843419_entry): Update erratum conditional.
1105 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1108 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1109 when computing distance_short_enough.
1111 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1114 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1115 Wrap around even if distance equals avr_pc_wrap_around.
1117 2019-05-20 Nick Clifton <nickc@redhat.com>
1119 * po/fr.po: Updated French translation.
1121 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1123 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1125 2019-05-16 Alan Modra <amodra@gmail.com>
1127 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1129 2019-05-15 Alan Modra <amodra@gmail.com>
1131 * elf32-arm.c (elf32_arm_write_section): Don't leave
1132 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1133 unitialised section contents.
1135 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1138 * verilog.c: (VerilogDataWidth): New variable.
1139 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1141 2019-05-08 Nick Clifton <nickc@redhat.com>
1144 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1145 rather than FALSE if encountering a non-ELF file.
1147 2019-05-06 Alan Modra <amodra@gmail.com>
1149 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1151 2019-05-06 Alan Modra <amodra@gmail.com>
1153 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1154 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1155 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1156 * libbfd.h: Regenerate.
1157 * bfd-in2.h: Regenerate.
1159 2019-05-04 Alan Modra <amodra@gmail.com>
1162 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1163 following the standard section names.
1164 (bfd_decode_symclass): Prioritize section flag tests in
1165 decode_section_type before name tests in coff_section_type.
1166 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1167 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1168 their names and choose standard .text section flags for
1171 2019-05-02 Nick Clifton <nickc@redhat.com>
1174 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1175 .gnu.debugaltlink sections as debugging sections.
1177 2019-04-30 Alan Modra <amodra@gmail.com>
1179 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1180 (struct _ppc64_elf_section_data): Likewise.
1181 (ppc64_elf_check_relocs): Set above fields.
1182 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1183 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1186 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1189 * elflink.c (elf_link_output_extsym): Don't complain undefined
1190 weak dynamic reference.
1192 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1194 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1195 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1196 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1197 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1198 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1199 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1200 (elfNN_aarch64_small_plt0_bti_entry): Update.
1201 (elfNN_aarch64_small_plt_bti_entry): Update.
1202 (elfNN_aarch64_small_plt_pac_entry): Update.
1203 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1204 (setup_plt_values): Setup new entries.
1205 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1206 (elfNN_aarch64_plt_sym_val): Likewise.
1208 2019-04-22 Jim Wilson <jimw@sifive.com>
1210 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1212 2019-04-19 Alan Modra <amodra@gmail.com>
1214 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1216 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1218 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1219 building shared object.
1220 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1222 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1225 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1228 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1230 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1232 * bfd-in2.h: Regenerate.
1233 * libbfd.h: Likewise.
1235 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1237 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1238 * bfd-in2.h: Regenerated.
1239 * libbfd.h: Regenerated.
1241 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1243 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1244 * bfd-in2.h: Regenerated.
1245 * libbfd.h: Likewise.
1247 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1249 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1250 * bfd-in2.h: Regenerated.
1251 * libbfd.h: Regenerated.
1252 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1253 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1254 and R_ARM_THM_BF12 together.
1255 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1257 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1259 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1260 * libbfd.h: Regenerated.
1261 * bfd-in2.h: Regenerated.
1262 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1263 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1264 and R_ARM_THM_BF18 together.
1265 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1267 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1269 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1270 * bfd-in2.h: Regenerated.
1271 * libbfd.h: Regenerated.
1272 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1273 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1274 and R_ARM_THM_BF16 together.
1275 (get_value_helper): New reloc helper.
1276 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1278 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1280 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1281 * bfd-in2.h: Regenerate.
1282 * libbfd.h: Regenerate.
1284 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1286 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1287 * bfd-in2.h: Regenerate.
1288 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1289 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1291 (using_thumb2): Likewise.
1292 (using_thumb2_bl): Update assert.
1293 (arch_has_arm_nop): Likewise.
1294 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1295 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1297 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1299 * elf-linker-x86.h (elf_x86_cet_report): New.
1300 (elf_linker_x86_params): Add cet_report.
1301 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1302 missing IBT and SHSTK properties if needed.
1304 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1307 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1308 "h != NULL". Don't check "h != NULL" before calling.
1309 bfd_elf_gc_record_vtentry.
1310 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1311 * elf32-bfin.c (bfin_check_relocs): Likewise.
1312 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1313 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1314 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1315 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1316 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1317 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1318 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1319 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1320 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1321 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1322 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1323 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1324 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1325 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1326 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1327 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1328 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1329 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1330 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1331 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1332 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1333 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1334 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1335 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1336 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1337 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1338 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1339 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1340 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1343 2019-04-11 Alan Modra <amodra@gmail.com>
1346 * elflink.c (elf_link_add_object_symbols): Don't read partial
1347 dynamic entries from fuzzed objects.
1349 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1352 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1353 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1354 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1356 2019-04-10 Michael Forney <mforney@mforney.org>
1359 * doc/chew.c (free_words): Correctly free "push_text" strings.
1361 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1363 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1365 2019-04-08 Alan Modra <amodra@gmail.com>
1367 * configure.ac (elfxx_x86): Define and use.
1368 * configure: Regenerate.
1370 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1372 * elf-linker-x86.h: New file.
1373 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1374 to get x86-specific linker options.
1375 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1376 (elf_x86_64_check_relocs): Likewise.
1377 (elf_x86_64_relocate_section): Likewise.
1378 (elf_x86_64_link_setup_gnu_properties): Likewise.
1379 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1380 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1381 (_bfd_elf_linker_x86_set_options): New function.
1382 * elfxx-x86.h: Include "elf-linker-x86.h".
1383 (elf_x86_link_hash_table): Add params.
1385 2019-04-03 Alan Modra <amodra@gmail.com>
1387 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1388 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1389 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1390 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1391 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1392 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1394 2019-04-02 Jim Wilson <jimw@sifive.com>
1397 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1398 ELF header flags to after check for ELF object file. Loop through
1399 sections looking for code sections, if none, then skip ABI checks.
1401 2019-03-30 Andrew Waterman <andrew@sifive.com>
1403 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1406 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1408 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1409 info->export_dynamic to the conditional.
1411 2019-03-28 Alan Modra <amodra@gmail.com>
1414 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1415 * configure: Regenerate.
1416 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1417 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1418 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1419 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1420 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1422 2019-03-21 Jim Wilson <jimw@sifive.com>
1425 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1426 verify sym non-NULL before using. Add identical check using h.
1428 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1430 * elf-bfd.h (struct elf_backend_data): Add argument to
1431 merge_gnu_properties.
1432 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1433 itself and while calling bed->merge_gnu_properties.
1434 (elf_merge_gnu_property_list): Update the calls for
1435 elf_merge_gnu_properties.
1436 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1437 of --force-bti warning and add argument.
1438 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1440 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1441 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1444 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1446 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1447 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1448 (elf_backend_fixup_gnu_properties): Define for AArch64.
1450 2019-03-18 Alan Modra <amodra@gmail.com>
1453 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1454 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1455 attempt at writing glink stubs only once.
1457 2019-03-16 Alan Modra <amodra@gmail.com>
1460 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1461 (_bfd_elf_rel_local_sym): Likewise.
1462 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1463 section of symbols with unrecognized shndx.
1465 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1468 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1470 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1471 in discarded section.
1473 2019-03-15 Alan Modra <amodra@gmail.com>
1476 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1477 symbol after globals if elf_bad_symtab is not set.
1479 2019-03-15 Alan Modra <amodra@gmail.com>
1482 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1483 (_bfd_elf_rel_local_sym): Likewise.
1485 2019-03-15 Alan Modra <amodra@gmail.com>
1488 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1489 object files with sh_size not a multiple of sh_entsize.
1491 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1494 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1495 input with bad relocation.
1497 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1499 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1501 2019-03-14 Nick Clifton <nickc@redhat.com>
1504 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1505 (save_section_vma): Initialise field to the number of entries in
1507 (section_vma_same): Check that the number of entries in the
1508 sec_vma table matches the number of sections in the bfd.
1510 2019-03-14 Nick Clifton <nickc@redhat.com>
1513 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1514 section owner pointer when adding the default symbol.
1516 2019-03-14 Nick Clifton <nickc@redhat.com>
1519 * elflink.c (elf_link_add_object_symbols): Add new local variable
1520 extversym_end. Initialise it to point to the end of the version
1521 symbol table, if present. Check it when initialising and updating
1524 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1526 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1527 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1528 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1529 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1531 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1532 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1533 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1535 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1536 Szabolcs Nagy <szabolcs.nagy@arm.com>
1538 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1539 (aarch64_bti_pac_info): New.
1540 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1541 (bfd_elf32_aarch64_set_options): Likewise.
1542 * bfd-in2.h: Regenerate
1543 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1544 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1545 (elfNN_aarch64_small_plt0_bti_entry): New.
1546 (elfNN_aarch64_small_plt_bti_entry): New.
1547 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1548 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1549 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1550 tlsdesc_plt_entry_size fields.
1551 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1552 (setup_plt_values): New helper function.
1553 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1555 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1557 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1558 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1559 to plt stubs instead of fixed ones and update filling them according
1560 to the need for bti.
1561 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1562 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1563 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1564 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1565 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1567 (bfd_elfNN_get_synthetic_symtab): Define.
1568 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1569 and mising BTI NOTE SECTION.
1572 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1574 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1575 linker created inputs from merge.
1576 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1577 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1578 (elfNN_aarch64_link_setup_gnu_properties): New.
1579 (elfNN_aarch64_merge_gnu_properties): New.
1580 (elf_backend_setup_gnu_properties): Define for AArch64.
1581 (elf_backend_merge_gnu_properties): Likewise.
1582 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1583 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1584 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1585 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1586 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1587 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1588 (elf_backend_parse_gnu_properties): Define for AArch64.
1590 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1593 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1594 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1596 2019-03-12 Alan Modra <amodra@gmail.com>
1598 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1599 nmemb parameter. Use bfd_alloc2.
1600 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1602 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1603 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1604 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1606 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1607 (assign_section_numbers): Style fix.
1608 (swap_out_syms): Use bfd_malloc2.
1609 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1611 (_bfd_elf_make_empty_symbol): Style fix.
1612 (elfobj_grok_stapsdt_note_1): Formatting.
1613 * elfcode.h (elf_object_p): Use bfd_alloc2.
1614 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1615 (elf_slurp_symbol_table): Use bfd_zalloc2.
1616 (elf_slurp_reloc_table): Use bfd_alloc2.
1617 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1618 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1619 size calculation doesn't overflow.
1620 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1621 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1622 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1624 2019-03-08 Alan Modra <amodra@gmail.com>
1627 * merge.c (merge_strings): Return secinfo. Don't pad section
1629 (_bfd_merge_sections): Pad section to alignment here, if input
1630 sections contributing to merged output all pad to alignment.
1633 2019-03-06 Nick Clifton <nickc@redhat.com>
1635 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1637 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1638 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1640 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1642 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1643 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1646 * elf32-s390.c (allocate_dynrelocs): Update comment.
1648 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1650 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1652 2019-02-28 Nick Clifton <nickc@redhat.com>
1655 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1656 section that is not NUL terminated.
1658 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1661 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1662 by linker when checking copy reloc on protected symbol.
1664 2019-02-24 Alan Modra <amodra@gmail.com>
1667 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1669 2019-02-20 Eric Tsai <erictsai@cadence.com>
1671 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1672 sections between the call site and call destination and adjust
1673 call distance by the largest alignment.
1675 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1677 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1678 * elf.c (elfcore_grok_aarch_pauth): New function.
1679 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1680 (elfcore_write_aarch_pauth): New function.
1681 (elfcore_write_register_note): Check for AArch64 pauth section.
1683 2019-02-20 Alan Modra <amodra@gmail.com>
1686 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1689 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1691 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1692 Darwin hosts, not just or1k.
1693 * configure: Regenerate.
1695 2019-02-20 Alan Modra <amodra@gmail.com>
1698 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1699 sentinel NUL to string buffer nearer to loop where it is used.
1700 Don't go past sentinel when scanning strings, and don't write
1702 * archive.c (do_slurp_coff_armap): Simplify string handling to
1705 2019-02-19 Alan Modra <amodra@gmail.com>
1708 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1709 attempting to prevent read past end of section.
1711 2019-02-18 Alan Modra <amodra@gmail.com>
1714 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1715 PRIx64 to generate warning messages. Print local sym names too.
1717 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1719 * elf32-arc (INIT_SYM_STRING): Delete.
1720 (FINI_SYM_STRING): Likewise.
1721 (init_str): Likewise.
1722 (fini_str): Likewise.
1724 2019-02-08 Alan Modra <amodra@gmail.com>
1726 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1727 for bss-plt" warning to make it an error.
1729 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1732 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1733 reloc_class_ifunc for ifunc symbols.
1734 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1736 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1738 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1739 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1741 2019-02-07 Nick Clifton <nickc@redhat.com>
1743 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1744 into the definitely obsolete list.
1746 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1749 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1750 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1751 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1753 (elf_x86_64_check_relocs): Here.
1754 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1755 to check if a symbol is defined in a non-shared object.
1756 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1758 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1760 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1761 of 'labs' (and fix GCC warning).
1763 2019-01-25 Nick Clifton <nickc@redhat.com>
1765 * po/ru.po: Updated Russian translation.
1767 2019-01-23 Nick Clifton <nickc@redhat.com>
1769 * po/fr.po: Updated French translation.
1771 2019-01-21 Nick Clifton <nickc@redhat.com>
1773 * po/pt.po: Updated Portuguese translation.
1774 * po/uk.po: Updated Ukranian translation.
1776 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1779 * elf32-nds32.c (nds32_relocate_section): Add space between words
1781 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1783 (riscv_i_or_e_p): Likewise.
1784 (riscv_merge_arch_attr_info): Likewise.
1786 2019-01-19 Nick Clifton <nickc@redhat.com>
1788 * version.m4: Reset to 2.32.51
1789 * configure: Regenerate.
1790 * po/bfd.pot: Regenerate.
1792 2018-06-24 Nick Clifton <nickc@redhat.com>
1794 2.32 branch created.
1796 2019-01-16 Kito Cheng <kito@andestech.com>
1798 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1801 2019-01-16 Kito Cheng <kito@andestech.com>
1802 Nelson Chu <nelson@andestech.com>
1804 * elfnn-riscv.c (in_subsets): New.
1805 (out_subsets): Likewise.
1806 (merged_subsets): Likewise.
1807 (riscv_std_ext_p): Likewise.
1808 (riscv_non_std_ext_p): Likewise.
1809 (riscv_std_sv_ext_p): Likewise.
1810 (riscv_non_std_sv_ext_p): Likewise.
1811 (riscv_version_mismatch): Likewise.
1812 (riscv_i_or_e_p): Likewise.
1813 (riscv_merge_std_ext): Likewise.
1814 (riscv_merge_non_std_and_sv_ext): Likewise.
1815 (riscv_merge_arch_attr_info): Likewise.
1816 (riscv_merge_attributes): Likewise.
1817 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1819 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1820 (elf_backend_obj_attrs_vendor): Define.
1821 (elf_backend_obj_attrs_section_type): Likewise.
1822 (elf_backend_obj_attrs_section): Likewise.
1823 (elf_backend_obj_attrs_arg_type): Define as
1824 riscv_elf_obj_attrs_arg_type.
1825 * elfxx-riscv.c (riscv_estimate_digit): New.
1826 (riscv_estimate_arch_strlen1): Likewise.
1827 (riscv_estimate_arch_strlen): Likewise.
1828 (riscv_arch_str1): Likewise.
1829 (riscv_arch_str): Likewise.
1830 * elfxx-riscv.h (riscv_arch_str): Declare.
1832 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1834 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1836 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1837 source field. (md_apply_fix): Apply final fix
1838 to BFD_RELOC_S12Z_OPR.
1839 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1841 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1844 * elf32-s390.c (allocate_dynrelocs): Update comment.
1846 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1848 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1849 * configure: Regenerate.
1851 2019-01-08 Alan Modra <amodra@gmail.com>
1855 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1858 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1860 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1861 * bfd/bfd-in2.h: Regenerate.
1862 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1863 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1865 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1867 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1868 default target, little endian target is more suitable.
1870 2019-01-04 Alan Modra <amodra@gmail.com>
1874 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1876 (EQ_VALUE_IN_FIELD): Likewise.
1877 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1879 2019-01-01 Alan Modra <amodra@gmail.com>
1881 Update year range in copyright notice of all files.
1883 For older changes see ChangeLog-2018
1885 Copyright (C) 2019 Free Software Foundation, Inc.
1887 Copying and distribution of this file, with or without modification,
1888 are permitted in any medium without royalty provided the copyright
1889 notice and this notice are preserved.
1895 version-control: never