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