1 2019-07-24 Alan Modra <amodra@gmail.com>
3 * elf32-visium.c (visium_elf_post_process_headers): Don't set
4 EI_OSABI header byte here.
7 2019-07-23 Alan Modra <amodra@gmail.com>
9 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
10 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
11 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
12 when elf_gnu_osabi_mbind is set.
13 (_bfd_elf_map_sections_to_segments): Likewise.
14 (_bfd_elf_init_private_section_data): Likewise.
15 (_bfd_elf_final_write_processing): Update comment.
16 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
17 (elf_backend_special_sections): Define without .tbss for linux.
19 2019-07-23 Alan Modra <amodra@gmail.com>
21 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
22 Remove none, any, all enums.
23 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
24 (_bfd_elf_final_write_processing): Declare.
25 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
26 elf_backend_final_write_processing.
27 (_bfd_elf_post_process_headers): Move body of function to..
28 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
29 only when not already set. Adjust for rename.
30 * elfxx-target.h (elf_backend_final_write_processing): Default to
31 _bfd_elf_final_write_processing.
32 * elf-hppa.h (elf_hppa_final_write_processing): Call
33 _bfd_elf_final_write_processing.
34 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
35 * elf-nacl.c (nacl_final_write_processing): Likewise.
36 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
37 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
38 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
39 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
40 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
41 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
42 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
43 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
44 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
45 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
46 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
47 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
48 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
49 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
50 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
51 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
52 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
53 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
54 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
55 * elf32-arm.c (arm_final_write_processing): Split out from..
56 (elf32_arm_final_write_processing): ..here. Call
57 _bfd_elf_final_write_processing.
58 (elf32_arm_nacl_final_write_processing): Adjust.
59 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
60 (_bfd_mips_elf_final_write_processing): ..here. Call
61 _bfd_elf_final_write_processing.
62 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
63 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
64 * elf32-ppc.c (ppc_final_write_processing): Split out from..
65 (ppc_elf_final_write_processing): ..here. Call
66 _bfd_elf_final_write_processing.
67 (ppc_elf_vxworks_final_write_processing): Adjust.
68 * elf32-sparc.c (sparc_final_write_processing): Split out from..
69 (elf32_sparc_final_write_processing): ..here. Call
70 _bfd_elf_final_write_processing.
71 (elf32_sparc_vxworks_final_write_processing): Adjust.
72 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
73 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
74 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
75 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
76 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
77 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
78 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
79 * elflink.c (elf_link_add_object_symbols): Likewise.
80 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
83 2019-07-23 Omar Majid <omajid@redhat.com>
85 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
86 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
87 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
89 * peXXigen.c: Add comment about source of .NET magic numbers.
91 2019-07-19 Alan Modra <amodra@gmail.com>
93 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
94 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
95 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
96 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
97 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
98 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
99 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
100 (ppc64_elf_check_relocs): Support pcrel tls relocs.
101 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
102 * bfd-in2.h: Regenerate.
103 * libbfd.h: Regenerate.
105 2019-07-18 Alan Modra <amodra@gmail.com>
107 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
108 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
111 2019-07-18 Alan Modra <amodra@gmail.com>
113 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
114 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
116 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
117 tls_type vars unsigned int.
118 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
119 to select r_type edit.
121 2019-07-18 Alan Modra <amodra@gmail.com>
123 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
125 * elf64-ppc.c (TLS_GDIE): Likewise.
127 2019-07-18 Alan Modra <amodra@gmail.com>
129 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
130 range of tp-relative offsets.
132 2019-07-15 Alan Modra <amodra@gmail.com>
134 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
135 alias is no longer bfd_link_hash_defined, clear the alias.
137 2019-07-13 Alan Modra <amodra@gmail.com>
139 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
141 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
142 (_bfd_elf_init_2_index_sections): Likewise.
143 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
144 relocations for local TLS symbols, use STN_UNDEF as the relocation
146 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
147 leave TLS symbol value in the addend.
149 2019-07-08 Alan Modra <amodra@gmail.com>
152 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
153 size before reading first word.
155 2019-07-02 Nick Clifton <nickc@redhat.com>
158 * elf.c (is_debuginfo_file): New function.
159 (assign_file_positions_for_non_load_sections): Do not warn about
160 allocated sections outside of loadable segments if they are found
162 * elf-bfd.h (is_debuginfo_file): Prototype.
164 2019-07-02 Nick Clifton <nickc@redhat.com>
167 * compress.c (bfd_get_full_section_contents): Do not complain
168 about linker created sections that are larger than the file size.
170 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
172 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
173 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
175 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
177 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
179 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
180 sections when .text section contain secure entry functions
183 2019-07-01 Nick Clifton <nickc@redhat.com>
186 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
187 section VMA in the offset used to update exidx relocs.
189 2019-06-28 Nick Clifton <nickc@redhat.com>
192 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
193 large version reference section.
194 * compress.c (bfd_get_full_section_contents): Check for an
195 uncompressed section whose size is larger than the file size.
197 2019-06-28 Alan Modra <amodra@gmail.com>
199 * format.c (bfd_check_format_matches): Don't match plugin target
200 if another target matches. Expand comment.
201 * targets.c (_bfd_target_vector): Move plugin_vec after all other
202 non-corefile targets, outside !SELECT_VECS.
203 * config.bfd: Don't handle targ=plugin here.
204 * configure.ac: Don't add plugin to enable_targets or handle in
205 target loop setting selvecs and other target vars.
206 * configure: Regenerate.
208 2019-06-26 Nick Clifton <nickc@redhat.com>
211 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
212 messages for failures.
213 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
214 if returning an error value.
216 2019-06-25 Jan Beulich <jbeulich@suse.com>
218 * elf-properties.c (elf_find_and_remove_property): Rename last
219 parameter. Mention it in comment.
221 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
223 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
224 SEC_MERGE or SEC_CODE flags are set.
225 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
226 symtype consistently. Don't include sec_addr (sym_sec) in symval.
227 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
228 Add sec_addr (sym_sec) after handling merge sections.
230 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
233 * elf-properties.c (elf_merge_gnu_property_list): Remove the
234 property after reporting property removal.
236 2019-06-23 Alan Modra <amodra@gmail.com>
239 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
240 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
241 Reduce range of offsets allowed for other GOT relocs.
243 2019-06-23 Alan Modra <amodra@gmail.com>
246 * elfcode.h (elf_object_p): Warning fix.
248 2019-06-21 Alan Modra <amodra@gmail.com>
251 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
253 2019-06-19 Alan Modra <amodra@gmail.com>
256 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
257 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
259 2019-06-19 Alan Modra <amodra@gmail.com>
261 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
262 functions that require r2 valid to use local entry.
263 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
265 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
267 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
268 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
269 with elfNN_aarch64_allocate_local_dynrelocs.
271 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
273 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
275 2019-06-14 Alan Modra <amodra@gmail.com>
277 * Makefile.in: Regenerate.
278 * configure: Regenerate.
280 2019-06-14 Alan Modra <amodra@gmail.com>
282 * elf64-ppc.c: Fix comments involving paddi.
284 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
287 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
288 absent, or the bfd is not in the ELF formart.
289 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
291 2019-06-10 Christos Zoulas <christos@zoulas.com>
294 * elf.c (elfcore_make_auxv_note_section): New function.
295 (elfcore_grok_note): Use it.
296 (elfcore_grok_freebsd_note): Likewise.
297 (elfcore_grok_openbsd_note): Likewise.
298 (elfcore_grok_netbsd_note): Likewise. Plus add support for
299 NT_NETBSDCORE_AUXV notes.
301 2019-06-06 Sudakshina Das <sudi.das@arm.com>
303 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
304 alignment of the new gnu property section.
306 2019-06-06 Sudakshina Das <sudi.das@arm.com>
308 * bfd-in.h: Change comment.
309 * bfd-in2.h: Regenerate.
310 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
311 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
314 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
316 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
317 Remove overflow check.
319 2019-05-28 Alan Modra <amodra@gmail.com>
322 * cofflink.c (coff_link_check_archive_element): Don't assume
323 element is a coff object file after calling add_archive_element.
325 2019-05-28 Alan Modra <amodra@gmail.com>
328 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
329 attempt to set sh_entsize for excluded PLT section.
331 2019-05-28 Alan Modra <amodra@gmail.com>
334 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
335 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
336 allocated in alpha_dynamic_entries_for_reloc.
338 2019-05-28 Alan Modra <amodra@gmail.com>
341 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
342 on NULL output_section.
343 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
345 2019-05-28 Alan Modra <amodra@gmail.com>
348 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
349 entry when MUST_FIND. Abort when MUST_FIND not found.
350 (elf_m68k_get_bfd2got_entry): Likewise.
351 (elf_m68k_relocate_section): Remove now useless assert.
353 2019-05-28 Alan Modra <amodra@gmail.com>
356 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
357 from bfd_link_info, not an output section owner.
358 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
359 (elf_hppa_final_link_relocate): Likewise.
361 2019-05-28 Alan Modra <amodra@gmail.com>
364 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
365 create_object_symbols_section, obj_textsec, obj_datasec or
366 obj_bsssec. Fix other errors in placement.
367 * config.bfd: Obsolete tic30-aout.
369 2019-05-28 Alan Modra <amodra@gmail.com>
372 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
373 end of section list as well as section_count.
374 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
375 section list before returning error.
377 2019-05-27 Alan Modra <amodra@gmail.com>
379 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
381 2019-05-27 Alan Modra <amodra@gmail.com>
384 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
386 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
388 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
389 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
390 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
391 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
392 (elf_backend_merge_symbol_attribute): Define.
394 2019-05-24 Alan Modra <amodra@gmail.com>
396 * po/SRC-POTFILES.in: Regenerate.
398 2019-05-24 Alan Modra <amodra@gmail.com>
400 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
401 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
402 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
403 (struct ppc_link_hash_table): Add powerxx_stubs.
404 (ppc64_elf_check_relocs): Set powerxx_stubs.
405 (build_powerxx_offset, size_powerxx_offset),
406 (num_relocs_for_powerxx_offset),
407 (emit_relocs_for_powerxx_offset): New functions.
408 (plt_stub_size): Size powerxx stubs.
409 (ppc_build_one_stub): Emit powerxx stubs.
410 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
413 2019-05-24 Alan Modra <amodra@gmail.com>
415 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
417 (xlate_pcrel_opt): New function.
418 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
419 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
420 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
422 2019-05-24 Alan Modra <amodra@gmail.com>
424 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
425 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
426 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
427 (BFD_RELOC_PPC64_PLT_PCREL34),
428 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
429 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
430 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
431 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
432 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
433 * elf64-ppc.c (PNOP): Define.
434 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
435 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
436 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
438 (ppc64_elf_prefix_reloc): New function.
439 (struct ppc_link_hash_table): Add notoc_plt.
440 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
441 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
442 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
443 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
444 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
445 possible need for dynamic relocs on non-pcrel powerxx relocs.
446 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
447 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
448 (toc_adjusting_stub_needed): Likewise.
449 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
450 (ppc64_elf_relocate_section): Handle new powerxx relocs.
451 * bfd-in2.h: Regenerate.
452 * libbfd.h: Regenerate.
454 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
456 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
457 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
459 * configure: Regenerate.
461 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
463 * configure: Regenerated.
464 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
465 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
466 (BFD64_BACKENDS): Add elf64-bpf.lo.
467 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
468 * Makefile.in (SOURCE_HFILES): Regenerate.
469 * config.bfd (targ_cpu): Handle bpf-*-* targets.
470 * cpu-bpf.c: New file.
471 * elf64-bpf.c: Likewise.
472 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
474 * archures.c: Define architecture bfd_arch_bpf and machine
476 * reloc.c: Define BFD relocations used by the BPF target.
477 * bfd-in2.h: Regenerated.
478 * libbfd.h: Likewise.
480 2019-05-22 Alan Modra <amodra@gmail.com>
482 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
485 2019-05-22 Alan Modra <amodra@gmail.com>
487 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
488 processing on "size error in section".
490 2019-05-22 Alan Modra <amodra@gmail.com>
492 * som.c (som_bfd_free_cached_info): Call
493 _bfd_generic_close_and_cleanup.
495 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
497 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
498 for TLS_TPREL_HI16(/LO16) relocations in shared library.
500 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
502 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
503 checks. Search the RELA table for n64 relocations.
505 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
506 Faraz Shahbazker <fshahbazker@wavecomp.com>
508 * elfxx-mips.c (LA25_BC): New macro.
509 (mips_elf_link_hash_table)<compact_branches>: New field.
510 (STUB_JALRC): New macro.
511 (mipsr6_o32_exec_plt0_entry_compact): New array.
512 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
513 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
514 (mipsr6_exec_plt_entry_compact): Likewise.
515 (mips_elf_create_la25_stub): Use BC instead of J for stubs
516 when compact_branches is true.
517 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
518 PLT for MIPSR6 with compact_branches. Do not reorder the
519 compact branches PLT. Switch the lazy stub for MIPSR6
520 with compact_branches to use JALRC.
521 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
522 when compact_branches is true.
523 (_bfd_mips_elf_compact_branches): New function.
524 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
526 2019-05-21 Tamar Christina <tamar.christina@arm.com>
529 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
532 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
535 * elf32-arm.c (get_value_helper): Remove.
536 (elf32_arm_final_link_relocate): Fix branch future relocations.
538 2019-05-21 Tamar Christina <tamar.christina@arm.com>
541 * bfd-in.h (enum erratum_84319_opts): New
542 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
543 int to enum erratum_84319_opts.
544 * bfd-in2.h: Regenerate.
545 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
546 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
547 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
548 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
549 (_bfd_aarch64_resize_stubs): Amend comment.
550 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
552 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
553 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
555 (clear_erratum_843419_entry): Update erratum conditional.
557 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
560 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
561 when computing distance_short_enough.
563 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
566 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
567 Wrap around even if distance equals avr_pc_wrap_around.
569 2019-05-20 Nick Clifton <nickc@redhat.com>
571 * po/fr.po: Updated French translation.
573 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
575 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
577 2019-05-16 Alan Modra <amodra@gmail.com>
579 * elf32-arm.c (elf32_arm_write_section): Revert last change.
581 2019-05-15 Alan Modra <amodra@gmail.com>
583 * elf32-arm.c (elf32_arm_write_section): Don't leave
584 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
585 unitialised section contents.
587 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
590 * verilog.c: (VerilogDataWidth): New variable.
591 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
593 2019-05-08 Nick Clifton <nickc@redhat.com>
596 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
597 rather than FALSE if encountering a non-ELF file.
599 2019-05-06 Alan Modra <amodra@gmail.com>
601 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
603 2019-05-06 Alan Modra <amodra@gmail.com>
605 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
606 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
607 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
608 * libbfd.h: Regenerate.
609 * bfd-in2.h: Regenerate.
611 2019-05-04 Alan Modra <amodra@gmail.com>
614 * syms.c (coff_section_type): Only allow '.', '$' and numeric
615 following the standard section names.
616 (bfd_decode_symclass): Prioritize section flag tests in
617 decode_section_type before name tests in coff_section_type.
618 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
619 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
620 their names and choose standard .text section flags for
623 2019-05-02 Nick Clifton <nickc@redhat.com>
626 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
627 .gnu.debugaltlink sections as debugging sections.
629 2019-04-30 Alan Modra <amodra@gmail.com>
631 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
632 (struct _ppc64_elf_section_data): Likewise.
633 (ppc64_elf_check_relocs): Set above fields.
634 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
635 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
638 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
641 * elflink.c (elf_link_output_extsym): Don't complain undefined
642 weak dynamic reference.
644 2019-04-25 Sudakshina Das <sudi.das@arm.com>
646 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
647 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
648 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
649 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
650 (elfNN_aarch64_small_plt0_pac_entry): Remove.
651 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
652 (elfNN_aarch64_small_plt0_bti_entry): Update.
653 (elfNN_aarch64_small_plt_bti_entry): Update.
654 (elfNN_aarch64_small_plt_pac_entry): Update.
655 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
656 (setup_plt_values): Setup new entries.
657 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
658 (elfNN_aarch64_plt_sym_val): Likewise.
660 2019-04-22 Jim Wilson <jimw@sifive.com>
662 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
664 2019-04-19 Alan Modra <amodra@gmail.com>
666 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
668 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
670 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
671 building shared object.
672 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
674 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
677 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
680 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
682 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
684 * bfd-in2.h: Regenerate.
685 * libbfd.h: Likewise.
687 2019-04-15 Sudakshina Das <sudi.das@arm.com>
689 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
690 * bfd-in2.h: Regenerated.
691 * libbfd.h: Regenerated.
693 2019-04-15 Sudakshina Das <sudi.das@arm.com>
695 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
696 * bfd-in2.h: Regenerated.
697 * libbfd.h: Likewise.
699 2019-04-15 Sudakshina Das <sudi.das@arm.com>
701 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
702 * bfd-in2.h: Regenerated.
703 * libbfd.h: Regenerated.
704 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
705 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
706 and R_ARM_THM_BF12 together.
707 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
709 2019-04-15 Sudakshina Das <sudi.das@arm.com>
711 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
712 * libbfd.h: Regenerated.
713 * bfd-in2.h: Regenerated.
714 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
715 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
716 and R_ARM_THM_BF18 together.
717 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
719 2019-04-15 Sudakshina Das <sudi.das@arm.com>
721 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
722 * bfd-in2.h: Regenerated.
723 * libbfd.h: Regenerated.
724 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
725 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
726 and R_ARM_THM_BF16 together.
727 (get_value_helper): New reloc helper.
728 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
730 2019-04-15 Sudakshina Das <sudi.das@arm.com>
732 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
733 * bfd-in2.h: Regenerate.
734 * libbfd.h: Regenerate.
736 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
738 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
739 * bfd-in2.h: Regenerate.
740 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
741 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
743 (using_thumb2): Likewise.
744 (using_thumb2_bl): Update assert.
745 (arch_has_arm_nop): Likewise.
746 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
747 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
749 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
751 * elf-linker-x86.h (elf_x86_cet_report): New.
752 (elf_linker_x86_params): Add cet_report.
753 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
754 missing IBT and SHSTK properties if needed.
756 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
759 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
760 "h != NULL". Don't check "h != NULL" before calling.
761 bfd_elf_gc_record_vtentry.
762 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
763 * elf32-bfin.c (bfin_check_relocs): Likewise.
764 * elf32-cris.c (cris_elf_check_relocs): Likewise.
765 * elf32-csky.c (csky_elf_check_relocs): Likewise.
766 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
767 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
768 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
769 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
770 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
771 * elf32-i386.c (elf_i386_check_relocs): Likewise.
772 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
773 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
774 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
775 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
776 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
777 * elf32-metag.c (elf_metag_check_relocs): Likewise.
778 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
779 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
780 * elf32-s390.c (elf_s390_check_relocs): Likewise.
781 * elf32-sh.c (sh_elf_check_relocs): Likewise.
782 * elf32-v850.c (v850_elf_check_relocs): Likewise.
783 * elf32-vax.c (elf_vax_check_relocs): Likewise.
784 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
785 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
786 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
787 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
788 * elf64-s390.c (elf_s390_check_relocs): Likewise.
789 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
790 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
791 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
792 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
795 2019-04-11 Alan Modra <amodra@gmail.com>
798 * elflink.c (elf_link_add_object_symbols): Don't read partial
799 dynamic entries from fuzzed objects.
801 2019-04-11 Tamar Christina <tamar.christina@arm.com>
804 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
805 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
806 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
808 2019-04-10 Michael Forney <mforney@mforney.org>
811 * doc/chew.c (free_words): Correctly free "push_text" strings.
813 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
815 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
817 2019-04-08 Alan Modra <amodra@gmail.com>
819 * configure.ac (elfxx_x86): Define and use.
820 * configure: Regenerate.
822 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
824 * elf-linker-x86.h: New file.
825 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
826 to get x86-specific linker options.
827 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
828 (elf_x86_64_check_relocs): Likewise.
829 (elf_x86_64_relocate_section): Likewise.
830 (elf_x86_64_link_setup_gnu_properties): Likewise.
831 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
832 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
833 (_bfd_elf_linker_x86_set_options): New function.
834 * elfxx-x86.h: Include "elf-linker-x86.h".
835 (elf_x86_link_hash_table): Add params.
837 2019-04-03 Alan Modra <amodra@gmail.com>
839 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
840 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
841 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
842 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
843 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
844 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
846 2019-04-02 Jim Wilson <jimw@sifive.com>
849 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
850 ELF header flags to after check for ELF object file. Loop through
851 sections looking for code sections, if none, then skip ABI checks.
853 2019-03-30 Andrew Waterman <andrew@sifive.com>
855 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
858 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
860 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
861 info->export_dynamic to the conditional.
863 2019-03-28 Alan Modra <amodra@gmail.com>
866 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
867 * configure: Regenerate.
868 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
869 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
870 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
871 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
872 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
874 2019-03-21 Jim Wilson <jimw@sifive.com>
877 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
878 verify sym non-NULL before using. Add identical check using h.
880 2019-03-21 Sudakshina Das <sudi.das@arm.com>
882 * elf-bfd.h (struct elf_backend_data): Add argument to
883 merge_gnu_properties.
884 * elf-properties.c (elf_merge_gnu_properties): Add argument to
885 itself and while calling bed->merge_gnu_properties.
886 (elf_merge_gnu_property_list): Update the calls for
887 elf_merge_gnu_properties.
888 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
889 of --force-bti warning and add argument.
890 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
892 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
893 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
896 2019-03-20 Sudakshina Das <sudi.das@arm.com>
898 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
899 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
900 (elf_backend_fixup_gnu_properties): Define for AArch64.
902 2019-03-18 Alan Modra <amodra@gmail.com>
905 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
906 for local iplt syms with ent->plt.offset == -1. Remove ineffective
907 attempt at writing glink stubs only once.
909 2019-03-16 Alan Modra <amodra@gmail.com>
912 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
913 (_bfd_elf_rel_local_sym): Likewise.
914 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
915 section of symbols with unrecognized shndx.
917 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
920 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
922 * cofflink.c (coff_link_add_symbols): Check for symbols defined
923 in discarded section.
925 2019-03-15 Alan Modra <amodra@gmail.com>
928 * elflink.c (elf_link_add_object_symbols): Bail out on a local
929 symbol after globals if elf_bad_symtab is not set.
931 2019-03-15 Alan Modra <amodra@gmail.com>
934 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
935 (_bfd_elf_rel_local_sym): Likewise.
937 2019-03-15 Alan Modra <amodra@gmail.com>
940 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
941 object files with sh_size not a multiple of sh_entsize.
943 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
946 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
947 input with bad relocation.
949 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
951 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
953 2019-03-14 Nick Clifton <nickc@redhat.com>
956 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
957 (save_section_vma): Initialise field to the number of entries in
959 (section_vma_same): Check that the number of entries in the
960 sec_vma table matches the number of sections in the bfd.
962 2019-03-14 Nick Clifton <nickc@redhat.com>
965 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
966 section owner pointer when adding the default symbol.
968 2019-03-14 Nick Clifton <nickc@redhat.com>
971 * elflink.c (elf_link_add_object_symbols): Add new local variable
972 extversym_end. Initialise it to point to the end of the version
973 symbol table, if present. Check it when initialising and updating
976 2019-03-13 Sudakshina Das <sudi.das@arm.com>
978 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
979 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
980 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
981 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
983 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
984 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
985 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
987 2019-03-13 Sudakshina Das <sudi.das@arm.com>
988 Szabolcs Nagy <szabolcs.nagy@arm.com>
990 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
991 (aarch64_bti_pac_info): New.
992 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
993 (bfd_elf32_aarch64_set_options): Likewise.
994 * bfd-in2.h: Regenerate
995 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
996 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
997 (elfNN_aarch64_small_plt0_bti_entry): New.
998 (elfNN_aarch64_small_plt_bti_entry): New.
999 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1000 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1001 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1002 tlsdesc_plt_entry_size fields.
1003 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1004 (setup_plt_values): New helper function.
1005 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1007 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1009 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1010 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1011 to plt stubs instead of fixed ones and update filling them according
1012 to the need for bti.
1013 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1014 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1015 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1016 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1017 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1019 (bfd_elfNN_get_synthetic_symtab): Define.
1020 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1021 and mising BTI NOTE SECTION.
1024 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1026 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1027 linker created inputs from merge.
1028 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1029 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1030 (elfNN_aarch64_link_setup_gnu_properties): New.
1031 (elfNN_aarch64_merge_gnu_properties): New.
1032 (elf_backend_setup_gnu_properties): Define for AArch64.
1033 (elf_backend_merge_gnu_properties): Likewise.
1034 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1035 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1036 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1037 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1038 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1039 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1040 (elf_backend_parse_gnu_properties): Define for AArch64.
1042 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1045 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1046 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1048 2019-03-12 Alan Modra <amodra@gmail.com>
1050 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1051 nmemb parameter. Use bfd_alloc2.
1052 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1054 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1055 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1056 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1058 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1059 (assign_section_numbers): Style fix.
1060 (swap_out_syms): Use bfd_malloc2.
1061 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1063 (_bfd_elf_make_empty_symbol): Style fix.
1064 (elfobj_grok_stapsdt_note_1): Formatting.
1065 * elfcode.h (elf_object_p): Use bfd_alloc2.
1066 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1067 (elf_slurp_symbol_table): Use bfd_zalloc2.
1068 (elf_slurp_reloc_table): Use bfd_alloc2.
1069 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1070 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1071 size calculation doesn't overflow.
1072 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1073 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1074 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1076 2019-03-08 Alan Modra <amodra@gmail.com>
1079 * merge.c (merge_strings): Return secinfo. Don't pad section
1081 (_bfd_merge_sections): Pad section to alignment here, if input
1082 sections contributing to merged output all pad to alignment.
1085 2019-03-06 Nick Clifton <nickc@redhat.com>
1087 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1089 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1090 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1092 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1094 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1095 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1098 * elf32-s390.c (allocate_dynrelocs): Update comment.
1100 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1102 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1104 2019-02-28 Nick Clifton <nickc@redhat.com>
1107 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1108 section that is not NUL terminated.
1110 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1113 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1114 by linker when checking copy reloc on protected symbol.
1116 2019-02-24 Alan Modra <amodra@gmail.com>
1119 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1121 2019-02-20 Eric Tsai <erictsai@cadence.com>
1123 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1124 sections between the call site and call destination and adjust
1125 call distance by the largest alignment.
1127 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1129 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1130 * elf.c (elfcore_grok_aarch_pauth): New function.
1131 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1132 (elfcore_write_aarch_pauth): New function.
1133 (elfcore_write_register_note): Check for AArch64 pauth section.
1135 2019-02-20 Alan Modra <amodra@gmail.com>
1138 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1141 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1143 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1144 Darwin hosts, not just or1k.
1145 * configure: Regenerate.
1147 2019-02-20 Alan Modra <amodra@gmail.com>
1150 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1151 sentinel NUL to string buffer nearer to loop where it is used.
1152 Don't go past sentinel when scanning strings, and don't write
1154 * archive.c (do_slurp_coff_armap): Simplify string handling to
1157 2019-02-19 Alan Modra <amodra@gmail.com>
1160 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1161 attempting to prevent read past end of section.
1163 2019-02-18 Alan Modra <amodra@gmail.com>
1166 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1167 PRIx64 to generate warning messages. Print local sym names too.
1169 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1171 * elf32-arc (INIT_SYM_STRING): Delete.
1172 (FINI_SYM_STRING): Likewise.
1173 (init_str): Likewise.
1174 (fini_str): Likewise.
1176 2019-02-08 Alan Modra <amodra@gmail.com>
1178 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1179 for bss-plt" warning to make it an error.
1181 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1184 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1185 reloc_class_ifunc for ifunc symbols.
1186 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1188 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1190 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1191 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1193 2019-02-07 Nick Clifton <nickc@redhat.com>
1195 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1196 into the definitely obsolete list.
1198 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1201 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1202 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1203 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1205 (elf_x86_64_check_relocs): Here.
1206 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1207 to check if a symbol is defined in a non-shared object.
1208 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1210 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1212 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1213 of 'labs' (and fix GCC warning).
1215 2019-01-25 Nick Clifton <nickc@redhat.com>
1217 * po/ru.po: Updated Russian translation.
1219 2019-01-23 Nick Clifton <nickc@redhat.com>
1221 * po/fr.po: Updated French translation.
1223 2019-01-21 Nick Clifton <nickc@redhat.com>
1225 * po/pt.po: Updated Portuguese translation.
1226 * po/uk.po: Updated Ukranian translation.
1228 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1231 * elf32-nds32.c (nds32_relocate_section): Add space between words
1233 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1235 (riscv_i_or_e_p): Likewise.
1236 (riscv_merge_arch_attr_info): Likewise.
1238 2019-01-19 Nick Clifton <nickc@redhat.com>
1240 * version.m4: Reset to 2.32.51
1241 * configure: Regenerate.
1242 * po/bfd.pot: Regenerate.
1244 2018-06-24 Nick Clifton <nickc@redhat.com>
1246 2.32 branch created.
1248 2019-01-16 Kito Cheng <kito@andestech.com>
1250 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1253 2019-01-16 Kito Cheng <kito@andestech.com>
1254 Nelson Chu <nelson@andestech.com>
1256 * elfnn-riscv.c (in_subsets): New.
1257 (out_subsets): Likewise.
1258 (merged_subsets): Likewise.
1259 (riscv_std_ext_p): Likewise.
1260 (riscv_non_std_ext_p): Likewise.
1261 (riscv_std_sv_ext_p): Likewise.
1262 (riscv_non_std_sv_ext_p): Likewise.
1263 (riscv_version_mismatch): Likewise.
1264 (riscv_i_or_e_p): Likewise.
1265 (riscv_merge_std_ext): Likewise.
1266 (riscv_merge_non_std_and_sv_ext): Likewise.
1267 (riscv_merge_arch_attr_info): Likewise.
1268 (riscv_merge_attributes): Likewise.
1269 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1271 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1272 (elf_backend_obj_attrs_vendor): Define.
1273 (elf_backend_obj_attrs_section_type): Likewise.
1274 (elf_backend_obj_attrs_section): Likewise.
1275 (elf_backend_obj_attrs_arg_type): Define as
1276 riscv_elf_obj_attrs_arg_type.
1277 * elfxx-riscv.c (riscv_estimate_digit): New.
1278 (riscv_estimate_arch_strlen1): Likewise.
1279 (riscv_estimate_arch_strlen): Likewise.
1280 (riscv_arch_str1): Likewise.
1281 (riscv_arch_str): Likewise.
1282 * elfxx-riscv.h (riscv_arch_str): Declare.
1284 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1286 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1288 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1289 source field. (md_apply_fix): Apply final fix
1290 to BFD_RELOC_S12Z_OPR.
1291 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1293 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1296 * elf32-s390.c (allocate_dynrelocs): Update comment.
1298 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1300 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1301 * configure: Regenerate.
1303 2019-01-08 Alan Modra <amodra@gmail.com>
1307 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1310 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1312 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1313 * bfd/bfd-in2.h: Regenerate.
1314 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1315 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1317 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1319 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1320 default target, little endian target is more suitable.
1322 2019-01-04 Alan Modra <amodra@gmail.com>
1326 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1328 (EQ_VALUE_IN_FIELD): Likewise.
1329 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1331 2019-01-01 Alan Modra <amodra@gmail.com>
1333 Update year range in copyright notice of all files.
1335 For older changes see ChangeLog-2018
1337 Copyright (C) 2019 Free Software Foundation, Inc.
1339 Copying and distribution of this file, with or without modification,
1340 are permitted in any medium without royalty provided the copyright
1341 notice and this notice are preserved.
1347 version-control: never