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