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