]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
74fd118f
NC
12021-05-25 Nick Clifton <nickc@redhat.com>
2
3 * elf32-arn.c (struct elf_arm_obj_tdata): Add num_entries field.
4 (elf32_arm_num_entries): New macro.
5 (elf32_arm_allocate_local_sym_info): Initialise the new field.
6 Allocate arrays individually so that buffer overruns can be
7 detected by memory checkers.
8 (elf32_arm_create_local_iplt): Check num_entries.
9 (elf32_arm_get_plt_info): Likewise.
10 (elf32_arm_final_link_relocate): Likewise.
11 (elf32_arm_check_relocs): Likewise.
12 (elf32_arm_size_dynamic_sections): Likewise.
13 (elf32_arm_output_arch_local_syms): Likewise.
14
cc850f74
NC
152021-05-25 Nick Clifton <nickc@redhat.com>
16
17 * elf32-arm.c: Fix formatting.
18
4be1e8db
AM
192021-05-25 Alan Modra <amodra@gmail.com>
20
21 * elf-attrs.c (elf_attr_strdup): New function.
22 (_bfd_elf_attr_strdup): Use it here.
23 (elf_add_obj_attr_string): New function, extracted from..
24 (bfd_elf_add_obj_attr_string): ..here.
25 (elf_add_obj_attr_int_string): New function, extracted from..
26 (bfd_elf_add_obj_attr_int_string): ..here.
27 (_bfd_elf_parse_attributes): Don't allocate an extra byte for a
28 string terminator. Instead ensure parsing doesn't go past
29 end of sub-section. Use size_t variables for lengths.
30
574ec108
AM
312021-05-22 Alan Modra <amodra@gmail.com>
32
33 * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter.
34 Replace data pointer with pointer to pointer. Increment pointer
35 over bytes read.
36 * libbfd-in.h (_bfd_safe_read_leb128): Update prototype.
37 * elf-attrs.c (_bfd_elf_parse_attributes): Adjust to suit. Be
38 careful not to increment data pointer past end. Remove now
39 redundant pr17512 check.
40 * wasm-module.c (READ_LEB128): Adjust to suit changes to
41 _bfd_safe_read_leb128.
42 * dwarf2.c (read_n_bytes): New inline function, old one renamed to..
43 (read_blk): ..this. Allocate and return block. Increment bfd_byte**
44 arg.
45 (read_3_bytes): New function.
46 (read_1_byte, read_1_signed_byte, read_2_bytes, read_4_bytes),
47 (read_8_bytes, read_string, read_indirect_string),
48 (read_indirect_line_string, read_alt_indirect_string): Take a
49 byte_byte** arg which is incremented over bytes read. Remove any
50 bytes_read return. Rewrite limit checks to compare lengths
51 rather than pointers.
52 (read_abbrevs, read_attribute_value, read_formatted_entries),
53 (decode_line_info, find_abstract_instance, read_ranges),
54 (read_rnglists, scan_unit_for_symbols, parse_comp_unit),
55 (stash_comp_unit): Adjust to suit. Rewrite limit checks to
56 compare lengths rather than pointers.
57 * libbfd.h: Regenerate.
58
894982bf
LM
592021-05-21 Luis Machado <luis.machado@linaro.org>
60
61 * elf.c (elfcore_make_memtag_note_section): New function.
62 (elfcore_grok_note): Handle NT_MEMTAG note types.
63
427e4066
AB
642021-05-20 Andrew Burgess <andrew.burgess@embecosm.com>
65
66 * section.c (bfd_get_section_by_name): Return NULL if name is
67 NULL.
68 (bfd_get_section_by_name_if): Likewise.
69 * dwarf2.c (read_section): Remove unneeded NULL check.
70 (find_debug_info): Likewise.
71
83b0a686
NC
722021-05-19 Nick Clifton <nickc@redhat.com>
73
74 * plugin.c (bfd_plugin_open_input): Inform the user if the limit
75 on the number of open files is reached. If possible, try to
76 increase this limit before failing.
77
75f03fa7
NC
782021-05-14 Nelson Chu <nelson.chu@sifive.com>
79
80 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Check the values
81 of %pcrel_hi, before and after adding the addend. Make sure the
82 value won't be changed, otherwise, report dangerous error.
83
7671eff8
NC
842021-05-13 Nelson Chu <nelson.chu@sifive.com>
85
86 * elfxx-riscv.c (check_implicit_always): The check_func, always add
87 the implicit subset without checking.
88 (check_implicit_for_i): The check_func for i, only add zicsr and
89 zifencei when the version of i less than 2.1.
90 (struct riscv_implicit_subset): Record the subsets and their
91 corresponding implicit subsets.
92 (riscv_implicit_subsets): Table records all implicit informations.
93 (riscv_parse_add_implicit_subsets): Updated and add implicit subsets
94 according to riscv_implicit_subsets. Remove the redundant codes.
95
4863cddb
AM
962021-05-13 Alan Modra <amodra@gmail.com>
97
98 PR 27858
99 * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid
100 reloc howto.
101
f0bbe8ba
LM
1022021-05-12 Luis Machado <luis.machado@linaro.org>
103
104 * elf-bfd.h (elfcore_write_aarch_mte): New prototype.
105 * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New
106 functions.
107 (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL.
108 (elfcore_write_register_note): Handle MTE notes.
109
8ca5537b
AM
1102021-05-11 Alan Modra <amodra@gmail.com>
111
112 PR 27844
113 * pdp11.c (aout_get_external_symbols): Clear first four bytes of
114 strings array, not just the first byte.
115 * aoutx.h (aout_get_external_symbols): Likewise.
116
b397aef4
L
1172021-05-10 H.J. Lu <hongjiu.lu@intel.com>
118
119 PR binutils/27839
120 * simple.c (bfd_simple_get_relocated_section_contents): Remove
121 strayed fprintf.
122
23182ac0
NC
1232021-05-10 Nick Clifton <nickc@redhat.com>
124
125 PR 27839
126 * simple.c (simple_dummy_add_to_set): New function.
127 (simple_dummy_constructor): New function.
128 (simple_dummy_multiple_common): New function.
129 (bfd_simple_get_relocated_section_contents): Zero out the
130 callbacks structure, and then set the add_to_set, constructor and
131 multiple_common fields.
132
5b45e89f
DD
1332021-05-10 Dimitar Dimitrov <dimitar@dinux.eu>
134
135 * elf32-pru.c (elf_backend_can_gc_sections): Define as 1.
136
cf758b39
MF
1372021-05-08 Mike Frysinger <vapier@gentoo.org>
138
139 * doc/Makefile.am (html-local, bfd/index.html): New targets.
140 * doc/Makefile.in: Regenerate.
141
2faf902d
MF
1422021-05-08 Mike Frysinger <vapier@gentoo.org>
143
144 * doc/Makefile.am (AM_MAKEINFOFLAGS): Define.
145 * doc/Makefile.in: Regenerate.
146
97834047
CC
1472021-05-07 Clément Chigot <clement.chigot@atos.net>
148
149 * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
150 sections.
151 * coffgen.c (coff_pointerize_aux): Handle C_DWARF.
152 (coff_print_symbol): Likewise.
153 * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
154
17c6c3b9
JB
1552021-05-07 Jan Beulich <jbeulich@suse.com>
156
157 * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields
158 to zero.
159
a41513ef
AM
1602021-05-07 Alan Modra <amodra@gmail.com>
161
162 * bfd-in2.h: Regenerate.
163 * libbfd.h: Regenerate.
164
284a1309
SH
1652021-05-06 Stafford Horne <shorne@gmail.com>
166
167 PR 27746
168 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT,
169 OR1K_ADD, OR1K_ORI): New macros to help with plt creation.
170 (elf_or1k_link_hash_table): New field plt_count.
171 (elf_or1k_link_hash_entry): New field plt_index.
172 (elf_or1k_plt_entry_size): New function.
173 (or1k_write_plt_entry): Update to support variable size PLTs.
174 (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry
175 API.
176 (or1k_elf_finish_dynamic_symbol): Update to write large PLTs
177 when needed.
178 (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for
179 PLT size.
180
3c3de29b
SH
1812021-05-06 Stafford Horne <shorne@gmail.com>
182
183 PR 21464
184 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16
185 overflow check if we have R_OR1K_GOT_AHI16 followed by
186 R_OR1K_GOT16.
187
0b3e14c9
SH
1882021-05-06 Stafford Horne <shorne@gmail.com>
189
190 PR 21464
191 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
192 * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
193 (or1k_final_link_relocate, or1k_elf_relocate_section,
194 or1k_elf_check_relocs): Likewise.
195 * libbfd.h (bfd_reloc_code_real_names): Likewise.
196 * reloc.c: Likewise.
197
a76ef689
SH
1982021-05-06 Stafford Horne <shorne@gmail.com>
199
200 PR 27624
201 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change
202 condition used to cleanup plt entries to cleanup forced local
203 entries.
204
4467df35
L
2052021-05-05 H.J. Lu <hongjiu.lu@intel.com>
206
207 PR ld/27825
208 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT"
209 to local symbols.
210
c38c6234
AM
2112021-05-05 Alan Modra <amodra@gmail.com>
212
213 * vms-lib.c (vms_traverse_index): Account for vms_kbn size when
214 sanity checking keylen.
215
bd6d8601
NC
2162021-05-04 Nick Clifton <nickc@redhat.com>
217
218 * libbfd.c (bfd_malloc): Provide some documenation. Treat a size
219 of 0 as 1.
220 (bfd_realloc): Likewise.
221 (bfd_zmalloc): Likewise.
222 (bfd_realloc_or_free): Provide some documentation. Treat a size
223 of 0 as a request to free.
224 * libbfd-in.h (bfd_realloc): Remove prototype.
225 (bfd_realloc_or_free): Remove prototype.
226 (bfd_zmalloc): Remove prototype.
227 * libbfd.h: Regenerate.
228
4c398cc0
JB
2292021-05-03 Jan Beulich <jbeulich@suse.com>
230
231 * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to
232 complain_overflow_dont.
233 * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit
234 relocs to complain_overflow_dont.
235
49160308
AM
2362021-05-03 Alan Modra <amodra@gmail.com>
237
238 * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak
239 symbols when -z dynamic-undefined-weak or when there are no
240 dynamic relocs in read-only sections and -z nodynamic-undefined-weak
241 is not given.
242 * elf64-ppc.c (allocate_dynrelocs): Likewise.
243
b2936612
AM
2442021-05-03 Alan Modra <amodra@gmail.com>
245
246 * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for
247 weak undefined symols that only appear on PLT relocs.
248 * elf64-ppc.c (allocate_dynrelocs): Likewise.
249
337d0bf8
AM
2502021-05-03 Alan Modra <amodra@gmail.com>
251
252 PR 27755
253 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.
254
5072b52d
AM
2552021-05-03 Alan Modra <amodra@gmail.com>
256
257 * elf32-csky.c (is_mapping_symbol_name): New function.
258 (csky_elf_is_target_special_symbol): Likewise.
259 (csky_elf_maybe_function_sym): Likewise.
260 (bfd_elf32_bfd_is_target_special_symbol): Define.
261 (elf_backend_maybe_function_sym): Define.
262
d1fbc3ba
NC
2632021-04-30 Nick Clifton <nickc@redhat.com>
264
265 PR 27801
266 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
267 read 32-bit value.
268
9f84cb38
NC
2692021-04-30 Nick Clifton <nickc@redhat.com>
270
271 PR 27799
272 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
273 that are too small.
274
6cb40a67
NC
2752021-04-30 Nick Clifton <nickc@redhat.com>
276
277 PR 27797
278 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
279 been realloc'ed to size 0.
280
bceb87ef
NC
2812021-04-30 Nick Clifton <nickc@redhat.com>
282
283 PR 27795
284 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
285 lengths.
286
09e40e44
NC
2872021-04-29 Nick Clifton <nickc@redhat.com>
288
289 PR 27793
290 * som.c (som_slurp_symbol_table): Assign symbols without any scope
291 to the undefined section.
292 (som_decode_symclass): Check for a missing symbol section.
293 * syms.c (bfd_decode_symclass): Likewise.
294
063e75c9
NC
2952021-04-29 Nick Clifton <nickc@redhat.com>
296
297 PR 27792
298 * som.c (som_slurp_string_table): Place a terminating NUL byte at
299 the end of the table.
300 (som_slurp_symbol_table): Check for an over-large offset into the
301 string string table.
302
24aebc79
NC
3032021-04-28 Nick Clifton <nickc@redhat.com>
304
305 * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin
306 symbols as potential function symbols.
307 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise.
308 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
309 * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise.
310
3955e346
MF
3112021-04-26 Mike Frysinger <vapier@gentoo.org>
312
313 * elf-bfd.h: Include stdlib.h.
314
a7664973
JB
3152021-04-26 Jan Beulich <jbeulich@suse.com>
316
317 * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to
318 complain_overflow_signed.
319 * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16
320 to complain_overflow_signed.
321
f5e98b7d
EB
3222021-04-23 Eric Botcazou <ebotcazou@adacore.com>
323
324 * elf.c (special_sections_p): Add .persistent.bss.
325
c21346c5
JB
3262021-04-23 Jan Beulich <jbeulich@suse.com>
327
328 * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero
329 size field.
330 * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL
331 has zero size field.
332
bdd2aaf6
CC
3332021-04-22 Clément Chigot <clement.chigot@atos.net>
334
335 * hash.c (struct bfd_strtab_hash): Remove xcoff field.
336 Add length_field_size field.
337 (_bfd_stringtab_init): Change prototype.
338 Adapt to new length_field_size.
339 (_bfd_xcoff_stringtab_init): Likewise.
340 (_bfd_stringtab_add): Likewise.
341 (_bfd_stringtab_emit): Likewise.
342 * libbfd-in.h (_bfd_xcoff_stringtab_init):
343 Change prototype.
344 * libbfd.h: Regenerate.
345 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
346 Call _bfd_xcoff_stringtab_init with isxcoff64 value.
347
b11b2969
CC
3482021-04-22 Clément Chigot <clement.chigot@atos.net>
349
350 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for
351 unsupported storage class or auxialiry entries.
352 Improve and adapt to new aux structures.
353 Add C_DWARF support.
354 (_bfd_xcoff_swap_aux_out): Likewise.
355 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
356 (_bfd_xcoff64_swap_aux_out): Likewise.
357
18e9a809
EZ
3582021-04-21 Eli Zaretskii <eliz@gnu.org>
359
360 PR 27760
361 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
362 of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
363 IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
364 Decode the contents of the DllCharacteristics field.
365
33fe00c1
NC
3662021-04-21 Nick Clifton <nickc@redhat.com>
367
368 PR 27759
369 * srec.c (srec_read_section): Replace assertions with error
370 returns.
371
c5df7e44
CC
3722021-04-20 Clément Chigot <clement.chigot@atos.net>
373
374 PR binutils/21700
375 * reloc.c (BFD_RELOC_PPC_NEG): New relocation.
376 * bfd-in2.h: Regenerate.
377 * libbfd.h: Regenerate.
378 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add
379 BFD_RELOC_PPC_NEG handler.
380 (xcoff_reloc_type_neg): Correctly substract addend.
381 * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32
382 howto.
383 (xcoff64_rtype2howto): Add handler for R_NEG_32.
384 (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler.
385 * xcofflink.c (xcoff_need_ldrel_p): Check output section
386 for R_POS-like relocations. New argument added.
387 (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument.
388 (xcoff_link_input_bfd): Likewise.
389
6f8f6017
AM
3902021-04-16 Alan Modra <amodra@gmail.com>
391
392 PR 27567
393 * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags.
394 (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT,
395 ignore alignment checks when return is false. Formatting.
396
ddfe525f
NC
3972021-04-15 Nelson Chu <nelson.chu@sifive.com>
398
399 PR27584
400 * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to
401 omit local and empty symbols since they usually generated to
402 mark the auipc instructions.
403
f6a1f957
LX
4042021-04-15 Lifang Xia<lifang_xia@c-sky.com>
405
406 * elf32-csky.c (csky_elf_howto_table)
407 <R_CKCORE_PCREL_IMM16BY2>: Set special_function to
408 bfd_elf_generic_reloc.
409 <R_CKCORE_PCREL_IMM16BY4>: Likewise.
410 <R_CKCORE_PCREL_IMM10BY4>: Likewise.
411 <R_CKCORE_PCREL_IMM18BY2>: Likewise.
412 <R_CKCORE_PCREL_FLRW_IMM8BY4>: Likewise.
413
9917b559
L
4142021-04-14 H.J. Lu <hongjiu.lu@intel.com>
415
416 PR binutils/27708
417 * elf.c (assign_file_positions_for_non_load_sections): Set
418 p_memsz to p_filesz for the loadable PT_NOTE segment.
419
5f47741b
FC
4202021-04-14 Frederic Cambus <fred@statdns.com>
421
422 * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
423 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
424
8985b74b
AM
4252021-04-14 Alan Modra <amodra@gmail.com>
426
427 PR 27631
428 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
429 when hh might be NULL, test for NULL first.
430
c9f9a78d
AM
4312021-04-14 Alan Modra <amodra@gmail.com>
432
433 PR 27630
434 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
435 hash might be NULL, cast instead.
436
d2f1139e
CC
4372021-04-13 Clément Chigot <clement.chigot@atos.net>
438
439 * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
440
e3839c10
NC
4412021-04-13 Nelson Chu <nelson.chu@sifive.com>
442
443 * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning
444 when the version of input or output is RISCV_UNKNOWN_VERSION, since
445 the extension is added implicitly.
446 * elfxx-riscv.c: Updated the obsolete comments.
447 (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h.
448 * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
449
43e05cd4
AM
4502021-04-12 Alan Modra <amodra@gmail.com>
451
452 * elf-bfd.h (ENABLE_CHECKING): Define.
453 (elf_link_hash_lookup): Abort if wrong type of hash table.
454 * configure.ac (--enable-checking): Add support.
455 * config.in: Regenerate.
456 * configure: Regenerate.
457
2cc15b10
AM
4582021-04-12 Alan Modra <amodra@gmail.com>
459
460 * elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
461 (elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
462 (elf_hash_table, elf_hash_table_id): Likewise.
463 * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
464 is_elf_hash_table check.
465 * elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
466 * elf32-hppa.c (clobber_millicode_symbols): Correct param types.
467 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
468 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
469 (elfNN_ia64_global_dyn_sym_thunk: Likewise.
470 * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
471 (elf64_ia64_global_dyn_sym_thunk): Likewise.
472 (elf64_vms_link_add_object_symbols): Pass base type of hash table
473 to is_elf_hash_table.
474 * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
475 (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
476 (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
477 (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
478 (bfd_elf_final_link): Likewise.
479 * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
480 * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup.
481
b585e899
AM
4822021-04-12 Alan Modra <amodra@gmail.com>
483
484 * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry*
485 from elf_backend_archive_symbol_lookup.
486 (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*.
487 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check
488 we have a ppc_hash_table before accessing ppc_link_hash_entry
489 fields.
490 * elflink.c (_bfd_elf_archive_symbol_lookup): Return
491 bfd_link_hash_entry*.
492 (elf_link_add_archive_symbols): Adjust to suit.
493
f5b10973
NC
4942021-04-12 Nelson Chu <nelson.chu@sifive.com>
495
496 * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
497 i-ext when expanding g-ext.
498
f0bae255
NC
4992021-04-12 Nelson Chu <nelson.chu@sifive.com>
500
501 * elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
502 (riscv_parse_add_subset): Always add the implicit extensions, even if
503 their versions are RISCV_UNKNOWN_VERSION.
504 (riscv_parse_std_ext): Delay to add i-ext as the implicit extension
505 in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the
506 implicit extension after it has been expanded.
507 (riscv_parse_add_implicit_subsets): Updated.
508
e601909a
NC
5092021-04-12 Nelson Chu <nelson.chu@sifive.com>
510
511 * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward.
512 (riscv_std_s_ext_strtab): Likewise.
513 (riscv_std_h_ext_strtab): Likewise.
514 (riscv_std_zxm_ext_strtab): Added for the zxm prefix.
515 (enum riscv_prefix_ext_class): Moved forward and renamed from
516 riscv_isa_ext_class. Reorder them according to the parsing order,
517 since the enum values are used to check the orders in the
518 riscv_compare_subsets.
519 (struct riscv_parse_prefix_config): Moved forward and renamed from
520 riscv_parse_config_t. Also removed the ext_valid_p field, the
521 related functions are replaced by riscv_valid_prefixed_ext.
522 (parse_config): Moved forward and updated. The more letters of the
523 prefix string, the more forward it must be defined. Otherwise, we
524 will get the wrong mapping when using strncmp in riscv_get_prefix_class.
525 (riscv_get_prefix_class): Moved forward. Support to parse the
526 multi-letter prefix, like zxm.
527 (riscv_known_prefixed_ext): New function, check if the prefixed
528 extension is supported according to the right riscv_std_*_ext_strtab.
529 (riscv_valid_prefixed_ext): New function, used to replace the
530 riscv_ext_*_valid_p functions.
531 (riscv_init_ext_order): Do not set the values for prefix keywords
532 since they may have multiple letters for now.
533 (riscv_compare_subsets): Set the order values of prefix keywords
534 to negative numbers according to the riscv_prefix_ext_class.
535 (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we
536 have parsed the prefixed extensions.
537 (riscv_parse_prefixed_ext): Updated and removed the parameter config.
538 Report error when the prefix is unknown.
539 (riscv_parse_subset): Do not parse the prefixed extensions according
540 to the orders in the parse_config. Remove the confused message and
541 let riscv_parse_prefixed_ext to report the details.
542 * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c.
543 (riscv_get_prefix_class): Removed to static.
544
eec8bf7e
MF
5452021-04-08 Mike Frysinger <vapier@gentoo.org>
546
547 * configure.ac (ACX_BUGURL): Use https://.
548 * configure.com (COPY_TEXT): Likewise.
549 * configure: Regenerate.
550
83c79df8
AM
5512021-04-05 Alan Modra <amodra@gmail.com>
552
553 * configure.ac: Don't check for long long or long double type.
554 Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
555 strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check
556 for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
557 vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS.
558 (AC_ISC_POSIX): Don't invoke.
559 (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise.
560 * sysdep.h: Remove many HAVE_*_H checks and fallback declarations.
561 Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder
562 header order as per automake AC_INCLUDES_DEFAULT.
563 * bfd-in.h: Include inttypes.h unconditionally.
564 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and
565 long double are available.
566 (bfd_scan_vma): Assume long long and strtoull are available.
567 * elflink.c: Include limits.h unconditionally.
568 * elfnn-riscv.c: Likewise.
569 * wasm-module.c: Likewise.
570 * hpux-core.c: Include dirent.h unconditionally.
571 * trad-core.c: Likewise.
572 * hosts/x86-64linux.h: Include stdlib.h unconditionally.
573 * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks.
574 * elf32-m68hc1x.c: Don't include alloca-conf.h.
575 * elf64-hppa.c: Likewise.
576 * som.c: Likewise.
577 * wasm-module.c: Likewise.
578 * xsym.c: Likewise.
579 * bfd-in2.h: Regenerate.
580 * config.in: Regenerate.
581 * configure: Regenerate.
582
74edb473
TC
5832021-04-01 Tamar Christina <tamar.christina@arm.com>
584
585 PR ld/26659
586 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
587
e9b095a5
ML
5882021-04-01 Martin Liska <mliska@suse.cz>
589
590 * ecoff.c (strneq): Remove strneq and use startswith.
591 (_bfd_ecoff_slurp_armap): Likewise.
592
3f3328b8
ML
5932021-04-01 Martin Liska <mliska@suse.cz>
594
595 * elf-bfd.h (bfd_section_is_ctf): Use startswith function.
596 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
597 (elf_get_reloc_section): Likewise.
598 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
599 * elf32-m32r.c (m32r_elf_section_flags): Likewise.
600 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise.
601 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
602 (nds32_elf_relocate_section): Likewise.
603 (nds32_elf_action_discarded): Likewise.
604 (nds32_elf_check_relocs): Likewise.
605 (nds32_elf_section_flags): Likewise.
606 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
607 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
608 * elf32-rx.c (rx_table_find): Likewise.
609 (rx_table_map): Likewise.
610 * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise.
611 (spu_elf_find_overlays): Likewise.
612 (needs_ovl_stub): Likewise.
613 (allocate_spuear_stubs): Likewise.
614 (build_spuear_stubs): Likewise.
615 (mark_overlay_section): Likewise.
616 (spu_elf_auto_overlay): Likewise.
617 (spu_elf_output_symbol_hook): Likewise.
618 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
619 * elf32-xtensa.c (xtensa_property_section_name): Likewise.
620 * elf64-ppc.c (ppc64_elf_section_flags): Likewise.
621 (ppc64_elf_relocate_section): Likewise.
622 * elflink.c (resolve_section): Likewise.
623 (UNARY_OP): Likewise.
624 (BINARY_OP_HEAD): Likewise.
625 (elf_link_input_bfd): Likewise.
626 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
627 * elfxx-riscv.c (riscv_parse_subset): Likewise.
628 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
629 * opncls.c (get_build_id): Likewise.
630
65c5fbd4
AM
6312021-03-31 Alan Modra <amodra@gmail.com>
632
633 PR 27671
634 * bfd-in.h: Don't poison FALSE or TRUE.
635 * bfd-in2.h: Regenerate.
636
0a1b45a2
AM
6372021-03-31 Alan Modra <amodra@gmail.com>
638
639 * sysdep.h: POISON_BFD_BOOLEAN: Define.
640 * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
641 * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
642 * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
643 * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
644 * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
645 * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
646 * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
647 * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
648 * coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
649 * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
650 * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
651 * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
652 * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
653 * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
654 * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
655 * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
656 * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
657 * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
658 * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
659 * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
660 * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
661 * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
662 * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
663 * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
664 * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
665 * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
666 * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
667 * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
668 * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
669 * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
670 * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
671 * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
672 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
673 * elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
674 * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
675 * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
676 * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
677 * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
678 * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
679 * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
680 * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
681 * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
682 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
683 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
684 * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
685 * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
686 * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
687 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
688 * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
689 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
690 * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
691 * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
692 * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
693 * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
694 * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
695 * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
696 * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
697 * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
698 * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
699 * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
700 * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
701 * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
702 * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
703 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
704 * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
705 * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
706 * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
707 * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
708 * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
709 * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
710 * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
711 * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
712 * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
713 * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
714 * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
715 * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
716 * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
717 * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
718 * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
719 * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
720 * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
721 * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
722 * xsym.h: Replace bfd_boolean with bool, FALSE with false, and
723 TRUE with true throughout.
724 * bfd-in2.h: Regenerate.
725 * libbfd.h: Regenerate.
726 * libcoff.h: Regenerate.
727
ad9e24ad
AM
7282021-03-31 Alan Modra <amodra@gmail.com>
729
730 * bfd-in.h: Include stdbool.h.
731 (bfd_boolean): Define as bool
732 * bfd-in2.h: Regenerate.
733
3dfb1b6d
AM
7342021-03-31 Alan Modra <amodra@gmail.com>
735
736 * .gitignore: Delete bfd_stdint.h entry.
737 * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
738 (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
739 * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
740 * configure.ac: Don't invoke GCC_HEADER_STDINT.
741 * configure.com: Don't create bfd_stdint.h.
742 * Makefile.in: Regenerate.
743 * aclocal.m4: Regenerate.
744 * bfd-in2.h: Regenerate.
745 * config.in: Regenerate.
746 * configure: Regenerate.
747 * doc/Makefile.in: Regenerate.
748 * po/BLD-POTFILES.in: Regenerate.
749
57ae980e
AM
7502021-03-31 Alan Modra <amodra@gmail.com>
751
752 * bfd-in.h: Include string.h.
753 (LITMEMCPY, LITSTRCPY): Delete.
754 * bfd-in2.h: Regenerate.
755
d1cbe007
AM
7562021-03-30 Alan Modra <amodra@gmail.com>
757
758 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
759 unless is_elf_hash_table.
760
63b4cc53
AM
7612021-03-29 Alan Modra <amodra@gmail.com>
762
763 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
764 to bfd_boolean.
765 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
766 against FALSE.
767 * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
768 (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
769 (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
770 (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
771 * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
772 * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
773 * elf32-rx.c (rx_set_section_contents): Likewise.
774 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
775 * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
776 * mach-o.c (bfd_mach_o_read_command): Likewise.
777 * targets.c (bfd_get_target_info): Likewise.
778
f4f9ede0
AM
7792021-03-29 Alan Modra <amodra@gmail.com>
780
781 * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
782 * elf32-z80.c (z80_is_local_label_name): Likewise.
783 * elf32-spu.c (spu_elf_modify_headers): Likewise.
784 * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
785 Change type to int.
786 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
787 for error return from vms_write_data_block.
788
1201fda6
AM
7892021-03-29 Alan Modra <amodra@gmail.com>
790
791 * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
792 * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
793 (elf64_ia64_local_dyn_sym_thunk): Likewise.
794 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
795 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
796 (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
797 * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
798 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
799 * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
800 (riscv_pcrel_reloc_eq): Likewise.
801 (riscv_elf_finish_local_dynamic_symbol): Likewise.
802 * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
803 (finish_local_dynamic_symbol): Likewise.
804 * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
805 * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
806 (mips_elf_count_got_symbols): Change return type to bfd_boolean.
807
37bb890f
AM
8082021-03-29 Alan Modra <amodra@gmail.com>
809
810 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
811 a void pointer.
812 (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
813 elf_link_output_symstrtab when calling output_arch_syms and
814 output_arch_local_syms.
815 * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
816 elf_backend_output_arch_local_syms>): Change return type of func
817 arg to match elf_link_output_symstrtab.
818 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
819 return type.
820 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
821 (nds32_elf_output_arch_syms): Correct func return type.
822
0f684201
AM
8232021-03-29 Alan Modra <amodra@gmail.com>
824
825 * elf-m10200.c (mn10200_elf_relocate_section): Return int.
826 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
827 * elf32-arc.c (elf_arc_relocate_section): Likewise.
828 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
829 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
830 * elf32-bfin.c (bfin_relocate_section): Likewise.
831 (bfinfdpic_relocate_section): Likewise.
832 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
833 * elf32-cris.c (cris_elf_relocate_section): Likewise.
834 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
835 * elf32-csky.c (csky_elf_relocate_section): Likewise.
836 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
837 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
838 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
839 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
840 * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
841 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
842 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
843 * elf32-i386.c (elf_i386_relocate_section): Likewise.
844 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
845 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
846 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
847 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
848 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
849 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
850 * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
851 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
852 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
853 * elf32-mep.c (mep_elf_relocate_section): Likewise.
854 * elf32-metag.c (elf_metag_relocate_section): Likewise.
855 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
856 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
857 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
858 * elf32-mt.c (mt_elf_relocate_section): Likewise.
859 * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
860 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
861 * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
862 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
863 * elf32-pru.c (pru_elf32_relocate_section): Likewise.
864 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
865 * elf32-rx.c (rx_elf_relocate_section): Likewise.
866 * elf32-s390.c (elf_s390_relocate_section): Likewise.
867 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
868 (_bfd_score_elf_relocate_section): Likewise.
869 * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
870 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
871 * elf32-sh.c (sh_elf_relocate_section): Likewise.
872 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
873 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
874 * elf32-v850.c (v850_elf_relocate_section): Likewise.
875 * elf32-vax.c (elf_vax_relocate_section): Likewise.
876 * elf32-visium.c (visium_elf_relocate_section): Likewise.
877 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
878 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
879 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
880 * elf32-z80.c (z80_elf_relocate_section): Likewise.
881 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
882 (elf64_alpha_relocate_section): Likewise.
883 * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
884 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
885 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
886 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
887 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
888 * elf64-s390.c (elf_s390_relocate_section): Likewise.
889 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
890 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
891 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
892 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
893 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
894 * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
895 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
896 * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
897 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
898 * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
899
ff5b3e14
KS
9002021-03-26 Keith Seitz <keiths@redhat.com>
901
902 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
903 offset of program headers after calling elf_read_notes.
904
f596b03f
JB
9052021-03-23 Jan Beulich <jbeulich@suse.com>
906
907 * dwarf2.c (read_indexed_string): Rename index to idx.
908
08dedd66
ML
9092021-03-22 Martin Liska <mliska@suse.cz>
910
911 * bfd-in.h (startswith): Add startswith function.
912 (CONST_STRNEQ): Remove.
913 * bfd-in2.h (startswith): Regenerate with make headers.
914 * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
915 (_bfd_slurp_extended_name_table): Likewise.
916 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
917 * bfd.c (bfd_get_sign_extend_vma): Likewise.
918 (bfd_convert_section_size): Likewise.
919 (bfd_convert_section_contents): Likewise.
920 * coff-stgo32.c (go32exe_create_stub): Likewise.
921 (go32exe_check_format): Likewise.
922 * coffcode.h (styp_to_sec_flags): Likewise.
923 (GNU_DEBUGALTLINK): Likewise.
924 * coffgen.c (_bfd_coff_section_already_linked): Likewise.
925 (coff_gc_sweep): Likewise.
926 (bfd_coff_gc_sections): Likewise.
927 * cofflink.c (coff_link_add_symbols): Likewise.
928 (process_embedded_commands): Likewise.
929 * compress.c (bfd_is_section_compressed_with_header): Likewise.
930 (bfd_init_section_decompress_status): Likewise.
931 * dwarf2.c (find_debug_info): Likewise.
932 (place_sections): Likewise.
933 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
934 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
935 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
936 (assign_section_numbers): Likewise.
937 (elfcore_grok_win32pstatus): Likewise.
938 * elf32-arm.c (cmse_scan): Likewise.
939 (elf32_arm_gc_mark_extra_sections): Likewise.
940 (elf32_arm_size_dynamic_sections): Likewise.
941 (is_arm_elf_unwind_section_name): Likewise.
942 * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
943 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
944 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
945 * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
946 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
947 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
948 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
949 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
950 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
951 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
952 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
953 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
954 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
955 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
956 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
957 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
958 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
959 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
960 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
961 (elf32_tic6x_size_dynamic_sections): Likewise.
962 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
963 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
964 (xtensa_is_insntable_section): Likewise.
965 (xtensa_is_littable_section): Likewise.
966 (xtensa_is_proptable_section): Likewise.
967 (xtensa_property_section_name): Likewise.
968 (xtensa_callback_required_dependence): Likewise.
969 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
970 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
971 * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
972 (get_reloc_section): Likewise.
973 (elf64_ia64_size_dynamic_sections): Likewise.
974 (elf64_ia64_object_p): Likewise.
975 * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
976 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
977 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
978 * elflink.c (elf_link_add_object_symbols): Likewise.
979 (_bfd_elf_gc_mark_extra_sections): Likewise.
980 (bfd_elf_parse_eh_frame_entries): Likewise.
981 (_bfd_elf_section_already_linked): Likewise.
982 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
983 * elfnn-ia64.c (is_unwind_section_name): Likewise.
984 (elfNN_ia64_size_dynamic_sections): Likewise.
985 (elfNN_ia64_object_p): Likewise.
986 * elfxx-mips.c (FN_STUB_P): Likewise.
987 (CALL_STUB_P): Likewise.
988 (CALL_FP_STUB_P): Likewise.
989 (_bfd_mips_elf_section_from_shdr): Likewise.
990 (_bfd_mips_elf_fake_sections): Likewise.
991 (_bfd_mips_elf_size_dynamic_sections): Likewise.
992 (_bfd_mips_final_write_processing): Likewise.
993 (_bfd_mips_elf_final_link): Likewise.
994 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
995 * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
996 (elf_x86_64_is_reloc_section): Likewise.
997 * hpux-core.c (thread_section_p): Likewise.
998 * libcoff.h (bfd_pei_p): Likewise.
999 * linker.c (REAL): Likewise.
1000 (unwrap_hash_lookup): Likewise.
1001 (_bfd_generic_link_add_one_symbol): Likewise.
1002 * mmo.c (mmo_internal_write_section): Likewise.
1003 * osf-core.c (osf_core_core_file_p): Likewise.
1004 * pef.c (bfd_pef_print_symbol): Likewise.
1005 * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
1006 * som.c (som_slurp_symbol_table): Likewise.
1007 (som_slurp_armap): Likewise.
1008 * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
1009
2aaf2ce8
JB
10102021-03-22 Jan Beulich <jbeulich@suse.com>
1011
1012 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
1013 language translation wrapping to _bfd_error_handler()
1014 invocations.
1015
e9338841
AM
10162021-03-21 Alan Modra <amodra@gmail.com>
1017
1018 * bfd-in.h (startswith): New inline.
1019 (CONST_STRNEQ): Use startswith.
1020 * bfd-in2.h: Regenerate.
1021
15407e7e
AM
10222021-03-20 Alan Modra <amodra@gmail.com>
1023
1024 PR 27590
1025 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
1026 test for .gnu.debuglto*.
1027
3818d4ab
L
10282021-03-18 H.J. Lu <hongjiu.lu@intel.com>
1029
1030 PR ld/27590
15407e7e 1031 * elf.c (_bfd_elf_make_section_from_shdr): Treat
3818d4ab
L
1032 .gnu.debuglto_.debug_ section as debugging section unless it is
1033 marked with SHF_EXCLUDE.
1034 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
1035 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
1036 matching non-debugging sections or linkonce section with comdat
1037 section.
1038
51f6e7a9
L
10392021-03-18 H.J. Lu <hongjiu.lu@intel.com>
1040
1041 PR ld/27587
1042 * dwarf2.c (read_attribute_value): Check version >= 3 for
1043 DW_FORM_ref_addr.
1044
012d4426
NC
10452021-03-16 Nick Clifton <nickc@redhat.com>
1046
1047 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
1048 overrun by using sizeof of the destination x_fname field as the
1049 limit for a memcpy.
1050
80d49d6a
KLC
10512021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1052
1053 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
1054
1b2cb8e2
CC
10552021-03-12 Clément Chigot <clement.chigot@atos.net>
1056
1057 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
1058 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
1059 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
1060 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
1061 BFD_RELOC_PPC64_TLS_ML): New relocations.
1062 * bfd-in2.h: Regenerate.
1063 * libbfd.h: Regenerate.
1064 * coff-rs6000.c (xcoff_calculate_relocation): Call
1065 xcoff_reloc_type_tls for TLS relocations.
1066 (xcoff_howto_table): Implement TLS relocations.
1067 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
1068 (xcoff_reloc_type_tls): New function.
1069 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
1070 (xcoff_howto_table): Likewise.
1071 (_bfd_xcoff_reloc_type_lookup): Likewise.
1072 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
1073 (styp_to_sec_flags): Likewise.
1074 (coff_compute_section_file_positions): Avoid file offset
1075 optimisation for .data when the previous section is .tdata.
1076 (coff_write_object_contents): Handle TLS sections.
1077 * coffswap.h (coff_swap_aouthdr_out): Add support for
1078 new fields in aouthdr.
1079 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
1080 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
1081 (xcoff_need_ldrel_p): Add cases for TLS relocations.
1082 (xcoff_create_ldrel): Add l_symndx for TLS sections.
1083
4a403be0
CC
10842021-03-12 Clément Chigot <clement.chigot@atos.net>
1085
1086 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
1087 New relocations.
1088 * bfd-in2.h: Regenerate.
1089 * libbfd.h: Regenerate.
1090 * coff-rs6000.c (xcoff_calculate_relocation): Call
1091 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
1092 (xcoff_howto_table): Remove src_mask for TOC relocations.
1093 Add R_TOCU and R_TOCL howtos.
1094 (_bfd_xcoff_reloc_type_lookup): Add cases for
1095 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
1096 (xcoff_reloc_type_toc): Compute the whole offset.
1097 Implement R_TOCU and R_TOCL.
1098 * coff64-rs6000.c (xcoff64_calculate_relocation):
1099 Likewise.
1100 (xcoff64_howto_table): Likewise.
1101 (xcoff64_reloc_type_lookup): Likewise.
1102
2c1bef53
CC
11032021-03-12 Clément Chigot <clement.chigot@atos.net>
1104
1105 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
1106 add new relocations.
1107 (xcoff_howto_table): Likewise.
1108 (xcoff_rtype2howto): Increase r_type maximum value.
1109 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
1110 of create a new one from scratch. Enable only some relocations
1111 to have a changing r_size.
1112 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
1113 (xcoff64_howto_table): Likewise.
1114 (xcoff64_rtype2howto): Likewise.
1115 (xcoff64_ppc_relocate_section): Likewise.
1116 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
1117
0c929e83
CC
11182021-03-12 Clément Chigot <clement.chigot@atos.net>
1119
1120 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
1121
6d4d9328
CC
11222021-03-12 Clément Chigot <clement.chigot@atos.net>
1123
1124 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
1125 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
1126 support for o_cputype field. Avoid creating an empty a.out header
1127 for XCOFF64.
1128
8aa2d023
CC
11292021-03-12 Clément Chigot <clement.chigot@atos.net>
1130
1131 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
1132 missing smclass.
1133
ebdcad3f
NC
11342021-03-11 Nelson Chu <nelson.chu@sifive.com>
1135
1136 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
1137 restart_relax, used to check if we need to run the whole
1138 relaxations from relax pass 0 to 2 again.
1139 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
1140 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
1141 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
1142 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
1143 after_allocation to check if we need to run the whole relaxations again.
1144 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
1145 when the restart_relax is FALSE; At last set restart_relax to TRUE if
1146 again is TRUE, too.
1147 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
1148 (bfd_elf64_riscv_restart_relax_sections): Likewise.
1149
67b0f684
JB
11502021-03-10 Jan Beulich <jbeulich@suse.com>
1151
1152 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
1153 offset.
1154
2dfa8341
AM
11552021-03-10 Alan Modra <amodra@gmail.com>
1156 Jan Beulich <jbeulich@suse.com>
1157
1158 * elf.c (bfd_elf_generic_reloc): Make references between debug
1159 sections use section relative values.
1160
87fa7d56
JB
11612021-03-09 Jan Beulich <jbeulich@suse.com>
1162
1163 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
1164
8c0546e9
L
11652021-03-05 H.J. Lu <hongjiu.lu@intel.com>
1166
1167 PR ld/27425
1168 PR ld/27432
1169 * bfd.c (_bfd_get_link_info): New function.
1170 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
1171 (elf_link_info): New.
1172 * libbfd-in.h (_bfd_get_link_info): New prototype.
1173 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
1174 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
1175 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
1176 (pex64_link_add_symbols): New function.
1177 (coff_bfd_link_add_symbols): New macro.
1178 * libbfd.h: Regenerated.
1179
db6092f3
AB
11802021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1181 Andrew Burgess <andrew.burgess@embecosm.com>
1182
1183 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
1184 * elf.c (elfcore_grok_riscv_csr): New function.
1185 (elfcore_grok_note): Handle NT_RISCV_CSR.
1186 (elfcore_write_riscv_csr): New function.
1187 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
1188
0897bb7d
AB
11892021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1190 Andrew Burgess <andrew.burgess@embecosm.com>
1191
1192 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
1193 (PRPSINFO_PR_PSARGS_LENGTH): Define.
1194 (riscv_write_core_note): New function.
1195 (riscv_elf_grok_psinfo): Make use of two new length defines.
1196 (elf_backend_write_core_note): Define.
1197
b63a5e38
AB
11982021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1199 Andrew Burgess <andrew.burgess@embecosm.com>
1200
1201 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
1202 * elf.c (elfcore_grok_gdb_tdesc): New function.
1203 (elfcore_grok_note): Handle NT_GDB_TDESC.
1204 (elfcore_write_gdb_tdesc): New function.
1205 (elfcore_write_register_note): Handle NT_GDB_TDESC.
1206
2017f387
NC
12072021-03-05 Nick Clifton <nickc@redhat.com>
1208
1209 PR 27521
1210 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
1211 (read_indexed_string): Placeholder function.
1212 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
1213 forms.
1214
b01b5d9a
AM
12152021-03-05 Alan Modra <amodra@gmail.com>
1216
1217 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
1218 2020-09-16 changes.
1219 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
1220 adjustments here instead. Separate pc-relative adjustments
1221 from symbol related adjustments. Tidy comments and formatting.
1222
6b5465b9
JB
12232021-03-04 Jan Beulich <jbeulich@suse.com>
1224
1225 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
1226 final PE images.
1227
0b7733b6
AM
12282021-03-04 Alan Modra <amodra@gmail.com>
1229
1230 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
1231
5789f845
AM
12322021-03-03 Alan Modra <amodra@gmail.com>
1233
1234 PR 27500
1235 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
1236 processing not when start/stop symbol section is unmarked but
1237 on first time a start/stop symbol is processed.
1238
dc83f2d2
AM
12392021-03-03 Alan Modra <amodra@gmail.com>
1240
1241 * reloc.c: Include x86_64.h rather than internal.h.
1242
ca8f6bc6
NC
12432021-03-02 Nick Clifton <nickc@redhat.com>
1244
1245 PR 27484
1246 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
1247 function and variable tags and a second time to resolve their
1248 attributes.
1249
211bcd01
NA
12502021-03-02 Nick Alcock <nick.alcock@oracle.com>
1251
1252 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
1253
b80e421f
AM
12542021-03-02 Alan Modra <amodra@gmail.com>
1255
1256 PR 27451
1257 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
1258 linker defined start/stop symbols when start_stop_gc.
1259
f5b9c288
AM
12602021-03-02 Alan Modra <amodra@gmail.com>
1261
1262 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
1263 indirect to pc-relative or toc-relative for undefined symbols.
1264
8ee10e86
AM
12652021-03-01 Alan Modra <amodra@gmail.com>
1266 Fangrui Song <maskray@google.com>
1267
1268 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
1269 defined start/stop symbols when start_stop_gc.
1270 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1271 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
1272 * linker.c (bfd_generic_define_start_stop): Likewise.
1273
bbaddd4b
AM
12742021-02-25 Alan Modra <amodra@gmail.com>
1275
1276 PR 27441
1277 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
1278 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
1279 use when deciding an as-needed library should be loaded instead
1280 of using the binding of the library definition.
1281
93af1b04
AM
12822021-02-24 Alan Modra <amodra@gmail.com>
1283
1284 PR 27459
1285 * coff-stgo32.c (go32exe_check_format): Sanity check size of
1286 header to avoid a buffer overflow.
1287
e9d18e06
AM
12882021-02-22 Alan Modra <amodra@gmail.com>
1289
1290 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
1291 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
1292
5a9f5403
NC
12932021-02-19 Nelson Chu <nelson.chu@sifive.com>
1294
1295 PR 27158
1296 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
1297 (_bfd_riscv_relax_call): Likewise.
1298 (_bfd_riscv_relax_lui): Likewise.
1299 * elfxx-riscv.c (howto_table): Likewise.
1300
3d73d29e
NC
13012021-02-18 Nelson Chu <nelson.chu@sifive.com>
1302
1303 * Makefile.am: Added cpu-riscv.h.
1304 * Makefile.in: Regenerated.
1305 * po/SRC-POTFILES.in: Regenerated.
1306 * cpu-riscv.h: Added to support spec versions controlling.
1307 Also added extern arrays and functions for cpu-riscv.c.
1308 (enum riscv_spec_class): Define all spec classes here uniformly.
1309 (struct riscv_spec): Added for all specs.
1310 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
1311 (RISCV_GET_SPEC_NAME): Likewise.
1312 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
1313 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
1314 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
1315 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
1316 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
1317 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
1318 (riscv_priv_specs): Moved below.
1319 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
1320 (riscv_isa_specs): Moved from include/opcode/riscv.h.
1321 * elfnn-riscv.c: Included cpu-riscv.h.
1322 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
1323 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
1324 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
1325 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
1326
b9b204b3
AM
13272021-02-17 Alan Modra <amodra@gmail.com>
1328
1329 * wasm-module.c: Guard include of limits.h.
1330 (CHAR_BIT): Provide backup define.
1331 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
1332 Correct signed overflow checking.
1333
0d6aab77
NC
13342021-02-17 Nelson Chu <nelson.chu@sifive.com>
1335
1336 PR 27200
1337 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
1338 copying the elf flags from input BFD to output BFD, until we have
1339 checked if the input BFD has no code section or not. Also fix the
1340 problem that we only check the first section rather than the entire
1341 sections for input BFD.
1342
7b54cadd
AM
13432021-02-16 Alan Modra <amodra@gmail.com>
1344
1345 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
1346 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
1347
8c674061
JB
13482021-02-15 Jan Beulich <jbeulich@suse.com>
1349
1350 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
1351 * doc/Makefile.in: Re-generate.
1352
1781a9d0
AM
13532021-02-15 Alan Modra <amodra@gmail.com>
1354
1355 * elf32-nds32.c (nds32_get_section_contents): Replace
1356 bfd_malloc_and_get_section with bfd_get_full_section_contents.
1357 (nds32_elf_relax_delete_blanks): Init contents.
1358 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
1359
8b78cbec
AM
13602021-02-15 Alan Modra <amodra@gmail.com>
1361
1362 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1363 bfd_get_full_section_contents.
1364
d7a7af8f
AM
13652021-02-14 Alan Modra <amodra@gmail.com>
1366
1367 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
1368 all fixes to bfd_generic_get_relocated_section_contents since this
1369 function was split out.
1370
234b98ce
AM
13712021-02-11 Alan Modra <amodra@gmail.com>
1372
1373 * config.bfd: Remove ia64 from obsolete list.
1374
769c253f
AM
13752021-02-11 Alan Modra <amodra@gmail.com>
1376
1377 PR ld/22269
1378 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
1379
31c711a2
AM
13802021-02-11 Alan Modra <amodra@gmail.com>
1381
1382 PR 27294
1383 * elf32-avr.c (avr_elf32_load_records_from_section): Use
1384 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
1385 unnecessary casts.
1386
6db658c5
AM
13872021-02-11 Alan Modra <amodra@gmail.com>
1388
1389 PR 27291
1390 * section.c (bfd_get_section_contents): Avoid possible overflow
1391 when range checking offset and count.
1392 (bfd_set_section_contents): Likewise.
1393
95148614
NA
13942021-02-03 Nick Alcock <nick.alcock@oracle.com>
1395
1396 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
1397 favour of LIBINTL.
1398 * configure: Regenerated.
1399
a57d1773
AM
14002021-02-09 Alan Modra <amodra@gmail.com>
1401
1402 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
1403 * configure.ac: Delete symbian entries.
1404 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
1405 * elf32-arm.c: Remove symbian support. Formatting.
1406 * targets.c: Delete symbian entries.
1407 * configure: Regenerate.
1408
1a2f1b54
L
14092021-02-04 H.J. Lu <hongjiu.lu@intel.com>
1410
1411 PR ld/19609
1412 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
1413 info when failed to convert GOTPCREL relocation.
1414
24075dcc
NC
14152021-02-04 Nelson Chu <nelson.chu@sifive.com>
1416
1417 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
1418
7d409ac0
AM
14192021-02-04 Alan Modra <amodra@gmail.com>
1420
1421 PR 27311
1422 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
1423 libraries for IR references on pass over libraries after LTO
1424 recompilation.
1425
f01fb44c
AM
14262021-02-03 Alan Modra <amodra@gmail.com>
1427
1428 PR 27311
1429 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
1430 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
1431 libraries when H is an indirect symbol after calling
1432 _bfd_elf_add_default_symbol.
1433
69551367
AM
14342021-02-03 Alan Modra <amodra@gmail.com>
1435
1436 PR 27311
1437 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
1438 undecorated symbol will have a different version.
1439
9918bff7
AM
14402021-02-02 Alan Modra <amodra@gmail.com>
1441
1442 PR 27311
1443 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
1444 Use when handling default versioned symbol. Rename existing
1445 override variable to nondef_override and use for non-default
1446 versioned symbol.
1447 (elf_link_add_object_symbols): Adjust call to suit. Don't
1448 pull in as-needed libraries when override is set.
1449
1f568f9a
EH
14502021-02-01 Emery Hemingway <ehmry@posteo.net>
1451
1452 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
1453
34c10233
EV
14542021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
1455
1456 PR 27254
1457 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
1458 offset for the R_RL78_RH_SADDR relocation.
1459
c4566785
AM
14602021-01-29 Alan Modra <amodra@gmail.com>
1461
1462 PR 27271
1463 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
1464 on symbols defined in absolute or other special sections.
1465
def97fb9
AM
14662021-01-28 Alan Modra <amodra@gmail.com>
1467
1468 PR 27259
1469 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
1470 prevent endless looping of linked-to sections.
1471
4cb1265b
MS
14722020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
1473
1474 * bfd-elf.h (elfcore_write_file_note): New function.
1475 * elf.c (elfcore_write_file_note): New function.
1476
4287950e
AM
14772021-01-26 Alan Modra <amodra@gmail.com>
1478
1479 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
1480
940d0202
L
14812021-01-24 H.J. Lu <hongjiu.lu@intel.com>
1482
1483 PR binutils/27231
1484 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
1485 number tables.
1486
18454c15
L
14872021-01-23 H.J. Lu <hongjiu.lu@intel.com>
1488
1489 PR binutils/27231
1490 * dwarf2.c (read_rnglists): Advance rngs_ptr after
1491 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
1492
4bd7c902
AM
14932021-01-20 Alan Modra <amodra@gmail.com>
1494
1495 * elf32-ppc.c: Delete outdated comment.
1496 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
1497 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
1498
8bd10d6b
AM
14992021-01-20 Alan Modra <amodra@gmail.com>
1500
1501 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
1502 section symbols are present.
1503
30845f11
AM
15042021-01-19 Alan Modra <amodra@gmail.com>
1505
1506 * elf64-ppc.c (elf_hash_entry): New inline function. Use
1507 throughout to replace casts.
1508 (branch_reloc_hash_match): Remove const from params.
1509 (use_local_plt): New function.
1510 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
1511 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
1512 Use use_local_plt.
1513 * elf32-ppc.c (use_local_plt): New function.
1514 (allocate_dynrelocs, ppc_elf_relocate_section),
1515 (write_global_sym_plt): Use use_local_plt.
1516
994b2513
L
15172021-01-17 H.J. Lu <hongjiu.lu@intel.com>
1518
1519 PR ld/27193
1520 * elflink.c (elf_create_symbuf): Also ignore section symbols.
1521
75a933f3
L
15222021-01-16 H.J. Lu <hongjiu.lu@intel.com>
1523
1524 PR ld/23169
1525 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
1526 check pointer_equality_needed.
1527
68b00778
L
15282021-01-15 H.J. Lu <hongjiu.lu@intel.com>
1529
1530 * elf-linker-x86.h (elf_linker_x86_params): Add
1531 report_relative_reloc.
1532 * elf32-i386.c (elf_i386_relocate_section): Call
1533 _bfd_x86_elf_link_report_relative_reloc to report relative
1534 relocations for -z report-relative-reloc.
1535 (elf_i386_finish_dynamic_symbol): Likewse.
1536 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
1537 (elf_x86_64_finish_dynamic_symbol): Likewse.
1538 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
1539 function.
1540 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
1541 prototype.
1542
ad92f33d
AM
15432021-01-16 Alan Modra <amodra@gmail.com>
1544
1545 * compress.c (decompress_contents): Tidy inflateEnd result test.
1546
eb6e6af8
AM
15472021-01-16 Alan Modra <amodra@gmail.com>
1548
1549 PR 26002
1550 * elflink.c (elf_link_output_extsym): Use version 1 in
1551 .gnu.version for undefined unversioned symbols.
1552
4bb5732e
NC
15532021-01-15 Nelson Chu <nelson.chu@sifive.com>
1554
1555 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
1556 caused the by previous commit accidentally.
1557
1942a048
NC
15582021-01-15 Nelson Chu <nelson.chu@sifive.com>
1559
1560 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
1561 also aligned the code.
1562
b800637e
NC
15632021-01-15 Nelson Chu <nelson.chu@sifive.com>
1564
1565 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
1566
dcd709e0
NC
15672021-01-15 Nelson Chu <nelson.chu@sifive.com>
1568
1569 * elfnn-riscv.c: Comments tidy and improvement.
1570 * elfxx-riscv.c: Likewise.
1571 * elfxx-riscv.h: Likewise.
1572
8ca9c7eb
L
15732021-01-14 H.J. Lu <hongjiu.lu@intel.com>
1574
1575 PR ld/26688
1576 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
1577 section for R_BFIN_FUNCDESC.
1578
7e0d77ef
NC
15792021-01-14 Nick Clifton <nickc@redhat.com>
1580
1581 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
1582
5347ed60
AM
15832021-01-13 Alan Modra <amodra@gmail.com>
1584
1585 * Makefile.in: Regenerate.
1586 * doc/Makefile.in: Regenerate.
1587
b209b5a6
AM
15882021-01-13 Alan Modra <amodra@gmail.com>
1589
1590 PR 27160
1591 * section.c (struct bfd_section): Remove pattern field.
1592 (BFD_FAKE_SECTION): Adjust to suit.
1593 * bfd-in2.h: Regenerate.
1594 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
1595 (bfd_elf_final_link): Don't call elf_fixup_link_order.
1596
d546b610
L
15972021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 PR binutils/26792
1600 * configure.ac: Use GNU_MAKE_JOBSERVER.
1601 * aclocal.m4: Regenerated.
1602 * configure: Likewise.
1603
c2e9a4a3
L
16042021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1605
1606 PR ld/27171
1607 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
1608 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
1609
83b33c6c
L
16102021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1611
1612 PR ld/27173
1613 * configure: Regenerated.
1614
a8aa72b9
NC
16152021-01-11 Nick Clifton <nickc@redhat.com>
1616
1617 * po/fr.po: Updated French translation.
1618 * po/pt.po: Updated Portuguese translation.
1619 * po/sr.po: Updated Serbian translation.
1620 * po/uk.po: Updated Ukranian translation.
1621
a4966cd9
L
16222021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1623
1624 * configure: Regenerated.
1625
0a94990b
L
16262021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1627
1628 PR ld/27166
1629 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
1630 -z lam-u48 and -z lam-u57.
1631
573fe3fb
NC
16322021-01-09 Nick Clifton <nickc@redhat.com>
1633
1634 * version.m4: Change to 2.36.50.
1635 * configure: Regenerate.
1636 * po/bfd.pot: Regenerate.
1637
055bc77a
NC
16382021-01-09 Nick Clifton <nickc@redhat.com>
1639
1640 * 2.36 release branch crated.
1641
ba9e922f
L
16422021-01-08 H.J. Lu <hongjiu.lu@intel.com>
1643
1644 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
1645 LAM_U57 when setting LAM_U48.
1646
b1b29aa5
L
16472021-01-08 H.J. Lu <hongjiu.lu@intel.com>
1648
1649 PR ld/26256
1650 PR ld/27160
1651 * elflink.c (elf_fixup_link_order): Verify that fixing up
1652 SHF_LINK_ORDER doesn't increase the output section size.
1653
64307045
AM
16542021-01-09 Alan Modra <amodra@gmail.com>
1655
1656 * configure: Regenerate.
1657
f4782128
ST
16582021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1659
1660 * configure: Regenerate.
1661
d1bcae83
L
16622021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1663
1664 PR 27109
1665 * aix386-core.c (core_aix386_vec): Initialize
1666 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
1667 * aout-target.h (MY (vec)): Likewise.
1668 * binary.c (binary_vec): Likewise.
1669 * cisco-core.c (core_cisco_be_vec): Likewise.
1670 (core_cisco_le_vec): Likewise.
1671 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
1672 * coff-i386.c (TARGET_SYM): Likewise.
1673 (TARGET_SYM_BIG): Likewise.
1674 * coff-ia64.c (TARGET_SYM): Likewise.
1675 * coff-mips.c (mips_ecoff_le_vec): Likewise.
1676 (mips_ecoff_be_vec): Likewise.
1677 (mips_ecoff_bele_vec): Likewise.
1678 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
1679 (powerpc_xcoff_vec): Likewise.
1680 * coff-sh.c (sh_coff_small_vec): Likewise.
1681 (sh_coff_small_le_vec): Likewise.
1682 * coff-tic30.c (tic30_coff_vec): Likewise.
1683 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
1684 (tic54x_coff0_beh_vec): Likewise.
1685 (tic54x_coff1_vec): Likewise.
1686 (tic54x_coff1_beh_vec): Likewise.
1687 (tic54x_coff2_vec): Likewise.
1688 (tic54x_coff2_beh_vec): Likewise.
1689 * coff-x86_64.c (TARGET_SYM): Likewise.
1690 (TARGET_SYM_BIG): Likewise.
1691 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
1692 (rs6000_xcoff64_aix_vec): Likewise.
1693 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
1694 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
1695 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
1696 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
1697 (TARGET_LITTLE_SYM): Likewise.
1698 * hppabsd-core.c (core_hppabsd_vec): Likewise.
1699 * hpux-core.c (core_hpux_vec): Likewise.
1700 * i386msdos.c (i386_msdos_vec): Likewise.
1701 * ihex.c (ihex_vec): Likewise.
1702 * irix-core.c (core_irix_vec): Likewise.
1703 * mach-o-target.c (TARGET_NAME): Likewise.
1704 * mmo.c (mmix_mmo_vec): Likewise.
1705 * netbsd-core.c (core_netbsd_vec): Likewise.
1706 * osf-core.c (core_osf_vec): Likewise.
1707 * pdp11.c (MY (vec)): Likewise.
1708 * pef.c (pef_vec): Likewise.
1709 (pef_xlib_vec): Likewise.
1710 * plugin.c (plugin_vec): Likewise.
1711 * ppcboot.c (powerpc_boot_vec): Likewise.
1712 * ptrace-core.c (core_ptrace_vec): Likewise.
1713 * sco5-core.c (core_sco5_vec): Likewise.
1714 * som.c (hppa_som_vec): Likewise.
1715 * srec.c (srec_vec): Likewise.
1716 (symbolsrec_vec): Likewise.
1717 * tekhex.c (tekhex_vec): Likewise.
1718 * trad-core.c (core_trad_vec): Likewise.
1719 * verilog.c (verilog_vec): Likewise.
1720 * vms-alpha.c (alpha_vms_vec): Likewise.
1721 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
1722 * wasm-module.c (wasm_vec): Likewise.
1723 * xsym.c (sym_vec): Likewise.
1724 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
1725 isn't set.
1726 (elf_map_symbols): Don't include ignored section symbols.
1727 * elfcode.h (elf_slurp_symbol_table): Also set
1728 BSF_SECTION_SYM_USED on STT_SECTION symbols.
1729 * elflink.c (bfd_elf_final_link): Generated section symbols only
1730 when emitting relocations or reqired.
1731 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1732 * syms.c (BSF_SECTION_SYM_USED): New.
1733 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1734 (bfd_target): Add keep_unused_section_symbols.
1735 (bfd_keep_unused_section_symbols): New.
1736 * bfd-in2.h: Regenerated.
1737
17d60030
NC
17382021-01-07 Nick Clifton <nickc@redhat.com>
1739
1740 PR 25713
1741 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
1742 absolute paths and check to see if they are longer than MAX_PATH.
1743
aa881ecd
PT
17442021-01-07 Philipp Tomsich <prt@gnu.org>
1745
1746 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
1747
2652cfad
CXW
17482021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
1749 Jim Wilson <jimw@sifive.com>
1750 Andrew Waterman <andrew@sifive.com>
1751 Maxim Blinov <maxim.blinov@embecosm.com>
1752 Kito Cheng <kito.cheng@sifive.com>
1753 Nelson Chu <nelson.chu@sifive.com>
1754
1755 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
1756
d4e57b87
L
17572021-01-06 H.J. Lu <hongjiu.lu@intel.com>
1758
1759 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
1760 (bfinfdpic_check_relocs): Likewise.
1761
599c86c4
AM
17622021-01-06 Alan Modra <amodra@gmail.com>
1763
1764 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
1765 on unknown r_type.
1766 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1767
3677b729
AM
17682021-01-06 Alan Modra <amodra@gmail.com>
1769
1770 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
1771 (sparc64-*-solaris2*): Add sparc_elf64_vec and
1772 sparc_elf32_vec.
1773
fbc09e7a
MC
17742021-01-06 Marcus Comstedt <marcus@mc.pp.se>
1775
1776 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
1777 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
1778 * configure.ac: Handle riscv_elf[32|64]_be_vec.
1779 * configure: Regenerate.
1780 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
1781 riscv_is_insn_reloc.
1782 (riscv_get_insn): RISC-V instructions are always little endian, but
1783 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
1784 the insturctions.
1785 (riscv_put_insn): Likewsie.
1786 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
1787 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
1788 use riscv_[get|put]_insn or bfd_[get|put].
1789 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
1790 or bfd_[get|put]l16 for code.
1791 (riscv_elf_relocate_section): Likewise.
1792 (riscv_elf_finish_dynamic_symbol): Likewise.
1793 (riscv_elf_finish_dynamic_sections): Likewise.
1794 (_bfd_riscv_relax_call): Likewise.
1795 (_bfd_riscv_relax_lui): Likewise.
1796 (_bfd_riscv_relax_align): Likewise.
1797 (_bfd_riscv_relax_pc): Likewise.
1798 (riscv_elf_object_p): Handled for big endian.
1799 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
1800 * targets.c: Add riscv_elf[32|64]_be_vec.
1801 (_bfd_target_vector): Likewise.
1802
c8bad65e
AM
18032021-01-05 Alan Modra <amodra@gmail.com>
1804
1805 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
1806 for relocatable executable.
1807
de6a7ee4
AM
18082021-01-05 Alan Modra <amodra@gmail.com>
1809
1810 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
1811
18b98722
NC
18122021-01-05 Nelson Chu <nelson.chu@sifive.com>
1813
1814 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
1815 make sure gp symbol is output as a dynamic symbol.
1816
cd6d537c
L
18172021-01-04 H.J. Lu <hongjiu.lu@intel.com>
1818
1819 PR ld/26256
1820 * elflink.c (compare_link_order): Place unordered sections before
1821 ordered sections.
1822 (elf_fixup_link_order): Add a link info argument. Allow mixed
1823 ordered and unordered input sections for non-relocatable link.
1824 Sort the consecutive bfd_indirect_link_order sections with the
1825 same pattern. Change the offsets of the bfd_indirect_link_order
1826 sections only.
1827 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
1828 * section.c (bfd_section): Add pattern.
1829 (BFD_FAKE_SECTION): Initialize pattern to NULL.
1830 * bfd-in2.h: Regenerated.
1831
dbb078f6
AF
18322021-01-04 Alexander Fedotov <alfedotov@gmail.com>
1833
1834 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
1835 of private flags with 0x.
1836 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
1837
5b4293ba
AM
18382021-01-04 Alan Modra <amodra@gmail.com>
1839
1840 PR 26822
1841 * elflink.c (elf_link_input_bfd): Use the file base name in
1842 linker generated STT_FILE symbols.
1843
4c0e540e
NC
18442021-01-04 Nelson Chu <nelson.chu@sifive.com>
1845
1846 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
1847 * elfxx-riscv.h: Add declaration.
1848 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
1849 riscv_compare_subsets to check the orders.
1850 (riscv_skip_prefix): Removed.
1851 (riscv_prefix_cmp): Removed.
1852
e9cf3691
AM
18532021-01-04 Alan Modra <amodra@gmail.com>
1854
1855 PR 26741
1856 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
1857 calculating subset version length.
1858
f9a6a8f0
AM
18592021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1860
1861 * xcofflink.c: Correct spelling in comments.
1862
250d07de
AM
18632021-01-01 Alan Modra <amodra@gmail.com>
1864
1865 Update year range in copyright notice of all files.
1866
c2795844 1867For older changes see ChangeLog-2020
3499769a 1868\f
c2795844 1869Copyright (C) 2021 Free Software Foundation, Inc.
3499769a
AM
1870
1871Copying and distribution of this file, with or without modification,
1872are permitted in any medium without royalty provided the copyright
1873notice and this notice are preserved.
1874
1875Local Variables:
1876mode: change-log
1877left-margin: 8
1878fill-column: 74
1879version-control: never
1880End: