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