1 2021-03-31 Alan Modra <amodra@gmail.com>
3 * .gitignore: Delete bfd_stdint.h entry.
4 * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
5 (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
6 * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
7 * configure.ac: Don't invoke GCC_HEADER_STDINT.
8 * configure.com: Don't create bfd_stdint.h.
9 * Makefile.in: Regenerate.
10 * aclocal.m4: Regenerate.
11 * bfd-in2.h: Regenerate.
12 * config.in: Regenerate.
13 * configure: Regenerate.
14 * doc/Makefile.in: Regenerate.
15 * po/BLD-POTFILES.in: Regenerate.
17 2021-03-31 Alan Modra <amodra@gmail.com>
19 * bfd-in.h: Include string.h.
20 (LITMEMCPY, LITSTRCPY): Delete.
21 * bfd-in2.h: Regenerate.
23 2021-03-30 Alan Modra <amodra@gmail.com>
25 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
26 unless is_elf_hash_table.
28 2021-03-29 Alan Modra <amodra@gmail.com>
30 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
32 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
34 * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
35 (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
36 (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
37 (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
38 * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
39 * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
40 * elf32-rx.c (rx_set_section_contents): Likewise.
41 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
42 * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
43 * mach-o.c (bfd_mach_o_read_command): Likewise.
44 * targets.c (bfd_get_target_info): Likewise.
46 2021-03-29 Alan Modra <amodra@gmail.com>
48 * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
49 * elf32-z80.c (z80_is_local_label_name): Likewise.
50 * elf32-spu.c (spu_elf_modify_headers): Likewise.
51 * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
53 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
54 for error return from vms_write_data_block.
56 2021-03-29 Alan Modra <amodra@gmail.com>
58 * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
59 * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
60 (elf64_ia64_local_dyn_sym_thunk): Likewise.
61 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
62 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
63 (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
64 * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
65 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
66 * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
67 (riscv_pcrel_reloc_eq): Likewise.
68 (riscv_elf_finish_local_dynamic_symbol): Likewise.
69 * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
70 (finish_local_dynamic_symbol): Likewise.
71 * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
72 * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
73 (mips_elf_count_got_symbols): Change return type to bfd_boolean.
75 2021-03-29 Alan Modra <amodra@gmail.com>
77 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
79 (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
80 elf_link_output_symstrtab when calling output_arch_syms and
81 output_arch_local_syms.
82 * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
83 elf_backend_output_arch_local_syms>): Change return type of func
84 arg to match elf_link_output_symstrtab.
85 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
87 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
88 (nds32_elf_output_arch_syms): Correct func return type.
90 2021-03-29 Alan Modra <amodra@gmail.com>
92 * elf-m10200.c (mn10200_elf_relocate_section): Return int.
93 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
94 * elf32-arc.c (elf_arc_relocate_section): Likewise.
95 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
96 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
97 * elf32-bfin.c (bfin_relocate_section): Likewise.
98 (bfinfdpic_relocate_section): Likewise.
99 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
100 * elf32-cris.c (cris_elf_relocate_section): Likewise.
101 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
102 * elf32-csky.c (csky_elf_relocate_section): Likewise.
103 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
104 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
105 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
106 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
107 * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
108 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
109 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
110 * elf32-i386.c (elf_i386_relocate_section): Likewise.
111 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
112 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
113 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
114 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
115 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
116 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
117 * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
118 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
119 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
120 * elf32-mep.c (mep_elf_relocate_section): Likewise.
121 * elf32-metag.c (elf_metag_relocate_section): Likewise.
122 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
123 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
124 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
125 * elf32-mt.c (mt_elf_relocate_section): Likewise.
126 * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
127 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
128 * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
129 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
130 * elf32-pru.c (pru_elf32_relocate_section): Likewise.
131 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
132 * elf32-rx.c (rx_elf_relocate_section): Likewise.
133 * elf32-s390.c (elf_s390_relocate_section): Likewise.
134 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
135 (_bfd_score_elf_relocate_section): Likewise.
136 * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
137 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
138 * elf32-sh.c (sh_elf_relocate_section): Likewise.
139 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
140 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
141 * elf32-v850.c (v850_elf_relocate_section): Likewise.
142 * elf32-vax.c (elf_vax_relocate_section): Likewise.
143 * elf32-visium.c (visium_elf_relocate_section): Likewise.
144 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
145 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
146 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
147 * elf32-z80.c (z80_elf_relocate_section): Likewise.
148 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
149 (elf64_alpha_relocate_section): Likewise.
150 * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
151 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
152 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
153 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
154 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
155 * elf64-s390.c (elf_s390_relocate_section): Likewise.
156 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
157 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
158 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
159 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
160 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
161 * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
162 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
163 * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
164 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
165 * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
167 2021-03-26 Keith Seitz <keiths@redhat.com>
169 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
170 offset of program headers after calling elf_read_notes.
172 2021-03-23 Jan Beulich <jbeulich@suse.com>
174 * dwarf2.c (read_indexed_string): Rename index to idx.
176 2021-03-22 Martin Liska <mliska@suse.cz>
178 * bfd-in.h (startswith): Add startswith function.
179 (CONST_STRNEQ): Remove.
180 * bfd-in2.h (startswith): Regenerate with make headers.
181 * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
182 (_bfd_slurp_extended_name_table): Likewise.
183 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
184 * bfd.c (bfd_get_sign_extend_vma): Likewise.
185 (bfd_convert_section_size): Likewise.
186 (bfd_convert_section_contents): Likewise.
187 * coff-stgo32.c (go32exe_create_stub): Likewise.
188 (go32exe_check_format): Likewise.
189 * coffcode.h (styp_to_sec_flags): Likewise.
190 (GNU_DEBUGALTLINK): Likewise.
191 * coffgen.c (_bfd_coff_section_already_linked): Likewise.
192 (coff_gc_sweep): Likewise.
193 (bfd_coff_gc_sections): Likewise.
194 * cofflink.c (coff_link_add_symbols): Likewise.
195 (process_embedded_commands): Likewise.
196 * compress.c (bfd_is_section_compressed_with_header): Likewise.
197 (bfd_init_section_decompress_status): Likewise.
198 * dwarf2.c (find_debug_info): Likewise.
199 (place_sections): Likewise.
200 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
201 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
202 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
203 (assign_section_numbers): Likewise.
204 (elfcore_grok_win32pstatus): Likewise.
205 * elf32-arm.c (cmse_scan): Likewise.
206 (elf32_arm_gc_mark_extra_sections): Likewise.
207 (elf32_arm_size_dynamic_sections): Likewise.
208 (is_arm_elf_unwind_section_name): Likewise.
209 * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
210 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
211 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
212 * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
213 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
214 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
215 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
216 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
217 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
218 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
219 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
220 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
221 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
222 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
223 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
224 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
225 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
226 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
227 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
228 (elf32_tic6x_size_dynamic_sections): Likewise.
229 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
230 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
231 (xtensa_is_insntable_section): Likewise.
232 (xtensa_is_littable_section): Likewise.
233 (xtensa_is_proptable_section): Likewise.
234 (xtensa_property_section_name): Likewise.
235 (xtensa_callback_required_dependence): Likewise.
236 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
237 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
238 * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
239 (get_reloc_section): Likewise.
240 (elf64_ia64_size_dynamic_sections): Likewise.
241 (elf64_ia64_object_p): Likewise.
242 * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
243 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
244 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
245 * elflink.c (elf_link_add_object_symbols): Likewise.
246 (_bfd_elf_gc_mark_extra_sections): Likewise.
247 (bfd_elf_parse_eh_frame_entries): Likewise.
248 (_bfd_elf_section_already_linked): Likewise.
249 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
250 * elfnn-ia64.c (is_unwind_section_name): Likewise.
251 (elfNN_ia64_size_dynamic_sections): Likewise.
252 (elfNN_ia64_object_p): Likewise.
253 * elfxx-mips.c (FN_STUB_P): Likewise.
254 (CALL_STUB_P): Likewise.
255 (CALL_FP_STUB_P): Likewise.
256 (_bfd_mips_elf_section_from_shdr): Likewise.
257 (_bfd_mips_elf_fake_sections): Likewise.
258 (_bfd_mips_elf_size_dynamic_sections): Likewise.
259 (_bfd_mips_final_write_processing): Likewise.
260 (_bfd_mips_elf_final_link): Likewise.
261 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
262 * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
263 (elf_x86_64_is_reloc_section): Likewise.
264 * hpux-core.c (thread_section_p): Likewise.
265 * libcoff.h (bfd_pei_p): Likewise.
266 * linker.c (REAL): Likewise.
267 (unwrap_hash_lookup): Likewise.
268 (_bfd_generic_link_add_one_symbol): Likewise.
269 * mmo.c (mmo_internal_write_section): Likewise.
270 * osf-core.c (osf_core_core_file_p): Likewise.
271 * pef.c (bfd_pef_print_symbol): Likewise.
272 * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
273 * som.c (som_slurp_symbol_table): Likewise.
274 (som_slurp_armap): Likewise.
275 * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
277 2021-03-22 Jan Beulich <jbeulich@suse.com>
279 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
280 language translation wrapping to _bfd_error_handler()
283 2021-03-21 Alan Modra <amodra@gmail.com>
285 * bfd-in.h (startswith): New inline.
286 (CONST_STRNEQ): Use startswith.
287 * bfd-in2.h: Regenerate.
289 2021-03-20 Alan Modra <amodra@gmail.com>
292 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
293 test for .gnu.debuglto*.
295 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
298 * elf.c (_bfd_elf_make_section_from_shdr): Treat
299 .gnu.debuglto_.debug_ section as debugging section unless it is
300 marked with SHF_EXCLUDE.
301 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
302 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
303 matching non-debugging sections or linkonce section with comdat
306 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
309 * dwarf2.c (read_attribute_value): Check version >= 3 for
312 2021-03-16 Nick Clifton <nickc@redhat.com>
314 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
315 overrun by using sizeof of the destination x_fname field as the
318 2021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
320 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
322 2021-03-12 Clément Chigot <clement.chigot@atos.net>
324 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
325 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
326 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
327 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
328 BFD_RELOC_PPC64_TLS_ML): New relocations.
329 * bfd-in2.h: Regenerate.
330 * libbfd.h: Regenerate.
331 * coff-rs6000.c (xcoff_calculate_relocation): Call
332 xcoff_reloc_type_tls for TLS relocations.
333 (xcoff_howto_table): Implement TLS relocations.
334 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
335 (xcoff_reloc_type_tls): New function.
336 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
337 (xcoff_howto_table): Likewise.
338 (_bfd_xcoff_reloc_type_lookup): Likewise.
339 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
340 (styp_to_sec_flags): Likewise.
341 (coff_compute_section_file_positions): Avoid file offset
342 optimisation for .data when the previous section is .tdata.
343 (coff_write_object_contents): Handle TLS sections.
344 * coffswap.h (coff_swap_aouthdr_out): Add support for
345 new fields in aouthdr.
346 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
347 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
348 (xcoff_need_ldrel_p): Add cases for TLS relocations.
349 (xcoff_create_ldrel): Add l_symndx for TLS sections.
351 2021-03-12 Clément Chigot <clement.chigot@atos.net>
353 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
355 * bfd-in2.h: Regenerate.
356 * libbfd.h: Regenerate.
357 * coff-rs6000.c (xcoff_calculate_relocation): Call
358 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
359 (xcoff_howto_table): Remove src_mask for TOC relocations.
360 Add R_TOCU and R_TOCL howtos.
361 (_bfd_xcoff_reloc_type_lookup): Add cases for
362 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
363 (xcoff_reloc_type_toc): Compute the whole offset.
364 Implement R_TOCU and R_TOCL.
365 * coff64-rs6000.c (xcoff64_calculate_relocation):
367 (xcoff64_howto_table): Likewise.
368 (xcoff64_reloc_type_lookup): Likewise.
370 2021-03-12 Clément Chigot <clement.chigot@atos.net>
372 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
374 (xcoff_howto_table): Likewise.
375 (xcoff_rtype2howto): Increase r_type maximum value.
376 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
377 of create a new one from scratch. Enable only some relocations
378 to have a changing r_size.
379 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
380 (xcoff64_howto_table): Likewise.
381 (xcoff64_rtype2howto): Likewise.
382 (xcoff64_ppc_relocate_section): Likewise.
383 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
385 2021-03-12 Clément Chigot <clement.chigot@atos.net>
387 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
389 2021-03-12 Clément Chigot <clement.chigot@atos.net>
391 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
392 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
393 support for o_cputype field. Avoid creating an empty a.out header
396 2021-03-12 Clément Chigot <clement.chigot@atos.net>
398 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
401 2021-03-11 Nelson Chu <nelson.chu@sifive.com>
403 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
404 restart_relax, used to check if we need to run the whole
405 relaxations from relax pass 0 to 2 again.
406 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
407 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
408 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
409 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
410 after_allocation to check if we need to run the whole relaxations again.
411 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
412 when the restart_relax is FALSE; At last set restart_relax to TRUE if
414 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
415 (bfd_elf64_riscv_restart_relax_sections): Likewise.
417 2021-03-10 Jan Beulich <jbeulich@suse.com>
419 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
422 2021-03-10 Alan Modra <amodra@gmail.com>
423 Jan Beulich <jbeulich@suse.com>
425 * elf.c (bfd_elf_generic_reloc): Make references between debug
426 sections use section relative values.
428 2021-03-09 Jan Beulich <jbeulich@suse.com>
430 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
432 2021-03-05 H.J. Lu <hongjiu.lu@intel.com>
436 * bfd.c (_bfd_get_link_info): New function.
437 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
438 (elf_link_info): New.
439 * libbfd-in.h (_bfd_get_link_info): New prototype.
440 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
441 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
442 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
443 (pex64_link_add_symbols): New function.
444 (coff_bfd_link_add_symbols): New macro.
445 * libbfd.h: Regenerated.
447 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
448 Andrew Burgess <andrew.burgess@embecosm.com>
450 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
451 * elf.c (elfcore_grok_riscv_csr): New function.
452 (elfcore_grok_note): Handle NT_RISCV_CSR.
453 (elfcore_write_riscv_csr): New function.
454 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
456 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
457 Andrew Burgess <andrew.burgess@embecosm.com>
459 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
460 (PRPSINFO_PR_PSARGS_LENGTH): Define.
461 (riscv_write_core_note): New function.
462 (riscv_elf_grok_psinfo): Make use of two new length defines.
463 (elf_backend_write_core_note): Define.
465 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
466 Andrew Burgess <andrew.burgess@embecosm.com>
468 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
469 * elf.c (elfcore_grok_gdb_tdesc): New function.
470 (elfcore_grok_note): Handle NT_GDB_TDESC.
471 (elfcore_write_gdb_tdesc): New function.
472 (elfcore_write_register_note): Handle NT_GDB_TDESC.
474 2021-03-05 Nick Clifton <nickc@redhat.com>
477 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
478 (read_indexed_string): Placeholder function.
479 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
482 2021-03-05 Alan Modra <amodra@gmail.com>
484 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
486 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
487 adjustments here instead. Separate pc-relative adjustments
488 from symbol related adjustments. Tidy comments and formatting.
490 2021-03-04 Jan Beulich <jbeulich@suse.com>
492 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
495 2021-03-04 Alan Modra <amodra@gmail.com>
497 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
499 2021-03-03 Alan Modra <amodra@gmail.com>
502 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
503 processing not when start/stop symbol section is unmarked but
504 on first time a start/stop symbol is processed.
506 2021-03-03 Alan Modra <amodra@gmail.com>
508 * reloc.c: Include x86_64.h rather than internal.h.
510 2021-03-02 Nick Clifton <nickc@redhat.com>
513 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
514 function and variable tags and a second time to resolve their
517 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
519 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
521 2021-03-02 Alan Modra <amodra@gmail.com>
524 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
525 linker defined start/stop symbols when start_stop_gc.
527 2021-03-02 Alan Modra <amodra@gmail.com>
529 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
530 indirect to pc-relative or toc-relative for undefined symbols.
532 2021-03-01 Alan Modra <amodra@gmail.com>
533 Fangrui Song <maskray@google.com>
535 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
536 defined start/stop symbols when start_stop_gc.
537 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
538 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
539 * linker.c (bfd_generic_define_start_stop): Likewise.
541 2021-02-25 Alan Modra <amodra@gmail.com>
544 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
545 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
546 use when deciding an as-needed library should be loaded instead
547 of using the binding of the library definition.
549 2021-02-24 Alan Modra <amodra@gmail.com>
552 * coff-stgo32.c (go32exe_check_format): Sanity check size of
553 header to avoid a buffer overflow.
555 2021-02-22 Alan Modra <amodra@gmail.com>
557 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
558 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
560 2021-02-19 Nelson Chu <nelson.chu@sifive.com>
563 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
564 (_bfd_riscv_relax_call): Likewise.
565 (_bfd_riscv_relax_lui): Likewise.
566 * elfxx-riscv.c (howto_table): Likewise.
568 2021-02-18 Nelson Chu <nelson.chu@sifive.com>
570 * Makefile.am: Added cpu-riscv.h.
571 * Makefile.in: Regenerated.
572 * po/SRC-POTFILES.in: Regenerated.
573 * cpu-riscv.h: Added to support spec versions controlling.
574 Also added extern arrays and functions for cpu-riscv.c.
575 (enum riscv_spec_class): Define all spec classes here uniformly.
576 (struct riscv_spec): Added for all specs.
577 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
578 (RISCV_GET_SPEC_NAME): Likewise.
579 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
580 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
581 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
582 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
583 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
584 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
585 (riscv_priv_specs): Moved below.
586 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
587 (riscv_isa_specs): Moved from include/opcode/riscv.h.
588 * elfnn-riscv.c: Included cpu-riscv.h.
589 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
590 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
591 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
592 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
594 2021-02-17 Alan Modra <amodra@gmail.com>
596 * wasm-module.c: Guard include of limits.h.
597 (CHAR_BIT): Provide backup define.
598 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
599 Correct signed overflow checking.
601 2021-02-17 Nelson Chu <nelson.chu@sifive.com>
604 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
605 copying the elf flags from input BFD to output BFD, until we have
606 checked if the input BFD has no code section or not. Also fix the
607 problem that we only check the first section rather than the entire
608 sections for input BFD.
610 2021-02-16 Alan Modra <amodra@gmail.com>
612 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
613 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
615 2021-02-15 Jan Beulich <jbeulich@suse.com>
617 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
618 * doc/Makefile.in: Re-generate.
620 2021-02-15 Alan Modra <amodra@gmail.com>
622 * elf32-nds32.c (nds32_get_section_contents): Replace
623 bfd_malloc_and_get_section with bfd_get_full_section_contents.
624 (nds32_elf_relax_delete_blanks): Init contents.
625 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
627 2021-02-15 Alan Modra <amodra@gmail.com>
629 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
630 bfd_get_full_section_contents.
632 2021-02-14 Alan Modra <amodra@gmail.com>
634 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
635 all fixes to bfd_generic_get_relocated_section_contents since this
636 function was split out.
638 2021-02-11 Alan Modra <amodra@gmail.com>
640 * config.bfd: Remove ia64 from obsolete list.
642 2021-02-11 Alan Modra <amodra@gmail.com>
645 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
647 2021-02-11 Alan Modra <amodra@gmail.com>
650 * elf32-avr.c (avr_elf32_load_records_from_section): Use
651 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
654 2021-02-11 Alan Modra <amodra@gmail.com>
657 * section.c (bfd_get_section_contents): Avoid possible overflow
658 when range checking offset and count.
659 (bfd_set_section_contents): Likewise.
661 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
663 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
665 * configure: Regenerated.
667 2021-02-09 Alan Modra <amodra@gmail.com>
669 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
670 * configure.ac: Delete symbian entries.
671 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
672 * elf32-arm.c: Remove symbian support. Formatting.
673 * targets.c: Delete symbian entries.
674 * configure: Regenerate.
676 2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
679 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
680 info when failed to convert GOTPCREL relocation.
682 2021-02-04 Nelson Chu <nelson.chu@sifive.com>
684 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
686 2021-02-04 Alan Modra <amodra@gmail.com>
689 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
690 libraries for IR references on pass over libraries after LTO
693 2021-02-03 Alan Modra <amodra@gmail.com>
696 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
697 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
698 libraries when H is an indirect symbol after calling
699 _bfd_elf_add_default_symbol.
701 2021-02-03 Alan Modra <amodra@gmail.com>
704 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
705 undecorated symbol will have a different version.
707 2021-02-02 Alan Modra <amodra@gmail.com>
710 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
711 Use when handling default versioned symbol. Rename existing
712 override variable to nondef_override and use for non-default
714 (elf_link_add_object_symbols): Adjust call to suit. Don't
715 pull in as-needed libraries when override is set.
717 2021-02-01 Emery Hemingway <ehmry@posteo.net>
719 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
721 2021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
724 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
725 offset for the R_RL78_RH_SADDR relocation.
727 2021-01-29 Alan Modra <amodra@gmail.com>
730 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
731 on symbols defined in absolute or other special sections.
733 2021-01-28 Alan Modra <amodra@gmail.com>
736 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
737 prevent endless looping of linked-to sections.
739 2020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
741 * bfd-elf.h (elfcore_write_file_note): New function.
742 * elf.c (elfcore_write_file_note): New function.
744 2021-01-26 Alan Modra <amodra@gmail.com>
746 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
748 2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
751 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
754 2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
757 * dwarf2.c (read_rnglists): Advance rngs_ptr after
758 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
760 2021-01-20 Alan Modra <amodra@gmail.com>
762 * elf32-ppc.c: Delete outdated comment.
763 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
764 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
766 2021-01-20 Alan Modra <amodra@gmail.com>
768 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
769 section symbols are present.
771 2021-01-19 Alan Modra <amodra@gmail.com>
773 * elf64-ppc.c (elf_hash_entry): New inline function. Use
774 throughout to replace casts.
775 (branch_reloc_hash_match): Remove const from params.
776 (use_local_plt): New function.
777 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
778 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
780 * elf32-ppc.c (use_local_plt): New function.
781 (allocate_dynrelocs, ppc_elf_relocate_section),
782 (write_global_sym_plt): Use use_local_plt.
784 2021-01-17 H.J. Lu <hongjiu.lu@intel.com>
787 * elflink.c (elf_create_symbuf): Also ignore section symbols.
789 2021-01-16 H.J. Lu <hongjiu.lu@intel.com>
792 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
793 check pointer_equality_needed.
795 2021-01-15 H.J. Lu <hongjiu.lu@intel.com>
797 * elf-linker-x86.h (elf_linker_x86_params): Add
798 report_relative_reloc.
799 * elf32-i386.c (elf_i386_relocate_section): Call
800 _bfd_x86_elf_link_report_relative_reloc to report relative
801 relocations for -z report-relative-reloc.
802 (elf_i386_finish_dynamic_symbol): Likewse.
803 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
804 (elf_x86_64_finish_dynamic_symbol): Likewse.
805 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
807 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
810 2021-01-16 Alan Modra <amodra@gmail.com>
812 * compress.c (decompress_contents): Tidy inflateEnd result test.
814 2021-01-16 Alan Modra <amodra@gmail.com>
817 * elflink.c (elf_link_output_extsym): Use version 1 in
818 .gnu.version for undefined unversioned symbols.
820 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
822 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
823 caused the by previous commit accidentally.
825 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
827 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
828 also aligned the code.
830 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
832 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
834 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
836 * elfnn-riscv.c: Comments tidy and improvement.
837 * elfxx-riscv.c: Likewise.
838 * elfxx-riscv.h: Likewise.
840 2021-01-14 H.J. Lu <hongjiu.lu@intel.com>
843 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
844 section for R_BFIN_FUNCDESC.
846 2021-01-14 Nick Clifton <nickc@redhat.com>
848 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
850 2021-01-13 Alan Modra <amodra@gmail.com>
852 * Makefile.in: Regenerate.
853 * doc/Makefile.in: Regenerate.
855 2021-01-13 Alan Modra <amodra@gmail.com>
858 * section.c (struct bfd_section): Remove pattern field.
859 (BFD_FAKE_SECTION): Adjust to suit.
860 * bfd-in2.h: Regenerate.
861 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
862 (bfd_elf_final_link): Don't call elf_fixup_link_order.
864 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
867 * configure.ac: Use GNU_MAKE_JOBSERVER.
868 * aclocal.m4: Regenerated.
869 * configure: Likewise.
871 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
874 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
875 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
877 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
880 * configure: Regenerated.
882 2021-01-11 Nick Clifton <nickc@redhat.com>
884 * po/fr.po: Updated French translation.
885 * po/pt.po: Updated Portuguese translation.
886 * po/sr.po: Updated Serbian translation.
887 * po/uk.po: Updated Ukranian translation.
889 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
891 * configure: Regenerated.
893 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
896 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
897 -z lam-u48 and -z lam-u57.
899 2021-01-09 Nick Clifton <nickc@redhat.com>
901 * version.m4: Change to 2.36.50.
902 * configure: Regenerate.
903 * po/bfd.pot: Regenerate.
905 2021-01-09 Nick Clifton <nickc@redhat.com>
907 * 2.36 release branch crated.
909 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
911 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
912 LAM_U57 when setting LAM_U48.
914 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
918 * elflink.c (elf_fixup_link_order): Verify that fixing up
919 SHF_LINK_ORDER doesn't increase the output section size.
921 2021-01-09 Alan Modra <amodra@gmail.com>
923 * configure: Regenerate.
925 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
927 * configure: Regenerate.
929 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
932 * aix386-core.c (core_aix386_vec): Initialize
933 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
934 * aout-target.h (MY (vec)): Likewise.
935 * binary.c (binary_vec): Likewise.
936 * cisco-core.c (core_cisco_be_vec): Likewise.
937 (core_cisco_le_vec): Likewise.
938 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
939 * coff-i386.c (TARGET_SYM): Likewise.
940 (TARGET_SYM_BIG): Likewise.
941 * coff-ia64.c (TARGET_SYM): Likewise.
942 * coff-mips.c (mips_ecoff_le_vec): Likewise.
943 (mips_ecoff_be_vec): Likewise.
944 (mips_ecoff_bele_vec): Likewise.
945 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
946 (powerpc_xcoff_vec): Likewise.
947 * coff-sh.c (sh_coff_small_vec): Likewise.
948 (sh_coff_small_le_vec): Likewise.
949 * coff-tic30.c (tic30_coff_vec): Likewise.
950 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
951 (tic54x_coff0_beh_vec): Likewise.
952 (tic54x_coff1_vec): Likewise.
953 (tic54x_coff1_beh_vec): Likewise.
954 (tic54x_coff2_vec): Likewise.
955 (tic54x_coff2_beh_vec): Likewise.
956 * coff-x86_64.c (TARGET_SYM): Likewise.
957 (TARGET_SYM_BIG): Likewise.
958 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
959 (rs6000_xcoff64_aix_vec): Likewise.
960 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
961 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
962 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
963 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
964 (TARGET_LITTLE_SYM): Likewise.
965 * hppabsd-core.c (core_hppabsd_vec): Likewise.
966 * hpux-core.c (core_hpux_vec): Likewise.
967 * i386msdos.c (i386_msdos_vec): Likewise.
968 * ihex.c (ihex_vec): Likewise.
969 * irix-core.c (core_irix_vec): Likewise.
970 * mach-o-target.c (TARGET_NAME): Likewise.
971 * mmo.c (mmix_mmo_vec): Likewise.
972 * netbsd-core.c (core_netbsd_vec): Likewise.
973 * osf-core.c (core_osf_vec): Likewise.
974 * pdp11.c (MY (vec)): Likewise.
975 * pef.c (pef_vec): Likewise.
976 (pef_xlib_vec): Likewise.
977 * plugin.c (plugin_vec): Likewise.
978 * ppcboot.c (powerpc_boot_vec): Likewise.
979 * ptrace-core.c (core_ptrace_vec): Likewise.
980 * sco5-core.c (core_sco5_vec): Likewise.
981 * som.c (hppa_som_vec): Likewise.
982 * srec.c (srec_vec): Likewise.
983 (symbolsrec_vec): Likewise.
984 * tekhex.c (tekhex_vec): Likewise.
985 * trad-core.c (core_trad_vec): Likewise.
986 * verilog.c (verilog_vec): Likewise.
987 * vms-alpha.c (alpha_vms_vec): Likewise.
988 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
989 * wasm-module.c (wasm_vec): Likewise.
990 * xsym.c (sym_vec): Likewise.
991 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
993 (elf_map_symbols): Don't include ignored section symbols.
994 * elfcode.h (elf_slurp_symbol_table): Also set
995 BSF_SECTION_SYM_USED on STT_SECTION symbols.
996 * elflink.c (bfd_elf_final_link): Generated section symbols only
997 when emitting relocations or reqired.
998 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
999 * syms.c (BSF_SECTION_SYM_USED): New.
1000 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1001 (bfd_target): Add keep_unused_section_symbols.
1002 (bfd_keep_unused_section_symbols): New.
1003 * bfd-in2.h: Regenerated.
1005 2021-01-07 Nick Clifton <nickc@redhat.com>
1008 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
1009 absolute paths and check to see if they are longer than MAX_PATH.
1011 2021-01-07 Philipp Tomsich <prt@gnu.org>
1013 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
1015 2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
1016 Jim Wilson <jimw@sifive.com>
1017 Andrew Waterman <andrew@sifive.com>
1018 Maxim Blinov <maxim.blinov@embecosm.com>
1019 Kito Cheng <kito.cheng@sifive.com>
1020 Nelson Chu <nelson.chu@sifive.com>
1022 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
1024 2021-01-06 H.J. Lu <hongjiu.lu@intel.com>
1026 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
1027 (bfinfdpic_check_relocs): Likewise.
1029 2021-01-06 Alan Modra <amodra@gmail.com>
1031 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
1033 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1035 2021-01-06 Alan Modra <amodra@gmail.com>
1037 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
1038 (sparc64-*-solaris2*): Add sparc_elf64_vec and
1041 2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
1043 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
1044 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
1045 * configure.ac: Handle riscv_elf[32|64]_be_vec.
1046 * configure: Regenerate.
1047 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
1048 riscv_is_insn_reloc.
1049 (riscv_get_insn): RISC-V instructions are always little endian, but
1050 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
1052 (riscv_put_insn): Likewsie.
1053 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
1054 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
1055 use riscv_[get|put]_insn or bfd_[get|put].
1056 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
1057 or bfd_[get|put]l16 for code.
1058 (riscv_elf_relocate_section): Likewise.
1059 (riscv_elf_finish_dynamic_symbol): Likewise.
1060 (riscv_elf_finish_dynamic_sections): Likewise.
1061 (_bfd_riscv_relax_call): Likewise.
1062 (_bfd_riscv_relax_lui): Likewise.
1063 (_bfd_riscv_relax_align): Likewise.
1064 (_bfd_riscv_relax_pc): Likewise.
1065 (riscv_elf_object_p): Handled for big endian.
1066 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
1067 * targets.c: Add riscv_elf[32|64]_be_vec.
1068 (_bfd_target_vector): Likewise.
1070 2021-01-05 Alan Modra <amodra@gmail.com>
1072 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
1073 for relocatable executable.
1075 2021-01-05 Alan Modra <amodra@gmail.com>
1077 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
1079 2021-01-05 Nelson Chu <nelson.chu@sifive.com>
1081 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
1082 make sure gp symbol is output as a dynamic symbol.
1084 2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
1087 * elflink.c (compare_link_order): Place unordered sections before
1089 (elf_fixup_link_order): Add a link info argument. Allow mixed
1090 ordered and unordered input sections for non-relocatable link.
1091 Sort the consecutive bfd_indirect_link_order sections with the
1092 same pattern. Change the offsets of the bfd_indirect_link_order
1094 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
1095 * section.c (bfd_section): Add pattern.
1096 (BFD_FAKE_SECTION): Initialize pattern to NULL.
1097 * bfd-in2.h: Regenerated.
1099 2021-01-04 Alexander Fedotov <alfedotov@gmail.com>
1101 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
1102 of private flags with 0x.
1103 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
1105 2021-01-04 Alan Modra <amodra@gmail.com>
1108 * elflink.c (elf_link_input_bfd): Use the file base name in
1109 linker generated STT_FILE symbols.
1111 2021-01-04 Nelson Chu <nelson.chu@sifive.com>
1113 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
1114 * elfxx-riscv.h: Add declaration.
1115 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
1116 riscv_compare_subsets to check the orders.
1117 (riscv_skip_prefix): Removed.
1118 (riscv_prefix_cmp): Removed.
1120 2021-01-04 Alan Modra <amodra@gmail.com>
1123 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
1124 calculating subset version length.
1126 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1128 * xcofflink.c: Correct spelling in comments.
1130 2021-01-01 Alan Modra <amodra@gmail.com>
1132 Update year range in copyright notice of all files.
1134 For older changes see ChangeLog-2020
1136 Copyright (C) 2021 Free Software Foundation, Inc.
1138 Copying and distribution of this file, with or without modification,
1139 are permitted in any medium without royalty provided the copyright
1140 notice and this notice are preserved.
1146 version-control: never