]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
[gdb/doc] Fix typo in maint selftest entry
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
09a7e912
CZ
12021-09-014 Cupertino Miranda <cmiranda@synopsys.com>
2 Claudiu Zissulescu <claziss@synopsys.com>
3
4 * arc-got.h (arc_static_sym_data): New structure.
5 (get_static_sym_data): New function.
6 (relocate_fix_got_relocs_for_got_info): Move the computation fo
7 symbol value and section to above introduced function, and use
8 this new function.
9
64dbf74d
LM
102021-09-07 Luis Machado <luis.machado@linaro.org>
11
12 Revert: [AArch64] MTE corefile support
13
14 2021-05-21 Luis Machado <luis.machado@linaro.org>
15
16 * elf.c (elfcore_make_memtag_note_section): New function.
17 (elfcore_grok_note): Handle NT_MEMTAG note types.
18
3f1a2892
NC
192021-09-07 Nick Clifton <nickc@redhat.com>
20
9dc2f267
NC
21 PR 28305
22 * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range
23 reloc.
24
3f1a2892
NC
25 PR 28303
26 * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of
27 range relocs.
28
3ee0cd9e
NC
292021-08-10 Nick Clifton <nickc@redhat.com>
30
31 * po/sr.po: Updated Serbian translation.
32
5c9cbf07
NC
332021-07-18 Nick Clifton <nickc@redhat.com>
34
35 * config.bfd: Move pending obsoletion targets to obsolete list.
36
05a1dd47
GB
372021-07-16 Giulio Benetti <giulio.benetti@benettiengineering.com>
38
39 * elf32-or1k.c (or1k_elf_relocate_section): Use a separate entry
40 in switch case R_OR1K_INSN_REL_26 where we need to check for
41 !SYMBOL_CALLS_LOCAL() instead of !SYMBOL_REFERENCES_LOCAL().
42
51d29b8c
CC
432021-07-14 Clément Chigot <clement.chigot@atos.net>
44
45 * libxcoff.h (struct xcoff_dwsect_name): Add DWARF name.
46 * coff-rs6000.c (xcoff_dwsect_names): Update.
47 * coffcode.h (sec_to_styp_flags): Likewise.
48 (coff_new_section_hook): Likewise.
49
f8dd3646
AM
502021-07-10 Alan Modra <amodra@gmail.com>
51
52 * dwarf2.c (read_address): Remove accidental commit.
53 (read_ranges): Compare offset rather than pointers.
54
f1cee837
NC
552021-07-08 Nick Clifton <nickc@redhat.com>
56
57 * po/pt.po: Updated Portuguese translation.
58
ca52626b
NC
592021-07-07 Nick Clifton <nickc@redhat.com>
60
61 * elfcode.h (elf_swap_symbol_out): Revert accidental change that
62 removed an abort if the shndx pointer is NULL.
63
f07afc65
RO
642021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
65
66 * sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
67 Solaris.
68
b737d304
RO
692021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
70
71 * configure.ac: Check for strnlen declaration.
72 * configure, config.in: Regenerate.
73
ffa5352c
NC
742021-07-07 Nick Clifton <nickc@redhat.com>
75
76 PR 28051
77 * coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in
78 order to fix problems when translating.
79 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
80 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
81 Likewise.
82 * po/bfd.pot: Regenerate.
83
235f5ef4
MM
842021-07-06 Michael Matz <matz@suse.de>
85
86 PR ld/28021
87 * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any
88 versioning.
89
07b2745f
AM
902021-07-06 Alan Modra <amodra@gmail.com>
91
92 PR 28055
93 * elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED.
94
b4c4b8aa
AM
952021-07-05 Alan Modra <amodra@gmail.com>
96
97 PR 28055
98 * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put
99 and bfd_put_32 calls. Correct section limit checks.
100
346d80ef
NC
1012021-07-03 Nick Clifton <nickc@redhat.com>
102
103 * version.m4: Update version number.
104 * configure: Regenerate.
105 * po/opcodes.pot: Regenerate.
106
51419248
NC
1072021-07-03 Nick Clifton <nickc@redhat.com>
108
109 * 2.37 release branch created.
110
49910fd8
NC
1112021-07-02 Nick Clifton <nickc@redhat.com>
112
113 PR 28046
114 * dwarf2.c (read_ranges): Check that range_ptr does not exceed
115 range_end.
116
9a39f738
YS
1172021-06-30 YunQiang Su <yunqiang.su@cipunited.com>
118
119 PR mips/28009
120 * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr,
121 _bfd_mips_elf_fake_sections): Mark LTO debug info as
122 SHT_MIPS_DWARF.
123
c2ce8313
NC
1242021-06-29 Nick Clifton <nickc@redhat.com>
125
126 * config.bfd (obsolete configurations): Add netbsdpe.
127
50331d64
NC
1282021-06-22 Nelson Chu <nelson.chu@sifive.com>
129
130 * elfnn-riscv.c (riscv_pcrel_hi_reloc): Added field to store
131 the original relocation type, in case the type is converted to
132 R_RISCV_HI20.
133 (riscv_pcrel_lo_reloc): Removed unused name field.
134 (riscv_pcrel_relocs): Added comments.
135 (riscv_zero_pcrel_hi_reloc): Removed unused input_bfd.
136 (riscv_record_pcrel_hi_reloc): Updated.
137 (riscv_record_pcrel_lo_reloc): Likewise.
138 (riscv_resolve_pcrel_lo_relocs): Likewise. Check the original
139 type of auipc, to make sure the %pcrel_lo without any addends.
140 Otherwise, report dangerous relocation error.
141 (riscv_elf_relocate_section): Updated above functions are changed.
142 For R_RISCV_GOT_HI20, report dangerous relocation error when addend
143 isn't zero.
144
406b4ada
L
1452021-06-19 H.J. Lu <hongjiu.lu@intel.com>
146
147 PR ld/27998
148 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Count PLT for GOTOFF
149 relocation against IFUNC symbols.
150 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
151
83b1d8f4
L
1522021-06-19 H.J. Lu <hongjiu.lu@intel.com>
153
154 * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in
155 PDE.
156
5a767724
L
1572021-06-18 H.J. Lu <hongjiu.lu@intel.com>
158
159 * elf-properties.c (_bfd_elf_parse_gnu_properties): Handle
160 GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
161 GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
162 (elf_merge_gnu_properties): Likewise.
163
f64b9b13
AM
1642021-06-11 Alan Modra <amodra@gmail.com>
165
166 PR 27952
167 * elf-bfd.h (struct elf_obj_tdata): Add is_pie.
168 * elflink.c (elf_link_add_object_symbols): Set is_pie.
169
f75bcf7e
NC
1702021-06-09 Nick Clifton <nickc@redhat.com>
171
172 PR 27666
173 * config.bfd: Do not add the sparc_elf32_vec or sparc_elf64_vec
174 vectors to Sparc Solaris2 targets.
175
5804373d
MM
1762021-06-08 Michael Matz <matz@suse.de>
177
178 * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag.
179 (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
180
6bee34a1
JB
1812021-06-07 Jan Beulich <jbeulich@suse.com>
182
183 * dwarf2.c (read_ranges, read_rnglists): Add u suffix to constant.
184
45342c7c
AM
1852021-06-02 Alan Modra <amodra@gmail.com>
186
187 * elf-attrs.c (_bfd_elf_parse_attributes): Break out of loop if
188 subsection length is too small to cover tag and length field.
189
ef9d2565
NC
1902021-05-31 Nelson Chu <nelson.chu@sifive.com>
191 Lifang Xia <lifang_xia@c-sky.com>
192
193 PR 27566
194 * elfnn-riscv.c (struct riscv_elf_link_hash_table): New integer pointer
195 to monitor the data segment phase.
196 (bfd_elfNN_riscv_set_data_segment_info): New function called by
197 after_allocation, to set the data_segment_phase from expld.dataseg.
198 (_bfd_riscv_relax_section): Don't relax when data_segment_phase is
199 exp_seg_relro_adjust (0x4).
200 * elfxx-riscv.h (bfd_elf32_riscv_set_data_segment_info): New extern.
201 (bfd_elf64_riscv_set_data_segment_info): Likewise
202
1273b2f8
L
2032021-05-28 H.J. Lu <hongjiu.lu@intel.com>
204
205 PR ld/27905
206 * elf32-i386.c: Don't include "libiberty.h".
207 (elf_howto_table): Revert commits a7664973b24 and 50c95a739c9.
208 (elf_i386_rtype_to_howto): Revert commit 50c95a739c9.
209 (elf_i386_info_to_howto_rel): Likewise.
210 (elf_i386_tls_transition): Likewise.
211 (elf_i386_relocate_section): Likewise.
212 * elf64-x86-64.c (x86_64_elf_howto_table): Revert commits
213 a7664973b24 and 50c95a739c9.
214 (elf_x86_64_rtype_to_howto): Revert commit 50c95a739c9.
215 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Likewise.
216 * elfxx-x86.h (elf_x86_obj_tdata): Likewise.
217 (elf_x86_has_code16): Likewise.
218
50c95a73
L
2192021-05-26 H.J. Lu <hongjiu.lu@intel.com>
220
221 PR ld/27905
222 * elf32-i386.c: Include "libiberty.h".
223 (elf_howto_table): Add 16-bit R_386_PC16 entry.
224 (elf_i386_rtype_to_howto): Add a BFD argument. Use 16-bit
225 R_386_PC16 if input has 16-bit mode instructions.
226 (elf_i386_info_to_howto_rel): Update elf_i386_rtype_to_howto
227 call.
228 (elf_i386_tls_transition): Likewise.
229 (elf_i386_relocate_section): Likewise.
230 * elf64-x86-64.c (x86_64_elf_howto_table): Add 16-bit
231 R_X86_64_PC16 entry.
232 (elf_x86_64_rtype_to_howto): Use 16-bit R_X86_64_PC16 if input
233 has 16-bit mode instructions.
234 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Set
235 elf_x86_has_code16 if relocatable input is marked with
236 GNU_PROPERTY_X86_FEATURE_2_CODE16.
237 * elfxx-x86.h (elf_x86_obj_tdata): Add has_code16.
238 (elf_x86_has_code16): New.
239
fe1f847d
NC
2402021-05-26 Nelson Chu <nelson.chu@sifive.com>
241
242 * elfxx-riscv.h (check_unknown_prefixed_ext): New bool.
243 * elfxx-riscv.c (riscv_parse_prefixed_ext): Do not check the
244 prefixed extension name if check_unknown_prefixed_ext is false.
245 * elfnn-riscv.c (riscv_merge_arch_attr_info): Set
246 check_unknown_prefixed_ext to false for linker.
247
74fd118f
NC
2482021-05-25 Nick Clifton <nickc@redhat.com>
249
250 * elf32-arn.c (struct elf_arm_obj_tdata): Add num_entries field.
251 (elf32_arm_num_entries): New macro.
252 (elf32_arm_allocate_local_sym_info): Initialise the new field.
253 Allocate arrays individually so that buffer overruns can be
254 detected by memory checkers.
255 (elf32_arm_create_local_iplt): Check num_entries.
256 (elf32_arm_get_plt_info): Likewise.
257 (elf32_arm_final_link_relocate): Likewise.
258 (elf32_arm_check_relocs): Likewise.
259 (elf32_arm_size_dynamic_sections): Likewise.
260 (elf32_arm_output_arch_local_syms): Likewise.
261
cc850f74
NC
2622021-05-25 Nick Clifton <nickc@redhat.com>
263
264 * elf32-arm.c: Fix formatting.
265
4be1e8db
AM
2662021-05-25 Alan Modra <amodra@gmail.com>
267
268 * elf-attrs.c (elf_attr_strdup): New function.
269 (_bfd_elf_attr_strdup): Use it here.
270 (elf_add_obj_attr_string): New function, extracted from..
271 (bfd_elf_add_obj_attr_string): ..here.
272 (elf_add_obj_attr_int_string): New function, extracted from..
273 (bfd_elf_add_obj_attr_int_string): ..here.
274 (_bfd_elf_parse_attributes): Don't allocate an extra byte for a
275 string terminator. Instead ensure parsing doesn't go past
276 end of sub-section. Use size_t variables for lengths.
277
574ec108
AM
2782021-05-22 Alan Modra <amodra@gmail.com>
279
280 * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter.
281 Replace data pointer with pointer to pointer. Increment pointer
282 over bytes read.
283 * libbfd-in.h (_bfd_safe_read_leb128): Update prototype.
284 * elf-attrs.c (_bfd_elf_parse_attributes): Adjust to suit. Be
285 careful not to increment data pointer past end. Remove now
286 redundant pr17512 check.
287 * wasm-module.c (READ_LEB128): Adjust to suit changes to
288 _bfd_safe_read_leb128.
289 * dwarf2.c (read_n_bytes): New inline function, old one renamed to..
290 (read_blk): ..this. Allocate and return block. Increment bfd_byte**
291 arg.
292 (read_3_bytes): New function.
293 (read_1_byte, read_1_signed_byte, read_2_bytes, read_4_bytes),
294 (read_8_bytes, read_string, read_indirect_string),
295 (read_indirect_line_string, read_alt_indirect_string): Take a
296 byte_byte** arg which is incremented over bytes read. Remove any
297 bytes_read return. Rewrite limit checks to compare lengths
298 rather than pointers.
299 (read_abbrevs, read_attribute_value, read_formatted_entries),
300 (decode_line_info, find_abstract_instance, read_ranges),
301 (read_rnglists, scan_unit_for_symbols, parse_comp_unit),
302 (stash_comp_unit): Adjust to suit. Rewrite limit checks to
303 compare lengths rather than pointers.
304 * libbfd.h: Regenerate.
305
894982bf
LM
3062021-05-21 Luis Machado <luis.machado@linaro.org>
307
308 * elf.c (elfcore_make_memtag_note_section): New function.
309 (elfcore_grok_note): Handle NT_MEMTAG note types.
310
427e4066
AB
3112021-05-20 Andrew Burgess <andrew.burgess@embecosm.com>
312
313 * section.c (bfd_get_section_by_name): Return NULL if name is
314 NULL.
315 (bfd_get_section_by_name_if): Likewise.
316 * dwarf2.c (read_section): Remove unneeded NULL check.
317 (find_debug_info): Likewise.
318
83b0a686
NC
3192021-05-19 Nick Clifton <nickc@redhat.com>
320
321 * plugin.c (bfd_plugin_open_input): Inform the user if the limit
322 on the number of open files is reached. If possible, try to
323 increase this limit before failing.
324
75f03fa7
NC
3252021-05-14 Nelson Chu <nelson.chu@sifive.com>
326
327 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Check the values
328 of %pcrel_hi, before and after adding the addend. Make sure the
329 value won't be changed, otherwise, report dangerous error.
330
7671eff8
NC
3312021-05-13 Nelson Chu <nelson.chu@sifive.com>
332
333 * elfxx-riscv.c (check_implicit_always): The check_func, always add
334 the implicit subset without checking.
335 (check_implicit_for_i): The check_func for i, only add zicsr and
336 zifencei when the version of i less than 2.1.
337 (struct riscv_implicit_subset): Record the subsets and their
338 corresponding implicit subsets.
339 (riscv_implicit_subsets): Table records all implicit informations.
340 (riscv_parse_add_implicit_subsets): Updated and add implicit subsets
341 according to riscv_implicit_subsets. Remove the redundant codes.
342
4863cddb
AM
3432021-05-13 Alan Modra <amodra@gmail.com>
344
345 PR 27858
346 * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid
347 reloc howto.
348
f0bbe8ba
LM
3492021-05-12 Luis Machado <luis.machado@linaro.org>
350
351 * elf-bfd.h (elfcore_write_aarch_mte): New prototype.
352 * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New
353 functions.
354 (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL.
355 (elfcore_write_register_note): Handle MTE notes.
356
8ca5537b
AM
3572021-05-11 Alan Modra <amodra@gmail.com>
358
359 PR 27844
360 * pdp11.c (aout_get_external_symbols): Clear first four bytes of
361 strings array, not just the first byte.
362 * aoutx.h (aout_get_external_symbols): Likewise.
363
b397aef4
L
3642021-05-10 H.J. Lu <hongjiu.lu@intel.com>
365
366 PR binutils/27839
367 * simple.c (bfd_simple_get_relocated_section_contents): Remove
368 strayed fprintf.
369
23182ac0
NC
3702021-05-10 Nick Clifton <nickc@redhat.com>
371
372 PR 27839
373 * simple.c (simple_dummy_add_to_set): New function.
374 (simple_dummy_constructor): New function.
375 (simple_dummy_multiple_common): New function.
376 (bfd_simple_get_relocated_section_contents): Zero out the
377 callbacks structure, and then set the add_to_set, constructor and
378 multiple_common fields.
379
5b45e89f
DD
3802021-05-10 Dimitar Dimitrov <dimitar@dinux.eu>
381
382 * elf32-pru.c (elf_backend_can_gc_sections): Define as 1.
383
cf758b39
MF
3842021-05-08 Mike Frysinger <vapier@gentoo.org>
385
386 * doc/Makefile.am (html-local, bfd/index.html): New targets.
387 * doc/Makefile.in: Regenerate.
388
2faf902d
MF
3892021-05-08 Mike Frysinger <vapier@gentoo.org>
390
391 * doc/Makefile.am (AM_MAKEINFOFLAGS): Define.
392 * doc/Makefile.in: Regenerate.
393
97834047
CC
3942021-05-07 Clément Chigot <clement.chigot@atos.net>
395
396 * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
397 sections.
398 * coffgen.c (coff_pointerize_aux): Handle C_DWARF.
399 (coff_print_symbol): Likewise.
400 * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
401
17c6c3b9
JB
4022021-05-07 Jan Beulich <jbeulich@suse.com>
403
404 * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields
405 to zero.
406
a41513ef
AM
4072021-05-07 Alan Modra <amodra@gmail.com>
408
409 * bfd-in2.h: Regenerate.
410 * libbfd.h: Regenerate.
411
284a1309
SH
4122021-05-06 Stafford Horne <shorne@gmail.com>
413
414 PR 27746
415 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT,
416 OR1K_ADD, OR1K_ORI): New macros to help with plt creation.
417 (elf_or1k_link_hash_table): New field plt_count.
418 (elf_or1k_link_hash_entry): New field plt_index.
419 (elf_or1k_plt_entry_size): New function.
420 (or1k_write_plt_entry): Update to support variable size PLTs.
421 (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry
422 API.
423 (or1k_elf_finish_dynamic_symbol): Update to write large PLTs
424 when needed.
425 (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for
426 PLT size.
427
3c3de29b
SH
4282021-05-06 Stafford Horne <shorne@gmail.com>
429
430 PR 21464
431 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16
432 overflow check if we have R_OR1K_GOT_AHI16 followed by
433 R_OR1K_GOT16.
434
0b3e14c9
SH
4352021-05-06 Stafford Horne <shorne@gmail.com>
436
437 PR 21464
438 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
439 * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
440 (or1k_final_link_relocate, or1k_elf_relocate_section,
441 or1k_elf_check_relocs): Likewise.
442 * libbfd.h (bfd_reloc_code_real_names): Likewise.
443 * reloc.c: Likewise.
444
a76ef689
SH
4452021-05-06 Stafford Horne <shorne@gmail.com>
446
447 PR 27624
448 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change
449 condition used to cleanup plt entries to cleanup forced local
450 entries.
451
4467df35
L
4522021-05-05 H.J. Lu <hongjiu.lu@intel.com>
453
454 PR ld/27825
455 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT"
456 to local symbols.
457
c38c6234
AM
4582021-05-05 Alan Modra <amodra@gmail.com>
459
460 * vms-lib.c (vms_traverse_index): Account for vms_kbn size when
461 sanity checking keylen.
462
bd6d8601
NC
4632021-05-04 Nick Clifton <nickc@redhat.com>
464
465 * libbfd.c (bfd_malloc): Provide some documenation. Treat a size
466 of 0 as 1.
467 (bfd_realloc): Likewise.
468 (bfd_zmalloc): Likewise.
469 (bfd_realloc_or_free): Provide some documentation. Treat a size
470 of 0 as a request to free.
471 * libbfd-in.h (bfd_realloc): Remove prototype.
472 (bfd_realloc_or_free): Remove prototype.
473 (bfd_zmalloc): Remove prototype.
474 * libbfd.h: Regenerate.
475
4c398cc0
JB
4762021-05-03 Jan Beulich <jbeulich@suse.com>
477
478 * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to
479 complain_overflow_dont.
480 * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit
481 relocs to complain_overflow_dont.
482
49160308
AM
4832021-05-03 Alan Modra <amodra@gmail.com>
484
485 * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak
486 symbols when -z dynamic-undefined-weak or when there are no
487 dynamic relocs in read-only sections and -z nodynamic-undefined-weak
488 is not given.
489 * elf64-ppc.c (allocate_dynrelocs): Likewise.
490
b2936612
AM
4912021-05-03 Alan Modra <amodra@gmail.com>
492
493 * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for
494 weak undefined symols that only appear on PLT relocs.
495 * elf64-ppc.c (allocate_dynrelocs): Likewise.
496
337d0bf8
AM
4972021-05-03 Alan Modra <amodra@gmail.com>
498
499 PR 27755
500 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.
501
5072b52d
AM
5022021-05-03 Alan Modra <amodra@gmail.com>
503
504 * elf32-csky.c (is_mapping_symbol_name): New function.
505 (csky_elf_is_target_special_symbol): Likewise.
506 (csky_elf_maybe_function_sym): Likewise.
507 (bfd_elf32_bfd_is_target_special_symbol): Define.
508 (elf_backend_maybe_function_sym): Define.
509
d1fbc3ba
NC
5102021-04-30 Nick Clifton <nickc@redhat.com>
511
512 PR 27801
513 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
514 read 32-bit value.
515
9f84cb38
NC
5162021-04-30 Nick Clifton <nickc@redhat.com>
517
518 PR 27799
519 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
520 that are too small.
521
6cb40a67
NC
5222021-04-30 Nick Clifton <nickc@redhat.com>
523
524 PR 27797
525 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
526 been realloc'ed to size 0.
527
bceb87ef
NC
5282021-04-30 Nick Clifton <nickc@redhat.com>
529
530 PR 27795
531 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
532 lengths.
533
09e40e44
NC
5342021-04-29 Nick Clifton <nickc@redhat.com>
535
536 PR 27793
537 * som.c (som_slurp_symbol_table): Assign symbols without any scope
538 to the undefined section.
539 (som_decode_symclass): Check for a missing symbol section.
540 * syms.c (bfd_decode_symclass): Likewise.
541
063e75c9
NC
5422021-04-29 Nick Clifton <nickc@redhat.com>
543
544 PR 27792
545 * som.c (som_slurp_string_table): Place a terminating NUL byte at
546 the end of the table.
547 (som_slurp_symbol_table): Check for an over-large offset into the
548 string string table.
549
24aebc79
NC
5502021-04-28 Nick Clifton <nickc@redhat.com>
551
552 * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin
553 symbols as potential function symbols.
554 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise.
555 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
556 * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise.
557
3955e346
MF
5582021-04-26 Mike Frysinger <vapier@gentoo.org>
559
560 * elf-bfd.h: Include stdlib.h.
561
a7664973
JB
5622021-04-26 Jan Beulich <jbeulich@suse.com>
563
564 * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to
565 complain_overflow_signed.
566 * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16
567 to complain_overflow_signed.
568
f5e98b7d
EB
5692021-04-23 Eric Botcazou <ebotcazou@adacore.com>
570
571 * elf.c (special_sections_p): Add .persistent.bss.
572
c21346c5
JB
5732021-04-23 Jan Beulich <jbeulich@suse.com>
574
575 * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero
576 size field.
577 * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL
578 has zero size field.
579
bdd2aaf6
CC
5802021-04-22 Clément Chigot <clement.chigot@atos.net>
581
582 * hash.c (struct bfd_strtab_hash): Remove xcoff field.
583 Add length_field_size field.
584 (_bfd_stringtab_init): Change prototype.
585 Adapt to new length_field_size.
586 (_bfd_xcoff_stringtab_init): Likewise.
587 (_bfd_stringtab_add): Likewise.
588 (_bfd_stringtab_emit): Likewise.
589 * libbfd-in.h (_bfd_xcoff_stringtab_init):
590 Change prototype.
591 * libbfd.h: Regenerate.
592 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
593 Call _bfd_xcoff_stringtab_init with isxcoff64 value.
594
b11b2969
CC
5952021-04-22 Clément Chigot <clement.chigot@atos.net>
596
597 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for
598 unsupported storage class or auxialiry entries.
599 Improve and adapt to new aux structures.
600 Add C_DWARF support.
601 (_bfd_xcoff_swap_aux_out): Likewise.
602 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
603 (_bfd_xcoff64_swap_aux_out): Likewise.
604
18e9a809
EZ
6052021-04-21 Eli Zaretskii <eliz@gnu.org>
606
607 PR 27760
608 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
609 of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
610 IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
611 Decode the contents of the DllCharacteristics field.
612
33fe00c1
NC
6132021-04-21 Nick Clifton <nickc@redhat.com>
614
615 PR 27759
616 * srec.c (srec_read_section): Replace assertions with error
617 returns.
618
c5df7e44
CC
6192021-04-20 Clément Chigot <clement.chigot@atos.net>
620
621 PR binutils/21700
622 * reloc.c (BFD_RELOC_PPC_NEG): New relocation.
623 * bfd-in2.h: Regenerate.
624 * libbfd.h: Regenerate.
625 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add
626 BFD_RELOC_PPC_NEG handler.
627 (xcoff_reloc_type_neg): Correctly substract addend.
628 * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32
629 howto.
630 (xcoff64_rtype2howto): Add handler for R_NEG_32.
631 (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler.
632 * xcofflink.c (xcoff_need_ldrel_p): Check output section
633 for R_POS-like relocations. New argument added.
634 (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument.
635 (xcoff_link_input_bfd): Likewise.
636
6f8f6017
AM
6372021-04-16 Alan Modra <amodra@gmail.com>
638
639 PR 27567
640 * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags.
641 (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT,
642 ignore alignment checks when return is false. Formatting.
643
ddfe525f
NC
6442021-04-15 Nelson Chu <nelson.chu@sifive.com>
645
646 PR27584
647 * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to
648 omit local and empty symbols since they usually generated to
649 mark the auipc instructions.
650
f6a1f957
LX
6512021-04-15 Lifang Xia<lifang_xia@c-sky.com>
652
653 * elf32-csky.c (csky_elf_howto_table)
654 <R_CKCORE_PCREL_IMM16BY2>: Set special_function to
655 bfd_elf_generic_reloc.
656 <R_CKCORE_PCREL_IMM16BY4>: Likewise.
657 <R_CKCORE_PCREL_IMM10BY4>: Likewise.
658 <R_CKCORE_PCREL_IMM18BY2>: Likewise.
659 <R_CKCORE_PCREL_FLRW_IMM8BY4>: Likewise.
660
9917b559
L
6612021-04-14 H.J. Lu <hongjiu.lu@intel.com>
662
663 PR binutils/27708
664 * elf.c (assign_file_positions_for_non_load_sections): Set
665 p_memsz to p_filesz for the loadable PT_NOTE segment.
666
5f47741b
FC
6672021-04-14 Frederic Cambus <fred@statdns.com>
668
669 * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
670 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
671
8985b74b
AM
6722021-04-14 Alan Modra <amodra@gmail.com>
673
674 PR 27631
675 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
676 when hh might be NULL, test for NULL first.
677
c9f9a78d
AM
6782021-04-14 Alan Modra <amodra@gmail.com>
679
680 PR 27630
681 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
682 hash might be NULL, cast instead.
683
d2f1139e
CC
6842021-04-13 Clément Chigot <clement.chigot@atos.net>
685
686 * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
687
e3839c10
NC
6882021-04-13 Nelson Chu <nelson.chu@sifive.com>
689
690 * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning
691 when the version of input or output is RISCV_UNKNOWN_VERSION, since
692 the extension is added implicitly.
693 * elfxx-riscv.c: Updated the obsolete comments.
694 (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h.
695 * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
696
43e05cd4
AM
6972021-04-12 Alan Modra <amodra@gmail.com>
698
699 * elf-bfd.h (ENABLE_CHECKING): Define.
700 (elf_link_hash_lookup): Abort if wrong type of hash table.
701 * configure.ac (--enable-checking): Add support.
702 * config.in: Regenerate.
703 * configure: Regenerate.
704
2cc15b10
AM
7052021-04-12 Alan Modra <amodra@gmail.com>
706
707 * elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
708 (elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
709 (elf_hash_table, elf_hash_table_id): Likewise.
710 * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
711 is_elf_hash_table check.
712 * elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
713 * elf32-hppa.c (clobber_millicode_symbols): Correct param types.
714 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
715 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
716 (elfNN_ia64_global_dyn_sym_thunk: Likewise.
717 * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
718 (elf64_ia64_global_dyn_sym_thunk): Likewise.
719 (elf64_vms_link_add_object_symbols): Pass base type of hash table
720 to is_elf_hash_table.
721 * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
722 (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
723 (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
724 (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
725 (bfd_elf_final_link): Likewise.
726 * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
727 * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup.
728
b585e899
AM
7292021-04-12 Alan Modra <amodra@gmail.com>
730
731 * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry*
732 from elf_backend_archive_symbol_lookup.
733 (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*.
734 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check
735 we have a ppc_hash_table before accessing ppc_link_hash_entry
736 fields.
737 * elflink.c (_bfd_elf_archive_symbol_lookup): Return
738 bfd_link_hash_entry*.
739 (elf_link_add_archive_symbols): Adjust to suit.
740
f5b10973
NC
7412021-04-12 Nelson Chu <nelson.chu@sifive.com>
742
743 * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
744 i-ext when expanding g-ext.
745
f0bae255
NC
7462021-04-12 Nelson Chu <nelson.chu@sifive.com>
747
748 * elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
749 (riscv_parse_add_subset): Always add the implicit extensions, even if
750 their versions are RISCV_UNKNOWN_VERSION.
751 (riscv_parse_std_ext): Delay to add i-ext as the implicit extension
752 in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the
753 implicit extension after it has been expanded.
754 (riscv_parse_add_implicit_subsets): Updated.
755
e601909a
NC
7562021-04-12 Nelson Chu <nelson.chu@sifive.com>
757
758 * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward.
759 (riscv_std_s_ext_strtab): Likewise.
760 (riscv_std_h_ext_strtab): Likewise.
761 (riscv_std_zxm_ext_strtab): Added for the zxm prefix.
762 (enum riscv_prefix_ext_class): Moved forward and renamed from
763 riscv_isa_ext_class. Reorder them according to the parsing order,
764 since the enum values are used to check the orders in the
765 riscv_compare_subsets.
766 (struct riscv_parse_prefix_config): Moved forward and renamed from
767 riscv_parse_config_t. Also removed the ext_valid_p field, the
768 related functions are replaced by riscv_valid_prefixed_ext.
769 (parse_config): Moved forward and updated. The more letters of the
770 prefix string, the more forward it must be defined. Otherwise, we
771 will get the wrong mapping when using strncmp in riscv_get_prefix_class.
772 (riscv_get_prefix_class): Moved forward. Support to parse the
773 multi-letter prefix, like zxm.
774 (riscv_known_prefixed_ext): New function, check if the prefixed
775 extension is supported according to the right riscv_std_*_ext_strtab.
776 (riscv_valid_prefixed_ext): New function, used to replace the
777 riscv_ext_*_valid_p functions.
778 (riscv_init_ext_order): Do not set the values for prefix keywords
779 since they may have multiple letters for now.
780 (riscv_compare_subsets): Set the order values of prefix keywords
781 to negative numbers according to the riscv_prefix_ext_class.
782 (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we
783 have parsed the prefixed extensions.
784 (riscv_parse_prefixed_ext): Updated and removed the parameter config.
785 Report error when the prefix is unknown.
786 (riscv_parse_subset): Do not parse the prefixed extensions according
787 to the orders in the parse_config. Remove the confused message and
788 let riscv_parse_prefixed_ext to report the details.
789 * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c.
790 (riscv_get_prefix_class): Removed to static.
791
eec8bf7e
MF
7922021-04-08 Mike Frysinger <vapier@gentoo.org>
793
794 * configure.ac (ACX_BUGURL): Use https://.
795 * configure.com (COPY_TEXT): Likewise.
796 * configure: Regenerate.
797
83c79df8
AM
7982021-04-05 Alan Modra <amodra@gmail.com>
799
800 * configure.ac: Don't check for long long or long double type.
801 Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
802 strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check
803 for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
804 vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS.
805 (AC_ISC_POSIX): Don't invoke.
806 (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise.
807 * sysdep.h: Remove many HAVE_*_H checks and fallback declarations.
808 Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder
809 header order as per automake AC_INCLUDES_DEFAULT.
810 * bfd-in.h: Include inttypes.h unconditionally.
811 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and
812 long double are available.
813 (bfd_scan_vma): Assume long long and strtoull are available.
814 * elflink.c: Include limits.h unconditionally.
815 * elfnn-riscv.c: Likewise.
816 * wasm-module.c: Likewise.
817 * hpux-core.c: Include dirent.h unconditionally.
818 * trad-core.c: Likewise.
819 * hosts/x86-64linux.h: Include stdlib.h unconditionally.
820 * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks.
821 * elf32-m68hc1x.c: Don't include alloca-conf.h.
822 * elf64-hppa.c: Likewise.
823 * som.c: Likewise.
824 * wasm-module.c: Likewise.
825 * xsym.c: Likewise.
826 * bfd-in2.h: Regenerate.
827 * config.in: Regenerate.
828 * configure: Regenerate.
829
74edb473
TC
8302021-04-01 Tamar Christina <tamar.christina@arm.com>
831
832 PR ld/26659
833 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
834
e9b095a5
ML
8352021-04-01 Martin Liska <mliska@suse.cz>
836
837 * ecoff.c (strneq): Remove strneq and use startswith.
838 (_bfd_ecoff_slurp_armap): Likewise.
839
3f3328b8
ML
8402021-04-01 Martin Liska <mliska@suse.cz>
841
842 * elf-bfd.h (bfd_section_is_ctf): Use startswith function.
843 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
844 (elf_get_reloc_section): Likewise.
845 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
846 * elf32-m32r.c (m32r_elf_section_flags): Likewise.
847 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise.
848 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
849 (nds32_elf_relocate_section): Likewise.
850 (nds32_elf_action_discarded): Likewise.
851 (nds32_elf_check_relocs): Likewise.
852 (nds32_elf_section_flags): Likewise.
853 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
854 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
855 * elf32-rx.c (rx_table_find): Likewise.
856 (rx_table_map): Likewise.
857 * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise.
858 (spu_elf_find_overlays): Likewise.
859 (needs_ovl_stub): Likewise.
860 (allocate_spuear_stubs): Likewise.
861 (build_spuear_stubs): Likewise.
862 (mark_overlay_section): Likewise.
863 (spu_elf_auto_overlay): Likewise.
864 (spu_elf_output_symbol_hook): Likewise.
865 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
866 * elf32-xtensa.c (xtensa_property_section_name): Likewise.
867 * elf64-ppc.c (ppc64_elf_section_flags): Likewise.
868 (ppc64_elf_relocate_section): Likewise.
869 * elflink.c (resolve_section): Likewise.
870 (UNARY_OP): Likewise.
871 (BINARY_OP_HEAD): Likewise.
872 (elf_link_input_bfd): Likewise.
873 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
874 * elfxx-riscv.c (riscv_parse_subset): Likewise.
875 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
876 * opncls.c (get_build_id): Likewise.
877
65c5fbd4
AM
8782021-03-31 Alan Modra <amodra@gmail.com>
879
880 PR 27671
881 * bfd-in.h: Don't poison FALSE or TRUE.
882 * bfd-in2.h: Regenerate.
883
0a1b45a2
AM
8842021-03-31 Alan Modra <amodra@gmail.com>
885
886 * sysdep.h: POISON_BFD_BOOLEAN: Define.
887 * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
888 * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
889 * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
890 * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
891 * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
892 * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
893 * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
894 * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
895 * coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
896 * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
897 * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
898 * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
899 * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
900 * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
901 * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
902 * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
903 * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
904 * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
905 * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
906 * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
907 * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
908 * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
909 * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
910 * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
911 * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
912 * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
913 * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
914 * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
915 * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
916 * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
917 * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
918 * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
919 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
920 * elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
921 * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
922 * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
923 * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
924 * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
925 * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
926 * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
927 * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
928 * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
929 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
930 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
931 * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
932 * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
933 * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
934 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
935 * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
936 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
937 * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
938 * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
939 * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
940 * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
941 * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
942 * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
943 * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
944 * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
945 * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
946 * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
947 * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
948 * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
949 * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
950 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
951 * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
952 * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
953 * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
954 * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
955 * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
956 * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
957 * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
958 * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
959 * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
960 * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
961 * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
962 * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
963 * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
964 * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
965 * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
966 * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
967 * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
968 * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
969 * xsym.h: Replace bfd_boolean with bool, FALSE with false, and
970 TRUE with true throughout.
971 * bfd-in2.h: Regenerate.
972 * libbfd.h: Regenerate.
973 * libcoff.h: Regenerate.
974
ad9e24ad
AM
9752021-03-31 Alan Modra <amodra@gmail.com>
976
977 * bfd-in.h: Include stdbool.h.
978 (bfd_boolean): Define as bool
979 * bfd-in2.h: Regenerate.
980
3dfb1b6d
AM
9812021-03-31 Alan Modra <amodra@gmail.com>
982
983 * .gitignore: Delete bfd_stdint.h entry.
984 * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
985 (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
986 * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
987 * configure.ac: Don't invoke GCC_HEADER_STDINT.
988 * configure.com: Don't create bfd_stdint.h.
989 * Makefile.in: Regenerate.
990 * aclocal.m4: Regenerate.
991 * bfd-in2.h: Regenerate.
992 * config.in: Regenerate.
993 * configure: Regenerate.
994 * doc/Makefile.in: Regenerate.
995 * po/BLD-POTFILES.in: Regenerate.
996
57ae980e
AM
9972021-03-31 Alan Modra <amodra@gmail.com>
998
999 * bfd-in.h: Include string.h.
1000 (LITMEMCPY, LITSTRCPY): Delete.
1001 * bfd-in2.h: Regenerate.
1002
d1cbe007
AM
10032021-03-30 Alan Modra <amodra@gmail.com>
1004
1005 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
1006 unless is_elf_hash_table.
1007
63b4cc53
AM
10082021-03-29 Alan Modra <amodra@gmail.com>
1009
1010 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
1011 to bfd_boolean.
1012 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
1013 against FALSE.
1014 * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
1015 (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
1016 (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
1017 (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
1018 * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
1019 * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
1020 * elf32-rx.c (rx_set_section_contents): Likewise.
1021 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1022 * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
1023 * mach-o.c (bfd_mach_o_read_command): Likewise.
1024 * targets.c (bfd_get_target_info): Likewise.
1025
f4f9ede0
AM
10262021-03-29 Alan Modra <amodra@gmail.com>
1027
1028 * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
1029 * elf32-z80.c (z80_is_local_label_name): Likewise.
1030 * elf32-spu.c (spu_elf_modify_headers): Likewise.
1031 * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
1032 Change type to int.
1033 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
1034 for error return from vms_write_data_block.
1035
1201fda6
AM
10362021-03-29 Alan Modra <amodra@gmail.com>
1037
1038 * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
1039 * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
1040 (elf64_ia64_local_dyn_sym_thunk): Likewise.
1041 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
1042 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
1043 (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
1044 * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
1045 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
1046 * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
1047 (riscv_pcrel_reloc_eq): Likewise.
1048 (riscv_elf_finish_local_dynamic_symbol): Likewise.
1049 * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
1050 (finish_local_dynamic_symbol): Likewise.
1051 * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
1052 * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
1053 (mips_elf_count_got_symbols): Change return type to bfd_boolean.
1054
37bb890f
AM
10552021-03-29 Alan Modra <amodra@gmail.com>
1056
1057 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
1058 a void pointer.
1059 (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
1060 elf_link_output_symstrtab when calling output_arch_syms and
1061 output_arch_local_syms.
1062 * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
1063 elf_backend_output_arch_local_syms>): Change return type of func
1064 arg to match elf_link_output_symstrtab.
1065 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
1066 return type.
1067 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
1068 (nds32_elf_output_arch_syms): Correct func return type.
1069
0f684201
AM
10702021-03-29 Alan Modra <amodra@gmail.com>
1071
1072 * elf-m10200.c (mn10200_elf_relocate_section): Return int.
1073 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1074 * elf32-arc.c (elf_arc_relocate_section): Likewise.
1075 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1076 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1077 * elf32-bfin.c (bfin_relocate_section): Likewise.
1078 (bfinfdpic_relocate_section): Likewise.
1079 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1080 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1081 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1082 * elf32-csky.c (csky_elf_relocate_section): Likewise.
1083 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1084 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1085 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1086 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1087 * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
1088 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1089 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1090 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1091 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1092 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1093 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1094 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1095 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1096 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1097 * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
1098 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1099 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1100 * elf32-mep.c (mep_elf_relocate_section): Likewise.
1101 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1102 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1103 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1104 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1105 * elf32-mt.c (mt_elf_relocate_section): Likewise.
1106 * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
1107 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1108 * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
1109 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1110 * elf32-pru.c (pru_elf32_relocate_section): Likewise.
1111 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1112 * elf32-rx.c (rx_elf_relocate_section): Likewise.
1113 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1114 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1115 (_bfd_score_elf_relocate_section): Likewise.
1116 * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
1117 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1118 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1119 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1120 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1121 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1122 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1123 * elf32-visium.c (visium_elf_relocate_section): Likewise.
1124 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1125 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1126 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1127 * elf32-z80.c (z80_elf_relocate_section): Likewise.
1128 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1129 (elf64_alpha_relocate_section): Likewise.
1130 * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
1131 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1132 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1133 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1134 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1135 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1136 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1137 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1138 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1139 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1140 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1141 * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
1142 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1143 * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
1144 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1145 * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
1146
ff5b3e14
KS
11472021-03-26 Keith Seitz <keiths@redhat.com>
1148
1149 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
1150 offset of program headers after calling elf_read_notes.
1151
f596b03f
JB
11522021-03-23 Jan Beulich <jbeulich@suse.com>
1153
1154 * dwarf2.c (read_indexed_string): Rename index to idx.
1155
08dedd66
ML
11562021-03-22 Martin Liska <mliska@suse.cz>
1157
1158 * bfd-in.h (startswith): Add startswith function.
1159 (CONST_STRNEQ): Remove.
1160 * bfd-in2.h (startswith): Regenerate with make headers.
1161 * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
1162 (_bfd_slurp_extended_name_table): Likewise.
1163 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1164 * bfd.c (bfd_get_sign_extend_vma): Likewise.
1165 (bfd_convert_section_size): Likewise.
1166 (bfd_convert_section_contents): Likewise.
1167 * coff-stgo32.c (go32exe_create_stub): Likewise.
1168 (go32exe_check_format): Likewise.
1169 * coffcode.h (styp_to_sec_flags): Likewise.
1170 (GNU_DEBUGALTLINK): Likewise.
1171 * coffgen.c (_bfd_coff_section_already_linked): Likewise.
1172 (coff_gc_sweep): Likewise.
1173 (bfd_coff_gc_sections): Likewise.
1174 * cofflink.c (coff_link_add_symbols): Likewise.
1175 (process_embedded_commands): Likewise.
1176 * compress.c (bfd_is_section_compressed_with_header): Likewise.
1177 (bfd_init_section_decompress_status): Likewise.
1178 * dwarf2.c (find_debug_info): Likewise.
1179 (place_sections): Likewise.
1180 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
1181 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1182 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1183 (assign_section_numbers): Likewise.
1184 (elfcore_grok_win32pstatus): Likewise.
1185 * elf32-arm.c (cmse_scan): Likewise.
1186 (elf32_arm_gc_mark_extra_sections): Likewise.
1187 (elf32_arm_size_dynamic_sections): Likewise.
1188 (is_arm_elf_unwind_section_name): Likewise.
1189 * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
1190 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
1191 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
1192 * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
1193 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1194 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1195 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
1196 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
1197 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1198 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
1199 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
1200 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
1201 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
1202 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1203 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1204 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1205 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1206 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1207 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
1208 (elf32_tic6x_size_dynamic_sections): Likewise.
1209 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
1210 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
1211 (xtensa_is_insntable_section): Likewise.
1212 (xtensa_is_littable_section): Likewise.
1213 (xtensa_is_proptable_section): Likewise.
1214 (xtensa_property_section_name): Likewise.
1215 (xtensa_callback_required_dependence): Likewise.
1216 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1217 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1218 * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
1219 (get_reloc_section): Likewise.
1220 (elf64_ia64_size_dynamic_sections): Likewise.
1221 (elf64_ia64_object_p): Likewise.
1222 * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
1223 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
1224 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1225 * elflink.c (elf_link_add_object_symbols): Likewise.
1226 (_bfd_elf_gc_mark_extra_sections): Likewise.
1227 (bfd_elf_parse_eh_frame_entries): Likewise.
1228 (_bfd_elf_section_already_linked): Likewise.
1229 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
1230 * elfnn-ia64.c (is_unwind_section_name): Likewise.
1231 (elfNN_ia64_size_dynamic_sections): Likewise.
1232 (elfNN_ia64_object_p): Likewise.
1233 * elfxx-mips.c (FN_STUB_P): Likewise.
1234 (CALL_STUB_P): Likewise.
1235 (CALL_FP_STUB_P): Likewise.
1236 (_bfd_mips_elf_section_from_shdr): Likewise.
1237 (_bfd_mips_elf_fake_sections): Likewise.
1238 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1239 (_bfd_mips_final_write_processing): Likewise.
1240 (_bfd_mips_elf_final_link): Likewise.
1241 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1242 * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
1243 (elf_x86_64_is_reloc_section): Likewise.
1244 * hpux-core.c (thread_section_p): Likewise.
1245 * libcoff.h (bfd_pei_p): Likewise.
1246 * linker.c (REAL): Likewise.
1247 (unwrap_hash_lookup): Likewise.
1248 (_bfd_generic_link_add_one_symbol): Likewise.
1249 * mmo.c (mmo_internal_write_section): Likewise.
1250 * osf-core.c (osf_core_core_file_p): Likewise.
1251 * pef.c (bfd_pef_print_symbol): Likewise.
1252 * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
1253 * som.c (som_slurp_symbol_table): Likewise.
1254 (som_slurp_armap): Likewise.
1255 * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
1256
2aaf2ce8
JB
12572021-03-22 Jan Beulich <jbeulich@suse.com>
1258
1259 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
1260 language translation wrapping to _bfd_error_handler()
1261 invocations.
1262
e9338841
AM
12632021-03-21 Alan Modra <amodra@gmail.com>
1264
1265 * bfd-in.h (startswith): New inline.
1266 (CONST_STRNEQ): Use startswith.
1267 * bfd-in2.h: Regenerate.
1268
15407e7e
AM
12692021-03-20 Alan Modra <amodra@gmail.com>
1270
1271 PR 27590
1272 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
1273 test for .gnu.debuglto*.
1274
3818d4ab
L
12752021-03-18 H.J. Lu <hongjiu.lu@intel.com>
1276
1277 PR ld/27590
15407e7e 1278 * elf.c (_bfd_elf_make_section_from_shdr): Treat
3818d4ab
L
1279 .gnu.debuglto_.debug_ section as debugging section unless it is
1280 marked with SHF_EXCLUDE.
1281 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
1282 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
1283 matching non-debugging sections or linkonce section with comdat
1284 section.
1285
51f6e7a9
L
12862021-03-18 H.J. Lu <hongjiu.lu@intel.com>
1287
1288 PR ld/27587
1289 * dwarf2.c (read_attribute_value): Check version >= 3 for
1290 DW_FORM_ref_addr.
1291
012d4426
NC
12922021-03-16 Nick Clifton <nickc@redhat.com>
1293
1294 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
1295 overrun by using sizeof of the destination x_fname field as the
1296 limit for a memcpy.
1297
80d49d6a
KLC
12982021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1299
1300 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
1301
1b2cb8e2
CC
13022021-03-12 Clément Chigot <clement.chigot@atos.net>
1303
1304 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
1305 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
1306 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
1307 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
1308 BFD_RELOC_PPC64_TLS_ML): New relocations.
1309 * bfd-in2.h: Regenerate.
1310 * libbfd.h: Regenerate.
1311 * coff-rs6000.c (xcoff_calculate_relocation): Call
1312 xcoff_reloc_type_tls for TLS relocations.
1313 (xcoff_howto_table): Implement TLS relocations.
1314 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
1315 (xcoff_reloc_type_tls): New function.
1316 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
1317 (xcoff_howto_table): Likewise.
1318 (_bfd_xcoff_reloc_type_lookup): Likewise.
1319 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
1320 (styp_to_sec_flags): Likewise.
1321 (coff_compute_section_file_positions): Avoid file offset
1322 optimisation for .data when the previous section is .tdata.
1323 (coff_write_object_contents): Handle TLS sections.
1324 * coffswap.h (coff_swap_aouthdr_out): Add support for
1325 new fields in aouthdr.
1326 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
1327 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
1328 (xcoff_need_ldrel_p): Add cases for TLS relocations.
1329 (xcoff_create_ldrel): Add l_symndx for TLS sections.
1330
4a403be0
CC
13312021-03-12 Clément Chigot <clement.chigot@atos.net>
1332
1333 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
1334 New relocations.
1335 * bfd-in2.h: Regenerate.
1336 * libbfd.h: Regenerate.
1337 * coff-rs6000.c (xcoff_calculate_relocation): Call
1338 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
1339 (xcoff_howto_table): Remove src_mask for TOC relocations.
1340 Add R_TOCU and R_TOCL howtos.
1341 (_bfd_xcoff_reloc_type_lookup): Add cases for
1342 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
1343 (xcoff_reloc_type_toc): Compute the whole offset.
1344 Implement R_TOCU and R_TOCL.
1345 * coff64-rs6000.c (xcoff64_calculate_relocation):
1346 Likewise.
1347 (xcoff64_howto_table): Likewise.
1348 (xcoff64_reloc_type_lookup): Likewise.
1349
2c1bef53
CC
13502021-03-12 Clément Chigot <clement.chigot@atos.net>
1351
1352 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
1353 add new relocations.
1354 (xcoff_howto_table): Likewise.
1355 (xcoff_rtype2howto): Increase r_type maximum value.
1356 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
1357 of create a new one from scratch. Enable only some relocations
1358 to have a changing r_size.
1359 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
1360 (xcoff64_howto_table): Likewise.
1361 (xcoff64_rtype2howto): Likewise.
1362 (xcoff64_ppc_relocate_section): Likewise.
1363 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
1364
0c929e83
CC
13652021-03-12 Clément Chigot <clement.chigot@atos.net>
1366
1367 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
1368
6d4d9328
CC
13692021-03-12 Clément Chigot <clement.chigot@atos.net>
1370
1371 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
1372 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
1373 support for o_cputype field. Avoid creating an empty a.out header
1374 for XCOFF64.
1375
8aa2d023
CC
13762021-03-12 Clément Chigot <clement.chigot@atos.net>
1377
1378 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
1379 missing smclass.
1380
ebdcad3f
NC
13812021-03-11 Nelson Chu <nelson.chu@sifive.com>
1382
1383 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
1384 restart_relax, used to check if we need to run the whole
1385 relaxations from relax pass 0 to 2 again.
1386 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
1387 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
1388 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
1389 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
1390 after_allocation to check if we need to run the whole relaxations again.
1391 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
1392 when the restart_relax is FALSE; At last set restart_relax to TRUE if
1393 again is TRUE, too.
1394 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
1395 (bfd_elf64_riscv_restart_relax_sections): Likewise.
1396
67b0f684
JB
13972021-03-10 Jan Beulich <jbeulich@suse.com>
1398
1399 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
1400 offset.
1401
2dfa8341
AM
14022021-03-10 Alan Modra <amodra@gmail.com>
1403 Jan Beulich <jbeulich@suse.com>
1404
1405 * elf.c (bfd_elf_generic_reloc): Make references between debug
1406 sections use section relative values.
1407
87fa7d56
JB
14082021-03-09 Jan Beulich <jbeulich@suse.com>
1409
1410 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
1411
8c0546e9
L
14122021-03-05 H.J. Lu <hongjiu.lu@intel.com>
1413
1414 PR ld/27425
1415 PR ld/27432
1416 * bfd.c (_bfd_get_link_info): New function.
1417 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
1418 (elf_link_info): New.
1419 * libbfd-in.h (_bfd_get_link_info): New prototype.
1420 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
1421 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
1422 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
1423 (pex64_link_add_symbols): New function.
1424 (coff_bfd_link_add_symbols): New macro.
1425 * libbfd.h: Regenerated.
1426
db6092f3
AB
14272021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1428 Andrew Burgess <andrew.burgess@embecosm.com>
1429
1430 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
1431 * elf.c (elfcore_grok_riscv_csr): New function.
1432 (elfcore_grok_note): Handle NT_RISCV_CSR.
1433 (elfcore_write_riscv_csr): New function.
1434 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
1435
0897bb7d
AB
14362021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1437 Andrew Burgess <andrew.burgess@embecosm.com>
1438
1439 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
1440 (PRPSINFO_PR_PSARGS_LENGTH): Define.
1441 (riscv_write_core_note): New function.
1442 (riscv_elf_grok_psinfo): Make use of two new length defines.
1443 (elf_backend_write_core_note): Define.
1444
b63a5e38
AB
14452021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1446 Andrew Burgess <andrew.burgess@embecosm.com>
1447
1448 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
1449 * elf.c (elfcore_grok_gdb_tdesc): New function.
1450 (elfcore_grok_note): Handle NT_GDB_TDESC.
1451 (elfcore_write_gdb_tdesc): New function.
1452 (elfcore_write_register_note): Handle NT_GDB_TDESC.
1453
2017f387
NC
14542021-03-05 Nick Clifton <nickc@redhat.com>
1455
1456 PR 27521
1457 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
1458 (read_indexed_string): Placeholder function.
1459 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
1460 forms.
1461
b01b5d9a
AM
14622021-03-05 Alan Modra <amodra@gmail.com>
1463
1464 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
1465 2020-09-16 changes.
1466 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
1467 adjustments here instead. Separate pc-relative adjustments
1468 from symbol related adjustments. Tidy comments and formatting.
1469
6b5465b9
JB
14702021-03-04 Jan Beulich <jbeulich@suse.com>
1471
1472 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
1473 final PE images.
1474
0b7733b6
AM
14752021-03-04 Alan Modra <amodra@gmail.com>
1476
1477 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
1478
5789f845
AM
14792021-03-03 Alan Modra <amodra@gmail.com>
1480
1481 PR 27500
1482 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
1483 processing not when start/stop symbol section is unmarked but
1484 on first time a start/stop symbol is processed.
1485
dc83f2d2
AM
14862021-03-03 Alan Modra <amodra@gmail.com>
1487
1488 * reloc.c: Include x86_64.h rather than internal.h.
1489
ca8f6bc6
NC
14902021-03-02 Nick Clifton <nickc@redhat.com>
1491
1492 PR 27484
1493 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
1494 function and variable tags and a second time to resolve their
1495 attributes.
1496
211bcd01
NA
14972021-03-02 Nick Alcock <nick.alcock@oracle.com>
1498
1499 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
1500
b80e421f
AM
15012021-03-02 Alan Modra <amodra@gmail.com>
1502
1503 PR 27451
1504 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
1505 linker defined start/stop symbols when start_stop_gc.
1506
f5b9c288
AM
15072021-03-02 Alan Modra <amodra@gmail.com>
1508
1509 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
1510 indirect to pc-relative or toc-relative for undefined symbols.
1511
8ee10e86
AM
15122021-03-01 Alan Modra <amodra@gmail.com>
1513 Fangrui Song <maskray@google.com>
1514
1515 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
1516 defined start/stop symbols when start_stop_gc.
1517 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1518 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
1519 * linker.c (bfd_generic_define_start_stop): Likewise.
1520
bbaddd4b
AM
15212021-02-25 Alan Modra <amodra@gmail.com>
1522
1523 PR 27441
1524 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
1525 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
1526 use when deciding an as-needed library should be loaded instead
1527 of using the binding of the library definition.
1528
93af1b04
AM
15292021-02-24 Alan Modra <amodra@gmail.com>
1530
1531 PR 27459
1532 * coff-stgo32.c (go32exe_check_format): Sanity check size of
1533 header to avoid a buffer overflow.
1534
e9d18e06
AM
15352021-02-22 Alan Modra <amodra@gmail.com>
1536
1537 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
1538 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
1539
5a9f5403
NC
15402021-02-19 Nelson Chu <nelson.chu@sifive.com>
1541
1542 PR 27158
1543 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
1544 (_bfd_riscv_relax_call): Likewise.
1545 (_bfd_riscv_relax_lui): Likewise.
1546 * elfxx-riscv.c (howto_table): Likewise.
1547
3d73d29e
NC
15482021-02-18 Nelson Chu <nelson.chu@sifive.com>
1549
1550 * Makefile.am: Added cpu-riscv.h.
1551 * Makefile.in: Regenerated.
1552 * po/SRC-POTFILES.in: Regenerated.
1553 * cpu-riscv.h: Added to support spec versions controlling.
1554 Also added extern arrays and functions for cpu-riscv.c.
1555 (enum riscv_spec_class): Define all spec classes here uniformly.
1556 (struct riscv_spec): Added for all specs.
1557 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
1558 (RISCV_GET_SPEC_NAME): Likewise.
1559 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
1560 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
1561 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
1562 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
1563 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
1564 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
1565 (riscv_priv_specs): Moved below.
1566 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
1567 (riscv_isa_specs): Moved from include/opcode/riscv.h.
1568 * elfnn-riscv.c: Included cpu-riscv.h.
1569 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
1570 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
1571 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
1572 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
1573
b9b204b3
AM
15742021-02-17 Alan Modra <amodra@gmail.com>
1575
1576 * wasm-module.c: Guard include of limits.h.
1577 (CHAR_BIT): Provide backup define.
1578 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
1579 Correct signed overflow checking.
1580
0d6aab77
NC
15812021-02-17 Nelson Chu <nelson.chu@sifive.com>
1582
1583 PR 27200
1584 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
1585 copying the elf flags from input BFD to output BFD, until we have
1586 checked if the input BFD has no code section or not. Also fix the
1587 problem that we only check the first section rather than the entire
1588 sections for input BFD.
1589
7b54cadd
AM
15902021-02-16 Alan Modra <amodra@gmail.com>
1591
1592 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
1593 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
1594
8c674061
JB
15952021-02-15 Jan Beulich <jbeulich@suse.com>
1596
1597 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
1598 * doc/Makefile.in: Re-generate.
1599
1781a9d0
AM
16002021-02-15 Alan Modra <amodra@gmail.com>
1601
1602 * elf32-nds32.c (nds32_get_section_contents): Replace
1603 bfd_malloc_and_get_section with bfd_get_full_section_contents.
1604 (nds32_elf_relax_delete_blanks): Init contents.
1605 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
1606
8b78cbec
AM
16072021-02-15 Alan Modra <amodra@gmail.com>
1608
1609 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1610 bfd_get_full_section_contents.
1611
d7a7af8f
AM
16122021-02-14 Alan Modra <amodra@gmail.com>
1613
1614 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
1615 all fixes to bfd_generic_get_relocated_section_contents since this
1616 function was split out.
1617
234b98ce
AM
16182021-02-11 Alan Modra <amodra@gmail.com>
1619
1620 * config.bfd: Remove ia64 from obsolete list.
1621
769c253f
AM
16222021-02-11 Alan Modra <amodra@gmail.com>
1623
1624 PR ld/22269
1625 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
1626
31c711a2
AM
16272021-02-11 Alan Modra <amodra@gmail.com>
1628
1629 PR 27294
1630 * elf32-avr.c (avr_elf32_load_records_from_section): Use
1631 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
1632 unnecessary casts.
1633
6db658c5
AM
16342021-02-11 Alan Modra <amodra@gmail.com>
1635
1636 PR 27291
1637 * section.c (bfd_get_section_contents): Avoid possible overflow
1638 when range checking offset and count.
1639 (bfd_set_section_contents): Likewise.
1640
95148614
NA
16412021-02-03 Nick Alcock <nick.alcock@oracle.com>
1642
1643 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
1644 favour of LIBINTL.
1645 * configure: Regenerated.
1646
a57d1773
AM
16472021-02-09 Alan Modra <amodra@gmail.com>
1648
1649 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
1650 * configure.ac: Delete symbian entries.
1651 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
1652 * elf32-arm.c: Remove symbian support. Formatting.
1653 * targets.c: Delete symbian entries.
1654 * configure: Regenerate.
1655
1a2f1b54
L
16562021-02-04 H.J. Lu <hongjiu.lu@intel.com>
1657
1658 PR ld/19609
1659 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
1660 info when failed to convert GOTPCREL relocation.
1661
24075dcc
NC
16622021-02-04 Nelson Chu <nelson.chu@sifive.com>
1663
1664 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
1665
7d409ac0
AM
16662021-02-04 Alan Modra <amodra@gmail.com>
1667
1668 PR 27311
1669 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
1670 libraries for IR references on pass over libraries after LTO
1671 recompilation.
1672
f01fb44c
AM
16732021-02-03 Alan Modra <amodra@gmail.com>
1674
1675 PR 27311
1676 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
1677 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
1678 libraries when H is an indirect symbol after calling
1679 _bfd_elf_add_default_symbol.
1680
69551367
AM
16812021-02-03 Alan Modra <amodra@gmail.com>
1682
1683 PR 27311
1684 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
1685 undecorated symbol will have a different version.
1686
9918bff7
AM
16872021-02-02 Alan Modra <amodra@gmail.com>
1688
1689 PR 27311
1690 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
1691 Use when handling default versioned symbol. Rename existing
1692 override variable to nondef_override and use for non-default
1693 versioned symbol.
1694 (elf_link_add_object_symbols): Adjust call to suit. Don't
1695 pull in as-needed libraries when override is set.
1696
1f568f9a
EH
16972021-02-01 Emery Hemingway <ehmry@posteo.net>
1698
1699 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
1700
34c10233
EV
17012021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
1702
1703 PR 27254
1704 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
1705 offset for the R_RL78_RH_SADDR relocation.
1706
c4566785
AM
17072021-01-29 Alan Modra <amodra@gmail.com>
1708
1709 PR 27271
1710 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
1711 on symbols defined in absolute or other special sections.
1712
def97fb9
AM
17132021-01-28 Alan Modra <amodra@gmail.com>
1714
1715 PR 27259
1716 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
1717 prevent endless looping of linked-to sections.
1718
4cb1265b
MS
17192020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
1720
1721 * bfd-elf.h (elfcore_write_file_note): New function.
1722 * elf.c (elfcore_write_file_note): New function.
1723
4287950e
AM
17242021-01-26 Alan Modra <amodra@gmail.com>
1725
1726 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
1727
940d0202
L
17282021-01-24 H.J. Lu <hongjiu.lu@intel.com>
1729
1730 PR binutils/27231
1731 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
1732 number tables.
1733
18454c15
L
17342021-01-23 H.J. Lu <hongjiu.lu@intel.com>
1735
1736 PR binutils/27231
1737 * dwarf2.c (read_rnglists): Advance rngs_ptr after
1738 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
1739
4bd7c902
AM
17402021-01-20 Alan Modra <amodra@gmail.com>
1741
1742 * elf32-ppc.c: Delete outdated comment.
1743 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
1744 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
1745
8bd10d6b
AM
17462021-01-20 Alan Modra <amodra@gmail.com>
1747
1748 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
1749 section symbols are present.
1750
30845f11
AM
17512021-01-19 Alan Modra <amodra@gmail.com>
1752
1753 * elf64-ppc.c (elf_hash_entry): New inline function. Use
1754 throughout to replace casts.
1755 (branch_reloc_hash_match): Remove const from params.
1756 (use_local_plt): New function.
1757 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
1758 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
1759 Use use_local_plt.
1760 * elf32-ppc.c (use_local_plt): New function.
1761 (allocate_dynrelocs, ppc_elf_relocate_section),
1762 (write_global_sym_plt): Use use_local_plt.
1763
994b2513
L
17642021-01-17 H.J. Lu <hongjiu.lu@intel.com>
1765
1766 PR ld/27193
1767 * elflink.c (elf_create_symbuf): Also ignore section symbols.
1768
75a933f3
L
17692021-01-16 H.J. Lu <hongjiu.lu@intel.com>
1770
1771 PR ld/23169
1772 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
1773 check pointer_equality_needed.
1774
68b00778
L
17752021-01-15 H.J. Lu <hongjiu.lu@intel.com>
1776
1777 * elf-linker-x86.h (elf_linker_x86_params): Add
1778 report_relative_reloc.
1779 * elf32-i386.c (elf_i386_relocate_section): Call
1780 _bfd_x86_elf_link_report_relative_reloc to report relative
1781 relocations for -z report-relative-reloc.
1782 (elf_i386_finish_dynamic_symbol): Likewse.
1783 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
1784 (elf_x86_64_finish_dynamic_symbol): Likewse.
1785 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
1786 function.
1787 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
1788 prototype.
1789
ad92f33d
AM
17902021-01-16 Alan Modra <amodra@gmail.com>
1791
1792 * compress.c (decompress_contents): Tidy inflateEnd result test.
1793
eb6e6af8
AM
17942021-01-16 Alan Modra <amodra@gmail.com>
1795
1796 PR 26002
1797 * elflink.c (elf_link_output_extsym): Use version 1 in
1798 .gnu.version for undefined unversioned symbols.
1799
4bb5732e
NC
18002021-01-15 Nelson Chu <nelson.chu@sifive.com>
1801
1802 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
1803 caused the by previous commit accidentally.
1804
1942a048
NC
18052021-01-15 Nelson Chu <nelson.chu@sifive.com>
1806
1807 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
1808 also aligned the code.
1809
b800637e
NC
18102021-01-15 Nelson Chu <nelson.chu@sifive.com>
1811
1812 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
1813
dcd709e0
NC
18142021-01-15 Nelson Chu <nelson.chu@sifive.com>
1815
1816 * elfnn-riscv.c: Comments tidy and improvement.
1817 * elfxx-riscv.c: Likewise.
1818 * elfxx-riscv.h: Likewise.
1819
8ca9c7eb
L
18202021-01-14 H.J. Lu <hongjiu.lu@intel.com>
1821
1822 PR ld/26688
1823 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
1824 section for R_BFIN_FUNCDESC.
1825
7e0d77ef
NC
18262021-01-14 Nick Clifton <nickc@redhat.com>
1827
1828 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
1829
5347ed60
AM
18302021-01-13 Alan Modra <amodra@gmail.com>
1831
1832 * Makefile.in: Regenerate.
1833 * doc/Makefile.in: Regenerate.
1834
b209b5a6
AM
18352021-01-13 Alan Modra <amodra@gmail.com>
1836
1837 PR 27160
1838 * section.c (struct bfd_section): Remove pattern field.
1839 (BFD_FAKE_SECTION): Adjust to suit.
1840 * bfd-in2.h: Regenerate.
1841 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
1842 (bfd_elf_final_link): Don't call elf_fixup_link_order.
1843
d546b610
L
18442021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1845
1846 PR binutils/26792
1847 * configure.ac: Use GNU_MAKE_JOBSERVER.
1848 * aclocal.m4: Regenerated.
1849 * configure: Likewise.
1850
c2e9a4a3
L
18512021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1852
1853 PR ld/27171
1854 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
1855 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
1856
83b33c6c
L
18572021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1858
1859 PR ld/27173
1860 * configure: Regenerated.
1861
a8aa72b9
NC
18622021-01-11 Nick Clifton <nickc@redhat.com>
1863
1864 * po/fr.po: Updated French translation.
1865 * po/pt.po: Updated Portuguese translation.
1866 * po/sr.po: Updated Serbian translation.
1867 * po/uk.po: Updated Ukranian translation.
1868
a4966cd9
L
18692021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1870
1871 * configure: Regenerated.
1872
0a94990b
L
18732021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1874
1875 PR ld/27166
1876 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
1877 -z lam-u48 and -z lam-u57.
1878
573fe3fb
NC
18792021-01-09 Nick Clifton <nickc@redhat.com>
1880
1881 * version.m4: Change to 2.36.50.
1882 * configure: Regenerate.
1883 * po/bfd.pot: Regenerate.
1884
055bc77a
NC
18852021-01-09 Nick Clifton <nickc@redhat.com>
1886
1887 * 2.36 release branch crated.
1888
ba9e922f
L
18892021-01-08 H.J. Lu <hongjiu.lu@intel.com>
1890
1891 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
1892 LAM_U57 when setting LAM_U48.
1893
b1b29aa5
L
18942021-01-08 H.J. Lu <hongjiu.lu@intel.com>
1895
1896 PR ld/26256
1897 PR ld/27160
1898 * elflink.c (elf_fixup_link_order): Verify that fixing up
1899 SHF_LINK_ORDER doesn't increase the output section size.
1900
64307045
AM
19012021-01-09 Alan Modra <amodra@gmail.com>
1902
1903 * configure: Regenerate.
1904
f4782128
ST
19052021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1906
1907 * configure: Regenerate.
1908
d1bcae83
L
19092021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1910
1911 PR 27109
1912 * aix386-core.c (core_aix386_vec): Initialize
1913 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
1914 * aout-target.h (MY (vec)): Likewise.
1915 * binary.c (binary_vec): Likewise.
1916 * cisco-core.c (core_cisco_be_vec): Likewise.
1917 (core_cisco_le_vec): Likewise.
1918 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
1919 * coff-i386.c (TARGET_SYM): Likewise.
1920 (TARGET_SYM_BIG): Likewise.
1921 * coff-ia64.c (TARGET_SYM): Likewise.
1922 * coff-mips.c (mips_ecoff_le_vec): Likewise.
1923 (mips_ecoff_be_vec): Likewise.
1924 (mips_ecoff_bele_vec): Likewise.
1925 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
1926 (powerpc_xcoff_vec): Likewise.
1927 * coff-sh.c (sh_coff_small_vec): Likewise.
1928 (sh_coff_small_le_vec): Likewise.
1929 * coff-tic30.c (tic30_coff_vec): Likewise.
1930 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
1931 (tic54x_coff0_beh_vec): Likewise.
1932 (tic54x_coff1_vec): Likewise.
1933 (tic54x_coff1_beh_vec): Likewise.
1934 (tic54x_coff2_vec): Likewise.
1935 (tic54x_coff2_beh_vec): Likewise.
1936 * coff-x86_64.c (TARGET_SYM): Likewise.
1937 (TARGET_SYM_BIG): Likewise.
1938 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
1939 (rs6000_xcoff64_aix_vec): Likewise.
1940 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
1941 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
1942 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
1943 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
1944 (TARGET_LITTLE_SYM): Likewise.
1945 * hppabsd-core.c (core_hppabsd_vec): Likewise.
1946 * hpux-core.c (core_hpux_vec): Likewise.
1947 * i386msdos.c (i386_msdos_vec): Likewise.
1948 * ihex.c (ihex_vec): Likewise.
1949 * irix-core.c (core_irix_vec): Likewise.
1950 * mach-o-target.c (TARGET_NAME): Likewise.
1951 * mmo.c (mmix_mmo_vec): Likewise.
1952 * netbsd-core.c (core_netbsd_vec): Likewise.
1953 * osf-core.c (core_osf_vec): Likewise.
1954 * pdp11.c (MY (vec)): Likewise.
1955 * pef.c (pef_vec): Likewise.
1956 (pef_xlib_vec): Likewise.
1957 * plugin.c (plugin_vec): Likewise.
1958 * ppcboot.c (powerpc_boot_vec): Likewise.
1959 * ptrace-core.c (core_ptrace_vec): Likewise.
1960 * sco5-core.c (core_sco5_vec): Likewise.
1961 * som.c (hppa_som_vec): Likewise.
1962 * srec.c (srec_vec): Likewise.
1963 (symbolsrec_vec): Likewise.
1964 * tekhex.c (tekhex_vec): Likewise.
1965 * trad-core.c (core_trad_vec): Likewise.
1966 * verilog.c (verilog_vec): Likewise.
1967 * vms-alpha.c (alpha_vms_vec): Likewise.
1968 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
1969 * wasm-module.c (wasm_vec): Likewise.
1970 * xsym.c (sym_vec): Likewise.
1971 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
1972 isn't set.
1973 (elf_map_symbols): Don't include ignored section symbols.
1974 * elfcode.h (elf_slurp_symbol_table): Also set
1975 BSF_SECTION_SYM_USED on STT_SECTION symbols.
1976 * elflink.c (bfd_elf_final_link): Generated section symbols only
1977 when emitting relocations or reqired.
1978 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1979 * syms.c (BSF_SECTION_SYM_USED): New.
1980 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1981 (bfd_target): Add keep_unused_section_symbols.
1982 (bfd_keep_unused_section_symbols): New.
1983 * bfd-in2.h: Regenerated.
1984
17d60030
NC
19852021-01-07 Nick Clifton <nickc@redhat.com>
1986
1987 PR 25713
1988 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
1989 absolute paths and check to see if they are longer than MAX_PATH.
1990
aa881ecd
PT
19912021-01-07 Philipp Tomsich <prt@gnu.org>
1992
1993 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
1994
2652cfad
CXW
19952021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
1996 Jim Wilson <jimw@sifive.com>
1997 Andrew Waterman <andrew@sifive.com>
1998 Maxim Blinov <maxim.blinov@embecosm.com>
1999 Kito Cheng <kito.cheng@sifive.com>
2000 Nelson Chu <nelson.chu@sifive.com>
2001
2002 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
2003
d4e57b87
L
20042021-01-06 H.J. Lu <hongjiu.lu@intel.com>
2005
2006 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
2007 (bfinfdpic_check_relocs): Likewise.
2008
599c86c4
AM
20092021-01-06 Alan Modra <amodra@gmail.com>
2010
2011 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
2012 on unknown r_type.
2013 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2014
3677b729
AM
20152021-01-06 Alan Modra <amodra@gmail.com>
2016
2017 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
2018 (sparc64-*-solaris2*): Add sparc_elf64_vec and
2019 sparc_elf32_vec.
2020
fbc09e7a
MC
20212021-01-06 Marcus Comstedt <marcus@mc.pp.se>
2022
2023 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
2024 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
2025 * configure.ac: Handle riscv_elf[32|64]_be_vec.
2026 * configure: Regenerate.
2027 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
2028 riscv_is_insn_reloc.
2029 (riscv_get_insn): RISC-V instructions are always little endian, but
2030 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
2031 the insturctions.
2032 (riscv_put_insn): Likewsie.
2033 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
2034 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
2035 use riscv_[get|put]_insn or bfd_[get|put].
2036 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
2037 or bfd_[get|put]l16 for code.
2038 (riscv_elf_relocate_section): Likewise.
2039 (riscv_elf_finish_dynamic_symbol): Likewise.
2040 (riscv_elf_finish_dynamic_sections): Likewise.
2041 (_bfd_riscv_relax_call): Likewise.
2042 (_bfd_riscv_relax_lui): Likewise.
2043 (_bfd_riscv_relax_align): Likewise.
2044 (_bfd_riscv_relax_pc): Likewise.
2045 (riscv_elf_object_p): Handled for big endian.
2046 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
2047 * targets.c: Add riscv_elf[32|64]_be_vec.
2048 (_bfd_target_vector): Likewise.
2049
c8bad65e
AM
20502021-01-05 Alan Modra <amodra@gmail.com>
2051
2052 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
2053 for relocatable executable.
2054
de6a7ee4
AM
20552021-01-05 Alan Modra <amodra@gmail.com>
2056
2057 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
2058
18b98722
NC
20592021-01-05 Nelson Chu <nelson.chu@sifive.com>
2060
2061 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
2062 make sure gp symbol is output as a dynamic symbol.
2063
cd6d537c
L
20642021-01-04 H.J. Lu <hongjiu.lu@intel.com>
2065
2066 PR ld/26256
2067 * elflink.c (compare_link_order): Place unordered sections before
2068 ordered sections.
2069 (elf_fixup_link_order): Add a link info argument. Allow mixed
2070 ordered and unordered input sections for non-relocatable link.
2071 Sort the consecutive bfd_indirect_link_order sections with the
2072 same pattern. Change the offsets of the bfd_indirect_link_order
2073 sections only.
2074 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
2075 * section.c (bfd_section): Add pattern.
2076 (BFD_FAKE_SECTION): Initialize pattern to NULL.
2077 * bfd-in2.h: Regenerated.
2078
dbb078f6
AF
20792021-01-04 Alexander Fedotov <alfedotov@gmail.com>
2080
2081 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
2082 of private flags with 0x.
2083 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
2084
5b4293ba
AM
20852021-01-04 Alan Modra <amodra@gmail.com>
2086
2087 PR 26822
2088 * elflink.c (elf_link_input_bfd): Use the file base name in
2089 linker generated STT_FILE symbols.
2090
4c0e540e
NC
20912021-01-04 Nelson Chu <nelson.chu@sifive.com>
2092
2093 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
2094 * elfxx-riscv.h: Add declaration.
2095 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
2096 riscv_compare_subsets to check the orders.
2097 (riscv_skip_prefix): Removed.
2098 (riscv_prefix_cmp): Removed.
2099
e9cf3691
AM
21002021-01-04 Alan Modra <amodra@gmail.com>
2101
2102 PR 26741
2103 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
2104 calculating subset version length.
2105
f9a6a8f0
AM
21062021-01-01 Nicolas Boulenguez <nicolas@debian.org>
2107
2108 * xcofflink.c: Correct spelling in comments.
2109
250d07de
AM
21102021-01-01 Alan Modra <amodra@gmail.com>
2111
2112 Update year range in copyright notice of all files.
2113
c2795844 2114For older changes see ChangeLog-2020
3499769a 2115\f
c2795844 2116Copyright (C) 2021 Free Software Foundation, Inc.
3499769a
AM
2117
2118Copying and distribution of this file, with or without modification,
2119are permitted in any medium without royalty provided the copyright
2120notice and this notice are preserved.
2121
2122Local Variables:
2123mode: change-log
2124left-margin: 8
2125fill-column: 74
2126version-control: never
2127End: