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