1 2019-07-24 Alan Modra <amodra@gmail.com>
3 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
4 elf_backend_final_write_processing, don't pass linker arg.
5 (_bfd_elf_final_write_processing): Update prototype.
6 * elf.c (_bfd_elf_write_object_contents): Adjust call.
7 (_bfd_elf_final_write_processing): Return error on incompatible
8 OSABI and has_gnu_osabi. Remove linker arg.
9 * elf-nacl.h (nacl_final_write_processing): Update prototype.
10 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
11 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
12 (_bfd_mips_elf_final_write_processing): Likewise.
13 * elf-hppa.h (elf_hppa_final_write_processing): Return status
14 and remove linker arg.
15 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
16 * elf-nacl.c (nacl_final_write_processing): Likewise.
17 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
18 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
19 * elf32-arm.c (arm_final_write_processing): Likewise.
20 (elf32_arm_final_write_processing): Likewise.
21 (elf32_arm_nacl_final_write_processing): Likewise.
22 (elf32_arm_vxworks_final_write_processing): Likewise.
23 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
24 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
25 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
26 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
27 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
28 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
29 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
30 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
31 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
32 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
33 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
34 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
35 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
36 * elf32-ppc.c (ppc_final_write_processing): Likewise.
37 (ppc_elf_final_write_processing): Likewise.
38 (ppc_elf_vxworks_final_write_processing): Likewise.
39 * elf32-sparc.c (sparc_final_write_processing): Likewise.
40 (elf32_sparc_final_write_processing): Likewise.
41 (elf32_sparc_vxworks_final_write_processing): Likewise.
42 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
43 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
44 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
45 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
46 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
47 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
48 (_bfd_mips_elf_final_write_processing): Likewise.
50 2019-07-24 Alan Modra <amodra@gmail.com>
52 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
54 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
55 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
57 2019-07-24 Alan Modra <amodra@gmail.com>
59 * elf32-visium.c (visium_elf_post_process_headers): Don't set
60 EI_OSABI header byte here.
63 2019-07-23 Alan Modra <amodra@gmail.com>
65 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
66 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
67 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
68 when elf_gnu_osabi_mbind is set.
69 (_bfd_elf_map_sections_to_segments): Likewise.
70 (_bfd_elf_init_private_section_data): Likewise.
71 (_bfd_elf_final_write_processing): Update comment.
72 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
73 (elf_backend_special_sections): Define without .tbss for linux.
75 2019-07-23 Alan Modra <amodra@gmail.com>
77 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
78 Remove none, any, all enums.
79 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
80 (_bfd_elf_final_write_processing): Declare.
81 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
82 elf_backend_final_write_processing.
83 (_bfd_elf_post_process_headers): Move body of function to..
84 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
85 only when not already set. Adjust for rename.
86 * elfxx-target.h (elf_backend_final_write_processing): Default to
87 _bfd_elf_final_write_processing.
88 * elf-hppa.h (elf_hppa_final_write_processing): Call
89 _bfd_elf_final_write_processing.
90 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
91 * elf-nacl.c (nacl_final_write_processing): Likewise.
92 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
93 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
94 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
95 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
96 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
97 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
98 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
99 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
100 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
101 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
102 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
103 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
104 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
105 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
106 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
107 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
108 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
109 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
110 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
111 * elf32-arm.c (arm_final_write_processing): Split out from..
112 (elf32_arm_final_write_processing): ..here. Call
113 _bfd_elf_final_write_processing.
114 (elf32_arm_nacl_final_write_processing): Adjust.
115 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
116 (_bfd_mips_elf_final_write_processing): ..here. Call
117 _bfd_elf_final_write_processing.
118 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
119 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
120 * elf32-ppc.c (ppc_final_write_processing): Split out from..
121 (ppc_elf_final_write_processing): ..here. Call
122 _bfd_elf_final_write_processing.
123 (ppc_elf_vxworks_final_write_processing): Adjust.
124 * elf32-sparc.c (sparc_final_write_processing): Split out from..
125 (elf32_sparc_final_write_processing): ..here. Call
126 _bfd_elf_final_write_processing.
127 (elf32_sparc_vxworks_final_write_processing): Adjust.
128 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
129 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
130 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
131 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
132 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
133 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
134 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
135 * elflink.c (elf_link_add_object_symbols): Likewise.
136 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
139 2019-07-23 Omar Majid <omajid@redhat.com>
141 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
142 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
143 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
145 * peXXigen.c: Add comment about source of .NET magic numbers.
147 2019-07-19 Alan Modra <amodra@gmail.com>
149 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
150 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
151 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
152 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
153 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
154 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
155 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
156 (ppc64_elf_check_relocs): Support pcrel tls relocs.
157 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
158 * bfd-in2.h: Regenerate.
159 * libbfd.h: Regenerate.
161 2019-07-18 Alan Modra <amodra@gmail.com>
163 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
164 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
167 2019-07-18 Alan Modra <amodra@gmail.com>
169 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
170 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
172 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
173 tls_type vars unsigned int.
174 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
175 to select r_type edit.
177 2019-07-18 Alan Modra <amodra@gmail.com>
179 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
181 * elf64-ppc.c (TLS_GDIE): Likewise.
183 2019-07-18 Alan Modra <amodra@gmail.com>
185 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
186 range of tp-relative offsets.
188 2019-07-15 Alan Modra <amodra@gmail.com>
190 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
191 alias is no longer bfd_link_hash_defined, clear the alias.
193 2019-07-13 Alan Modra <amodra@gmail.com>
195 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
197 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
198 (_bfd_elf_init_2_index_sections): Likewise.
199 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
200 relocations for local TLS symbols, use STN_UNDEF as the relocation
202 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
203 leave TLS symbol value in the addend.
205 2019-07-08 Alan Modra <amodra@gmail.com>
208 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
209 size before reading first word.
211 2019-07-02 Nick Clifton <nickc@redhat.com>
214 * elf.c (is_debuginfo_file): New function.
215 (assign_file_positions_for_non_load_sections): Do not warn about
216 allocated sections outside of loadable segments if they are found
218 * elf-bfd.h (is_debuginfo_file): Prototype.
220 2019-07-02 Nick Clifton <nickc@redhat.com>
223 * compress.c (bfd_get_full_section_contents): Do not complain
224 about linker created sections that are larger than the file size.
226 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
228 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
229 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
231 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
233 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
235 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
236 sections when .text section contain secure entry functions
239 2019-07-01 Nick Clifton <nickc@redhat.com>
242 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
243 section VMA in the offset used to update exidx relocs.
245 2019-06-28 Nick Clifton <nickc@redhat.com>
248 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
249 large version reference section.
250 * compress.c (bfd_get_full_section_contents): Check for an
251 uncompressed section whose size is larger than the file size.
253 2019-06-28 Alan Modra <amodra@gmail.com>
255 * format.c (bfd_check_format_matches): Don't match plugin target
256 if another target matches. Expand comment.
257 * targets.c (_bfd_target_vector): Move plugin_vec after all other
258 non-corefile targets, outside !SELECT_VECS.
259 * config.bfd: Don't handle targ=plugin here.
260 * configure.ac: Don't add plugin to enable_targets or handle in
261 target loop setting selvecs and other target vars.
262 * configure: Regenerate.
264 2019-06-26 Nick Clifton <nickc@redhat.com>
267 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
268 messages for failures.
269 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
270 if returning an error value.
272 2019-06-25 Jan Beulich <jbeulich@suse.com>
274 * elf-properties.c (elf_find_and_remove_property): Rename last
275 parameter. Mention it in comment.
277 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
279 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
280 SEC_MERGE or SEC_CODE flags are set.
281 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
282 symtype consistently. Don't include sec_addr (sym_sec) in symval.
283 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
284 Add sec_addr (sym_sec) after handling merge sections.
286 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
289 * elf-properties.c (elf_merge_gnu_property_list): Remove the
290 property after reporting property removal.
292 2019-06-23 Alan Modra <amodra@gmail.com>
295 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
296 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
297 Reduce range of offsets allowed for other GOT relocs.
299 2019-06-23 Alan Modra <amodra@gmail.com>
302 * elfcode.h (elf_object_p): Warning fix.
304 2019-06-21 Alan Modra <amodra@gmail.com>
307 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
309 2019-06-19 Alan Modra <amodra@gmail.com>
312 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
313 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
315 2019-06-19 Alan Modra <amodra@gmail.com>
317 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
318 functions that require r2 valid to use local entry.
319 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
321 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
323 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
324 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
325 with elfNN_aarch64_allocate_local_dynrelocs.
327 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
329 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
331 2019-06-14 Alan Modra <amodra@gmail.com>
333 * Makefile.in: Regenerate.
334 * configure: Regenerate.
336 2019-06-14 Alan Modra <amodra@gmail.com>
338 * elf64-ppc.c: Fix comments involving paddi.
340 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
343 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
344 absent, or the bfd is not in the ELF formart.
345 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
347 2019-06-10 Christos Zoulas <christos@zoulas.com>
350 * elf.c (elfcore_make_auxv_note_section): New function.
351 (elfcore_grok_note): Use it.
352 (elfcore_grok_freebsd_note): Likewise.
353 (elfcore_grok_openbsd_note): Likewise.
354 (elfcore_grok_netbsd_note): Likewise. Plus add support for
355 NT_NETBSDCORE_AUXV notes.
357 2019-06-06 Sudakshina Das <sudi.das@arm.com>
359 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
360 alignment of the new gnu property section.
362 2019-06-06 Sudakshina Das <sudi.das@arm.com>
364 * bfd-in.h: Change comment.
365 * bfd-in2.h: Regenerate.
366 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
367 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
370 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
372 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
373 Remove overflow check.
375 2019-05-28 Alan Modra <amodra@gmail.com>
378 * cofflink.c (coff_link_check_archive_element): Don't assume
379 element is a coff object file after calling add_archive_element.
381 2019-05-28 Alan Modra <amodra@gmail.com>
384 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
385 attempt to set sh_entsize for excluded PLT section.
387 2019-05-28 Alan Modra <amodra@gmail.com>
390 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
391 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
392 allocated in alpha_dynamic_entries_for_reloc.
394 2019-05-28 Alan Modra <amodra@gmail.com>
397 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
398 on NULL output_section.
399 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
401 2019-05-28 Alan Modra <amodra@gmail.com>
404 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
405 entry when MUST_FIND. Abort when MUST_FIND not found.
406 (elf_m68k_get_bfd2got_entry): Likewise.
407 (elf_m68k_relocate_section): Remove now useless assert.
409 2019-05-28 Alan Modra <amodra@gmail.com>
412 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
413 from bfd_link_info, not an output section owner.
414 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
415 (elf_hppa_final_link_relocate): Likewise.
417 2019-05-28 Alan Modra <amodra@gmail.com>
420 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
421 create_object_symbols_section, obj_textsec, obj_datasec or
422 obj_bsssec. Fix other errors in placement.
423 * config.bfd: Obsolete tic30-aout.
425 2019-05-28 Alan Modra <amodra@gmail.com>
428 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
429 end of section list as well as section_count.
430 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
431 section list before returning error.
433 2019-05-27 Alan Modra <amodra@gmail.com>
435 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
437 2019-05-27 Alan Modra <amodra@gmail.com>
440 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
442 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
444 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
445 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
446 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
447 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
448 (elf_backend_merge_symbol_attribute): Define.
450 2019-05-24 Alan Modra <amodra@gmail.com>
452 * po/SRC-POTFILES.in: Regenerate.
454 2019-05-24 Alan Modra <amodra@gmail.com>
456 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
457 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
458 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
459 (struct ppc_link_hash_table): Add powerxx_stubs.
460 (ppc64_elf_check_relocs): Set powerxx_stubs.
461 (build_powerxx_offset, size_powerxx_offset),
462 (num_relocs_for_powerxx_offset),
463 (emit_relocs_for_powerxx_offset): New functions.
464 (plt_stub_size): Size powerxx stubs.
465 (ppc_build_one_stub): Emit powerxx stubs.
466 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
469 2019-05-24 Alan Modra <amodra@gmail.com>
471 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
473 (xlate_pcrel_opt): New function.
474 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
475 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
476 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
478 2019-05-24 Alan Modra <amodra@gmail.com>
480 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
481 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
482 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
483 (BFD_RELOC_PPC64_PLT_PCREL34),
484 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
485 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
486 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
487 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
488 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
489 * elf64-ppc.c (PNOP): Define.
490 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
491 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
492 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
494 (ppc64_elf_prefix_reloc): New function.
495 (struct ppc_link_hash_table): Add notoc_plt.
496 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
497 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
498 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
499 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
500 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
501 possible need for dynamic relocs on non-pcrel powerxx relocs.
502 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
503 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
504 (toc_adjusting_stub_needed): Likewise.
505 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
506 (ppc64_elf_relocate_section): Handle new powerxx relocs.
507 * bfd-in2.h: Regenerate.
508 * libbfd.h: Regenerate.
510 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
512 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
513 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
515 * configure: Regenerate.
517 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
519 * configure: Regenerated.
520 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
521 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
522 (BFD64_BACKENDS): Add elf64-bpf.lo.
523 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
524 * Makefile.in (SOURCE_HFILES): Regenerate.
525 * config.bfd (targ_cpu): Handle bpf-*-* targets.
526 * cpu-bpf.c: New file.
527 * elf64-bpf.c: Likewise.
528 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
530 * archures.c: Define architecture bfd_arch_bpf and machine
532 * reloc.c: Define BFD relocations used by the BPF target.
533 * bfd-in2.h: Regenerated.
534 * libbfd.h: Likewise.
536 2019-05-22 Alan Modra <amodra@gmail.com>
538 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
541 2019-05-22 Alan Modra <amodra@gmail.com>
543 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
544 processing on "size error in section".
546 2019-05-22 Alan Modra <amodra@gmail.com>
548 * som.c (som_bfd_free_cached_info): Call
549 _bfd_generic_close_and_cleanup.
551 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
553 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
554 for TLS_TPREL_HI16(/LO16) relocations in shared library.
556 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
558 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
559 checks. Search the RELA table for n64 relocations.
561 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
562 Faraz Shahbazker <fshahbazker@wavecomp.com>
564 * elfxx-mips.c (LA25_BC): New macro.
565 (mips_elf_link_hash_table)<compact_branches>: New field.
566 (STUB_JALRC): New macro.
567 (mipsr6_o32_exec_plt0_entry_compact): New array.
568 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
569 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
570 (mipsr6_exec_plt_entry_compact): Likewise.
571 (mips_elf_create_la25_stub): Use BC instead of J for stubs
572 when compact_branches is true.
573 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
574 PLT for MIPSR6 with compact_branches. Do not reorder the
575 compact branches PLT. Switch the lazy stub for MIPSR6
576 with compact_branches to use JALRC.
577 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
578 when compact_branches is true.
579 (_bfd_mips_elf_compact_branches): New function.
580 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
582 2019-05-21 Tamar Christina <tamar.christina@arm.com>
585 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
588 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
591 * elf32-arm.c (get_value_helper): Remove.
592 (elf32_arm_final_link_relocate): Fix branch future relocations.
594 2019-05-21 Tamar Christina <tamar.christina@arm.com>
597 * bfd-in.h (enum erratum_84319_opts): New
598 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
599 int to enum erratum_84319_opts.
600 * bfd-in2.h: Regenerate.
601 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
602 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
603 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
604 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
605 (_bfd_aarch64_resize_stubs): Amend comment.
606 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
608 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
609 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
611 (clear_erratum_843419_entry): Update erratum conditional.
613 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
616 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
617 when computing distance_short_enough.
619 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
622 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
623 Wrap around even if distance equals avr_pc_wrap_around.
625 2019-05-20 Nick Clifton <nickc@redhat.com>
627 * po/fr.po: Updated French translation.
629 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
631 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
633 2019-05-16 Alan Modra <amodra@gmail.com>
635 * elf32-arm.c (elf32_arm_write_section): Revert last change.
637 2019-05-15 Alan Modra <amodra@gmail.com>
639 * elf32-arm.c (elf32_arm_write_section): Don't leave
640 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
641 unitialised section contents.
643 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
646 * verilog.c: (VerilogDataWidth): New variable.
647 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
649 2019-05-08 Nick Clifton <nickc@redhat.com>
652 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
653 rather than FALSE if encountering a non-ELF file.
655 2019-05-06 Alan Modra <amodra@gmail.com>
657 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
659 2019-05-06 Alan Modra <amodra@gmail.com>
661 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
662 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
663 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
664 * libbfd.h: Regenerate.
665 * bfd-in2.h: Regenerate.
667 2019-05-04 Alan Modra <amodra@gmail.com>
670 * syms.c (coff_section_type): Only allow '.', '$' and numeric
671 following the standard section names.
672 (bfd_decode_symclass): Prioritize section flag tests in
673 decode_section_type before name tests in coff_section_type.
674 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
675 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
676 their names and choose standard .text section flags for
679 2019-05-02 Nick Clifton <nickc@redhat.com>
682 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
683 .gnu.debugaltlink sections as debugging sections.
685 2019-04-30 Alan Modra <amodra@gmail.com>
687 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
688 (struct _ppc64_elf_section_data): Likewise.
689 (ppc64_elf_check_relocs): Set above fields.
690 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
691 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
694 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
697 * elflink.c (elf_link_output_extsym): Don't complain undefined
698 weak dynamic reference.
700 2019-04-25 Sudakshina Das <sudi.das@arm.com>
702 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
703 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
704 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
705 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
706 (elfNN_aarch64_small_plt0_pac_entry): Remove.
707 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
708 (elfNN_aarch64_small_plt0_bti_entry): Update.
709 (elfNN_aarch64_small_plt_bti_entry): Update.
710 (elfNN_aarch64_small_plt_pac_entry): Update.
711 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
712 (setup_plt_values): Setup new entries.
713 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
714 (elfNN_aarch64_plt_sym_val): Likewise.
716 2019-04-22 Jim Wilson <jimw@sifive.com>
718 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
720 2019-04-19 Alan Modra <amodra@gmail.com>
722 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
724 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
726 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
727 building shared object.
728 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
730 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
733 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
736 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
738 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
740 * bfd-in2.h: Regenerate.
741 * libbfd.h: Likewise.
743 2019-04-15 Sudakshina Das <sudi.das@arm.com>
745 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
746 * bfd-in2.h: Regenerated.
747 * libbfd.h: Regenerated.
749 2019-04-15 Sudakshina Das <sudi.das@arm.com>
751 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
752 * bfd-in2.h: Regenerated.
753 * libbfd.h: Likewise.
755 2019-04-15 Sudakshina Das <sudi.das@arm.com>
757 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
758 * bfd-in2.h: Regenerated.
759 * libbfd.h: Regenerated.
760 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
761 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
762 and R_ARM_THM_BF12 together.
763 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
765 2019-04-15 Sudakshina Das <sudi.das@arm.com>
767 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
768 * libbfd.h: Regenerated.
769 * bfd-in2.h: Regenerated.
770 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
771 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
772 and R_ARM_THM_BF18 together.
773 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
775 2019-04-15 Sudakshina Das <sudi.das@arm.com>
777 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
778 * bfd-in2.h: Regenerated.
779 * libbfd.h: Regenerated.
780 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
781 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
782 and R_ARM_THM_BF16 together.
783 (get_value_helper): New reloc helper.
784 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
786 2019-04-15 Sudakshina Das <sudi.das@arm.com>
788 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
789 * bfd-in2.h: Regenerate.
790 * libbfd.h: Regenerate.
792 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
794 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
795 * bfd-in2.h: Regenerate.
796 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
797 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
799 (using_thumb2): Likewise.
800 (using_thumb2_bl): Update assert.
801 (arch_has_arm_nop): Likewise.
802 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
803 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
805 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
807 * elf-linker-x86.h (elf_x86_cet_report): New.
808 (elf_linker_x86_params): Add cet_report.
809 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
810 missing IBT and SHSTK properties if needed.
812 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
815 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
816 "h != NULL". Don't check "h != NULL" before calling.
817 bfd_elf_gc_record_vtentry.
818 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
819 * elf32-bfin.c (bfin_check_relocs): Likewise.
820 * elf32-cris.c (cris_elf_check_relocs): Likewise.
821 * elf32-csky.c (csky_elf_check_relocs): Likewise.
822 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
823 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
824 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
825 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
826 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
827 * elf32-i386.c (elf_i386_check_relocs): Likewise.
828 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
829 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
830 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
831 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
832 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
833 * elf32-metag.c (elf_metag_check_relocs): Likewise.
834 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
835 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
836 * elf32-s390.c (elf_s390_check_relocs): Likewise.
837 * elf32-sh.c (sh_elf_check_relocs): Likewise.
838 * elf32-v850.c (v850_elf_check_relocs): Likewise.
839 * elf32-vax.c (elf_vax_check_relocs): Likewise.
840 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
841 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
842 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
843 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
844 * elf64-s390.c (elf_s390_check_relocs): Likewise.
845 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
846 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
847 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
848 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
851 2019-04-11 Alan Modra <amodra@gmail.com>
854 * elflink.c (elf_link_add_object_symbols): Don't read partial
855 dynamic entries from fuzzed objects.
857 2019-04-11 Tamar Christina <tamar.christina@arm.com>
860 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
861 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
862 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
864 2019-04-10 Michael Forney <mforney@mforney.org>
867 * doc/chew.c (free_words): Correctly free "push_text" strings.
869 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
871 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
873 2019-04-08 Alan Modra <amodra@gmail.com>
875 * configure.ac (elfxx_x86): Define and use.
876 * configure: Regenerate.
878 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
880 * elf-linker-x86.h: New file.
881 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
882 to get x86-specific linker options.
883 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
884 (elf_x86_64_check_relocs): Likewise.
885 (elf_x86_64_relocate_section): Likewise.
886 (elf_x86_64_link_setup_gnu_properties): Likewise.
887 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
888 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
889 (_bfd_elf_linker_x86_set_options): New function.
890 * elfxx-x86.h: Include "elf-linker-x86.h".
891 (elf_x86_link_hash_table): Add params.
893 2019-04-03 Alan Modra <amodra@gmail.com>
895 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
896 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
897 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
898 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
899 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
900 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
902 2019-04-02 Jim Wilson <jimw@sifive.com>
905 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
906 ELF header flags to after check for ELF object file. Loop through
907 sections looking for code sections, if none, then skip ABI checks.
909 2019-03-30 Andrew Waterman <andrew@sifive.com>
911 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
914 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
916 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
917 info->export_dynamic to the conditional.
919 2019-03-28 Alan Modra <amodra@gmail.com>
922 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
923 * configure: Regenerate.
924 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
925 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
926 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
927 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
928 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
930 2019-03-21 Jim Wilson <jimw@sifive.com>
933 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
934 verify sym non-NULL before using. Add identical check using h.
936 2019-03-21 Sudakshina Das <sudi.das@arm.com>
938 * elf-bfd.h (struct elf_backend_data): Add argument to
939 merge_gnu_properties.
940 * elf-properties.c (elf_merge_gnu_properties): Add argument to
941 itself and while calling bed->merge_gnu_properties.
942 (elf_merge_gnu_property_list): Update the calls for
943 elf_merge_gnu_properties.
944 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
945 of --force-bti warning and add argument.
946 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
948 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
949 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
952 2019-03-20 Sudakshina Das <sudi.das@arm.com>
954 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
955 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
956 (elf_backend_fixup_gnu_properties): Define for AArch64.
958 2019-03-18 Alan Modra <amodra@gmail.com>
961 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
962 for local iplt syms with ent->plt.offset == -1. Remove ineffective
963 attempt at writing glink stubs only once.
965 2019-03-16 Alan Modra <amodra@gmail.com>
968 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
969 (_bfd_elf_rel_local_sym): Likewise.
970 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
971 section of symbols with unrecognized shndx.
973 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
976 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
978 * cofflink.c (coff_link_add_symbols): Check for symbols defined
979 in discarded section.
981 2019-03-15 Alan Modra <amodra@gmail.com>
984 * elflink.c (elf_link_add_object_symbols): Bail out on a local
985 symbol after globals if elf_bad_symtab is not set.
987 2019-03-15 Alan Modra <amodra@gmail.com>
990 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
991 (_bfd_elf_rel_local_sym): Likewise.
993 2019-03-15 Alan Modra <amodra@gmail.com>
996 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
997 object files with sh_size not a multiple of sh_entsize.
999 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1002 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1003 input with bad relocation.
1005 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1007 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1009 2019-03-14 Nick Clifton <nickc@redhat.com>
1012 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1013 (save_section_vma): Initialise field to the number of entries in
1015 (section_vma_same): Check that the number of entries in the
1016 sec_vma table matches the number of sections in the bfd.
1018 2019-03-14 Nick Clifton <nickc@redhat.com>
1021 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1022 section owner pointer when adding the default symbol.
1024 2019-03-14 Nick Clifton <nickc@redhat.com>
1027 * elflink.c (elf_link_add_object_symbols): Add new local variable
1028 extversym_end. Initialise it to point to the end of the version
1029 symbol table, if present. Check it when initialising and updating
1032 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1034 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1035 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1036 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1037 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1039 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1040 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1041 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1043 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1044 Szabolcs Nagy <szabolcs.nagy@arm.com>
1046 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1047 (aarch64_bti_pac_info): New.
1048 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1049 (bfd_elf32_aarch64_set_options): Likewise.
1050 * bfd-in2.h: Regenerate
1051 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1052 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1053 (elfNN_aarch64_small_plt0_bti_entry): New.
1054 (elfNN_aarch64_small_plt_bti_entry): New.
1055 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1056 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1057 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1058 tlsdesc_plt_entry_size fields.
1059 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1060 (setup_plt_values): New helper function.
1061 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1063 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1065 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1066 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1067 to plt stubs instead of fixed ones and update filling them according
1068 to the need for bti.
1069 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1070 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1071 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1072 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1073 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1075 (bfd_elfNN_get_synthetic_symtab): Define.
1076 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1077 and mising BTI NOTE SECTION.
1080 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1082 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1083 linker created inputs from merge.
1084 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1085 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1086 (elfNN_aarch64_link_setup_gnu_properties): New.
1087 (elfNN_aarch64_merge_gnu_properties): New.
1088 (elf_backend_setup_gnu_properties): Define for AArch64.
1089 (elf_backend_merge_gnu_properties): Likewise.
1090 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1091 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1092 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1093 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1094 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1095 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1096 (elf_backend_parse_gnu_properties): Define for AArch64.
1098 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1101 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1102 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1104 2019-03-12 Alan Modra <amodra@gmail.com>
1106 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1107 nmemb parameter. Use bfd_alloc2.
1108 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1110 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1111 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1112 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1114 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1115 (assign_section_numbers): Style fix.
1116 (swap_out_syms): Use bfd_malloc2.
1117 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1119 (_bfd_elf_make_empty_symbol): Style fix.
1120 (elfobj_grok_stapsdt_note_1): Formatting.
1121 * elfcode.h (elf_object_p): Use bfd_alloc2.
1122 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1123 (elf_slurp_symbol_table): Use bfd_zalloc2.
1124 (elf_slurp_reloc_table): Use bfd_alloc2.
1125 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1126 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1127 size calculation doesn't overflow.
1128 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1129 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1130 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1132 2019-03-08 Alan Modra <amodra@gmail.com>
1135 * merge.c (merge_strings): Return secinfo. Don't pad section
1137 (_bfd_merge_sections): Pad section to alignment here, if input
1138 sections contributing to merged output all pad to alignment.
1141 2019-03-06 Nick Clifton <nickc@redhat.com>
1143 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1145 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1146 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1148 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1150 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1151 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1154 * elf32-s390.c (allocate_dynrelocs): Update comment.
1156 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1158 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1160 2019-02-28 Nick Clifton <nickc@redhat.com>
1163 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1164 section that is not NUL terminated.
1166 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1169 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1170 by linker when checking copy reloc on protected symbol.
1172 2019-02-24 Alan Modra <amodra@gmail.com>
1175 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1177 2019-02-20 Eric Tsai <erictsai@cadence.com>
1179 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1180 sections between the call site and call destination and adjust
1181 call distance by the largest alignment.
1183 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1185 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1186 * elf.c (elfcore_grok_aarch_pauth): New function.
1187 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1188 (elfcore_write_aarch_pauth): New function.
1189 (elfcore_write_register_note): Check for AArch64 pauth section.
1191 2019-02-20 Alan Modra <amodra@gmail.com>
1194 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1197 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1199 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1200 Darwin hosts, not just or1k.
1201 * configure: Regenerate.
1203 2019-02-20 Alan Modra <amodra@gmail.com>
1206 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1207 sentinel NUL to string buffer nearer to loop where it is used.
1208 Don't go past sentinel when scanning strings, and don't write
1210 * archive.c (do_slurp_coff_armap): Simplify string handling to
1213 2019-02-19 Alan Modra <amodra@gmail.com>
1216 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1217 attempting to prevent read past end of section.
1219 2019-02-18 Alan Modra <amodra@gmail.com>
1222 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1223 PRIx64 to generate warning messages. Print local sym names too.
1225 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1227 * elf32-arc (INIT_SYM_STRING): Delete.
1228 (FINI_SYM_STRING): Likewise.
1229 (init_str): Likewise.
1230 (fini_str): Likewise.
1232 2019-02-08 Alan Modra <amodra@gmail.com>
1234 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1235 for bss-plt" warning to make it an error.
1237 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1240 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1241 reloc_class_ifunc for ifunc symbols.
1242 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1244 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1246 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1247 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1249 2019-02-07 Nick Clifton <nickc@redhat.com>
1251 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1252 into the definitely obsolete list.
1254 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1257 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1258 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1259 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1261 (elf_x86_64_check_relocs): Here.
1262 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1263 to check if a symbol is defined in a non-shared object.
1264 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1266 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1268 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1269 of 'labs' (and fix GCC warning).
1271 2019-01-25 Nick Clifton <nickc@redhat.com>
1273 * po/ru.po: Updated Russian translation.
1275 2019-01-23 Nick Clifton <nickc@redhat.com>
1277 * po/fr.po: Updated French translation.
1279 2019-01-21 Nick Clifton <nickc@redhat.com>
1281 * po/pt.po: Updated Portuguese translation.
1282 * po/uk.po: Updated Ukranian translation.
1284 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1287 * elf32-nds32.c (nds32_relocate_section): Add space between words
1289 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1291 (riscv_i_or_e_p): Likewise.
1292 (riscv_merge_arch_attr_info): Likewise.
1294 2019-01-19 Nick Clifton <nickc@redhat.com>
1296 * version.m4: Reset to 2.32.51
1297 * configure: Regenerate.
1298 * po/bfd.pot: Regenerate.
1300 2018-06-24 Nick Clifton <nickc@redhat.com>
1302 2.32 branch created.
1304 2019-01-16 Kito Cheng <kito@andestech.com>
1306 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1309 2019-01-16 Kito Cheng <kito@andestech.com>
1310 Nelson Chu <nelson@andestech.com>
1312 * elfnn-riscv.c (in_subsets): New.
1313 (out_subsets): Likewise.
1314 (merged_subsets): Likewise.
1315 (riscv_std_ext_p): Likewise.
1316 (riscv_non_std_ext_p): Likewise.
1317 (riscv_std_sv_ext_p): Likewise.
1318 (riscv_non_std_sv_ext_p): Likewise.
1319 (riscv_version_mismatch): Likewise.
1320 (riscv_i_or_e_p): Likewise.
1321 (riscv_merge_std_ext): Likewise.
1322 (riscv_merge_non_std_and_sv_ext): Likewise.
1323 (riscv_merge_arch_attr_info): Likewise.
1324 (riscv_merge_attributes): Likewise.
1325 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1327 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1328 (elf_backend_obj_attrs_vendor): Define.
1329 (elf_backend_obj_attrs_section_type): Likewise.
1330 (elf_backend_obj_attrs_section): Likewise.
1331 (elf_backend_obj_attrs_arg_type): Define as
1332 riscv_elf_obj_attrs_arg_type.
1333 * elfxx-riscv.c (riscv_estimate_digit): New.
1334 (riscv_estimate_arch_strlen1): Likewise.
1335 (riscv_estimate_arch_strlen): Likewise.
1336 (riscv_arch_str1): Likewise.
1337 (riscv_arch_str): Likewise.
1338 * elfxx-riscv.h (riscv_arch_str): Declare.
1340 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1342 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1344 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1345 source field. (md_apply_fix): Apply final fix
1346 to BFD_RELOC_S12Z_OPR.
1347 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1349 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1352 * elf32-s390.c (allocate_dynrelocs): Update comment.
1354 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1356 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1357 * configure: Regenerate.
1359 2019-01-08 Alan Modra <amodra@gmail.com>
1363 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1366 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1368 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1369 * bfd/bfd-in2.h: Regenerate.
1370 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1371 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1373 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1375 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1376 default target, little endian target is more suitable.
1378 2019-01-04 Alan Modra <amodra@gmail.com>
1382 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1384 (EQ_VALUE_IN_FIELD): Likewise.
1385 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1387 2019-01-01 Alan Modra <amodra@gmail.com>
1389 Update year range in copyright notice of all files.
1391 For older changes see ChangeLog-2018
1393 Copyright (C) 2019 Free Software Foundation, Inc.
1395 Copying and distribution of this file, with or without modification,
1396 are permitted in any medium without royalty provided the copyright
1397 notice and this notice are preserved.
1403 version-control: never