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