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