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