1 2019-09-18 Alan Modra <amodra@gmail.com>
3 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
4 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
5 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
6 needs_copy even if all relocs are in rw sections.
7 (dec_dynrel_count): Handle TOC16 relocs.
8 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
9 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
12 2019-09-16 Phil Blundell <pb@pbcl.net>
14 * version.m4: Set version to 2.33.50.
15 * Makefile.in, configure, doc/Makefile.in: Regenerated.
17 2019-09-11 Tom Tromey <tom@tromey.com>
19 * opncls.c (bfd_set_filename): New function.
20 * bfd-in2.h: Regenerate.
22 2019-09-11 Alan Modra <amodra@gmail.com>
24 * targets.c (struct bfd_target): Add _bfd_group_name.
25 (BFD_JUMP_TABLE): Likewise.
26 * coffgen.c (bfd_coff_group_name): New function.
27 * elf.c (bfd_elf_group_name): New function.
28 * linker.c (_bfd_nolink_bfd_group_name): New function.
29 * section.c (bfd_generic_group_name): New function.
30 * elf-bfd.h (bfd_elf_group_name): Declare.
31 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
32 * libcoff-in.h (bfd_coff_group_name): Declare.
33 * aout-target.h (MY_bfd_group_name): Define.
34 * aout-tic30.c (MY_bfd_group_name): Define.
35 * bfd.c (bfd_group_name): Define.
36 * binary.c (binary_bfd_group_name): Define.
37 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
38 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
39 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
40 * coffcode.h (coff_bfd_group_name): Define.
41 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
42 * i386msdos.c (msdos_bfd_group_name): Define.
43 * ihex.c (ihex_bfd_group_name): Define.
44 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
45 * mmo.c (mmo_bfd_group_name): Define.
46 * pef.c (bfd_pef_bfd_group_name): Define.
47 * plugin.c (bfd_plugin_bfd_group_name): Define.
48 * ppcboot.c (ppcboot_bfd_group_name): Define.
49 * som.c (som_bfd_group_name): Define.
50 * srec.c (srec_bfd_group_name): Define.
51 * tekhex.c (tekhex_bfd_group_name): Define.
52 * verilog.c (verilog_bfd_group_name): Define.
53 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
54 * xsym.c (bfd_sym_bfd_group_name): Define.
55 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
56 (rs6000_xcoff64_aix_vec): Likewise.
57 * bfd-in2.h: Regenerate.
58 * libbfd.h: Regenerate.
59 * libcoff.h: Regenerate.
61 2019-09-10 Nick Clifton <nickc@redhat.com>
64 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
66 (bfd_default_arch_struct): Initialise the new field.
67 * bfd-in2.h: Regenerate.
68 * cpu-aarch64.c: Initialise the new field.
69 * cpu-alpha.c: Likewise.
70 * cpu-arc.c: Likewise.
71 * cpu-arm.c: Likewise.
72 * cpu-avr.c: Likewise.
73 * cpu-bfin.c: Likewise.
74 * cpu-bpf.c: Likewise.
75 * cpu-cr16.c: Likewise.
76 * cpu-cr16c.c: Likewise.
77 * cpu-cris.c: Likewise.
78 * cpu-crx.c: Likewise.
79 * cpu-csky.c: Likewise.
80 * cpu-d10v.c: Likewise.
81 * cpu-d30v.c: Likewise.
82 * cpu-dlx.c: Likewise.
83 * cpu-epiphany.c: Likewise.
84 * cpu-fr30.c: Likewise.
85 * cpu-frv.c: Likewise.
86 * cpu-ft32.c: Likewise.
87 * cpu-h8300.c: Likewise.
88 * cpu-hppa.c: Likewise.
89 * cpu-i386.c: Likewise.
90 * cpu-ia64.c: Likewise.
91 * cpu-iamcu.c: Likewise.
92 * cpu-ip2k.c: Likewise.
93 * cpu-iq2000.c: Likewise.
94 * cpu-k1om.c: Likewise.
95 * cpu-l1om.c: Likewise.
96 * cpu-lm32.c: Likewise.
97 * cpu-m10200.c: Likewise.
98 * cpu-m10300.c: Likewise.
99 * cpu-m32c.c: Likewise.
100 * cpu-m32r.c: Likewise.
101 * cpu-m68hc11.c: Likewise.
102 * cpu-m68hc12.c: Likewise.
103 * cpu-m68k.c: Likewise.
104 * cpu-m9s12x.c: Likewise.
105 * cpu-m9s12xg.c: Likewise.
106 * cpu-mcore.c: Likewise.
107 * cpu-mep.c: Likewise.
108 * cpu-metag.c: Likewise.
109 * cpu-microblaze.c: Likewise.
110 * cpu-mips.c: Likewise.
111 * cpu-mmix.c: Likewise.
112 * cpu-moxie.c: Likewise.
113 * cpu-msp430.c: Likewise.
114 * cpu-mt.c: Likewise.
115 * cpu-nds32.c: Likewise.
116 * cpu-nfp.c: Likewise.
117 * cpu-nios2.c: Likewise.
118 * cpu-ns32k.c: Likewise.
119 * cpu-or1k.c: Likewise.
120 * cpu-pdp11.c: Likewise.
121 * cpu-pj.c: Likewise.
122 * cpu-plugin.c: Likewise.
123 * cpu-powerpc.c: Likewise.
124 * cpu-pru.c: Likewise.
125 * cpu-riscv.c: Likewise.
126 * cpu-rl78.c: Likewise.
127 * cpu-rs6000.c: Likewise.
128 * cpu-rx.c: Likewise.
129 * cpu-s12z.c: Likewise.
130 * cpu-s390.c: Likewise.
131 * cpu-score.c: Likewise.
132 * cpu-sh.c: Likewise.
133 * cpu-sparc.c: Likewise.
134 * cpu-spu.c: Likewise.
135 * cpu-tic30.c: Likewise.
136 * cpu-tic4x.c: Likewise.
137 * cpu-tic54x.c: Likewise.
138 * cpu-tic6x.c: Likewise.
139 * cpu-tic80.c: Likewise.
140 * cpu-tilegx.c: Likewise.
141 * cpu-tilepro.c: Likewise.
142 * cpu-v850.c: Likewise.
143 * cpu-v850_rh850.c: Likewise.
144 * cpu-vax.c: Likewise.
145 * cpu-visium.c: Likewise.
146 * cpu-wasm32.c: Likewise.
147 * cpu-xc16x.c: Likewise.
148 * cpu-xgate.c: Likewise.
149 * cpu-xstormy16.c: Likewise.
150 * cpu-xtensa.c: Likewise.
151 * cpu-z80.c: Likewise.
152 * cpu-z8k.c: Likewise.
154 2019-09-09 Phil Blundell <pb@pbcl.net>
156 binutils 2.33 branch created.
158 2019-09-06 Alan Modra <amodra@gmail.com>
160 * aout-target.h (object_p): Formatting.
161 * bfd-in.h (bfd_get_filename): Don't cast to char*.
162 * corefile.c (generic_core_file_matches_executable_p): Constify
163 variables and remove cast.
164 * bfd-in2.h: Regenerate.
166 2019-09-05 Alan Modra <amodra@gmail.com>
168 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
169 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
170 in the GOT/PLT entry rather than affecting the offset to that
172 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
174 2019-09-05 Alan Modra <amodra@gmail.com>
176 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
177 in second instruction.
178 (ppc64_elf_relocate_section): Likewise.
180 2019-09-05 Alan Modra <amodra@gmail.com>
183 * libbfd-in.h (bfd_strdup): New inline function.
184 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
186 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
187 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
189 (bfd_openstreamr): Use bfd_strdup.
190 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
191 * plugin.c (try_load_plugin): Use bfd_malloc.
192 * libbfd.h: Regenerate.
194 2019-09-02 Alan Modra <amodra@gmail.com>
197 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
199 (read_alt_indirect_string): Likewise.
200 (read_alt_indirect_ref): Likewise.
202 2019-08-31 Jim Wilson <jimw@sifive.com>
205 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
206 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
208 2019-08-30 Jim Wilson <jimw@sifive.com>
210 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
211 error, call bfd_set_error, set ret to FALSE, and goto out label.
213 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
216 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
217 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
219 2019-08-29 Alan Modra <amodra@gmail.com>
222 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
223 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
224 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
227 2019-08-29 Alan Modra <amodra@gmail.com>
229 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
230 on second insn, return it in poff.
231 (ppc64_elf_relocate_section): Add offset to paddi addend for
234 2019-08-28 Jim Wilson <jimw@sifive.com>
236 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
237 section when setting max_alignment. Update comment.
238 (_bfd_riscv_relax_pc): Likewise.
240 2019-08-29 Alan Modra <amodra@gmail.com>
243 * bfd.c (struct bfd): Add no_element_cache.
244 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
245 archive cache when no_element_cache.
246 (bfd_generic_archive_p): Set no_element_cache when opening first
247 element to check format. Close first element too.
248 (do_slurp_bsd_armap): Don't zero ardata->cache here.
249 * bfd-in2.h: Regenerate.
251 2019-08-24 Alan Modra <amodra@gmail.com>
253 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
254 symbols from GOT optimisation.
256 2019-08-23 Stafford Horne <shorne@gmail.com>
258 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
261 2019-08-23 Nick Clifton <nickc@redhat.com>
264 * elf.c (bfd_section_from_shdr): Issue an informative warning
265 message and continue processing other sections after encountering
266 a reloc section for a section which already has other relocs
269 2019-08-23 Alan Modra <amodra@gmail.com>
272 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
273 on error without freeing plts[] contents.
275 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
277 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
279 2019-08-22 Nick Clifton <nickc@redhat.com>
282 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
283 reading data from extra records.
285 2019-08-22 Tamar Christina <tamar.christina@arm.com>
288 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
289 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
290 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
291 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
294 2019-08-22 Alan Modra <amodra@gmail.com>
296 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
297 instead recognize CMSE_PREFIX in symbol name.
298 (elf32_arm_gc_mark_extra_sections): Likewise.
299 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
300 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
302 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
304 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
305 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
307 2019-08-20 Tamar Christina <tamar.christina@arm.com>
309 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
310 elf32_arm_stub_long_branch_v4t_thumb_thumb,
311 elf32_arm_stub_long_branch_v4t_thumb_arm,
312 elf32_arm_stub_short_branch_v4t_thumb_arm,
313 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
314 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
315 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
316 previous instruction.
318 2019-08-19 Tom Tromey <tromey@adacore.com>
320 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
323 2019-08-19 Alan Modra <amodra@gmail.com>
325 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
327 (struct _ppc64_elf_section_data): Likewise.
328 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
329 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
330 than TOC loop. Check PLT16 insns too.
332 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
335 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
336 PC-relative relocations back to ...
337 (elf_x86_64_relocate_section): Here.
339 2019-08-16 Martin Liska <mliska@suse.cz>
342 * elflink.c: Report error only for not relocatable.
343 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
344 here lto_slim_object as it's handled in caller.
346 2019-08-16 Alan Modra <amodra@gmail.com>
348 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
350 2019-08-15 Jim Wilson <jimw@sifive.com>
352 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
353 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
354 to c.li instruction, and use ENCODE_RVC_IMM to set value.
356 2019-08-15 Tom Tromey <tromey@adacore.com>
358 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
361 2019-08-14 Alan Modra <amodra@gmail.com>
364 * dwarf2.c (stash_comp_unit): New function, extracted from..
365 (_bfd_dwarf2_find_nearest_line): ..here.
366 (find_abstract_instance): Parse comp units and decode line info
369 2019-08-14 Alan Modra <amodra@gmail.com>
371 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
372 (comp_unit_find_nearest_line): Use it here..
373 (_bfd_dwarf2_find_symbol_bias): ..and here.
375 2019-08-14 Alan Modra <amodra@gmail.com>
377 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
378 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
379 * coffgen.c (coff_find_nearest_line_with_names): Adjust
380 _bfd_dwarf2_find_nearest_line calls.
381 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
382 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
383 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
384 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
385 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
386 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
387 * libbfd.h: Regenerate.
389 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
391 * elf-bfd.h (struct elf_backend_data): New members.
392 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
393 .gnu.hash section if necessary.
394 (struct collect_gnu_hash_codes): New member.
395 (elf_gnu_hash_process_symidx): New function name.
396 (elf_renumber_gnu_hash_syms): Ignore local and undefined
397 symbols. Record xlat location for every symbol which should have
399 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
400 dynamic section if necessary.
401 (GNU_HASH_SECTION_NAME): New define.
402 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
403 Update the section size info.
404 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
405 (struct mips_elf_link_hash_entry): New member.
406 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
408 (mips_elf_sort_hash_table): Initialize the pointer to the
410 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
411 translation table entry with the symbol dynindx.
412 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
413 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
415 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
417 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
419 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
420 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
422 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
423 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
424 (_bfd_mips_post_process_headers): Mark the ABI version as
425 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
426 but not a .hash section.
427 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
428 position in the translation table, associated with the hash
430 * elfxx-mips.h (literal_reloc_p): Define
431 elf_backend_record_xhash_symbol backend hook.
432 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
435 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
437 * elf64-bpf.c (bpf_elf_relocate_section): New function.
438 (bpf_elf_insn_disp_reloc): Delete function.
439 (elf_backend_relocate_section): Define.
441 2019-08-07 Alan Modra <amodra@gmail.com>
444 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
445 for overflow in expressions involving nsymz.
447 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
449 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
450 two pages in relro presence.
452 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
454 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
455 (get_wsr_lbeg_opcode): New functions.
456 (check_loop_aligned): Detect relaxed loops and adjust loop_len
457 and insn_len for the first actual instruction of the loop.
459 2019-07-30 Alan Modra <amodra@gmail.com>
462 * bfd.c (struct bfd): Add lto_slim_object flag.
463 * bfd-in2.h: Regenerate.
465 2019-07-29 Martin Liska <mliska@suse.cz>
468 * archive.c (_bfd_compute_and_write_armap): Come up with
469 report_plugin_err variable.
470 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
471 * elf.c (struct lto_section): New.
472 (_bfd_elf_make_section_from_shdr): Parse content of
473 .gnu_lto_.lto section.
474 * elflink.c: Report error for a missing LTO plugin.
475 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
477 2019-07-28 Alan Modra <amodra@gmail.com>
481 * elflink.c (elf_link_add_object_symbols): Report an informative
482 error on finding local symbols with index equal or greater than
483 symbol table sh_info. Correct comment. Allow such symbols in
484 dynamic objects. Abort on NULL section for symbol.
486 2019-07-26 Alan Modra <amodra@gmail.com>
488 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
489 (elf_linker): Don't define.
490 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
492 2019-07-25 YunQiang Su <syq@debian.org>
495 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
498 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
500 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
502 (reloc_type_to_name): Fix formating.
503 (arc_elf_object_p): Likewise.
504 (debug_arc_reloc): Likewise.
505 (arc_do_relocation): Likewise.
507 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
509 * elf32-arc.c (bfd_get_32_me): New function.
510 (bfd_put_32_me): Likewise.
511 (arc_elf_relax_section): Likewise.
512 (bfd_elf32_bfd_relax_section): Define.
514 2019-07-24 Alan Modra <amodra@gmail.com>
516 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
517 elf_backend_final_write_processing, don't pass linker arg.
518 (_bfd_elf_final_write_processing): Update prototype.
519 * elf.c (_bfd_elf_write_object_contents): Adjust call.
520 (_bfd_elf_final_write_processing): Return error on incompatible
521 OSABI and has_gnu_osabi. Remove linker arg.
522 * elf-nacl.h (nacl_final_write_processing): Update prototype.
523 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
524 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
525 (_bfd_mips_elf_final_write_processing): Likewise.
526 * elf-hppa.h (elf_hppa_final_write_processing): Return status
527 and remove linker arg.
528 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
529 * elf-nacl.c (nacl_final_write_processing): Likewise.
530 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
531 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
532 * elf32-arm.c (arm_final_write_processing): Likewise.
533 (elf32_arm_final_write_processing): Likewise.
534 (elf32_arm_nacl_final_write_processing): Likewise.
535 (elf32_arm_vxworks_final_write_processing): Likewise.
536 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
537 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
538 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
539 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
540 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
541 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
542 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
543 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
544 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
545 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
546 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
547 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
548 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
549 * elf32-ppc.c (ppc_final_write_processing): Likewise.
550 (ppc_elf_final_write_processing): Likewise.
551 (ppc_elf_vxworks_final_write_processing): Likewise.
552 * elf32-sparc.c (sparc_final_write_processing): Likewise.
553 (elf32_sparc_final_write_processing): Likewise.
554 (elf32_sparc_vxworks_final_write_processing): Likewise.
555 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
556 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
557 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
558 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
559 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
560 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
561 (_bfd_mips_elf_final_write_processing): Likewise.
563 2019-07-24 Alan Modra <amodra@gmail.com>
565 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
567 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
568 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
570 2019-07-24 Alan Modra <amodra@gmail.com>
572 * elf32-visium.c (visium_elf_post_process_headers): Don't set
573 EI_OSABI header byte here.
576 2019-07-23 Alan Modra <amodra@gmail.com>
578 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
579 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
580 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
581 when elf_gnu_osabi_mbind is set.
582 (_bfd_elf_map_sections_to_segments): Likewise.
583 (_bfd_elf_init_private_section_data): Likewise.
584 (_bfd_elf_final_write_processing): Update comment.
585 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
586 (elf_backend_special_sections): Define without .tbss for linux.
588 2019-07-23 Alan Modra <amodra@gmail.com>
590 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
591 Remove none, any, all enums.
592 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
593 (_bfd_elf_final_write_processing): Declare.
594 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
595 elf_backend_final_write_processing.
596 (_bfd_elf_post_process_headers): Move body of function to..
597 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
598 only when not already set. Adjust for rename.
599 * elfxx-target.h (elf_backend_final_write_processing): Default to
600 _bfd_elf_final_write_processing.
601 * elf-hppa.h (elf_hppa_final_write_processing): Call
602 _bfd_elf_final_write_processing.
603 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
604 * elf-nacl.c (nacl_final_write_processing): Likewise.
605 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
606 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
607 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
608 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
609 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
610 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
611 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
612 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
613 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
614 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
615 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
616 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
617 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
618 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
619 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
620 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
621 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
622 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
623 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
624 * elf32-arm.c (arm_final_write_processing): Split out from..
625 (elf32_arm_final_write_processing): ..here. Call
626 _bfd_elf_final_write_processing.
627 (elf32_arm_nacl_final_write_processing): Adjust.
628 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
629 (_bfd_mips_elf_final_write_processing): ..here. Call
630 _bfd_elf_final_write_processing.
631 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
632 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
633 * elf32-ppc.c (ppc_final_write_processing): Split out from..
634 (ppc_elf_final_write_processing): ..here. Call
635 _bfd_elf_final_write_processing.
636 (ppc_elf_vxworks_final_write_processing): Adjust.
637 * elf32-sparc.c (sparc_final_write_processing): Split out from..
638 (elf32_sparc_final_write_processing): ..here. Call
639 _bfd_elf_final_write_processing.
640 (elf32_sparc_vxworks_final_write_processing): Adjust.
641 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
642 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
643 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
644 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
645 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
646 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
647 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
648 * elflink.c (elf_link_add_object_symbols): Likewise.
649 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
652 2019-07-23 Omar Majid <omajid@redhat.com>
654 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
655 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
656 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
658 * peXXigen.c: Add comment about source of .NET magic numbers.
660 2019-07-19 Alan Modra <amodra@gmail.com>
662 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
663 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
664 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
665 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
666 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
667 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
668 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
669 (ppc64_elf_check_relocs): Support pcrel tls relocs.
670 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
671 * bfd-in2.h: Regenerate.
672 * libbfd.h: Regenerate.
674 2019-07-18 Alan Modra <amodra@gmail.com>
676 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
677 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
680 2019-07-18 Alan Modra <amodra@gmail.com>
682 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
683 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
685 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
686 tls_type vars unsigned int.
687 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
688 to select r_type edit.
690 2019-07-18 Alan Modra <amodra@gmail.com>
692 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
694 * elf64-ppc.c (TLS_GDIE): Likewise.
696 2019-07-18 Alan Modra <amodra@gmail.com>
698 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
699 range of tp-relative offsets.
701 2019-07-15 Alan Modra <amodra@gmail.com>
703 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
704 alias is no longer bfd_link_hash_defined, clear the alias.
706 2019-07-13 Alan Modra <amodra@gmail.com>
708 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
710 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
711 (_bfd_elf_init_2_index_sections): Likewise.
712 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
713 relocations for local TLS symbols, use STN_UNDEF as the relocation
715 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
716 leave TLS symbol value in the addend.
718 2019-07-08 Alan Modra <amodra@gmail.com>
721 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
722 size before reading first word.
724 2019-07-02 Nick Clifton <nickc@redhat.com>
727 * elf.c (is_debuginfo_file): New function.
728 (assign_file_positions_for_non_load_sections): Do not warn about
729 allocated sections outside of loadable segments if they are found
731 * elf-bfd.h (is_debuginfo_file): Prototype.
733 2019-07-02 Nick Clifton <nickc@redhat.com>
736 * compress.c (bfd_get_full_section_contents): Do not complain
737 about linker created sections that are larger than the file size.
739 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
741 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
742 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
744 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
746 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
748 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
749 sections when .text section contain secure entry functions
752 2019-07-01 Nick Clifton <nickc@redhat.com>
755 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
756 section VMA in the offset used to update exidx relocs.
758 2019-06-28 Nick Clifton <nickc@redhat.com>
761 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
762 large version reference section.
763 * compress.c (bfd_get_full_section_contents): Check for an
764 uncompressed section whose size is larger than the file size.
766 2019-06-28 Alan Modra <amodra@gmail.com>
768 * format.c (bfd_check_format_matches): Don't match plugin target
769 if another target matches. Expand comment.
770 * targets.c (_bfd_target_vector): Move plugin_vec after all other
771 non-corefile targets, outside !SELECT_VECS.
772 * config.bfd: Don't handle targ=plugin here.
773 * configure.ac: Don't add plugin to enable_targets or handle in
774 target loop setting selvecs and other target vars.
775 * configure: Regenerate.
777 2019-06-26 Nick Clifton <nickc@redhat.com>
780 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
781 messages for failures.
782 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
783 if returning an error value.
785 2019-06-25 Jan Beulich <jbeulich@suse.com>
787 * elf-properties.c (elf_find_and_remove_property): Rename last
788 parameter. Mention it in comment.
790 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
792 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
793 SEC_MERGE or SEC_CODE flags are set.
794 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
795 symtype consistently. Don't include sec_addr (sym_sec) in symval.
796 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
797 Add sec_addr (sym_sec) after handling merge sections.
799 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
802 * elf-properties.c (elf_merge_gnu_property_list): Remove the
803 property after reporting property removal.
805 2019-06-23 Alan Modra <amodra@gmail.com>
808 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
809 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
810 Reduce range of offsets allowed for other GOT relocs.
812 2019-06-23 Alan Modra <amodra@gmail.com>
815 * elfcode.h (elf_object_p): Warning fix.
817 2019-06-21 Alan Modra <amodra@gmail.com>
820 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
822 2019-06-19 Alan Modra <amodra@gmail.com>
825 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
826 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
828 2019-06-19 Alan Modra <amodra@gmail.com>
830 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
831 functions that require r2 valid to use local entry.
832 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
834 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
836 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
837 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
838 with elfNN_aarch64_allocate_local_dynrelocs.
840 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
842 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
844 2019-06-14 Alan Modra <amodra@gmail.com>
846 * Makefile.in: Regenerate.
847 * configure: Regenerate.
849 2019-06-14 Alan Modra <amodra@gmail.com>
851 * elf64-ppc.c: Fix comments involving paddi.
853 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
856 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
857 absent, or the bfd is not in the ELF formart.
858 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
860 2019-06-10 Christos Zoulas <christos@zoulas.com>
863 * elf.c (elfcore_make_auxv_note_section): New function.
864 (elfcore_grok_note): Use it.
865 (elfcore_grok_freebsd_note): Likewise.
866 (elfcore_grok_openbsd_note): Likewise.
867 (elfcore_grok_netbsd_note): Likewise. Plus add support for
868 NT_NETBSDCORE_AUXV notes.
870 2019-06-06 Sudakshina Das <sudi.das@arm.com>
872 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
873 alignment of the new gnu property section.
875 2019-06-06 Sudakshina Das <sudi.das@arm.com>
877 * bfd-in.h: Change comment.
878 * bfd-in2.h: Regenerate.
879 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
880 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
883 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
885 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
886 Remove overflow check.
888 2019-05-28 Alan Modra <amodra@gmail.com>
891 * cofflink.c (coff_link_check_archive_element): Don't assume
892 element is a coff object file after calling add_archive_element.
894 2019-05-28 Alan Modra <amodra@gmail.com>
897 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
898 attempt to set sh_entsize for excluded PLT section.
900 2019-05-28 Alan Modra <amodra@gmail.com>
903 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
904 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
905 allocated in alpha_dynamic_entries_for_reloc.
907 2019-05-28 Alan Modra <amodra@gmail.com>
910 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
911 on NULL output_section.
912 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
914 2019-05-28 Alan Modra <amodra@gmail.com>
917 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
918 entry when MUST_FIND. Abort when MUST_FIND not found.
919 (elf_m68k_get_bfd2got_entry): Likewise.
920 (elf_m68k_relocate_section): Remove now useless assert.
922 2019-05-28 Alan Modra <amodra@gmail.com>
925 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
926 from bfd_link_info, not an output section owner.
927 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
928 (elf_hppa_final_link_relocate): Likewise.
930 2019-05-28 Alan Modra <amodra@gmail.com>
933 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
934 create_object_symbols_section, obj_textsec, obj_datasec or
935 obj_bsssec. Fix other errors in placement.
936 * config.bfd: Obsolete tic30-aout.
938 2019-05-28 Alan Modra <amodra@gmail.com>
941 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
942 end of section list as well as section_count.
943 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
944 section list before returning error.
946 2019-05-27 Alan Modra <amodra@gmail.com>
948 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
950 2019-05-27 Alan Modra <amodra@gmail.com>
953 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
955 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
957 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
958 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
959 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
960 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
961 (elf_backend_merge_symbol_attribute): Define.
963 2019-05-24 Alan Modra <amodra@gmail.com>
965 * po/SRC-POTFILES.in: Regenerate.
967 2019-05-24 Alan Modra <amodra@gmail.com>
969 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
970 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
971 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
972 (struct ppc_link_hash_table): Add powerxx_stubs.
973 (ppc64_elf_check_relocs): Set powerxx_stubs.
974 (build_powerxx_offset, size_powerxx_offset),
975 (num_relocs_for_powerxx_offset),
976 (emit_relocs_for_powerxx_offset): New functions.
977 (plt_stub_size): Size powerxx stubs.
978 (ppc_build_one_stub): Emit powerxx stubs.
979 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
982 2019-05-24 Alan Modra <amodra@gmail.com>
984 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
986 (xlate_pcrel_opt): New function.
987 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
988 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
989 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
991 2019-05-24 Alan Modra <amodra@gmail.com>
993 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
994 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
995 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
996 (BFD_RELOC_PPC64_PLT_PCREL34),
997 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
998 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
999 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1000 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1001 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1002 * elf64-ppc.c (PNOP): Define.
1003 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1004 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1005 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1007 (ppc64_elf_prefix_reloc): New function.
1008 (struct ppc_link_hash_table): Add notoc_plt.
1009 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1010 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1011 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1012 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1013 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1014 possible need for dynamic relocs on non-pcrel powerxx relocs.
1015 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1016 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1017 (toc_adjusting_stub_needed): Likewise.
1018 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1019 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1020 * bfd-in2.h: Regenerate.
1021 * libbfd.h: Regenerate.
1023 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1025 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1026 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1028 * configure: Regenerate.
1030 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1032 * configure: Regenerated.
1033 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1034 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1035 (BFD64_BACKENDS): Add elf64-bpf.lo.
1036 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1037 * Makefile.in (SOURCE_HFILES): Regenerate.
1038 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1039 * cpu-bpf.c: New file.
1040 * elf64-bpf.c: Likewise.
1041 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1043 * archures.c: Define architecture bfd_arch_bpf and machine
1045 * reloc.c: Define BFD relocations used by the BPF target.
1046 * bfd-in2.h: Regenerated.
1047 * libbfd.h: Likewise.
1049 2019-05-22 Alan Modra <amodra@gmail.com>
1051 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1054 2019-05-22 Alan Modra <amodra@gmail.com>
1056 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1057 processing on "size error in section".
1059 2019-05-22 Alan Modra <amodra@gmail.com>
1061 * som.c (som_bfd_free_cached_info): Call
1062 _bfd_generic_close_and_cleanup.
1064 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1066 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1067 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1069 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1071 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1072 checks. Search the RELA table for n64 relocations.
1074 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1075 Faraz Shahbazker <fshahbazker@wavecomp.com>
1077 * elfxx-mips.c (LA25_BC): New macro.
1078 (mips_elf_link_hash_table)<compact_branches>: New field.
1079 (STUB_JALRC): New macro.
1080 (mipsr6_o32_exec_plt0_entry_compact): New array.
1081 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1082 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1083 (mipsr6_exec_plt_entry_compact): Likewise.
1084 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1085 when compact_branches is true.
1086 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1087 PLT for MIPSR6 with compact_branches. Do not reorder the
1088 compact branches PLT. Switch the lazy stub for MIPSR6
1089 with compact_branches to use JALRC.
1090 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1091 when compact_branches is true.
1092 (_bfd_mips_elf_compact_branches): New function.
1093 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1095 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1098 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1099 Fix print formatter.
1101 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1104 * elf32-arm.c (get_value_helper): Remove.
1105 (elf32_arm_final_link_relocate): Fix branch future relocations.
1107 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1110 * bfd-in.h (enum erratum_84319_opts): New
1111 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1112 int to enum erratum_84319_opts.
1113 * bfd-in2.h: Regenerate.
1114 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1115 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1116 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1117 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1118 (_bfd_aarch64_resize_stubs): Amend comment.
1119 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1121 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1122 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1124 (clear_erratum_843419_entry): Update erratum conditional.
1126 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1129 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1130 when computing distance_short_enough.
1132 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1135 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1136 Wrap around even if distance equals avr_pc_wrap_around.
1138 2019-05-20 Nick Clifton <nickc@redhat.com>
1140 * po/fr.po: Updated French translation.
1142 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1144 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1146 2019-05-16 Alan Modra <amodra@gmail.com>
1148 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1150 2019-05-15 Alan Modra <amodra@gmail.com>
1152 * elf32-arm.c (elf32_arm_write_section): Don't leave
1153 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1154 unitialised section contents.
1156 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1159 * verilog.c: (VerilogDataWidth): New variable.
1160 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1162 2019-05-08 Nick Clifton <nickc@redhat.com>
1165 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1166 rather than FALSE if encountering a non-ELF file.
1168 2019-05-06 Alan Modra <amodra@gmail.com>
1170 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1172 2019-05-06 Alan Modra <amodra@gmail.com>
1174 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1175 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1176 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1177 * libbfd.h: Regenerate.
1178 * bfd-in2.h: Regenerate.
1180 2019-05-04 Alan Modra <amodra@gmail.com>
1183 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1184 following the standard section names.
1185 (bfd_decode_symclass): Prioritize section flag tests in
1186 decode_section_type before name tests in coff_section_type.
1187 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1188 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1189 their names and choose standard .text section flags for
1192 2019-05-02 Nick Clifton <nickc@redhat.com>
1195 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1196 .gnu.debugaltlink sections as debugging sections.
1198 2019-04-30 Alan Modra <amodra@gmail.com>
1200 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1201 (struct _ppc64_elf_section_data): Likewise.
1202 (ppc64_elf_check_relocs): Set above fields.
1203 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1204 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1207 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1210 * elflink.c (elf_link_output_extsym): Don't complain undefined
1211 weak dynamic reference.
1213 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1215 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1216 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1217 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1218 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1219 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1220 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1221 (elfNN_aarch64_small_plt0_bti_entry): Update.
1222 (elfNN_aarch64_small_plt_bti_entry): Update.
1223 (elfNN_aarch64_small_plt_pac_entry): Update.
1224 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1225 (setup_plt_values): Setup new entries.
1226 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1227 (elfNN_aarch64_plt_sym_val): Likewise.
1229 2019-04-22 Jim Wilson <jimw@sifive.com>
1231 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1233 2019-04-19 Alan Modra <amodra@gmail.com>
1235 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1237 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1239 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1240 building shared object.
1241 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1243 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1246 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1249 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1251 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1253 * bfd-in2.h: Regenerate.
1254 * libbfd.h: Likewise.
1256 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1258 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1259 * bfd-in2.h: Regenerated.
1260 * libbfd.h: Regenerated.
1262 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1264 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1265 * bfd-in2.h: Regenerated.
1266 * libbfd.h: Likewise.
1268 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1270 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1271 * bfd-in2.h: Regenerated.
1272 * libbfd.h: Regenerated.
1273 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1274 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1275 and R_ARM_THM_BF12 together.
1276 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1278 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1280 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1281 * libbfd.h: Regenerated.
1282 * bfd-in2.h: Regenerated.
1283 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1284 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1285 and R_ARM_THM_BF18 together.
1286 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1288 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1290 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1291 * bfd-in2.h: Regenerated.
1292 * libbfd.h: Regenerated.
1293 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1294 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1295 and R_ARM_THM_BF16 together.
1296 (get_value_helper): New reloc helper.
1297 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1299 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1301 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1302 * bfd-in2.h: Regenerate.
1303 * libbfd.h: Regenerate.
1305 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1307 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1308 * bfd-in2.h: Regenerate.
1309 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1310 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1312 (using_thumb2): Likewise.
1313 (using_thumb2_bl): Update assert.
1314 (arch_has_arm_nop): Likewise.
1315 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1316 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1318 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1320 * elf-linker-x86.h (elf_x86_cet_report): New.
1321 (elf_linker_x86_params): Add cet_report.
1322 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1323 missing IBT and SHSTK properties if needed.
1325 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1328 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1329 "h != NULL". Don't check "h != NULL" before calling.
1330 bfd_elf_gc_record_vtentry.
1331 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1332 * elf32-bfin.c (bfin_check_relocs): Likewise.
1333 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1334 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1335 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1336 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1337 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1338 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1339 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1340 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1341 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1342 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1343 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1344 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1345 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1346 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1347 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1348 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1349 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1350 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1351 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1352 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1353 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1354 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1355 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1356 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1357 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1358 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1359 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1360 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1361 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1364 2019-04-11 Alan Modra <amodra@gmail.com>
1367 * elflink.c (elf_link_add_object_symbols): Don't read partial
1368 dynamic entries from fuzzed objects.
1370 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1373 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1374 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1375 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1377 2019-04-10 Michael Forney <mforney@mforney.org>
1380 * doc/chew.c (free_words): Correctly free "push_text" strings.
1382 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1384 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1386 2019-04-08 Alan Modra <amodra@gmail.com>
1388 * configure.ac (elfxx_x86): Define and use.
1389 * configure: Regenerate.
1391 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1393 * elf-linker-x86.h: New file.
1394 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1395 to get x86-specific linker options.
1396 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1397 (elf_x86_64_check_relocs): Likewise.
1398 (elf_x86_64_relocate_section): Likewise.
1399 (elf_x86_64_link_setup_gnu_properties): Likewise.
1400 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1401 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1402 (_bfd_elf_linker_x86_set_options): New function.
1403 * elfxx-x86.h: Include "elf-linker-x86.h".
1404 (elf_x86_link_hash_table): Add params.
1406 2019-04-03 Alan Modra <amodra@gmail.com>
1408 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1409 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1410 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1411 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1412 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1413 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1415 2019-04-02 Jim Wilson <jimw@sifive.com>
1418 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1419 ELF header flags to after check for ELF object file. Loop through
1420 sections looking for code sections, if none, then skip ABI checks.
1422 2019-03-30 Andrew Waterman <andrew@sifive.com>
1424 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1427 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1429 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1430 info->export_dynamic to the conditional.
1432 2019-03-28 Alan Modra <amodra@gmail.com>
1435 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1436 * configure: Regenerate.
1437 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1438 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1439 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1440 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1441 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1443 2019-03-21 Jim Wilson <jimw@sifive.com>
1446 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1447 verify sym non-NULL before using. Add identical check using h.
1449 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1451 * elf-bfd.h (struct elf_backend_data): Add argument to
1452 merge_gnu_properties.
1453 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1454 itself and while calling bed->merge_gnu_properties.
1455 (elf_merge_gnu_property_list): Update the calls for
1456 elf_merge_gnu_properties.
1457 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1458 of --force-bti warning and add argument.
1459 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1461 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1462 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1465 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1467 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1468 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1469 (elf_backend_fixup_gnu_properties): Define for AArch64.
1471 2019-03-18 Alan Modra <amodra@gmail.com>
1474 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1475 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1476 attempt at writing glink stubs only once.
1478 2019-03-16 Alan Modra <amodra@gmail.com>
1481 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1482 (_bfd_elf_rel_local_sym): Likewise.
1483 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1484 section of symbols with unrecognized shndx.
1486 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1489 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1491 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1492 in discarded section.
1494 2019-03-15 Alan Modra <amodra@gmail.com>
1497 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1498 symbol after globals if elf_bad_symtab is not set.
1500 2019-03-15 Alan Modra <amodra@gmail.com>
1503 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1504 (_bfd_elf_rel_local_sym): Likewise.
1506 2019-03-15 Alan Modra <amodra@gmail.com>
1509 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1510 object files with sh_size not a multiple of sh_entsize.
1512 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1515 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1516 input with bad relocation.
1518 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1520 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1522 2019-03-14 Nick Clifton <nickc@redhat.com>
1525 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1526 (save_section_vma): Initialise field to the number of entries in
1528 (section_vma_same): Check that the number of entries in the
1529 sec_vma table matches the number of sections in the bfd.
1531 2019-03-14 Nick Clifton <nickc@redhat.com>
1534 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1535 section owner pointer when adding the default symbol.
1537 2019-03-14 Nick Clifton <nickc@redhat.com>
1540 * elflink.c (elf_link_add_object_symbols): Add new local variable
1541 extversym_end. Initialise it to point to the end of the version
1542 symbol table, if present. Check it when initialising and updating
1545 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1547 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1548 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1549 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1550 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1552 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1553 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1554 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1556 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1557 Szabolcs Nagy <szabolcs.nagy@arm.com>
1559 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1560 (aarch64_bti_pac_info): New.
1561 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1562 (bfd_elf32_aarch64_set_options): Likewise.
1563 * bfd-in2.h: Regenerate
1564 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1565 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1566 (elfNN_aarch64_small_plt0_bti_entry): New.
1567 (elfNN_aarch64_small_plt_bti_entry): New.
1568 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1569 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1570 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1571 tlsdesc_plt_entry_size fields.
1572 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1573 (setup_plt_values): New helper function.
1574 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1576 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1578 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1579 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1580 to plt stubs instead of fixed ones and update filling them according
1581 to the need for bti.
1582 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1583 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1584 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1585 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1586 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1588 (bfd_elfNN_get_synthetic_symtab): Define.
1589 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1590 and mising BTI NOTE SECTION.
1593 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1595 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1596 linker created inputs from merge.
1597 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1598 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1599 (elfNN_aarch64_link_setup_gnu_properties): New.
1600 (elfNN_aarch64_merge_gnu_properties): New.
1601 (elf_backend_setup_gnu_properties): Define for AArch64.
1602 (elf_backend_merge_gnu_properties): Likewise.
1603 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1604 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1605 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1606 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1607 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1608 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1609 (elf_backend_parse_gnu_properties): Define for AArch64.
1611 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1614 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1615 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1617 2019-03-12 Alan Modra <amodra@gmail.com>
1619 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1620 nmemb parameter. Use bfd_alloc2.
1621 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1623 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1624 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1625 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1627 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1628 (assign_section_numbers): Style fix.
1629 (swap_out_syms): Use bfd_malloc2.
1630 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1632 (_bfd_elf_make_empty_symbol): Style fix.
1633 (elfobj_grok_stapsdt_note_1): Formatting.
1634 * elfcode.h (elf_object_p): Use bfd_alloc2.
1635 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1636 (elf_slurp_symbol_table): Use bfd_zalloc2.
1637 (elf_slurp_reloc_table): Use bfd_alloc2.
1638 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1639 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1640 size calculation doesn't overflow.
1641 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1642 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1643 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1645 2019-03-08 Alan Modra <amodra@gmail.com>
1648 * merge.c (merge_strings): Return secinfo. Don't pad section
1650 (_bfd_merge_sections): Pad section to alignment here, if input
1651 sections contributing to merged output all pad to alignment.
1654 2019-03-06 Nick Clifton <nickc@redhat.com>
1656 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1658 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1659 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1661 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1663 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1664 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1667 * elf32-s390.c (allocate_dynrelocs): Update comment.
1669 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1671 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1673 2019-02-28 Nick Clifton <nickc@redhat.com>
1676 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1677 section that is not NUL terminated.
1679 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1682 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1683 by linker when checking copy reloc on protected symbol.
1685 2019-02-24 Alan Modra <amodra@gmail.com>
1688 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1690 2019-02-20 Eric Tsai <erictsai@cadence.com>
1692 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1693 sections between the call site and call destination and adjust
1694 call distance by the largest alignment.
1696 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1698 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1699 * elf.c (elfcore_grok_aarch_pauth): New function.
1700 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1701 (elfcore_write_aarch_pauth): New function.
1702 (elfcore_write_register_note): Check for AArch64 pauth section.
1704 2019-02-20 Alan Modra <amodra@gmail.com>
1707 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1710 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1712 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1713 Darwin hosts, not just or1k.
1714 * configure: Regenerate.
1716 2019-02-20 Alan Modra <amodra@gmail.com>
1719 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1720 sentinel NUL to string buffer nearer to loop where it is used.
1721 Don't go past sentinel when scanning strings, and don't write
1723 * archive.c (do_slurp_coff_armap): Simplify string handling to
1726 2019-02-19 Alan Modra <amodra@gmail.com>
1729 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1730 attempting to prevent read past end of section.
1732 2019-02-18 Alan Modra <amodra@gmail.com>
1735 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1736 PRIx64 to generate warning messages. Print local sym names too.
1738 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1740 * elf32-arc (INIT_SYM_STRING): Delete.
1741 (FINI_SYM_STRING): Likewise.
1742 (init_str): Likewise.
1743 (fini_str): Likewise.
1745 2019-02-08 Alan Modra <amodra@gmail.com>
1747 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1748 for bss-plt" warning to make it an error.
1750 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1753 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1754 reloc_class_ifunc for ifunc symbols.
1755 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1757 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1759 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1760 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1762 2019-02-07 Nick Clifton <nickc@redhat.com>
1764 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1765 into the definitely obsolete list.
1767 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1770 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1771 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1772 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1774 (elf_x86_64_check_relocs): Here.
1775 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1776 to check if a symbol is defined in a non-shared object.
1777 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1779 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1781 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1782 of 'labs' (and fix GCC warning).
1784 2019-01-25 Nick Clifton <nickc@redhat.com>
1786 * po/ru.po: Updated Russian translation.
1788 2019-01-23 Nick Clifton <nickc@redhat.com>
1790 * po/fr.po: Updated French translation.
1792 2019-01-21 Nick Clifton <nickc@redhat.com>
1794 * po/pt.po: Updated Portuguese translation.
1795 * po/uk.po: Updated Ukranian translation.
1797 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1800 * elf32-nds32.c (nds32_relocate_section): Add space between words
1802 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1804 (riscv_i_or_e_p): Likewise.
1805 (riscv_merge_arch_attr_info): Likewise.
1807 2019-01-19 Nick Clifton <nickc@redhat.com>
1809 * version.m4: Reset to 2.32.51
1810 * configure: Regenerate.
1811 * po/bfd.pot: Regenerate.
1813 2018-06-24 Nick Clifton <nickc@redhat.com>
1815 2.32 branch created.
1817 2019-01-16 Kito Cheng <kito@andestech.com>
1819 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1822 2019-01-16 Kito Cheng <kito@andestech.com>
1823 Nelson Chu <nelson@andestech.com>
1825 * elfnn-riscv.c (in_subsets): New.
1826 (out_subsets): Likewise.
1827 (merged_subsets): Likewise.
1828 (riscv_std_ext_p): Likewise.
1829 (riscv_non_std_ext_p): Likewise.
1830 (riscv_std_sv_ext_p): Likewise.
1831 (riscv_non_std_sv_ext_p): Likewise.
1832 (riscv_version_mismatch): Likewise.
1833 (riscv_i_or_e_p): Likewise.
1834 (riscv_merge_std_ext): Likewise.
1835 (riscv_merge_non_std_and_sv_ext): Likewise.
1836 (riscv_merge_arch_attr_info): Likewise.
1837 (riscv_merge_attributes): Likewise.
1838 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1840 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1841 (elf_backend_obj_attrs_vendor): Define.
1842 (elf_backend_obj_attrs_section_type): Likewise.
1843 (elf_backend_obj_attrs_section): Likewise.
1844 (elf_backend_obj_attrs_arg_type): Define as
1845 riscv_elf_obj_attrs_arg_type.
1846 * elfxx-riscv.c (riscv_estimate_digit): New.
1847 (riscv_estimate_arch_strlen1): Likewise.
1848 (riscv_estimate_arch_strlen): Likewise.
1849 (riscv_arch_str1): Likewise.
1850 (riscv_arch_str): Likewise.
1851 * elfxx-riscv.h (riscv_arch_str): Declare.
1853 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1855 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1857 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1858 source field. (md_apply_fix): Apply final fix
1859 to BFD_RELOC_S12Z_OPR.
1860 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1862 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1865 * elf32-s390.c (allocate_dynrelocs): Update comment.
1867 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1869 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1870 * configure: Regenerate.
1872 2019-01-08 Alan Modra <amodra@gmail.com>
1876 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1879 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1881 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1882 * bfd/bfd-in2.h: Regenerate.
1883 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1884 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1886 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1888 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1889 default target, little endian target is more suitable.
1891 2019-01-04 Alan Modra <amodra@gmail.com>
1895 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1897 (EQ_VALUE_IN_FIELD): Likewise.
1898 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1900 2019-01-01 Alan Modra <amodra@gmail.com>
1902 Update year range in copyright notice of all files.
1904 For older changes see ChangeLog-2018
1906 Copyright (C) 2019 Free Software Foundation, Inc.
1908 Copying and distribution of this file, with or without modification,
1909 are permitted in any medium without royalty provided the copyright
1910 notice and this notice are preserved.
1916 version-control: never