1 2019-09-16 Phil Blundell <pb@pbcl.net>
3 * version.m4: Set version to 2.33.50.
4 * Makefile.in, configure, doc/Makefile.in: Regenerated.
6 2019-09-11 Tom Tromey <tom@tromey.com>
8 * opncls.c (bfd_set_filename): New function.
9 * bfd-in2.h: Regenerate.
11 2019-09-11 Alan Modra <amodra@gmail.com>
13 * targets.c (struct bfd_target): Add _bfd_group_name.
14 (BFD_JUMP_TABLE): Likewise.
15 * coffgen.c (bfd_coff_group_name): New function.
16 * elf.c (bfd_elf_group_name): New function.
17 * linker.c (_bfd_nolink_bfd_group_name): New function.
18 * section.c (bfd_generic_group_name): New function.
19 * elf-bfd.h (bfd_elf_group_name): Declare.
20 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
21 * libcoff-in.h (bfd_coff_group_name): Declare.
22 * aout-target.h (MY_bfd_group_name): Define.
23 * aout-tic30.c (MY_bfd_group_name): Define.
24 * bfd.c (bfd_group_name): Define.
25 * binary.c (binary_bfd_group_name): Define.
26 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
27 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
28 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
29 * coffcode.h (coff_bfd_group_name): Define.
30 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
31 * i386msdos.c (msdos_bfd_group_name): Define.
32 * ihex.c (ihex_bfd_group_name): Define.
33 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
34 * mmo.c (mmo_bfd_group_name): Define.
35 * pef.c (bfd_pef_bfd_group_name): Define.
36 * plugin.c (bfd_plugin_bfd_group_name): Define.
37 * ppcboot.c (ppcboot_bfd_group_name): Define.
38 * som.c (som_bfd_group_name): Define.
39 * srec.c (srec_bfd_group_name): Define.
40 * tekhex.c (tekhex_bfd_group_name): Define.
41 * verilog.c (verilog_bfd_group_name): Define.
42 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
43 * xsym.c (bfd_sym_bfd_group_name): Define.
44 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
45 (rs6000_xcoff64_aix_vec): Likewise.
46 * bfd-in2.h: Regenerate.
47 * libbfd.h: Regenerate.
48 * libcoff.h: Regenerate.
50 2019-09-10 Nick Clifton <nickc@redhat.com>
53 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
55 (bfd_default_arch_struct): Initialise the new field.
56 * bfd-in2.h: Regenerate.
57 * cpu-aarch64.c: Initialise the new field.
58 * cpu-alpha.c: Likewise.
59 * cpu-arc.c: Likewise.
60 * cpu-arm.c: Likewise.
61 * cpu-avr.c: Likewise.
62 * cpu-bfin.c: Likewise.
63 * cpu-bpf.c: Likewise.
64 * cpu-cr16.c: Likewise.
65 * cpu-cr16c.c: Likewise.
66 * cpu-cris.c: Likewise.
67 * cpu-crx.c: Likewise.
68 * cpu-csky.c: Likewise.
69 * cpu-d10v.c: Likewise.
70 * cpu-d30v.c: Likewise.
71 * cpu-dlx.c: Likewise.
72 * cpu-epiphany.c: Likewise.
73 * cpu-fr30.c: Likewise.
74 * cpu-frv.c: Likewise.
75 * cpu-ft32.c: Likewise.
76 * cpu-h8300.c: Likewise.
77 * cpu-hppa.c: Likewise.
78 * cpu-i386.c: Likewise.
79 * cpu-ia64.c: Likewise.
80 * cpu-iamcu.c: Likewise.
81 * cpu-ip2k.c: Likewise.
82 * cpu-iq2000.c: Likewise.
83 * cpu-k1om.c: Likewise.
84 * cpu-l1om.c: Likewise.
85 * cpu-lm32.c: Likewise.
86 * cpu-m10200.c: Likewise.
87 * cpu-m10300.c: Likewise.
88 * cpu-m32c.c: Likewise.
89 * cpu-m32r.c: Likewise.
90 * cpu-m68hc11.c: Likewise.
91 * cpu-m68hc12.c: Likewise.
92 * cpu-m68k.c: Likewise.
93 * cpu-m9s12x.c: Likewise.
94 * cpu-m9s12xg.c: Likewise.
95 * cpu-mcore.c: Likewise.
96 * cpu-mep.c: Likewise.
97 * cpu-metag.c: Likewise.
98 * cpu-microblaze.c: Likewise.
99 * cpu-mips.c: Likewise.
100 * cpu-mmix.c: Likewise.
101 * cpu-moxie.c: Likewise.
102 * cpu-msp430.c: Likewise.
103 * cpu-mt.c: Likewise.
104 * cpu-nds32.c: Likewise.
105 * cpu-nfp.c: Likewise.
106 * cpu-nios2.c: Likewise.
107 * cpu-ns32k.c: Likewise.
108 * cpu-or1k.c: Likewise.
109 * cpu-pdp11.c: Likewise.
110 * cpu-pj.c: Likewise.
111 * cpu-plugin.c: Likewise.
112 * cpu-powerpc.c: Likewise.
113 * cpu-pru.c: Likewise.
114 * cpu-riscv.c: Likewise.
115 * cpu-rl78.c: Likewise.
116 * cpu-rs6000.c: Likewise.
117 * cpu-rx.c: Likewise.
118 * cpu-s12z.c: Likewise.
119 * cpu-s390.c: Likewise.
120 * cpu-score.c: Likewise.
121 * cpu-sh.c: Likewise.
122 * cpu-sparc.c: Likewise.
123 * cpu-spu.c: Likewise.
124 * cpu-tic30.c: Likewise.
125 * cpu-tic4x.c: Likewise.
126 * cpu-tic54x.c: Likewise.
127 * cpu-tic6x.c: Likewise.
128 * cpu-tic80.c: Likewise.
129 * cpu-tilegx.c: Likewise.
130 * cpu-tilepro.c: Likewise.
131 * cpu-v850.c: Likewise.
132 * cpu-v850_rh850.c: Likewise.
133 * cpu-vax.c: Likewise.
134 * cpu-visium.c: Likewise.
135 * cpu-wasm32.c: Likewise.
136 * cpu-xc16x.c: Likewise.
137 * cpu-xgate.c: Likewise.
138 * cpu-xstormy16.c: Likewise.
139 * cpu-xtensa.c: Likewise.
140 * cpu-z80.c: Likewise.
141 * cpu-z8k.c: Likewise.
143 2019-09-09 Phil Blundell <pb@pbcl.net>
145 binutils 2.33 branch created.
147 2019-09-06 Alan Modra <amodra@gmail.com>
149 * aout-target.h (object_p): Formatting.
150 * bfd-in.h (bfd_get_filename): Don't cast to char*.
151 * corefile.c (generic_core_file_matches_executable_p): Constify
152 variables and remove cast.
153 * bfd-in2.h: Regenerate.
155 2019-09-05 Alan Modra <amodra@gmail.com>
157 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
158 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
159 in the GOT/PLT entry rather than affecting the offset to that
161 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
163 2019-09-05 Alan Modra <amodra@gmail.com>
165 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
166 in second instruction.
167 (ppc64_elf_relocate_section): Likewise.
169 2019-09-05 Alan Modra <amodra@gmail.com>
172 * libbfd-in.h (bfd_strdup): New inline function.
173 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
175 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
176 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
178 (bfd_openstreamr): Use bfd_strdup.
179 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
180 * plugin.c (try_load_plugin): Use bfd_malloc.
181 * libbfd.h: Regenerate.
183 2019-09-02 Alan Modra <amodra@gmail.com>
186 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
188 (read_alt_indirect_string): Likewise.
189 (read_alt_indirect_ref): Likewise.
191 2019-08-31 Jim Wilson <jimw@sifive.com>
194 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
195 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
197 2019-08-30 Jim Wilson <jimw@sifive.com>
199 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
200 error, call bfd_set_error, set ret to FALSE, and goto out label.
202 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
205 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
206 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
208 2019-08-29 Alan Modra <amodra@gmail.com>
211 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
212 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
213 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
216 2019-08-29 Alan Modra <amodra@gmail.com>
218 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
219 on second insn, return it in poff.
220 (ppc64_elf_relocate_section): Add offset to paddi addend for
223 2019-08-28 Jim Wilson <jimw@sifive.com>
225 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
226 section when setting max_alignment. Update comment.
227 (_bfd_riscv_relax_pc): Likewise.
229 2019-08-29 Alan Modra <amodra@gmail.com>
232 * bfd.c (struct bfd): Add no_element_cache.
233 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
234 archive cache when no_element_cache.
235 (bfd_generic_archive_p): Set no_element_cache when opening first
236 element to check format. Close first element too.
237 (do_slurp_bsd_armap): Don't zero ardata->cache here.
238 * bfd-in2.h: Regenerate.
240 2019-08-24 Alan Modra <amodra@gmail.com>
242 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
243 symbols from GOT optimisation.
245 2019-08-23 Stafford Horne <shorne@gmail.com>
247 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
250 2019-08-23 Nick Clifton <nickc@redhat.com>
253 * elf.c (bfd_section_from_shdr): Issue an informative warning
254 message and continue processing other sections after encountering
255 a reloc section for a section which already has other relocs
258 2019-08-23 Alan Modra <amodra@gmail.com>
261 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
262 on error without freeing plts[] contents.
264 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
266 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
268 2019-08-22 Nick Clifton <nickc@redhat.com>
271 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
272 reading data from extra records.
274 2019-08-22 Tamar Christina <tamar.christina@arm.com>
277 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
278 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
279 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
280 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
283 2019-08-22 Alan Modra <amodra@gmail.com>
285 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
286 instead recognize CMSE_PREFIX in symbol name.
287 (elf32_arm_gc_mark_extra_sections): Likewise.
288 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
289 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
291 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
293 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
294 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
296 2019-08-20 Tamar Christina <tamar.christina@arm.com>
298 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
299 elf32_arm_stub_long_branch_v4t_thumb_thumb,
300 elf32_arm_stub_long_branch_v4t_thumb_arm,
301 elf32_arm_stub_short_branch_v4t_thumb_arm,
302 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
303 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
304 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
305 previous instruction.
307 2019-08-19 Tom Tromey <tromey@adacore.com>
309 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
312 2019-08-19 Alan Modra <amodra@gmail.com>
314 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
316 (struct _ppc64_elf_section_data): Likewise.
317 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
318 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
319 than TOC loop. Check PLT16 insns too.
321 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
324 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
325 PC-relative relocations back to ...
326 (elf_x86_64_relocate_section): Here.
328 2019-08-16 Martin Liska <mliska@suse.cz>
331 * elflink.c: Report error only for not relocatable.
332 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
333 here lto_slim_object as it's handled in caller.
335 2019-08-16 Alan Modra <amodra@gmail.com>
337 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
339 2019-08-15 Jim Wilson <jimw@sifive.com>
341 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
342 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
343 to c.li instruction, and use ENCODE_RVC_IMM to set value.
345 2019-08-15 Tom Tromey <tromey@adacore.com>
347 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
350 2019-08-14 Alan Modra <amodra@gmail.com>
353 * dwarf2.c (stash_comp_unit): New function, extracted from..
354 (_bfd_dwarf2_find_nearest_line): ..here.
355 (find_abstract_instance): Parse comp units and decode line info
358 2019-08-14 Alan Modra <amodra@gmail.com>
360 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
361 (comp_unit_find_nearest_line): Use it here..
362 (_bfd_dwarf2_find_symbol_bias): ..and here.
364 2019-08-14 Alan Modra <amodra@gmail.com>
366 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
367 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
368 * coffgen.c (coff_find_nearest_line_with_names): Adjust
369 _bfd_dwarf2_find_nearest_line calls.
370 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
371 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
372 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
373 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
374 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
375 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
376 * libbfd.h: Regenerate.
378 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
380 * elf-bfd.h (struct elf_backend_data): New members.
381 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
382 .gnu.hash section if necessary.
383 (struct collect_gnu_hash_codes): New member.
384 (elf_gnu_hash_process_symidx): New function name.
385 (elf_renumber_gnu_hash_syms): Ignore local and undefined
386 symbols. Record xlat location for every symbol which should have
388 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
389 dynamic section if necessary.
390 (GNU_HASH_SECTION_NAME): New define.
391 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
392 Update the section size info.
393 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
394 (struct mips_elf_link_hash_entry): New member.
395 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
397 (mips_elf_sort_hash_table): Initialize the pointer to the
399 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
400 translation table entry with the symbol dynindx.
401 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
402 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
404 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
406 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
408 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
409 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
411 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
412 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
413 (_bfd_mips_post_process_headers): Mark the ABI version as
414 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
415 but not a .hash section.
416 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
417 position in the translation table, associated with the hash
419 * elfxx-mips.h (literal_reloc_p): Define
420 elf_backend_record_xhash_symbol backend hook.
421 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
424 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
426 * elf64-bpf.c (bpf_elf_relocate_section): New function.
427 (bpf_elf_insn_disp_reloc): Delete function.
428 (elf_backend_relocate_section): Define.
430 2019-08-07 Alan Modra <amodra@gmail.com>
433 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
434 for overflow in expressions involving nsymz.
436 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
438 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
439 two pages in relro presence.
441 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
443 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
444 (get_wsr_lbeg_opcode): New functions.
445 (check_loop_aligned): Detect relaxed loops and adjust loop_len
446 and insn_len for the first actual instruction of the loop.
448 2019-07-30 Alan Modra <amodra@gmail.com>
451 * bfd.c (struct bfd): Add lto_slim_object flag.
452 * bfd-in2.h: Regenerate.
454 2019-07-29 Martin Liska <mliska@suse.cz>
457 * archive.c (_bfd_compute_and_write_armap): Come up with
458 report_plugin_err variable.
459 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
460 * elf.c (struct lto_section): New.
461 (_bfd_elf_make_section_from_shdr): Parse content of
462 .gnu_lto_.lto section.
463 * elflink.c: Report error for a missing LTO plugin.
464 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
466 2019-07-28 Alan Modra <amodra@gmail.com>
470 * elflink.c (elf_link_add_object_symbols): Report an informative
471 error on finding local symbols with index equal or greater than
472 symbol table sh_info. Correct comment. Allow such symbols in
473 dynamic objects. Abort on NULL section for symbol.
475 2019-07-26 Alan Modra <amodra@gmail.com>
477 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
478 (elf_linker): Don't define.
479 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
481 2019-07-25 YunQiang Su <syq@debian.org>
484 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
487 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
489 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
491 (reloc_type_to_name): Fix formating.
492 (arc_elf_object_p): Likewise.
493 (debug_arc_reloc): Likewise.
494 (arc_do_relocation): Likewise.
496 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
498 * elf32-arc.c (bfd_get_32_me): New function.
499 (bfd_put_32_me): Likewise.
500 (arc_elf_relax_section): Likewise.
501 (bfd_elf32_bfd_relax_section): Define.
503 2019-07-24 Alan Modra <amodra@gmail.com>
505 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
506 elf_backend_final_write_processing, don't pass linker arg.
507 (_bfd_elf_final_write_processing): Update prototype.
508 * elf.c (_bfd_elf_write_object_contents): Adjust call.
509 (_bfd_elf_final_write_processing): Return error on incompatible
510 OSABI and has_gnu_osabi. Remove linker arg.
511 * elf-nacl.h (nacl_final_write_processing): Update prototype.
512 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
513 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
514 (_bfd_mips_elf_final_write_processing): Likewise.
515 * elf-hppa.h (elf_hppa_final_write_processing): Return status
516 and remove linker arg.
517 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
518 * elf-nacl.c (nacl_final_write_processing): Likewise.
519 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
520 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
521 * elf32-arm.c (arm_final_write_processing): Likewise.
522 (elf32_arm_final_write_processing): Likewise.
523 (elf32_arm_nacl_final_write_processing): Likewise.
524 (elf32_arm_vxworks_final_write_processing): Likewise.
525 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
526 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
527 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
528 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
529 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
530 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
531 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
532 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
533 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
534 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
535 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
536 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
537 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
538 * elf32-ppc.c (ppc_final_write_processing): Likewise.
539 (ppc_elf_final_write_processing): Likewise.
540 (ppc_elf_vxworks_final_write_processing): Likewise.
541 * elf32-sparc.c (sparc_final_write_processing): Likewise.
542 (elf32_sparc_final_write_processing): Likewise.
543 (elf32_sparc_vxworks_final_write_processing): Likewise.
544 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
545 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
546 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
547 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
548 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
549 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
550 (_bfd_mips_elf_final_write_processing): Likewise.
552 2019-07-24 Alan Modra <amodra@gmail.com>
554 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
556 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
557 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
559 2019-07-24 Alan Modra <amodra@gmail.com>
561 * elf32-visium.c (visium_elf_post_process_headers): Don't set
562 EI_OSABI header byte here.
565 2019-07-23 Alan Modra <amodra@gmail.com>
567 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
568 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
569 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
570 when elf_gnu_osabi_mbind is set.
571 (_bfd_elf_map_sections_to_segments): Likewise.
572 (_bfd_elf_init_private_section_data): Likewise.
573 (_bfd_elf_final_write_processing): Update comment.
574 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
575 (elf_backend_special_sections): Define without .tbss for linux.
577 2019-07-23 Alan Modra <amodra@gmail.com>
579 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
580 Remove none, any, all enums.
581 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
582 (_bfd_elf_final_write_processing): Declare.
583 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
584 elf_backend_final_write_processing.
585 (_bfd_elf_post_process_headers): Move body of function to..
586 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
587 only when not already set. Adjust for rename.
588 * elfxx-target.h (elf_backend_final_write_processing): Default to
589 _bfd_elf_final_write_processing.
590 * elf-hppa.h (elf_hppa_final_write_processing): Call
591 _bfd_elf_final_write_processing.
592 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
593 * elf-nacl.c (nacl_final_write_processing): Likewise.
594 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
595 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
596 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
597 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
598 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
599 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
600 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
601 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
602 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
603 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
604 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
605 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
606 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
607 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
608 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
609 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
610 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
611 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
612 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
613 * elf32-arm.c (arm_final_write_processing): Split out from..
614 (elf32_arm_final_write_processing): ..here. Call
615 _bfd_elf_final_write_processing.
616 (elf32_arm_nacl_final_write_processing): Adjust.
617 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
618 (_bfd_mips_elf_final_write_processing): ..here. Call
619 _bfd_elf_final_write_processing.
620 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
621 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
622 * elf32-ppc.c (ppc_final_write_processing): Split out from..
623 (ppc_elf_final_write_processing): ..here. Call
624 _bfd_elf_final_write_processing.
625 (ppc_elf_vxworks_final_write_processing): Adjust.
626 * elf32-sparc.c (sparc_final_write_processing): Split out from..
627 (elf32_sparc_final_write_processing): ..here. Call
628 _bfd_elf_final_write_processing.
629 (elf32_sparc_vxworks_final_write_processing): Adjust.
630 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
631 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
632 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
633 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
634 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
635 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
636 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
637 * elflink.c (elf_link_add_object_symbols): Likewise.
638 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
641 2019-07-23 Omar Majid <omajid@redhat.com>
643 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
644 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
645 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
647 * peXXigen.c: Add comment about source of .NET magic numbers.
649 2019-07-19 Alan Modra <amodra@gmail.com>
651 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
652 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
653 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
654 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
655 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
656 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
657 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
658 (ppc64_elf_check_relocs): Support pcrel tls relocs.
659 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
660 * bfd-in2.h: Regenerate.
661 * libbfd.h: Regenerate.
663 2019-07-18 Alan Modra <amodra@gmail.com>
665 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
666 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
669 2019-07-18 Alan Modra <amodra@gmail.com>
671 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
672 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
674 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
675 tls_type vars unsigned int.
676 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
677 to select r_type edit.
679 2019-07-18 Alan Modra <amodra@gmail.com>
681 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
683 * elf64-ppc.c (TLS_GDIE): Likewise.
685 2019-07-18 Alan Modra <amodra@gmail.com>
687 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
688 range of tp-relative offsets.
690 2019-07-15 Alan Modra <amodra@gmail.com>
692 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
693 alias is no longer bfd_link_hash_defined, clear the alias.
695 2019-07-13 Alan Modra <amodra@gmail.com>
697 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
699 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
700 (_bfd_elf_init_2_index_sections): Likewise.
701 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
702 relocations for local TLS symbols, use STN_UNDEF as the relocation
704 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
705 leave TLS symbol value in the addend.
707 2019-07-08 Alan Modra <amodra@gmail.com>
710 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
711 size before reading first word.
713 2019-07-02 Nick Clifton <nickc@redhat.com>
716 * elf.c (is_debuginfo_file): New function.
717 (assign_file_positions_for_non_load_sections): Do not warn about
718 allocated sections outside of loadable segments if they are found
720 * elf-bfd.h (is_debuginfo_file): Prototype.
722 2019-07-02 Nick Clifton <nickc@redhat.com>
725 * compress.c (bfd_get_full_section_contents): Do not complain
726 about linker created sections that are larger than the file size.
728 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
730 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
731 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
733 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
735 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
737 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
738 sections when .text section contain secure entry functions
741 2019-07-01 Nick Clifton <nickc@redhat.com>
744 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
745 section VMA in the offset used to update exidx relocs.
747 2019-06-28 Nick Clifton <nickc@redhat.com>
750 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
751 large version reference section.
752 * compress.c (bfd_get_full_section_contents): Check for an
753 uncompressed section whose size is larger than the file size.
755 2019-06-28 Alan Modra <amodra@gmail.com>
757 * format.c (bfd_check_format_matches): Don't match plugin target
758 if another target matches. Expand comment.
759 * targets.c (_bfd_target_vector): Move plugin_vec after all other
760 non-corefile targets, outside !SELECT_VECS.
761 * config.bfd: Don't handle targ=plugin here.
762 * configure.ac: Don't add plugin to enable_targets or handle in
763 target loop setting selvecs and other target vars.
764 * configure: Regenerate.
766 2019-06-26 Nick Clifton <nickc@redhat.com>
769 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
770 messages for failures.
771 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
772 if returning an error value.
774 2019-06-25 Jan Beulich <jbeulich@suse.com>
776 * elf-properties.c (elf_find_and_remove_property): Rename last
777 parameter. Mention it in comment.
779 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
781 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
782 SEC_MERGE or SEC_CODE flags are set.
783 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
784 symtype consistently. Don't include sec_addr (sym_sec) in symval.
785 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
786 Add sec_addr (sym_sec) after handling merge sections.
788 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
791 * elf-properties.c (elf_merge_gnu_property_list): Remove the
792 property after reporting property removal.
794 2019-06-23 Alan Modra <amodra@gmail.com>
797 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
798 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
799 Reduce range of offsets allowed for other GOT relocs.
801 2019-06-23 Alan Modra <amodra@gmail.com>
804 * elfcode.h (elf_object_p): Warning fix.
806 2019-06-21 Alan Modra <amodra@gmail.com>
809 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
811 2019-06-19 Alan Modra <amodra@gmail.com>
814 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
815 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
817 2019-06-19 Alan Modra <amodra@gmail.com>
819 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
820 functions that require r2 valid to use local entry.
821 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
823 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
825 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
826 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
827 with elfNN_aarch64_allocate_local_dynrelocs.
829 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
831 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
833 2019-06-14 Alan Modra <amodra@gmail.com>
835 * Makefile.in: Regenerate.
836 * configure: Regenerate.
838 2019-06-14 Alan Modra <amodra@gmail.com>
840 * elf64-ppc.c: Fix comments involving paddi.
842 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
845 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
846 absent, or the bfd is not in the ELF formart.
847 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
849 2019-06-10 Christos Zoulas <christos@zoulas.com>
852 * elf.c (elfcore_make_auxv_note_section): New function.
853 (elfcore_grok_note): Use it.
854 (elfcore_grok_freebsd_note): Likewise.
855 (elfcore_grok_openbsd_note): Likewise.
856 (elfcore_grok_netbsd_note): Likewise. Plus add support for
857 NT_NETBSDCORE_AUXV notes.
859 2019-06-06 Sudakshina Das <sudi.das@arm.com>
861 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
862 alignment of the new gnu property section.
864 2019-06-06 Sudakshina Das <sudi.das@arm.com>
866 * bfd-in.h: Change comment.
867 * bfd-in2.h: Regenerate.
868 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
869 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
872 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
874 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
875 Remove overflow check.
877 2019-05-28 Alan Modra <amodra@gmail.com>
880 * cofflink.c (coff_link_check_archive_element): Don't assume
881 element is a coff object file after calling add_archive_element.
883 2019-05-28 Alan Modra <amodra@gmail.com>
886 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
887 attempt to set sh_entsize for excluded PLT section.
889 2019-05-28 Alan Modra <amodra@gmail.com>
892 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
893 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
894 allocated in alpha_dynamic_entries_for_reloc.
896 2019-05-28 Alan Modra <amodra@gmail.com>
899 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
900 on NULL output_section.
901 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
903 2019-05-28 Alan Modra <amodra@gmail.com>
906 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
907 entry when MUST_FIND. Abort when MUST_FIND not found.
908 (elf_m68k_get_bfd2got_entry): Likewise.
909 (elf_m68k_relocate_section): Remove now useless assert.
911 2019-05-28 Alan Modra <amodra@gmail.com>
914 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
915 from bfd_link_info, not an output section owner.
916 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
917 (elf_hppa_final_link_relocate): Likewise.
919 2019-05-28 Alan Modra <amodra@gmail.com>
922 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
923 create_object_symbols_section, obj_textsec, obj_datasec or
924 obj_bsssec. Fix other errors in placement.
925 * config.bfd: Obsolete tic30-aout.
927 2019-05-28 Alan Modra <amodra@gmail.com>
930 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
931 end of section list as well as section_count.
932 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
933 section list before returning error.
935 2019-05-27 Alan Modra <amodra@gmail.com>
937 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
939 2019-05-27 Alan Modra <amodra@gmail.com>
942 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
944 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
946 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
947 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
948 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
949 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
950 (elf_backend_merge_symbol_attribute): Define.
952 2019-05-24 Alan Modra <amodra@gmail.com>
954 * po/SRC-POTFILES.in: Regenerate.
956 2019-05-24 Alan Modra <amodra@gmail.com>
958 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
959 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
960 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
961 (struct ppc_link_hash_table): Add powerxx_stubs.
962 (ppc64_elf_check_relocs): Set powerxx_stubs.
963 (build_powerxx_offset, size_powerxx_offset),
964 (num_relocs_for_powerxx_offset),
965 (emit_relocs_for_powerxx_offset): New functions.
966 (plt_stub_size): Size powerxx stubs.
967 (ppc_build_one_stub): Emit powerxx stubs.
968 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
971 2019-05-24 Alan Modra <amodra@gmail.com>
973 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
975 (xlate_pcrel_opt): New function.
976 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
977 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
978 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
980 2019-05-24 Alan Modra <amodra@gmail.com>
982 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
983 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
984 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
985 (BFD_RELOC_PPC64_PLT_PCREL34),
986 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
987 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
988 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
989 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
990 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
991 * elf64-ppc.c (PNOP): Define.
992 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
993 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
994 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
996 (ppc64_elf_prefix_reloc): New function.
997 (struct ppc_link_hash_table): Add notoc_plt.
998 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
999 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1000 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1001 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1002 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1003 possible need for dynamic relocs on non-pcrel powerxx relocs.
1004 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1005 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1006 (toc_adjusting_stub_needed): Likewise.
1007 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1008 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1009 * bfd-in2.h: Regenerate.
1010 * libbfd.h: Regenerate.
1012 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1014 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1015 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1017 * configure: Regenerate.
1019 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1021 * configure: Regenerated.
1022 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1023 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1024 (BFD64_BACKENDS): Add elf64-bpf.lo.
1025 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1026 * Makefile.in (SOURCE_HFILES): Regenerate.
1027 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1028 * cpu-bpf.c: New file.
1029 * elf64-bpf.c: Likewise.
1030 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1032 * archures.c: Define architecture bfd_arch_bpf and machine
1034 * reloc.c: Define BFD relocations used by the BPF target.
1035 * bfd-in2.h: Regenerated.
1036 * libbfd.h: Likewise.
1038 2019-05-22 Alan Modra <amodra@gmail.com>
1040 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1043 2019-05-22 Alan Modra <amodra@gmail.com>
1045 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1046 processing on "size error in section".
1048 2019-05-22 Alan Modra <amodra@gmail.com>
1050 * som.c (som_bfd_free_cached_info): Call
1051 _bfd_generic_close_and_cleanup.
1053 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1055 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1056 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1058 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1060 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1061 checks. Search the RELA table for n64 relocations.
1063 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1064 Faraz Shahbazker <fshahbazker@wavecomp.com>
1066 * elfxx-mips.c (LA25_BC): New macro.
1067 (mips_elf_link_hash_table)<compact_branches>: New field.
1068 (STUB_JALRC): New macro.
1069 (mipsr6_o32_exec_plt0_entry_compact): New array.
1070 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1071 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1072 (mipsr6_exec_plt_entry_compact): Likewise.
1073 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1074 when compact_branches is true.
1075 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1076 PLT for MIPSR6 with compact_branches. Do not reorder the
1077 compact branches PLT. Switch the lazy stub for MIPSR6
1078 with compact_branches to use JALRC.
1079 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1080 when compact_branches is true.
1081 (_bfd_mips_elf_compact_branches): New function.
1082 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1084 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1087 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1088 Fix print formatter.
1090 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1093 * elf32-arm.c (get_value_helper): Remove.
1094 (elf32_arm_final_link_relocate): Fix branch future relocations.
1096 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1099 * bfd-in.h (enum erratum_84319_opts): New
1100 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1101 int to enum erratum_84319_opts.
1102 * bfd-in2.h: Regenerate.
1103 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1104 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1105 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1106 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1107 (_bfd_aarch64_resize_stubs): Amend comment.
1108 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1110 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1111 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1113 (clear_erratum_843419_entry): Update erratum conditional.
1115 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1118 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1119 when computing distance_short_enough.
1121 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1124 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1125 Wrap around even if distance equals avr_pc_wrap_around.
1127 2019-05-20 Nick Clifton <nickc@redhat.com>
1129 * po/fr.po: Updated French translation.
1131 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1133 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1135 2019-05-16 Alan Modra <amodra@gmail.com>
1137 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1139 2019-05-15 Alan Modra <amodra@gmail.com>
1141 * elf32-arm.c (elf32_arm_write_section): Don't leave
1142 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1143 unitialised section contents.
1145 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1148 * verilog.c: (VerilogDataWidth): New variable.
1149 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1151 2019-05-08 Nick Clifton <nickc@redhat.com>
1154 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1155 rather than FALSE if encountering a non-ELF file.
1157 2019-05-06 Alan Modra <amodra@gmail.com>
1159 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1161 2019-05-06 Alan Modra <amodra@gmail.com>
1163 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1164 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1165 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1166 * libbfd.h: Regenerate.
1167 * bfd-in2.h: Regenerate.
1169 2019-05-04 Alan Modra <amodra@gmail.com>
1172 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1173 following the standard section names.
1174 (bfd_decode_symclass): Prioritize section flag tests in
1175 decode_section_type before name tests in coff_section_type.
1176 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1177 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1178 their names and choose standard .text section flags for
1181 2019-05-02 Nick Clifton <nickc@redhat.com>
1184 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1185 .gnu.debugaltlink sections as debugging sections.
1187 2019-04-30 Alan Modra <amodra@gmail.com>
1189 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1190 (struct _ppc64_elf_section_data): Likewise.
1191 (ppc64_elf_check_relocs): Set above fields.
1192 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1193 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1196 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1199 * elflink.c (elf_link_output_extsym): Don't complain undefined
1200 weak dynamic reference.
1202 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1204 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1205 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1206 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1207 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1208 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1209 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1210 (elfNN_aarch64_small_plt0_bti_entry): Update.
1211 (elfNN_aarch64_small_plt_bti_entry): Update.
1212 (elfNN_aarch64_small_plt_pac_entry): Update.
1213 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1214 (setup_plt_values): Setup new entries.
1215 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1216 (elfNN_aarch64_plt_sym_val): Likewise.
1218 2019-04-22 Jim Wilson <jimw@sifive.com>
1220 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1222 2019-04-19 Alan Modra <amodra@gmail.com>
1224 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1226 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1228 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1229 building shared object.
1230 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1232 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1235 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1238 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1240 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1242 * bfd-in2.h: Regenerate.
1243 * libbfd.h: Likewise.
1245 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1247 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1248 * bfd-in2.h: Regenerated.
1249 * libbfd.h: Regenerated.
1251 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1253 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1254 * bfd-in2.h: Regenerated.
1255 * libbfd.h: Likewise.
1257 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1259 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1260 * bfd-in2.h: Regenerated.
1261 * libbfd.h: Regenerated.
1262 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1263 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1264 and R_ARM_THM_BF12 together.
1265 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1267 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1269 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1270 * libbfd.h: Regenerated.
1271 * bfd-in2.h: Regenerated.
1272 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1273 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1274 and R_ARM_THM_BF18 together.
1275 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1277 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1279 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1280 * bfd-in2.h: Regenerated.
1281 * libbfd.h: Regenerated.
1282 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1283 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1284 and R_ARM_THM_BF16 together.
1285 (get_value_helper): New reloc helper.
1286 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1288 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1290 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1291 * bfd-in2.h: Regenerate.
1292 * libbfd.h: Regenerate.
1294 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1296 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1297 * bfd-in2.h: Regenerate.
1298 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1299 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1301 (using_thumb2): Likewise.
1302 (using_thumb2_bl): Update assert.
1303 (arch_has_arm_nop): Likewise.
1304 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1305 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1307 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1309 * elf-linker-x86.h (elf_x86_cet_report): New.
1310 (elf_linker_x86_params): Add cet_report.
1311 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1312 missing IBT and SHSTK properties if needed.
1314 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1317 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1318 "h != NULL". Don't check "h != NULL" before calling.
1319 bfd_elf_gc_record_vtentry.
1320 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1321 * elf32-bfin.c (bfin_check_relocs): Likewise.
1322 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1323 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1324 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1325 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1326 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1327 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1328 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1329 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1330 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1331 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1332 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1333 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1334 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1335 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1336 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1337 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1338 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1339 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1340 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1341 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1342 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1343 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1344 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1345 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1346 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1347 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1348 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1349 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1350 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1353 2019-04-11 Alan Modra <amodra@gmail.com>
1356 * elflink.c (elf_link_add_object_symbols): Don't read partial
1357 dynamic entries from fuzzed objects.
1359 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1362 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1363 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1364 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1366 2019-04-10 Michael Forney <mforney@mforney.org>
1369 * doc/chew.c (free_words): Correctly free "push_text" strings.
1371 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1373 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1375 2019-04-08 Alan Modra <amodra@gmail.com>
1377 * configure.ac (elfxx_x86): Define and use.
1378 * configure: Regenerate.
1380 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1382 * elf-linker-x86.h: New file.
1383 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1384 to get x86-specific linker options.
1385 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1386 (elf_x86_64_check_relocs): Likewise.
1387 (elf_x86_64_relocate_section): Likewise.
1388 (elf_x86_64_link_setup_gnu_properties): Likewise.
1389 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1390 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1391 (_bfd_elf_linker_x86_set_options): New function.
1392 * elfxx-x86.h: Include "elf-linker-x86.h".
1393 (elf_x86_link_hash_table): Add params.
1395 2019-04-03 Alan Modra <amodra@gmail.com>
1397 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1398 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1399 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1400 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1401 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1402 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1404 2019-04-02 Jim Wilson <jimw@sifive.com>
1407 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1408 ELF header flags to after check for ELF object file. Loop through
1409 sections looking for code sections, if none, then skip ABI checks.
1411 2019-03-30 Andrew Waterman <andrew@sifive.com>
1413 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1416 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1418 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1419 info->export_dynamic to the conditional.
1421 2019-03-28 Alan Modra <amodra@gmail.com>
1424 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1425 * configure: Regenerate.
1426 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1427 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1428 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1429 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1430 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1432 2019-03-21 Jim Wilson <jimw@sifive.com>
1435 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1436 verify sym non-NULL before using. Add identical check using h.
1438 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1440 * elf-bfd.h (struct elf_backend_data): Add argument to
1441 merge_gnu_properties.
1442 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1443 itself and while calling bed->merge_gnu_properties.
1444 (elf_merge_gnu_property_list): Update the calls for
1445 elf_merge_gnu_properties.
1446 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1447 of --force-bti warning and add argument.
1448 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1450 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1451 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1454 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1456 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1457 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1458 (elf_backend_fixup_gnu_properties): Define for AArch64.
1460 2019-03-18 Alan Modra <amodra@gmail.com>
1463 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1464 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1465 attempt at writing glink stubs only once.
1467 2019-03-16 Alan Modra <amodra@gmail.com>
1470 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1471 (_bfd_elf_rel_local_sym): Likewise.
1472 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1473 section of symbols with unrecognized shndx.
1475 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1478 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1480 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1481 in discarded section.
1483 2019-03-15 Alan Modra <amodra@gmail.com>
1486 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1487 symbol after globals if elf_bad_symtab is not set.
1489 2019-03-15 Alan Modra <amodra@gmail.com>
1492 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1493 (_bfd_elf_rel_local_sym): Likewise.
1495 2019-03-15 Alan Modra <amodra@gmail.com>
1498 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1499 object files with sh_size not a multiple of sh_entsize.
1501 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1504 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1505 input with bad relocation.
1507 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1509 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1511 2019-03-14 Nick Clifton <nickc@redhat.com>
1514 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1515 (save_section_vma): Initialise field to the number of entries in
1517 (section_vma_same): Check that the number of entries in the
1518 sec_vma table matches the number of sections in the bfd.
1520 2019-03-14 Nick Clifton <nickc@redhat.com>
1523 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1524 section owner pointer when adding the default symbol.
1526 2019-03-14 Nick Clifton <nickc@redhat.com>
1529 * elflink.c (elf_link_add_object_symbols): Add new local variable
1530 extversym_end. Initialise it to point to the end of the version
1531 symbol table, if present. Check it when initialising and updating
1534 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1536 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1537 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1538 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1539 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1541 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1542 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1543 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1545 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1546 Szabolcs Nagy <szabolcs.nagy@arm.com>
1548 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1549 (aarch64_bti_pac_info): New.
1550 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1551 (bfd_elf32_aarch64_set_options): Likewise.
1552 * bfd-in2.h: Regenerate
1553 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1554 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1555 (elfNN_aarch64_small_plt0_bti_entry): New.
1556 (elfNN_aarch64_small_plt_bti_entry): New.
1557 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1558 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1559 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1560 tlsdesc_plt_entry_size fields.
1561 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1562 (setup_plt_values): New helper function.
1563 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1565 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1567 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1568 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1569 to plt stubs instead of fixed ones and update filling them according
1570 to the need for bti.
1571 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1572 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1573 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1574 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1575 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1577 (bfd_elfNN_get_synthetic_symtab): Define.
1578 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1579 and mising BTI NOTE SECTION.
1582 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1584 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1585 linker created inputs from merge.
1586 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1587 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1588 (elfNN_aarch64_link_setup_gnu_properties): New.
1589 (elfNN_aarch64_merge_gnu_properties): New.
1590 (elf_backend_setup_gnu_properties): Define for AArch64.
1591 (elf_backend_merge_gnu_properties): Likewise.
1592 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1593 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1594 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1595 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1596 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1597 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1598 (elf_backend_parse_gnu_properties): Define for AArch64.
1600 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1603 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1604 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1606 2019-03-12 Alan Modra <amodra@gmail.com>
1608 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1609 nmemb parameter. Use bfd_alloc2.
1610 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1612 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1613 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1614 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1616 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1617 (assign_section_numbers): Style fix.
1618 (swap_out_syms): Use bfd_malloc2.
1619 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1621 (_bfd_elf_make_empty_symbol): Style fix.
1622 (elfobj_grok_stapsdt_note_1): Formatting.
1623 * elfcode.h (elf_object_p): Use bfd_alloc2.
1624 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1625 (elf_slurp_symbol_table): Use bfd_zalloc2.
1626 (elf_slurp_reloc_table): Use bfd_alloc2.
1627 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1628 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1629 size calculation doesn't overflow.
1630 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1631 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1632 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1634 2019-03-08 Alan Modra <amodra@gmail.com>
1637 * merge.c (merge_strings): Return secinfo. Don't pad section
1639 (_bfd_merge_sections): Pad section to alignment here, if input
1640 sections contributing to merged output all pad to alignment.
1643 2019-03-06 Nick Clifton <nickc@redhat.com>
1645 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1647 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1648 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1650 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1652 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1653 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1656 * elf32-s390.c (allocate_dynrelocs): Update comment.
1658 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1660 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1662 2019-02-28 Nick Clifton <nickc@redhat.com>
1665 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1666 section that is not NUL terminated.
1668 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1671 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1672 by linker when checking copy reloc on protected symbol.
1674 2019-02-24 Alan Modra <amodra@gmail.com>
1677 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1679 2019-02-20 Eric Tsai <erictsai@cadence.com>
1681 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1682 sections between the call site and call destination and adjust
1683 call distance by the largest alignment.
1685 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1687 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1688 * elf.c (elfcore_grok_aarch_pauth): New function.
1689 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1690 (elfcore_write_aarch_pauth): New function.
1691 (elfcore_write_register_note): Check for AArch64 pauth section.
1693 2019-02-20 Alan Modra <amodra@gmail.com>
1696 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1699 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1701 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1702 Darwin hosts, not just or1k.
1703 * configure: Regenerate.
1705 2019-02-20 Alan Modra <amodra@gmail.com>
1708 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1709 sentinel NUL to string buffer nearer to loop where it is used.
1710 Don't go past sentinel when scanning strings, and don't write
1712 * archive.c (do_slurp_coff_armap): Simplify string handling to
1715 2019-02-19 Alan Modra <amodra@gmail.com>
1718 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1719 attempting to prevent read past end of section.
1721 2019-02-18 Alan Modra <amodra@gmail.com>
1724 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1725 PRIx64 to generate warning messages. Print local sym names too.
1727 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1729 * elf32-arc (INIT_SYM_STRING): Delete.
1730 (FINI_SYM_STRING): Likewise.
1731 (init_str): Likewise.
1732 (fini_str): Likewise.
1734 2019-02-08 Alan Modra <amodra@gmail.com>
1736 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1737 for bss-plt" warning to make it an error.
1739 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1742 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1743 reloc_class_ifunc for ifunc symbols.
1744 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1746 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1748 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1749 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1751 2019-02-07 Nick Clifton <nickc@redhat.com>
1753 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1754 into the definitely obsolete list.
1756 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1759 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1760 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1761 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1763 (elf_x86_64_check_relocs): Here.
1764 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1765 to check if a symbol is defined in a non-shared object.
1766 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1768 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1770 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1771 of 'labs' (and fix GCC warning).
1773 2019-01-25 Nick Clifton <nickc@redhat.com>
1775 * po/ru.po: Updated Russian translation.
1777 2019-01-23 Nick Clifton <nickc@redhat.com>
1779 * po/fr.po: Updated French translation.
1781 2019-01-21 Nick Clifton <nickc@redhat.com>
1783 * po/pt.po: Updated Portuguese translation.
1784 * po/uk.po: Updated Ukranian translation.
1786 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1789 * elf32-nds32.c (nds32_relocate_section): Add space between words
1791 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1793 (riscv_i_or_e_p): Likewise.
1794 (riscv_merge_arch_attr_info): Likewise.
1796 2019-01-19 Nick Clifton <nickc@redhat.com>
1798 * version.m4: Reset to 2.32.51
1799 * configure: Regenerate.
1800 * po/bfd.pot: Regenerate.
1802 2018-06-24 Nick Clifton <nickc@redhat.com>
1804 2.32 branch created.
1806 2019-01-16 Kito Cheng <kito@andestech.com>
1808 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1811 2019-01-16 Kito Cheng <kito@andestech.com>
1812 Nelson Chu <nelson@andestech.com>
1814 * elfnn-riscv.c (in_subsets): New.
1815 (out_subsets): Likewise.
1816 (merged_subsets): Likewise.
1817 (riscv_std_ext_p): Likewise.
1818 (riscv_non_std_ext_p): Likewise.
1819 (riscv_std_sv_ext_p): Likewise.
1820 (riscv_non_std_sv_ext_p): Likewise.
1821 (riscv_version_mismatch): Likewise.
1822 (riscv_i_or_e_p): Likewise.
1823 (riscv_merge_std_ext): Likewise.
1824 (riscv_merge_non_std_and_sv_ext): Likewise.
1825 (riscv_merge_arch_attr_info): Likewise.
1826 (riscv_merge_attributes): Likewise.
1827 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1829 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1830 (elf_backend_obj_attrs_vendor): Define.
1831 (elf_backend_obj_attrs_section_type): Likewise.
1832 (elf_backend_obj_attrs_section): Likewise.
1833 (elf_backend_obj_attrs_arg_type): Define as
1834 riscv_elf_obj_attrs_arg_type.
1835 * elfxx-riscv.c (riscv_estimate_digit): New.
1836 (riscv_estimate_arch_strlen1): Likewise.
1837 (riscv_estimate_arch_strlen): Likewise.
1838 (riscv_arch_str1): Likewise.
1839 (riscv_arch_str): Likewise.
1840 * elfxx-riscv.h (riscv_arch_str): Declare.
1842 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1844 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1846 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1847 source field. (md_apply_fix): Apply final fix
1848 to BFD_RELOC_S12Z_OPR.
1849 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1851 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1854 * elf32-s390.c (allocate_dynrelocs): Update comment.
1856 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1858 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1859 * configure: Regenerate.
1861 2019-01-08 Alan Modra <amodra@gmail.com>
1865 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1868 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1870 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1871 * bfd/bfd-in2.h: Regenerate.
1872 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1873 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1875 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1877 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1878 default target, little endian target is more suitable.
1880 2019-01-04 Alan Modra <amodra@gmail.com>
1884 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1886 (EQ_VALUE_IN_FIELD): Likewise.
1887 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1889 2019-01-01 Alan Modra <amodra@gmail.com>
1891 Update year range in copyright notice of all files.
1893 For older changes see ChangeLog-2018
1895 Copyright (C) 2019 Free Software Foundation, Inc.
1897 Copying and distribution of this file, with or without modification,
1898 are permitted in any medium without royalty provided the copyright
1899 notice and this notice are preserved.
1905 version-control: never