1 2019-07-24 Alan Modra <amodra@gmail.com>
3 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
5 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
6 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
8 2019-07-24 Alan Modra <amodra@gmail.com>
10 * elf32-visium.c (visium_elf_post_process_headers): Don't set
11 EI_OSABI header byte here.
14 2019-07-23 Alan Modra <amodra@gmail.com>
16 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
17 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
18 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
19 when elf_gnu_osabi_mbind is set.
20 (_bfd_elf_map_sections_to_segments): Likewise.
21 (_bfd_elf_init_private_section_data): Likewise.
22 (_bfd_elf_final_write_processing): Update comment.
23 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
24 (elf_backend_special_sections): Define without .tbss for linux.
26 2019-07-23 Alan Modra <amodra@gmail.com>
28 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
29 Remove none, any, all enums.
30 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
31 (_bfd_elf_final_write_processing): Declare.
32 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
33 elf_backend_final_write_processing.
34 (_bfd_elf_post_process_headers): Move body of function to..
35 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
36 only when not already set. Adjust for rename.
37 * elfxx-target.h (elf_backend_final_write_processing): Default to
38 _bfd_elf_final_write_processing.
39 * elf-hppa.h (elf_hppa_final_write_processing): Call
40 _bfd_elf_final_write_processing.
41 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
42 * elf-nacl.c (nacl_final_write_processing): Likewise.
43 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
44 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
45 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
46 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
47 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
48 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
49 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
50 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
51 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
52 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
53 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
54 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
55 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
56 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
57 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
58 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
59 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
60 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
61 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
62 * elf32-arm.c (arm_final_write_processing): Split out from..
63 (elf32_arm_final_write_processing): ..here. Call
64 _bfd_elf_final_write_processing.
65 (elf32_arm_nacl_final_write_processing): Adjust.
66 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
67 (_bfd_mips_elf_final_write_processing): ..here. Call
68 _bfd_elf_final_write_processing.
69 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
70 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
71 * elf32-ppc.c (ppc_final_write_processing): Split out from..
72 (ppc_elf_final_write_processing): ..here. Call
73 _bfd_elf_final_write_processing.
74 (ppc_elf_vxworks_final_write_processing): Adjust.
75 * elf32-sparc.c (sparc_final_write_processing): Split out from..
76 (elf32_sparc_final_write_processing): ..here. Call
77 _bfd_elf_final_write_processing.
78 (elf32_sparc_vxworks_final_write_processing): Adjust.
79 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
80 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
81 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
82 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
83 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
84 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
85 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
86 * elflink.c (elf_link_add_object_symbols): Likewise.
87 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
90 2019-07-23 Omar Majid <omajid@redhat.com>
92 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
93 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
94 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
96 * peXXigen.c: Add comment about source of .NET magic numbers.
98 2019-07-19 Alan Modra <amodra@gmail.com>
100 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
101 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
102 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
103 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
104 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
105 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
106 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
107 (ppc64_elf_check_relocs): Support pcrel tls relocs.
108 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
109 * bfd-in2.h: Regenerate.
110 * libbfd.h: Regenerate.
112 2019-07-18 Alan Modra <amodra@gmail.com>
114 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
115 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
118 2019-07-18 Alan Modra <amodra@gmail.com>
120 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
121 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
123 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
124 tls_type vars unsigned int.
125 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
126 to select r_type edit.
128 2019-07-18 Alan Modra <amodra@gmail.com>
130 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
132 * elf64-ppc.c (TLS_GDIE): Likewise.
134 2019-07-18 Alan Modra <amodra@gmail.com>
136 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
137 range of tp-relative offsets.
139 2019-07-15 Alan Modra <amodra@gmail.com>
141 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
142 alias is no longer bfd_link_hash_defined, clear the alias.
144 2019-07-13 Alan Modra <amodra@gmail.com>
146 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
148 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
149 (_bfd_elf_init_2_index_sections): Likewise.
150 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
151 relocations for local TLS symbols, use STN_UNDEF as the relocation
153 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
154 leave TLS symbol value in the addend.
156 2019-07-08 Alan Modra <amodra@gmail.com>
159 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
160 size before reading first word.
162 2019-07-02 Nick Clifton <nickc@redhat.com>
165 * elf.c (is_debuginfo_file): New function.
166 (assign_file_positions_for_non_load_sections): Do not warn about
167 allocated sections outside of loadable segments if they are found
169 * elf-bfd.h (is_debuginfo_file): Prototype.
171 2019-07-02 Nick Clifton <nickc@redhat.com>
174 * compress.c (bfd_get_full_section_contents): Do not complain
175 about linker created sections that are larger than the file size.
177 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
179 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
180 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
182 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
184 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
186 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
187 sections when .text section contain secure entry functions
190 2019-07-01 Nick Clifton <nickc@redhat.com>
193 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
194 section VMA in the offset used to update exidx relocs.
196 2019-06-28 Nick Clifton <nickc@redhat.com>
199 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
200 large version reference section.
201 * compress.c (bfd_get_full_section_contents): Check for an
202 uncompressed section whose size is larger than the file size.
204 2019-06-28 Alan Modra <amodra@gmail.com>
206 * format.c (bfd_check_format_matches): Don't match plugin target
207 if another target matches. Expand comment.
208 * targets.c (_bfd_target_vector): Move plugin_vec after all other
209 non-corefile targets, outside !SELECT_VECS.
210 * config.bfd: Don't handle targ=plugin here.
211 * configure.ac: Don't add plugin to enable_targets or handle in
212 target loop setting selvecs and other target vars.
213 * configure: Regenerate.
215 2019-06-26 Nick Clifton <nickc@redhat.com>
218 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
219 messages for failures.
220 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
221 if returning an error value.
223 2019-06-25 Jan Beulich <jbeulich@suse.com>
225 * elf-properties.c (elf_find_and_remove_property): Rename last
226 parameter. Mention it in comment.
228 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
230 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
231 SEC_MERGE or SEC_CODE flags are set.
232 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
233 symtype consistently. Don't include sec_addr (sym_sec) in symval.
234 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
235 Add sec_addr (sym_sec) after handling merge sections.
237 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
240 * elf-properties.c (elf_merge_gnu_property_list): Remove the
241 property after reporting property removal.
243 2019-06-23 Alan Modra <amodra@gmail.com>
246 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
247 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
248 Reduce range of offsets allowed for other GOT relocs.
250 2019-06-23 Alan Modra <amodra@gmail.com>
253 * elfcode.h (elf_object_p): Warning fix.
255 2019-06-21 Alan Modra <amodra@gmail.com>
258 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
260 2019-06-19 Alan Modra <amodra@gmail.com>
263 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
264 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
266 2019-06-19 Alan Modra <amodra@gmail.com>
268 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
269 functions that require r2 valid to use local entry.
270 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
272 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
274 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
275 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
276 with elfNN_aarch64_allocate_local_dynrelocs.
278 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
280 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
282 2019-06-14 Alan Modra <amodra@gmail.com>
284 * Makefile.in: Regenerate.
285 * configure: Regenerate.
287 2019-06-14 Alan Modra <amodra@gmail.com>
289 * elf64-ppc.c: Fix comments involving paddi.
291 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
294 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
295 absent, or the bfd is not in the ELF formart.
296 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
298 2019-06-10 Christos Zoulas <christos@zoulas.com>
301 * elf.c (elfcore_make_auxv_note_section): New function.
302 (elfcore_grok_note): Use it.
303 (elfcore_grok_freebsd_note): Likewise.
304 (elfcore_grok_openbsd_note): Likewise.
305 (elfcore_grok_netbsd_note): Likewise. Plus add support for
306 NT_NETBSDCORE_AUXV notes.
308 2019-06-06 Sudakshina Das <sudi.das@arm.com>
310 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
311 alignment of the new gnu property section.
313 2019-06-06 Sudakshina Das <sudi.das@arm.com>
315 * bfd-in.h: Change comment.
316 * bfd-in2.h: Regenerate.
317 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
318 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
321 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
323 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
324 Remove overflow check.
326 2019-05-28 Alan Modra <amodra@gmail.com>
329 * cofflink.c (coff_link_check_archive_element): Don't assume
330 element is a coff object file after calling add_archive_element.
332 2019-05-28 Alan Modra <amodra@gmail.com>
335 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
336 attempt to set sh_entsize for excluded PLT section.
338 2019-05-28 Alan Modra <amodra@gmail.com>
341 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
342 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
343 allocated in alpha_dynamic_entries_for_reloc.
345 2019-05-28 Alan Modra <amodra@gmail.com>
348 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
349 on NULL output_section.
350 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
352 2019-05-28 Alan Modra <amodra@gmail.com>
355 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
356 entry when MUST_FIND. Abort when MUST_FIND not found.
357 (elf_m68k_get_bfd2got_entry): Likewise.
358 (elf_m68k_relocate_section): Remove now useless assert.
360 2019-05-28 Alan Modra <amodra@gmail.com>
363 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
364 from bfd_link_info, not an output section owner.
365 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
366 (elf_hppa_final_link_relocate): Likewise.
368 2019-05-28 Alan Modra <amodra@gmail.com>
371 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
372 create_object_symbols_section, obj_textsec, obj_datasec or
373 obj_bsssec. Fix other errors in placement.
374 * config.bfd: Obsolete tic30-aout.
376 2019-05-28 Alan Modra <amodra@gmail.com>
379 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
380 end of section list as well as section_count.
381 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
382 section list before returning error.
384 2019-05-27 Alan Modra <amodra@gmail.com>
386 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
388 2019-05-27 Alan Modra <amodra@gmail.com>
391 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
393 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
395 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
396 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
397 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
398 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
399 (elf_backend_merge_symbol_attribute): Define.
401 2019-05-24 Alan Modra <amodra@gmail.com>
403 * po/SRC-POTFILES.in: Regenerate.
405 2019-05-24 Alan Modra <amodra@gmail.com>
407 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
408 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
409 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
410 (struct ppc_link_hash_table): Add powerxx_stubs.
411 (ppc64_elf_check_relocs): Set powerxx_stubs.
412 (build_powerxx_offset, size_powerxx_offset),
413 (num_relocs_for_powerxx_offset),
414 (emit_relocs_for_powerxx_offset): New functions.
415 (plt_stub_size): Size powerxx stubs.
416 (ppc_build_one_stub): Emit powerxx stubs.
417 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
420 2019-05-24 Alan Modra <amodra@gmail.com>
422 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
424 (xlate_pcrel_opt): New function.
425 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
426 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
427 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
429 2019-05-24 Alan Modra <amodra@gmail.com>
431 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
432 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
433 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
434 (BFD_RELOC_PPC64_PLT_PCREL34),
435 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
436 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
437 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
438 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
439 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
440 * elf64-ppc.c (PNOP): Define.
441 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
442 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
443 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
445 (ppc64_elf_prefix_reloc): New function.
446 (struct ppc_link_hash_table): Add notoc_plt.
447 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
448 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
449 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
450 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
451 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
452 possible need for dynamic relocs on non-pcrel powerxx relocs.
453 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
454 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
455 (toc_adjusting_stub_needed): Likewise.
456 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
457 (ppc64_elf_relocate_section): Handle new powerxx relocs.
458 * bfd-in2.h: Regenerate.
459 * libbfd.h: Regenerate.
461 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
463 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
464 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
466 * configure: Regenerate.
468 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
470 * configure: Regenerated.
471 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
472 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
473 (BFD64_BACKENDS): Add elf64-bpf.lo.
474 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
475 * Makefile.in (SOURCE_HFILES): Regenerate.
476 * config.bfd (targ_cpu): Handle bpf-*-* targets.
477 * cpu-bpf.c: New file.
478 * elf64-bpf.c: Likewise.
479 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
481 * archures.c: Define architecture bfd_arch_bpf and machine
483 * reloc.c: Define BFD relocations used by the BPF target.
484 * bfd-in2.h: Regenerated.
485 * libbfd.h: Likewise.
487 2019-05-22 Alan Modra <amodra@gmail.com>
489 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
492 2019-05-22 Alan Modra <amodra@gmail.com>
494 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
495 processing on "size error in section".
497 2019-05-22 Alan Modra <amodra@gmail.com>
499 * som.c (som_bfd_free_cached_info): Call
500 _bfd_generic_close_and_cleanup.
502 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
504 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
505 for TLS_TPREL_HI16(/LO16) relocations in shared library.
507 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
509 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
510 checks. Search the RELA table for n64 relocations.
512 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
513 Faraz Shahbazker <fshahbazker@wavecomp.com>
515 * elfxx-mips.c (LA25_BC): New macro.
516 (mips_elf_link_hash_table)<compact_branches>: New field.
517 (STUB_JALRC): New macro.
518 (mipsr6_o32_exec_plt0_entry_compact): New array.
519 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
520 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
521 (mipsr6_exec_plt_entry_compact): Likewise.
522 (mips_elf_create_la25_stub): Use BC instead of J for stubs
523 when compact_branches is true.
524 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
525 PLT for MIPSR6 with compact_branches. Do not reorder the
526 compact branches PLT. Switch the lazy stub for MIPSR6
527 with compact_branches to use JALRC.
528 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
529 when compact_branches is true.
530 (_bfd_mips_elf_compact_branches): New function.
531 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
533 2019-05-21 Tamar Christina <tamar.christina@arm.com>
536 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
539 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
542 * elf32-arm.c (get_value_helper): Remove.
543 (elf32_arm_final_link_relocate): Fix branch future relocations.
545 2019-05-21 Tamar Christina <tamar.christina@arm.com>
548 * bfd-in.h (enum erratum_84319_opts): New
549 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
550 int to enum erratum_84319_opts.
551 * bfd-in2.h: Regenerate.
552 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
553 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
554 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
555 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
556 (_bfd_aarch64_resize_stubs): Amend comment.
557 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
559 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
560 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
562 (clear_erratum_843419_entry): Update erratum conditional.
564 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
567 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
568 when computing distance_short_enough.
570 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
573 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
574 Wrap around even if distance equals avr_pc_wrap_around.
576 2019-05-20 Nick Clifton <nickc@redhat.com>
578 * po/fr.po: Updated French translation.
580 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
582 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
584 2019-05-16 Alan Modra <amodra@gmail.com>
586 * elf32-arm.c (elf32_arm_write_section): Revert last change.
588 2019-05-15 Alan Modra <amodra@gmail.com>
590 * elf32-arm.c (elf32_arm_write_section): Don't leave
591 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
592 unitialised section contents.
594 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
597 * verilog.c: (VerilogDataWidth): New variable.
598 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
600 2019-05-08 Nick Clifton <nickc@redhat.com>
603 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
604 rather than FALSE if encountering a non-ELF file.
606 2019-05-06 Alan Modra <amodra@gmail.com>
608 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
610 2019-05-06 Alan Modra <amodra@gmail.com>
612 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
613 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
614 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
615 * libbfd.h: Regenerate.
616 * bfd-in2.h: Regenerate.
618 2019-05-04 Alan Modra <amodra@gmail.com>
621 * syms.c (coff_section_type): Only allow '.', '$' and numeric
622 following the standard section names.
623 (bfd_decode_symclass): Prioritize section flag tests in
624 decode_section_type before name tests in coff_section_type.
625 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
626 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
627 their names and choose standard .text section flags for
630 2019-05-02 Nick Clifton <nickc@redhat.com>
633 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
634 .gnu.debugaltlink sections as debugging sections.
636 2019-04-30 Alan Modra <amodra@gmail.com>
638 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
639 (struct _ppc64_elf_section_data): Likewise.
640 (ppc64_elf_check_relocs): Set above fields.
641 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
642 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
645 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
648 * elflink.c (elf_link_output_extsym): Don't complain undefined
649 weak dynamic reference.
651 2019-04-25 Sudakshina Das <sudi.das@arm.com>
653 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
654 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
655 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
656 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
657 (elfNN_aarch64_small_plt0_pac_entry): Remove.
658 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
659 (elfNN_aarch64_small_plt0_bti_entry): Update.
660 (elfNN_aarch64_small_plt_bti_entry): Update.
661 (elfNN_aarch64_small_plt_pac_entry): Update.
662 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
663 (setup_plt_values): Setup new entries.
664 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
665 (elfNN_aarch64_plt_sym_val): Likewise.
667 2019-04-22 Jim Wilson <jimw@sifive.com>
669 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
671 2019-04-19 Alan Modra <amodra@gmail.com>
673 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
675 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
677 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
678 building shared object.
679 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
681 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
684 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
687 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
689 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
691 * bfd-in2.h: Regenerate.
692 * libbfd.h: Likewise.
694 2019-04-15 Sudakshina Das <sudi.das@arm.com>
696 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
697 * bfd-in2.h: Regenerated.
698 * libbfd.h: Regenerated.
700 2019-04-15 Sudakshina Das <sudi.das@arm.com>
702 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
703 * bfd-in2.h: Regenerated.
704 * libbfd.h: Likewise.
706 2019-04-15 Sudakshina Das <sudi.das@arm.com>
708 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
709 * bfd-in2.h: Regenerated.
710 * libbfd.h: Regenerated.
711 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
712 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
713 and R_ARM_THM_BF12 together.
714 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
716 2019-04-15 Sudakshina Das <sudi.das@arm.com>
718 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
719 * libbfd.h: Regenerated.
720 * bfd-in2.h: Regenerated.
721 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
722 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
723 and R_ARM_THM_BF18 together.
724 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
726 2019-04-15 Sudakshina Das <sudi.das@arm.com>
728 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
729 * bfd-in2.h: Regenerated.
730 * libbfd.h: Regenerated.
731 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
732 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
733 and R_ARM_THM_BF16 together.
734 (get_value_helper): New reloc helper.
735 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
737 2019-04-15 Sudakshina Das <sudi.das@arm.com>
739 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
740 * bfd-in2.h: Regenerate.
741 * libbfd.h: Regenerate.
743 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
745 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
746 * bfd-in2.h: Regenerate.
747 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
748 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
750 (using_thumb2): Likewise.
751 (using_thumb2_bl): Update assert.
752 (arch_has_arm_nop): Likewise.
753 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
754 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
756 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
758 * elf-linker-x86.h (elf_x86_cet_report): New.
759 (elf_linker_x86_params): Add cet_report.
760 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
761 missing IBT and SHSTK properties if needed.
763 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
766 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
767 "h != NULL". Don't check "h != NULL" before calling.
768 bfd_elf_gc_record_vtentry.
769 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
770 * elf32-bfin.c (bfin_check_relocs): Likewise.
771 * elf32-cris.c (cris_elf_check_relocs): Likewise.
772 * elf32-csky.c (csky_elf_check_relocs): Likewise.
773 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
774 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
775 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
776 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
777 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
778 * elf32-i386.c (elf_i386_check_relocs): Likewise.
779 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
780 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
781 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
782 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
783 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
784 * elf32-metag.c (elf_metag_check_relocs): Likewise.
785 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
786 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
787 * elf32-s390.c (elf_s390_check_relocs): Likewise.
788 * elf32-sh.c (sh_elf_check_relocs): Likewise.
789 * elf32-v850.c (v850_elf_check_relocs): Likewise.
790 * elf32-vax.c (elf_vax_check_relocs): Likewise.
791 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
792 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
793 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
794 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
795 * elf64-s390.c (elf_s390_check_relocs): Likewise.
796 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
797 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
798 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
799 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
802 2019-04-11 Alan Modra <amodra@gmail.com>
805 * elflink.c (elf_link_add_object_symbols): Don't read partial
806 dynamic entries from fuzzed objects.
808 2019-04-11 Tamar Christina <tamar.christina@arm.com>
811 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
812 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
813 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
815 2019-04-10 Michael Forney <mforney@mforney.org>
818 * doc/chew.c (free_words): Correctly free "push_text" strings.
820 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
822 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
824 2019-04-08 Alan Modra <amodra@gmail.com>
826 * configure.ac (elfxx_x86): Define and use.
827 * configure: Regenerate.
829 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
831 * elf-linker-x86.h: New file.
832 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
833 to get x86-specific linker options.
834 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
835 (elf_x86_64_check_relocs): Likewise.
836 (elf_x86_64_relocate_section): Likewise.
837 (elf_x86_64_link_setup_gnu_properties): Likewise.
838 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
839 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
840 (_bfd_elf_linker_x86_set_options): New function.
841 * elfxx-x86.h: Include "elf-linker-x86.h".
842 (elf_x86_link_hash_table): Add params.
844 2019-04-03 Alan Modra <amodra@gmail.com>
846 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
847 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
848 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
849 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
850 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
851 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
853 2019-04-02 Jim Wilson <jimw@sifive.com>
856 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
857 ELF header flags to after check for ELF object file. Loop through
858 sections looking for code sections, if none, then skip ABI checks.
860 2019-03-30 Andrew Waterman <andrew@sifive.com>
862 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
865 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
867 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
868 info->export_dynamic to the conditional.
870 2019-03-28 Alan Modra <amodra@gmail.com>
873 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
874 * configure: Regenerate.
875 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
876 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
877 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
878 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
879 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
881 2019-03-21 Jim Wilson <jimw@sifive.com>
884 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
885 verify sym non-NULL before using. Add identical check using h.
887 2019-03-21 Sudakshina Das <sudi.das@arm.com>
889 * elf-bfd.h (struct elf_backend_data): Add argument to
890 merge_gnu_properties.
891 * elf-properties.c (elf_merge_gnu_properties): Add argument to
892 itself and while calling bed->merge_gnu_properties.
893 (elf_merge_gnu_property_list): Update the calls for
894 elf_merge_gnu_properties.
895 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
896 of --force-bti warning and add argument.
897 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
899 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
900 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
903 2019-03-20 Sudakshina Das <sudi.das@arm.com>
905 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
906 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
907 (elf_backend_fixup_gnu_properties): Define for AArch64.
909 2019-03-18 Alan Modra <amodra@gmail.com>
912 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
913 for local iplt syms with ent->plt.offset == -1. Remove ineffective
914 attempt at writing glink stubs only once.
916 2019-03-16 Alan Modra <amodra@gmail.com>
919 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
920 (_bfd_elf_rel_local_sym): Likewise.
921 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
922 section of symbols with unrecognized shndx.
924 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
927 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
929 * cofflink.c (coff_link_add_symbols): Check for symbols defined
930 in discarded section.
932 2019-03-15 Alan Modra <amodra@gmail.com>
935 * elflink.c (elf_link_add_object_symbols): Bail out on a local
936 symbol after globals if elf_bad_symtab is not set.
938 2019-03-15 Alan Modra <amodra@gmail.com>
941 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
942 (_bfd_elf_rel_local_sym): Likewise.
944 2019-03-15 Alan Modra <amodra@gmail.com>
947 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
948 object files with sh_size not a multiple of sh_entsize.
950 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
953 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
954 input with bad relocation.
956 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
958 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
960 2019-03-14 Nick Clifton <nickc@redhat.com>
963 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
964 (save_section_vma): Initialise field to the number of entries in
966 (section_vma_same): Check that the number of entries in the
967 sec_vma table matches the number of sections in the bfd.
969 2019-03-14 Nick Clifton <nickc@redhat.com>
972 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
973 section owner pointer when adding the default symbol.
975 2019-03-14 Nick Clifton <nickc@redhat.com>
978 * elflink.c (elf_link_add_object_symbols): Add new local variable
979 extversym_end. Initialise it to point to the end of the version
980 symbol table, if present. Check it when initialising and updating
983 2019-03-13 Sudakshina Das <sudi.das@arm.com>
985 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
986 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
987 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
988 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
990 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
991 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
992 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
994 2019-03-13 Sudakshina Das <sudi.das@arm.com>
995 Szabolcs Nagy <szabolcs.nagy@arm.com>
997 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
998 (aarch64_bti_pac_info): New.
999 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1000 (bfd_elf32_aarch64_set_options): Likewise.
1001 * bfd-in2.h: Regenerate
1002 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1003 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1004 (elfNN_aarch64_small_plt0_bti_entry): New.
1005 (elfNN_aarch64_small_plt_bti_entry): New.
1006 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1007 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1008 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1009 tlsdesc_plt_entry_size fields.
1010 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1011 (setup_plt_values): New helper function.
1012 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1014 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1016 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1017 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1018 to plt stubs instead of fixed ones and update filling them according
1019 to the need for bti.
1020 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1021 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1022 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1023 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1024 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1026 (bfd_elfNN_get_synthetic_symtab): Define.
1027 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1028 and mising BTI NOTE SECTION.
1031 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1033 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1034 linker created inputs from merge.
1035 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1036 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1037 (elfNN_aarch64_link_setup_gnu_properties): New.
1038 (elfNN_aarch64_merge_gnu_properties): New.
1039 (elf_backend_setup_gnu_properties): Define for AArch64.
1040 (elf_backend_merge_gnu_properties): Likewise.
1041 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1042 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1043 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1044 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1045 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1046 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1047 (elf_backend_parse_gnu_properties): Define for AArch64.
1049 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1052 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1053 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1055 2019-03-12 Alan Modra <amodra@gmail.com>
1057 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1058 nmemb parameter. Use bfd_alloc2.
1059 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1061 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1062 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1063 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1065 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1066 (assign_section_numbers): Style fix.
1067 (swap_out_syms): Use bfd_malloc2.
1068 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1070 (_bfd_elf_make_empty_symbol): Style fix.
1071 (elfobj_grok_stapsdt_note_1): Formatting.
1072 * elfcode.h (elf_object_p): Use bfd_alloc2.
1073 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1074 (elf_slurp_symbol_table): Use bfd_zalloc2.
1075 (elf_slurp_reloc_table): Use bfd_alloc2.
1076 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1077 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1078 size calculation doesn't overflow.
1079 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1080 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1081 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1083 2019-03-08 Alan Modra <amodra@gmail.com>
1086 * merge.c (merge_strings): Return secinfo. Don't pad section
1088 (_bfd_merge_sections): Pad section to alignment here, if input
1089 sections contributing to merged output all pad to alignment.
1092 2019-03-06 Nick Clifton <nickc@redhat.com>
1094 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1096 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1097 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1099 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1101 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1102 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1105 * elf32-s390.c (allocate_dynrelocs): Update comment.
1107 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1109 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1111 2019-02-28 Nick Clifton <nickc@redhat.com>
1114 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1115 section that is not NUL terminated.
1117 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1120 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1121 by linker when checking copy reloc on protected symbol.
1123 2019-02-24 Alan Modra <amodra@gmail.com>
1126 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1128 2019-02-20 Eric Tsai <erictsai@cadence.com>
1130 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1131 sections between the call site and call destination and adjust
1132 call distance by the largest alignment.
1134 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1136 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1137 * elf.c (elfcore_grok_aarch_pauth): New function.
1138 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1139 (elfcore_write_aarch_pauth): New function.
1140 (elfcore_write_register_note): Check for AArch64 pauth section.
1142 2019-02-20 Alan Modra <amodra@gmail.com>
1145 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1148 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1150 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1151 Darwin hosts, not just or1k.
1152 * configure: Regenerate.
1154 2019-02-20 Alan Modra <amodra@gmail.com>
1157 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1158 sentinel NUL to string buffer nearer to loop where it is used.
1159 Don't go past sentinel when scanning strings, and don't write
1161 * archive.c (do_slurp_coff_armap): Simplify string handling to
1164 2019-02-19 Alan Modra <amodra@gmail.com>
1167 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1168 attempting to prevent read past end of section.
1170 2019-02-18 Alan Modra <amodra@gmail.com>
1173 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1174 PRIx64 to generate warning messages. Print local sym names too.
1176 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1178 * elf32-arc (INIT_SYM_STRING): Delete.
1179 (FINI_SYM_STRING): Likewise.
1180 (init_str): Likewise.
1181 (fini_str): Likewise.
1183 2019-02-08 Alan Modra <amodra@gmail.com>
1185 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1186 for bss-plt" warning to make it an error.
1188 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1191 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1192 reloc_class_ifunc for ifunc symbols.
1193 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1195 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1197 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1198 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1200 2019-02-07 Nick Clifton <nickc@redhat.com>
1202 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1203 into the definitely obsolete list.
1205 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1208 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1209 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1210 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1212 (elf_x86_64_check_relocs): Here.
1213 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1214 to check if a symbol is defined in a non-shared object.
1215 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1217 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1219 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1220 of 'labs' (and fix GCC warning).
1222 2019-01-25 Nick Clifton <nickc@redhat.com>
1224 * po/ru.po: Updated Russian translation.
1226 2019-01-23 Nick Clifton <nickc@redhat.com>
1228 * po/fr.po: Updated French translation.
1230 2019-01-21 Nick Clifton <nickc@redhat.com>
1232 * po/pt.po: Updated Portuguese translation.
1233 * po/uk.po: Updated Ukranian translation.
1235 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1238 * elf32-nds32.c (nds32_relocate_section): Add space between words
1240 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1242 (riscv_i_or_e_p): Likewise.
1243 (riscv_merge_arch_attr_info): Likewise.
1245 2019-01-19 Nick Clifton <nickc@redhat.com>
1247 * version.m4: Reset to 2.32.51
1248 * configure: Regenerate.
1249 * po/bfd.pot: Regenerate.
1251 2018-06-24 Nick Clifton <nickc@redhat.com>
1253 2.32 branch created.
1255 2019-01-16 Kito Cheng <kito@andestech.com>
1257 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1260 2019-01-16 Kito Cheng <kito@andestech.com>
1261 Nelson Chu <nelson@andestech.com>
1263 * elfnn-riscv.c (in_subsets): New.
1264 (out_subsets): Likewise.
1265 (merged_subsets): Likewise.
1266 (riscv_std_ext_p): Likewise.
1267 (riscv_non_std_ext_p): Likewise.
1268 (riscv_std_sv_ext_p): Likewise.
1269 (riscv_non_std_sv_ext_p): Likewise.
1270 (riscv_version_mismatch): Likewise.
1271 (riscv_i_or_e_p): Likewise.
1272 (riscv_merge_std_ext): Likewise.
1273 (riscv_merge_non_std_and_sv_ext): Likewise.
1274 (riscv_merge_arch_attr_info): Likewise.
1275 (riscv_merge_attributes): Likewise.
1276 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1278 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1279 (elf_backend_obj_attrs_vendor): Define.
1280 (elf_backend_obj_attrs_section_type): Likewise.
1281 (elf_backend_obj_attrs_section): Likewise.
1282 (elf_backend_obj_attrs_arg_type): Define as
1283 riscv_elf_obj_attrs_arg_type.
1284 * elfxx-riscv.c (riscv_estimate_digit): New.
1285 (riscv_estimate_arch_strlen1): Likewise.
1286 (riscv_estimate_arch_strlen): Likewise.
1287 (riscv_arch_str1): Likewise.
1288 (riscv_arch_str): Likewise.
1289 * elfxx-riscv.h (riscv_arch_str): Declare.
1291 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1293 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1295 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1296 source field. (md_apply_fix): Apply final fix
1297 to BFD_RELOC_S12Z_OPR.
1298 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1300 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1303 * elf32-s390.c (allocate_dynrelocs): Update comment.
1305 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1307 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1308 * configure: Regenerate.
1310 2019-01-08 Alan Modra <amodra@gmail.com>
1314 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1317 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1319 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1320 * bfd/bfd-in2.h: Regenerate.
1321 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1322 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1324 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1326 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1327 default target, little endian target is more suitable.
1329 2019-01-04 Alan Modra <amodra@gmail.com>
1333 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1335 (EQ_VALUE_IN_FIELD): Likewise.
1336 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1338 2019-01-01 Alan Modra <amodra@gmail.com>
1340 Update year range in copyright notice of all files.
1342 For older changes see ChangeLog-2018
1344 Copyright (C) 2019 Free Software Foundation, Inc.
1346 Copying and distribution of this file, with or without modification,
1347 are permitted in any medium without royalty provided the copyright
1348 notice and this notice are preserved.
1354 version-control: never