]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Add ability to change linker warning messages into errors when reporting executable...
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
e922d1ea
NC
12023-11-10 Nick Clifton <nickc@redhat.com>
2
3 * elf.c (assign_file_positions_except_relocs): Turn warnings about
4 executable segments into errors if so requested.
5 * elflink.c (bfd_elf_size_dynamic_sections): Turn warnings about
6 executable stacks into errors if so requested.
7
a4a51292
NC
82023-10-30 Nick Clifton <nickc@redhat.com>
9
10 * bpf-reloc.def (R_BPF_64_NODLD32): Add entry.
11
fd00374f
NC
122023-10-16 Nick Clifton <nickc@redhat.com>
13
14 PR 28910
15 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Do not set
16 output flags if the input flags have not been set.
17
e7c3fa04
NC
182023-10-09 Nick Clifton <nickc@redhat.com>
19
cb0f1baf
NC
20 PR 30950
21 * elf32-i386.c (elf_i386_convert_load_reloc): Check for
22 elf_x86_hash_table returning a NULL pointer.
23
e7c3fa04
NC
24 PR 30949
25 * elflink.c (elf_gc_mark_debug_section): Check for
26 bfd_section_from_elf_index returning a NULL pointer.
27
b75b3eb0
NC
282023-10-06 Nick Clifton <nickc@redhat.com>
29
30 PR 30940
31 * elf64-alpha.c (elf64_alpha_check_relocs): Correct error message.
32
345309aa
NC
332023-10-05 Nick Clifton <nickc@redhat.com>
34
35 PR 30904
36 * elf.c (_bfd_elf_get_dynamic_symbols): Fix typo when checking to
37 see if the gnuchains array has been successfully created.
38
6a6117ab
NC
392023-10-02 Nick Clifton <nickc@redhat.com>
40
41 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Use
42 bfd_get_current_time when filing in the timestamp.
43
a78c3c97
NC
442023-09-29 Nick Clifton <nickc@redhat.com>
45
46 PR 30906
47 * elf.c (_bfd_elf_slurp_version_tables): Test that the verref
48 section header has been initialised before using it.
49
6136093c
NC
502023-09-28 Nick Clifton <nickc@redhat.com>
51
52 PR 30886
53 * elf-bfd.h (struct elf_obj_tdata): Add dt_strsz field.
54 * elf.c (_bfd_elf_get_dynamic_symbols): Add a NUL byte at the end
55 of the string table.
56 Initialise the dt_strsz field.
57 (_bfd_elf_slurp_version_tables): Only free the contents if they
58 were malloc'ed.
59 Add checks before setting string pointers in the dt_strtab buffer.
60
4befded4
NC
612023-09-27 Nick Clifton <nickc@redhat.com>
62
63 PR 30885
64 * elfcode.h (elf_slurp_symbol_table): Compute the symcount for non
65 dynamic symbols in the same way as _bfd_elf_get_symtab_upper_bound.
66
38cc67cc
JN
672023-09-13 Jacob Navia <jacob@jacob.remcomp.fr>
68
69 * elf.c (_bfd_elf_init_reloc_shdr): Don't segfault on alloc fail.
70
45285527
AM
712023-09-13 Alan Modra <amodra@gmail.com>
72
73 * elf-strtab.c (_bfd_elf_strtab_init): In the event of memory
74 allocation failure, make sure that the hash table is freed.
75
3b23b03a
TT
762023-08-30 Tom Tromey <tom@tromey.com>
77
78 PR binutils/30703
79 * doc/webassembly.texi, doc/bfd.texi: Revert 8bb23cdb, adding
80 parameters back to @node.
81
0133072f
NC
822023-08-04 Nick Clifton <nickc@redhat.com>
83
84 PR 15545
85 * cache.c (bfd_cache_close_all): Extend description to note that
86 all files will be closed, even those that are not cacheable.
87 Add code to prevent a possible infinite loop.
88
f559e52a
TT
892023-08-02 Tom Tromey <tromey@adacore.com>
90
91 * pei-x86_64.c (PEI_HEADERS): Do not define.
92 * pei-loongarch64.c (PEI_HEADERS): Do not define.
93 * pei-aarch64.c (PEI_HEADERS): Do not define.
94 * pe-x86_64.c (PEI_HEADERS): Do not define.
95 * pe-aarch64.c (PEI_HEADERS): Do not define.
96 * libpei.h (_LIBPEI_H): Add include guard.
97 * coff-x86_64.c (PEI_HEADERS): Do not check.
98 * coff-loongarch64.c (PEI_HEADERS): Do not check.
99 * coff-aarch64.c (PEI_HEADERS): Do not check.
100
b5c37946 1012023-07-24 Johannes Schauer Marin Rodrigues <josch@debian.org>
6badd102 102
b5c37946
SJ
103 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): If inserting a
104 timestamp, use the value held in the SOURCE_DATE_EPOCH environment
105 variable, if it is defined.
106
1072023-07-24 Jose E. Marchesi <jose.marchesi@oracle.com>
c2ca88d7 108
b5c37946
SJ
109 * reloc.c: New reloc BFD_RELOC_BPF_DISPCALL32.
110 * elf64-bpf.c (bpf_reloc_type_lookup): Handle the new reloc.
111 * libbfd.h (bfd_reloc_code_real_names): Regenerate.
c2ca88d7 112
b5c37946 1132023-07-09 Fangrui Song <maskray@google.com>
5e24da90 114
b5c37946
SJ
115 PR 30592
116 * section.c: Define SEC_ELF_LARGE.
117 * bfd-in2.h: Regenerate.
118 * elf64-x86-64.c (elf_x86_64_section_flags, elf_x86_64_fake_sections,
119 elf_x86_64_copy_private_section_data): New.
5e24da90 120
87485f53
NC
1212023-07-03 Nick Clifton <nickc@redhat.com>
122
b5c37946 123 * version.m4: Update version number to 2.41.50.
87485f53
NC
124 * configure: Regenerate.
125 * bfd/po/bfd.pot: Regenerate.
126
d501d384
NC
1272023-07-03 Nick Clifton <nickc@redhat.com>
128
129 2.41 Branch Point.
130
74d39f70
NC
1312023-06-19 Nick Clifton <nickc@redhat.com>
132
133 PR 30560
134 * elf64-x86-64.c (elf_x86_64_relocate_section): Add more checks
135 for a valid relocation offset.
136
064ad3ea
NC
1372023-06-07 Nick Clifton <nickc@redhat.com>
138
139 PR 30499
140 * elflink.c (elf_link_add_object_symbols): Add a message
141 indicating that alignment and size discrepancies between the
142 definition of common symbols and normal symbols are serious and
143 should be investigated.
144
768d1d87
TG
1452023-05-31 Tristan Gingold <tgingold@free.fr>
146
147 PR 30444
148 * coffcode.h (coff_write_object_contents): Handle base64 encoding
149 on PE. Also check for too large string table.
150 * coffgen.c (extract_long_section_name): New function extracted
151 from ...
152 (make_a_section_from_file): ... here. Add support for base64
153 long section names.
154 (decode_base64): New function.
155
80d4e113
LB
1562023-05-17 Luca Bacci <luca.bacci@outlook.com>
157
158 PR 30421
159 * cofflink.c (_decoration_hash_newfunc): New function.
160 (_bfd_coff_link_hash_table_init): Call it.
161 * libcoff-in.h (struct coff_link_hash_table): Add decoration_hash
162 field.
163 (struct decoration_hash_entry): Declare.
164 (_decoration_hash_newfunc): Prototype.
165 * libcoff.h: Regenerate.
166
0e759f23
OT
1672023-05-16 Oleg Tolmatcev <oleg.tolmatcev@gmail.com>
168
169 * libcoff-in.h (struct coff_tdata): Add section_by_index and
170 section_by_target_index hash tables.
171 * libcoff.h: Regenerate.
172 * coffcode.h (htab_hash_section_index): New function.
173 (htab_eq_section_index): New function.
174 (htab_hash_section_target_index): New function.
175 (htab_eq_section_target_index): New function.
176 (coff_mkobject_hool): Create the hash tables.
177 * peicode.h: Add the same new functions.
178 (pe_mkobject_hook): Create the hash tables.
179 * coff-x86_64.c (coff_amd64_rtype_to_howto): Use the new tables to
180 speed up lookups.
181 * coffgen.c (coff_section_from_bfd_index): Likewise.
182 (_bfd_coff_close_and_cleanup): Delete the hash tables.
183
8b7b3b2b
LB
1842023-05-10 Luca Bonissi <gcc@scarsita.it>
185
186 PR 30422
187 * elf32-or1k.c (or1k_elf_relocate_section): Prescan for
188 R_OR1K_GOT_AHI16 relocs as they may occur after R_OR1K_GOT16
189 relocs.
190
e4fbcd83
NC
1912023-05-05 Nick Clifton <nickc@redhat.com>
192
193 PR 30354
194 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): If any debug
195 sections are marked then rerun the extra marking in order to pick
196 up any dependencies.
197
a2243c30
OT
1982023-05-03 Oleg Tolmatcev <oleg.tolmatcev@gmail.com>
199
200 * archive.c (_bfd_write_archive_contents): Use a larger buffer in
201 order to improve efficiency.
202
7e1b5887
OT
2032023-05-03 Oleg Tolmatcev <oleg.tolmatcev@gmail.com>
204
205 * coffcode.h (coff_read_word_from_buffer): New function.
206 * coffcode.h (COFF_CHECKSUM_BUFFER_SIZE): New constant.
207 * coffcode.h (coff_compute_checksum): Improve speed by reducing
208 the number of seeks and reads used.
209
6946d292
NC
2102023-04-24 Nick Clifton <nickc@redhat.com>
211
212 * po/la.po: New Georgian translation.
213
c53c6186
NC
2142023-04-17 Nick Clifton <nickc@redhat.com>
215
216 PR 30142
217 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do not force the .rsrc
218 section to be writeable.
219
c22d38ba
NC
2202023-03-30 Nick Clifton <nickc@redhat.com>
221
222 PR 30285
223 * elf.c (_bfd_elf_slurp_version_tables): Fail if no version
224 definitions are allocated.
225
c3846307
FW
2262023-02-27 Felix Willgerodt <felix.willgerodt@intel.com>
227
228 * elf64-x86-64.c (elf_x86_64_grok_psinfo): Check for
229 elf_external_linux_prpsinfo32_ugid32.
230
50980ba3
FS
2312023-02-23 Fangrui Song <i@maskray.me>
232
233 * elfnn-riscv.c (struct riscv_elf_link_hash_table): Add params.
234 (riscv_elfNN_set_options): New.
235 (riscv_info_to_howto_rela): Check relax_gp.
236 (_bfd_riscv_relax_section): Likewise.
237 * elfxx-riscv.h (struct riscv_elf_params): New.
238 (riscv_elf32_set_options): New.
239 (riscv_elf64_set_options): New.
240
e0b74a85
NC
2412023-02-23 Nick Clifton <nickc@redhat.com>
242 Alan Modra <amodra@gmail.com>
243
244 PR 30150
245 * dwarf2.c (comp_unit_contains_address): Renamed to ...
246 (comp_unit_may_contain_address): this, and added code to return
247 true if the CU's ranges have not yet been computed.
248 (_bfd_dwarf2_find_nearest_line_with_alt): Use the renamed
249 function, simplifying code in the process.
250
4c16e1ab
NC
2512023-02-21 Nick Clifton <nickc@redhat.com>
252
253 * opncls.c (bfd_fill_in_gnu_debuglink_section): Update
254 description.
255
dbe7ee1a
TT
2562023-02-17 Tom Tromey <tom@tromey.com>
257
258 * doc/doc.str (FUNCTION): Call func.
259
03a7c6eb
TT
2602023-02-17 Tom Tromey <tom@tromey.com>
261
262 * opncls.c: Hoist the SECTION comment.
263
2070491c
TT
2642023-02-17 Tom Tromey <tom@tromey.com>
265
266 * opncls.c (bfd_get_debug_link_info_1, separate_debug_file_exists)
267 (separate_alt_debug_file_exists, find_separate_debug_file)
268 (get_build_id, get_build_id_name, check_build_id_file): Don't use
269 chew comments.
270
ee0e1723
TT
2712023-02-17 Tom Tromey <tom@tromey.com>
272
273 * doc/doc.str (SYNOPSIS): Use collapse_whitespace.
274 * doc/chew.c (collapse_whitespace): New function.
275 (main): Register collapse_whitespace.
276
f370ae88
TT
2772023-02-07 Tom Tromey <tom@tromey.com>
278
279 * bfd.c, cache.c, compress.c, opncls.c: Remove RETURNS from
280 documentation comments.
281 * doc/doc.str, doc/proto.str (RETURNS): Remove.
282
b8e81f19
TT
2832023-02-07 Tom Tromey <tom@tromey.com>
284
285 * syms.c (bfd_decode_symclass, bfd_is_undefined_symclass)
286 (bfd_symbol_info): Reorder documentation comment.
287 * doc/doc.str (synopsis_seen): New variable.
288 (SYNOPSIS): Set synopsis_seen. Emit @deftypefn.
289 (DESCRIPTION): Use synopsis_seen.
290 * doc/chew.c (catstrif): New function.
291 (main): Add catstrif intrinsic.
292 (compile): Recognize "variable" command.
293
fe20eda5
TT
2942023-02-07 Tom Tromey <tom@tromey.com>
295
296 * doc/proto.str (external, internal, ifinternal, ENUMEQ, ENUMDOC):
297 Update.
298 * doc/chew.c (internalmode): Remove.
299 (add_intrinsic_variable): New function.
300 (main): Add internalmode as intrinsic.
301 (internal_mode): Remove global.
302 (maybecatstr): Update.
303 (free_words): Free variables.
304
126eff23
TT
3052023-02-07 Tom Tromey <tom@tromey.com>
306
307 * doc/chew.c (pcu) <l>: Now intptr_t.
308 (internal_mode, istack, isp): Likewise.
309 (bang, atsign): Use intptr_t.
310
2e60790c
TT
3112023-02-07 Tom Tromey <tom@tromey.com>
312
313 * doc/proto.str (SYNOPSIS): Don't use paramstuff.
314 * doc/chew.c (paramstuff): Remove.
315 (main): Don't add paramstuff intrinsic.
316
910081a3
TT
3172023-02-07 Tom Tromey <tom@tromey.com>
318
319 * doc/doc.str, doc/proto.str: Add copyright header.
320
8bb23cdb
TT
3212023-02-07 Tom Tromey <tom@tromey.com>
322
323 * doc/webassembly.texi (File layout): Remove second argument from
324 @node.
325 * doc/bfd.texi: Use single-argument @node everywhere.
326
1cbeca4a
TT
3272023-02-07 Tom Tromey <tom@tromey.com>
328
329 * Makefile.in: Rebuild.
330 * doc/local.mk (%D%/chew.stamp): Don't use H_CFLAGS.
331
f3d8ae90
NC
3322023-01-24 Nick Clifton <nickc@redhat.com>
333
334 PR 29998
335 * cofflink.c (_bfd_coff_generic_relocate_section): Add an
336 assertion that the output section is set for defined, global
337 symbols.
338
fd1b3e0e
XQ
3392023-01-17 Xianmiao Qu <cooper.qu@linux.alibaba.com>
340
341 * elf32-csky.c (elf32_csky_merge_attributes): Don't save
342 and restore the ARCH attribute, it will actually clear
343 the ARCH attribute.
344 (csky_elf_merge_private_bfd_data): Store the machine flag
345 correctly.
346
6f9f4481
NC
3472023-01-13 Nick Clifton <nickc@redhat.com>
348
349 * po/ro.po: Updated Romainian translation.
350
11d171f1
NC
3512023-01-11 Nick Clifton <nickc@redhat.com>
352
353 PR 29988
354 * dwarf2.c (read_indexed_address): Fix check for an out of range
355 offset.
356
59e1f50f
NC
3572023-01-06 Nick Clifton <nickc@redhat.com>
358
359 * po/ru.po: Updated Russian translation.
360
a8cf07d3
H
3612023-01-03 Himal <himalr@proton.me>
362
363 PR 29947
364 * bfdio.c (_bfd_real_fopen): Do not add a prefix to the Windows'
365 nul device filename.
366
11982f9f
NC
3672023-01-03 Nick Clifton <nickc@redhat.com>
368
369 * po/fr.po: Updated French trabslation.
370 * po/uk.po: Updated Ukrainian trabslation.
371
a72b0718
NC
3722022-12-31 Nick Clifton <nickc@redhat.com>
373
374 * 2.40 branch created.
375
8af23b30
NC
3762022-12-23 Nick Clifton <nickc@redhat.com>
377
378 PR 29936
379 * dwarf2.c (concat_filename): Fix check for a directory index off
380 the end of the directory table.
381
ea6ed58e
NC
3822022-12-21 Nick Clifton <nickc@redhat.com>
383
384 * po/ro.po: Updated Romanian translation.
385
83f18e5e
NC
3862022-12-06 Nick Clifton <nickc@redhat.com>
387
388 PR 29852
389 * elf32-arm.c (cmse_scan): Check for NULL entries in the
390 sym_hashes array.
391 (elf32_arm_gc_mark_extra_sections): Likewise.
392
942fa4fb
NC
3932022-12-05 Nick Clifton <nickc@redhat.com>
394
395 PR 29848
396 * vms-alpha.c (parse_module): Fix potential out of bounds memory
397 access.
398
6ef35c04
NC
3992022-12-01 Nick Clifton <nickc@redhat.com>
400
401 PR 25202
402 * bfd.c (VerilogDataEndianness): New variable.
403 (verilog_write_record): Use VerilogDataEndianness, if set, to
404 choose the endianness of the output.
405 (verilog_write_section): Adjust the address by the data width.
406
1a7e622b
NC
4072022-11-21 Nick Clifton <nickc@redhat.com>
408
409 PR 29764
410 * cpu-arm.c (scan): Accept machine names prefixed with "arm:".
411 * cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:".
412
5c831a3c
NC
4132022-10-19 Nick Clifton <nickc@redhat.com>
414
415 PR 29699
416 * elf.c (_bfd_elf_slurp_version_tables): Fail if the sh_info field
417 of the section header is zero.
418
efc1521e
NC
4192022-09-09 Nick Clifton <nickc@redhat.com>
420
421 PR 29532
422 * elf.c (setup_group): Do not return false if there is no group
423 information available.
424
6e7a29c7
AM
4252022-09-02 Aaron Merey <amerey@redhat.com>
426
427 * aout-target.h (MY_find_nearest_line_with_alt): New macro.
428 * bfd-in2.h: Regenerate.
429 * bfd.c (bfd_find_nearest_line_with_alt): New macro.
430 * binary.c (binary_find_nearest_line_with_alt): New macro.
431 * coff-rs6000.c (_bfd_xcoff_find_nearest_line_with_alt): New macro.
432 (rs6000_xcoff64_vec): Add coff_find_nearest_line_with_alt.
433 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Calls
434 _bfd_dwarf2_find_nearest_line_with_alt.
435 (_bfd_dwarf2_find_nearest_line_with_alt): New function. Implements the
436 former _bfd_dwarf2_find_nearest_line. Adds parameter alt_filename.
437 Attempt to open alt_filename and use it as the .dwz file if not NULL.
438 * elf-bfd.h (_bfd_elf_find_nearest_line_with_alt): New declaration.
439 * elf.c (_bfd_elf_find_nearest_line): Calls
440 _bfd_elf_find_nearest_line_with_alt.
441 (_bfd_elf_find_nearest_line_with_alt): New function. Implements the
442 former _bfd_elf_find_nearest_line. Adds parameter alt_filename.
443 * elf32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro.
444 * elf64-mips.c (bfd_elf64_find_nearest_line_with_alt): New macro.
445 * elfn32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro.
446 * elfxx-mips.h (_bfd_mips_elf_find_nearest_line_with_alt): New macro.
447 * elfxx-target.h (bfd_elfNN_find_nearest_line_with_alt): New macro.
448 * i386mdos.c (msdos_find_nearest_line_with_alt): New macro.
449 * ihex.c (ihex_find_nearest_line_with_alt): New macro.
450 * libbfd-in.h (_bfd_nosymbols_find_nearest_line_with_alt): New
451 declaration.
452 (_bfd_dwarf2_find_nearest_line_with_alt): New declaration.
453 * libbfd.h: Regenerate.
454 * libcoff-in.h (coff_find_nearest_line_with_alt): New macro.
455 * libcoff.h: Regenerate.
456 * libecoff.h (_bfd_ecoff_find_nearest_line_with_alt): New macro.
457 * mach-o.h (bfd_mach_o_find_nearest_line_with_alt): New macro.
458 * mmo.c (mmo_find_nearest_line_with_alt): New macro.
459 * pef.c (bfd_pef_find_nearest_line_with_alt): New macro.
460 * plugin.c (bfd_plugin_find_nearest_line_with_alt): New macro.
461 * ppcboot.c (ppcboot_find_nearest_line_with_alt): New macro.
462 * som.h (som_find_nearest_line_with_alt): New macro.
463 * srec.c (srec_find_nearest_line_with_alt): New macro.
464 * syms.c (_bfd_nosymbols_find_nearest_line_with_alt): New function.
465 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add symbol for
466 NAME##_find_nearest_line_with_alt.
467 (_bfd_find_nearest_line_with_alt): Add declaration.
468 * tekhex.c (tekhex_find_nearest_line_with_alt): New macro.
469 * verilog.c (verilog_find_nearest_line_with_alt): New macro.
470 * vms-alpha.c (_bfd_vms_find_nearest_line_with_alt): New macro.
471 * wasm-module.c (wasm_find_nearest_line_with_alt): New macro.
472 * xsym.c (bfd_sym_find_nearest_line_with_alt): New macro.
473
d0a122d3
FC
4742022-09-02 Frederic Cambus <fred@statdns.com>
475
476 * config.bfd (arm-*-openbsd*): Restore target.
477
37833b96
NC
4782022-08-30 Nick Clifton <nickc@redhat.com>
479
480 PR 29529
481 * dwarf2.c (struct line_info_table): Add new field:
482 use_dir_and_file_0.
483 (concat_filename): Use new field to help select the correct table
484 slot.
485 (read_formatted_entries): Do not skip entry 0.
486 (decode_line_info): Set new field depending upon the version of
487 DWARF being parsed. Initialise filename based upon the setting of
488 the new field.
489
ba86e750
FC
4902022-08-22 Frederic Cambus <fred@statdns.com>
491
492 * config.bfd (aarch64-*-openbsd*): Add target.
493
a6ad7914
AM
4942022-08-03 Nick Clifton <nickc@redhat.com>
495
496 PR 29389
497 * bfd.c (BFD_CLOSED_BY_CACHE): New bfd flag.
498 * cache.c (bfd_cache_delete): Set BFD_CLOSED_BY_DELETE on the
499 closed bfd.
500 (bfd_cache_lookup_worker): Clear BFD_CLOSED_BY_DELETE on the newly
501 reopened bfd.
502 * opncls.c (bfd_set_filename): Refuse to change the name of a bfd
503 that has been closed by bfd_cache_delete. Mark changed bfds as
504 uncacheable.
505 * bfd-in2.h: Regenerate.
506
b44cfc5d
NC
5072022-07-29 Nick Clifton <nickc@redhat.com>
508
509 PR 29424
510 * dwarf2.c (read_attribute_value): Handle DW_FORM_rnglistx and
511 DW_FORM_loclistx.
512
27121f67
NC
5132022-07-26 Nick Clifton <nickc@redhat.com>
514
515 * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix
516 indentation.
517
0bd09323
NC
5182022-07-08 Nick Clifton <nickc@redhat.com>
519
520 * 2.39 branch created.
521
5f3fc928
YR
5222022-05-19 Yvan Roux <yvan.roux@foss.st.com>
523
524 PR 25713
525 * bfdio.c (_bfd_real_fopen): Delete ccs string.
526
8e6afe40
JB
5272022-04-27 John Baldwin <jhb@FreeBSD.org>
528
529 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes.
530
0d38576a
NC
5312022-04-25 Nick Clifton <nickc@redhat.com>
532
533 PR 29072
534 * elflink.c (bfd_elf_size_dynamic_sections): Display a note to the
535 user that the current ehaviour of creating an executable stack
536 because of a missing .note.GNU-stack section is deprecated and
537 will be changed in a future release.
538
2d23f965
CC
5392022-04-20 Clément Chigot <clement.chigot@atos.net>
540
541 * coff-rs6000.c (xcoff_reloc_type_noop): Add info argument.
542 (xcoff_reloc_type_fail): Likewise.
543 (xcoff_reloc_type_pos): Likewise.
544 (xcoff_reloc_type_neg): Likewise.
545 (xcoff_reloc_type_rel): Likewise.
546 (xcoff_reloc_type_toc): Likewise.
547 (xcoff_reloc_type_ba): Likewise.
548 (xcoff_reloc_type_crel): Likewise.
549 (xcoff_reloc_type_tls): Likewise.
550 (xcoff_reloc_type_br): Add stub handler.
551 (xcoff_ppc_relocate_section): Add info to
552 xcoff_calculate_relocation.
553 (xcoff_stub_indirect_call_code): New constant.
554 (xcoff_stub_shared_call_code): Likewise.
555 (bfd_xcoff_backend_data): Add stub code fields.
556 (bfd_pmac_xcoff_backend_data): Likewise.
557 * coff64-rs6000.c (xcoff64_reloc_type_br): Add stub handler.
558 (xcoff64_ppc_relocate_section): Add info to
559 xcoff64_calculate_relocation.
560 (xcoff64_stub_indirect_call_code): New constant.
561 (xcoff64_stub_shared_call_code): Likewise.
562 (bfd_xcoff_backend_data): Add stub code fields.
563 (bfd_xcoff_aix5_backend_data): Likewise.
564 * libxcoff.h (struct xcoff_backend_data_rec): Add stub fields.
565 (bfd_xcoff_stub_indirect_call_code): New define.
566 (bfd_xcoff_stub_indirect_call_size): New define.
567 (bfd_xcoff_stub_shared_call_code): New define.
568 (bfd_xcoff_stub_shared_call_size): New define.
569 (xcoff_reloc_function): Add info argument.
570 (enum xcoff_stub_type): New enum.
571 (struct xcoff_stub_hash_entry): New structure.
572 * xcofflink.c (struct xcoff_link_hash_table): Add stub hash
573 table and params fields.
574 (xcoff_stub_hash_entry): New define.
575 (xcoff_stub_hash_lookup): New define.
576 (stub_hash_newfunc): New function.
577 (_bfd_xcoff_bfd_link_hash_table_free): Free the new stub hash
578 table.
579 (_bfd_xcoff_bfd_link_hash_table_create): Create the new stub
580 hash table.
581 (xcoff_link_add_symbols): Save rawsize for XTY_SD.
582 (bfd_xcoff_link_init): New function.
583 (xcoff_stub_csect_name): New function.
584 (xcoff_stub_get_csect_in_range): New function.
585 (xcoff_stub_name): New function.
586 (bfd_xcoff_get_stub_entry): New function.
587 (bfd_xcoff_type_of_stub): New function.
588 (xcoff_add_stub): New function.
589 (xcoff_build_one_stub): New function.
590 (bfd_xcoff_size_stubs): New function.
591 (bfd_xcoff_build_stubs): New function.
592 (xcoff_stub_create_relocations): New function.
593 (xcoff_link_input_bfd): Adapt relocations to stub.
594 (xcoff_write_global_symbol): Adapt to new TOC entries generated
595 for stubs.
596 (_bfd_xcoff_bfd_final_link): Handle stub file.
597 * xcofflink.h (struct bfd_xcoff_link_params): New structure.
598
1876a542
CC
5992022-04-20 Clément Chigot <clement.chigot@atos.net>
600
601 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Write len in
602 ldinfo->strings instead of directly in the output_bfd.
603 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
604 * xcofflink.c (struct xcoff_link_hash_table): Remove ldrel_count
605 field. Add ldinfo field.
606 (xcoff_mark_symbol): Adjust to new ldinfo field.
607 (xcoff_mark): Likewise.
608 (bfd_xcoff_link_count_reloc): Likewise.
609 (xcoff_build_loader_section): Split into two functions: one that
610 build the loader section (this function) and one that only size
611 it...
612 (xcoff_size_loader_section): ... (this function).
613 (bfd_xcoff_size_dynamic_sections): Adapt to new ldinfo field.
614 Move the part where the dynamic sections are build to ...
615 (bfd_xcoff_build_dynamic_sections): ... this function.
616 * xcofflink.h: Add bfd_xcoff_build_dynamic_sections prototype.
617
f5e76050
AGI
6182022-04-13 Alexander von Gluck IV <kallisti5@unixzen.com>
619
620 * config.bfd (x86-haiku): Add i386_pei_vec as a selectable format.
621
7d41169b
NC
6222022-04-08 Nick Clifton <nickc@redhat.com>
623
624 PR 29038
625 * coffgen.c (coff_find_nearest_line_with_names): Fix typo
626 retrieving saved bias.
627
145667f8
MH
6282022-04-07 Mark Harmstone <mark@harmstone.com>
629
630 * coff-i386.c (in_reloc_p): Add R_SECTION.
631 (howto_table): Add R_SECTION.
632 (coff_pe_i386_relocation_section): Add support for R_SECTION.
633 (coff_i386_reloc_type_lookup): Add support for
634 BFD_RELOC_16_SECCIDX.
635 * coff-x86_64.c (in_reloc_p): Add R_SECTION.
636 (howto_table): Add R_SECTION.
637 (coff_pe_amd64_relocation_section): Add support for R_SECTION.
638 (coff_amd64_reloc_type_lookup): Add support for
639 BFD_RELOC_16_SECCIDX.
640 * reloc.c: Add BFD_RELOC_16_SECIDX.
641 * bfd-in2.h: Regenerate.
642 * libbfd.h: Regenerate.
643
b5c2367c
JB
6442022-04-01 John Baldwin <jhb@FreeBSD.org>
645
646 * elf-bfd.h (elfcore_write_x86_segbases): New.
647 * elf.c (elfcore_grok_freebsd_note): Add pseudosections for
648 NT_FREEBSD_X86_SEGBASES register notes.
649 (elfcore_write_x86_segbases): New.
650 (elfcore_write_register_note): Write NT_FREEBSD_X86_SEGBASES
651 register notes.
652
e330d4c0
JB
6532022-04-01 John Baldwin <jhb@FreeBSD.org>
654
655 * elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.
656
86ed2a5e
SG
6572022-03-22 Steiner H Gunderson <steinar+sourceware@gunderson.no>
658
659 * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is
660 found, but no line number info, then return a result of 2.
661
30cbd32a
SG
6622022-03-21 Steiner H Gunderson <steinar+sourceware@gunderson.no>
663
664 PR 28978
665 * dwarf2.c (scan_unit_for_symbols): When performing second pass,
666 check to see if the function or variable being processed is the
667 same as the previous one.
668
a747a286
VP
6692022-03-18 Viorel Preoteasa <viorel.preoteasa@gmail.com>
670
671 PR 28924
672 * elf32-arm.c (THM_MAX_FWD_BRANCH_OFFSET): Fix definition.
673 (THM2_MAX_FWD_BRANCH_OFFSET): Likewise.
674
978602e8
SM
6752022-03-16 Simon Marchi <simon.marchi@efficios.com>
676
677 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES):
678 Add cpu-amdgcn.c.
679 (BFD64_BACKENDS): Add elf64-amdgcn.lo.
680 (BFD64_BACKENDS_CFILES): Add elf64-amdgcn.c.
681 * Makefile.in: Re-generate.
682 * cpu-amdgcn.c: New.
683 * elf64-amdgcn.c: New.
684 * archures.c (bfd_architecture): Add bfd_arch_amdgcn and related
685 mach defines.
686 (bfd_amdgcn_arch): New.
687 (bfd_archures_list): Add bfd_amdgcn_arch.
688 * bfd-in2.h: Re-generate.
689 * config.bfd: Handle amdgcn* target.
690 * configure.ac: Handle amdgcn_elf64_le_vec.
691 * configure: Re-generate.
692 * elf-bfd.h (elf_target_id): Add AMDGCN_ELF_DATA.
693 * targets.c (amdgcn_elf64_le_vec): New.
694 (_bfd_target_vector): Add amdgcn_elf64_le_vec.
695
ba0eb22c
NC
6962022-03-01 Torbjörn Svensson <torbjorn.svensson@st.com>
697 Fred Eisele <fredrick.eisele@gmail.com>
698
699 PR 25713
700 * bfdio.c (_bfd_real_fopen): Fix typo.
701
81c9e0f6
NC
7022022-03-01 Nick Clifton <nickc@redhat.com>
703
704 PR 28848
705 * elf32-arm.c (elf32_arm_merge_eabi_attributes): If the first
706 input bfd has a Tag_ABI_HardFP_use set to 3 but does not also have
707 TAG_FP_arch set then reset the TAG_ABI_HardFP_use.
708
cb7da2a6 7092022-02-28 Torbjörn Svensson <torbjorn.svensson@st.com>
ba0eb22c 710 Fred Eisele <fredrick.eisele@gmail.com>
cb7da2a6
TS
711
712 PR 25713
ba0eb22c 713 * bfdio.c (_bfd_real_fopen): Fix handling of paths longer than 260
cb7da2a6
TS
714 characters on Windows hosts.
715
eda240cd
NC
7162022-02-28 Nick Clifton <nickc@redhat.com>
717
718 PR 28886
719 * config.bfd: Update error message for obsolete configurations.
720
36d285b9
NC
7212022-02-17 Nick Clifton <nickc@redhat.com>
722
723 * po/sr.po: Updated Serbian translation.
724
c212f39d
FS
7252022-02-16 Fangrui Song <maskray@google.com>
726 Nick Clifton <nickc@redhat.com>
727
728 PR ld/28841
729 * bfd-in2.h (struct bfd_section): Add type.
730 (discarded_section): Add field.
731 * elf.c (elf_fake_sections): Handle bfd_section::type.
732 * section.c (BFD_FAKE_SECTION): Add field.
733 * mri.c (mri_draw_tree): Update function call.
734
5d0d011b
MF
7352022-02-11 Michael Forney <mforney@mforney.org>
736
737 * bfd.c (bfd_set_gp_value): Remove return with expression
738 in void function.
739
0f38fd87
NC
7402022-02-09 Nick Clifton <nickc@redhat.com>
741
742 * config.bfd: Move pending obsolesence targets into the definitely
743 obsolete list.
744
41ba8b76
NC
7452022-02-02 Nick Clifton <nickc@redhat.com>
746
747 PR 28834
748 * dwarf2.c (read_section): Change the heuristic that checks for
749 overlarge dwarf debug info sections.
750
c7c6e55b
SH
7512022-02-02 Stafford Horne <shorne@gmail.com>
752
753 PR 28735
754 * elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define.
755 (or1k_elf_relocate_section): Use new howto instead of trying to
756 mask out relocation bits.
757
fdf55097
RM
7582022-01-24 Roland McGrath <mcgrathr@google.com>
759
760 * doc/local.mk (%D%/bfdver.texi): Add mkdir command.
761
5fe73d46
NC
7622022-01-24 Nick Clifton <nickc@redhat.com>
763
764 * po/fr.po: Updated French translation.
765 * po/ro.po: Updated Romanian translation.
766 * po/uk.po: Updated Ukranian translation.
767
f908e960
NC
7682022-01-22 Nick Clifton <nickc@redhat.com>
769
770 * version.m4: Change to 2.38.50.
771 * configure: Regenerate.
772 * po/bfd.pot: Regenerate.
773
a74e1cb3
NC
7742022-01-22 Nick Clifton <nickc@redhat.com>
775
776 * 2.38 release branch created.
777
6c037fdb
NC
7782022-01-17 Nick Clifton <nickc@redhat.com>
779
780 * Makefile.in: Regenerate.
781 * configure: Regenerate.
782 * doc/Makefile.in: Regenerate.
783 * po/bfd.pot: Regenerate.
784
4d3605c8
NP
7852021-12-15 Nikita Popov <npv1310@gmail.com>
786
787 PR 28687
788 * dwarf1.c (parse_die): Fix undefined behaviour in range tests.
789
ee9e412f
NC
7902021-11-17 Nick Clifton <nickc@redhat.com>
791
792 PR 28452
793 * elf.c (assign_file_positions_for_non_load_sections): Replace
794 assertion with a warning message.
795
cf487499
NC
7962021-10-19 Nick Clifton <nickc@redhat.com>
797
798 * linker.c (_bfd_generic_link_add_one_symbol): Test for a NULL
799 name before checking to see if the symbol is __gnu_lto_slim.
800 * archive.c (_bfd_compute_and_write_armap): Likewise.
801
b9004024
NA
8022021-09-27 Nick Alcock <nick.alcock@oracle.com>
803
804 * configure: Regenerate.
805
b4745472
AB
8062021-09-15 Andrew Burgess <andrew.burgess@embecosm.com>
807
808 * archures.c (bfd_arch_list): Use 'char *' instead of 'char **'
809 when calculating space for a string list.
810
09a7e912
CZ
8112021-09-014 Cupertino Miranda <cmiranda@synopsys.com>
812 Claudiu Zissulescu <claziss@synopsys.com>
813
814 * arc-got.h (arc_static_sym_data): New structure.
815 (get_static_sym_data): New function.
816 (relocate_fix_got_relocs_for_got_info): Move the computation fo
817 symbol value and section to above introduced function, and use
818 this new function.
819
64dbf74d
LM
8202021-09-07 Luis Machado <luis.machado@linaro.org>
821
822 Revert: [AArch64] MTE corefile support
823
824 2021-05-21 Luis Machado <luis.machado@linaro.org>
825
826 * elf.c (elfcore_make_memtag_note_section): New function.
827 (elfcore_grok_note): Handle NT_MEMTAG note types.
828
3f1a2892
NC
8292021-09-07 Nick Clifton <nickc@redhat.com>
830
9dc2f267
NC
831 PR 28305
832 * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range
833 reloc.
834
3f1a2892
NC
835 PR 28303
836 * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of
837 range relocs.
838
3ee0cd9e
NC
8392021-08-10 Nick Clifton <nickc@redhat.com>
840
841 * po/sr.po: Updated Serbian translation.
842
5c9cbf07
NC
8432021-07-18 Nick Clifton <nickc@redhat.com>
844
845 * config.bfd: Move pending obsoletion targets to obsolete list.
846
05a1dd47
GB
8472021-07-16 Giulio Benetti <giulio.benetti@benettiengineering.com>
848
849 * elf32-or1k.c (or1k_elf_relocate_section): Use a separate entry
850 in switch case R_OR1K_INSN_REL_26 where we need to check for
851 !SYMBOL_CALLS_LOCAL() instead of !SYMBOL_REFERENCES_LOCAL().
852
51d29b8c
CC
8532021-07-14 Clément Chigot <clement.chigot@atos.net>
854
855 * libxcoff.h (struct xcoff_dwsect_name): Add DWARF name.
856 * coff-rs6000.c (xcoff_dwsect_names): Update.
857 * coffcode.h (sec_to_styp_flags): Likewise.
858 (coff_new_section_hook): Likewise.
859
f8dd3646
AM
8602021-07-10 Alan Modra <amodra@gmail.com>
861
862 * dwarf2.c (read_address): Remove accidental commit.
863 (read_ranges): Compare offset rather than pointers.
864
f1cee837
NC
8652021-07-08 Nick Clifton <nickc@redhat.com>
866
867 * po/pt.po: Updated Portuguese translation.
868
ca52626b
NC
8692021-07-07 Nick Clifton <nickc@redhat.com>
870
871 * elfcode.h (elf_swap_symbol_out): Revert accidental change that
872 removed an abort if the shndx pointer is NULL.
873
f07afc65
RO
8742021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
875
876 * sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
877 Solaris.
878
b737d304
RO
8792021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
880
881 * configure.ac: Check for strnlen declaration.
882 * configure, config.in: Regenerate.
883
ffa5352c
NC
8842021-07-07 Nick Clifton <nickc@redhat.com>
885
886 PR 28051
887 * coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in
888 order to fix problems when translating.
889 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
890 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
891 Likewise.
892 * po/bfd.pot: Regenerate.
893
235f5ef4
MM
8942021-07-06 Michael Matz <matz@suse.de>
895
896 PR ld/28021
897 * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any
898 versioning.
899
07b2745f
AM
9002021-07-06 Alan Modra <amodra@gmail.com>
901
902 PR 28055
903 * elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED.
904
b4c4b8aa
AM
9052021-07-05 Alan Modra <amodra@gmail.com>
906
907 PR 28055
908 * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put
909 and bfd_put_32 calls. Correct section limit checks.
910
346d80ef
NC
9112021-07-03 Nick Clifton <nickc@redhat.com>
912
913 * version.m4: Update version number.
914 * configure: Regenerate.
915 * po/opcodes.pot: Regenerate.
916
51419248
NC
9172021-07-03 Nick Clifton <nickc@redhat.com>
918
919 * 2.37 release branch created.
920
49910fd8
NC
9212021-07-02 Nick Clifton <nickc@redhat.com>
922
923 PR 28046
924 * dwarf2.c (read_ranges): Check that range_ptr does not exceed
925 range_end.
926
9a39f738
YS
9272021-06-30 YunQiang Su <yunqiang.su@cipunited.com>
928
929 PR mips/28009
930 * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr,
931 _bfd_mips_elf_fake_sections): Mark LTO debug info as
932 SHT_MIPS_DWARF.
933
c2ce8313
NC
9342021-06-29 Nick Clifton <nickc@redhat.com>
935
936 * config.bfd (obsolete configurations): Add netbsdpe.
937
50331d64
NC
9382021-06-22 Nelson Chu <nelson.chu@sifive.com>
939
940 * elfnn-riscv.c (riscv_pcrel_hi_reloc): Added field to store
941 the original relocation type, in case the type is converted to
942 R_RISCV_HI20.
943 (riscv_pcrel_lo_reloc): Removed unused name field.
944 (riscv_pcrel_relocs): Added comments.
945 (riscv_zero_pcrel_hi_reloc): Removed unused input_bfd.
946 (riscv_record_pcrel_hi_reloc): Updated.
947 (riscv_record_pcrel_lo_reloc): Likewise.
948 (riscv_resolve_pcrel_lo_relocs): Likewise. Check the original
949 type of auipc, to make sure the %pcrel_lo without any addends.
950 Otherwise, report dangerous relocation error.
951 (riscv_elf_relocate_section): Updated above functions are changed.
952 For R_RISCV_GOT_HI20, report dangerous relocation error when addend
953 isn't zero.
954
406b4ada
L
9552021-06-19 H.J. Lu <hongjiu.lu@intel.com>
956
957 PR ld/27998
958 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Count PLT for GOTOFF
959 relocation against IFUNC symbols.
960 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
961
83b1d8f4
L
9622021-06-19 H.J. Lu <hongjiu.lu@intel.com>
963
964 * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in
965 PDE.
966
5a767724
L
9672021-06-18 H.J. Lu <hongjiu.lu@intel.com>
968
969 * elf-properties.c (_bfd_elf_parse_gnu_properties): Handle
970 GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
971 GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
972 (elf_merge_gnu_properties): Likewise.
973
f64b9b13
AM
9742021-06-11 Alan Modra <amodra@gmail.com>
975
976 PR 27952
977 * elf-bfd.h (struct elf_obj_tdata): Add is_pie.
978 * elflink.c (elf_link_add_object_symbols): Set is_pie.
979
f75bcf7e
NC
9802021-06-09 Nick Clifton <nickc@redhat.com>
981
982 PR 27666
983 * config.bfd: Do not add the sparc_elf32_vec or sparc_elf64_vec
984 vectors to Sparc Solaris2 targets.
985
5804373d
MM
9862021-06-08 Michael Matz <matz@suse.de>
987
988 * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag.
989 (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
990
6bee34a1
JB
9912021-06-07 Jan Beulich <jbeulich@suse.com>
992
993 * dwarf2.c (read_ranges, read_rnglists): Add u suffix to constant.
994
45342c7c
AM
9952021-06-02 Alan Modra <amodra@gmail.com>
996
997 * elf-attrs.c (_bfd_elf_parse_attributes): Break out of loop if
998 subsection length is too small to cover tag and length field.
999
ef9d2565
NC
10002021-05-31 Nelson Chu <nelson.chu@sifive.com>
1001 Lifang Xia <lifang_xia@c-sky.com>
1002
1003 PR 27566
1004 * elfnn-riscv.c (struct riscv_elf_link_hash_table): New integer pointer
1005 to monitor the data segment phase.
1006 (bfd_elfNN_riscv_set_data_segment_info): New function called by
1007 after_allocation, to set the data_segment_phase from expld.dataseg.
1008 (_bfd_riscv_relax_section): Don't relax when data_segment_phase is
1009 exp_seg_relro_adjust (0x4).
1010 * elfxx-riscv.h (bfd_elf32_riscv_set_data_segment_info): New extern.
1011 (bfd_elf64_riscv_set_data_segment_info): Likewise
1012
1273b2f8
L
10132021-05-28 H.J. Lu <hongjiu.lu@intel.com>
1014
1015 PR ld/27905
1016 * elf32-i386.c: Don't include "libiberty.h".
1017 (elf_howto_table): Revert commits a7664973b24 and 50c95a739c9.
1018 (elf_i386_rtype_to_howto): Revert commit 50c95a739c9.
1019 (elf_i386_info_to_howto_rel): Likewise.
1020 (elf_i386_tls_transition): Likewise.
1021 (elf_i386_relocate_section): Likewise.
1022 * elf64-x86-64.c (x86_64_elf_howto_table): Revert commits
1023 a7664973b24 and 50c95a739c9.
1024 (elf_x86_64_rtype_to_howto): Revert commit 50c95a739c9.
1025 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Likewise.
1026 * elfxx-x86.h (elf_x86_obj_tdata): Likewise.
1027 (elf_x86_has_code16): Likewise.
1028
50c95a73
L
10292021-05-26 H.J. Lu <hongjiu.lu@intel.com>
1030
1031 PR ld/27905
1032 * elf32-i386.c: Include "libiberty.h".
1033 (elf_howto_table): Add 16-bit R_386_PC16 entry.
1034 (elf_i386_rtype_to_howto): Add a BFD argument. Use 16-bit
1035 R_386_PC16 if input has 16-bit mode instructions.
1036 (elf_i386_info_to_howto_rel): Update elf_i386_rtype_to_howto
1037 call.
1038 (elf_i386_tls_transition): Likewise.
1039 (elf_i386_relocate_section): Likewise.
1040 * elf64-x86-64.c (x86_64_elf_howto_table): Add 16-bit
1041 R_X86_64_PC16 entry.
1042 (elf_x86_64_rtype_to_howto): Use 16-bit R_X86_64_PC16 if input
1043 has 16-bit mode instructions.
1044 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Set
1045 elf_x86_has_code16 if relocatable input is marked with
1046 GNU_PROPERTY_X86_FEATURE_2_CODE16.
1047 * elfxx-x86.h (elf_x86_obj_tdata): Add has_code16.
1048 (elf_x86_has_code16): New.
1049
fe1f847d
NC
10502021-05-26 Nelson Chu <nelson.chu@sifive.com>
1051
1052 * elfxx-riscv.h (check_unknown_prefixed_ext): New bool.
1053 * elfxx-riscv.c (riscv_parse_prefixed_ext): Do not check the
1054 prefixed extension name if check_unknown_prefixed_ext is false.
1055 * elfnn-riscv.c (riscv_merge_arch_attr_info): Set
1056 check_unknown_prefixed_ext to false for linker.
1057
74fd118f
NC
10582021-05-25 Nick Clifton <nickc@redhat.com>
1059
1060 * elf32-arn.c (struct elf_arm_obj_tdata): Add num_entries field.
1061 (elf32_arm_num_entries): New macro.
1062 (elf32_arm_allocate_local_sym_info): Initialise the new field.
1063 Allocate arrays individually so that buffer overruns can be
1064 detected by memory checkers.
1065 (elf32_arm_create_local_iplt): Check num_entries.
1066 (elf32_arm_get_plt_info): Likewise.
1067 (elf32_arm_final_link_relocate): Likewise.
1068 (elf32_arm_check_relocs): Likewise.
1069 (elf32_arm_size_dynamic_sections): Likewise.
1070 (elf32_arm_output_arch_local_syms): Likewise.
1071
cc850f74
NC
10722021-05-25 Nick Clifton <nickc@redhat.com>
1073
1074 * elf32-arm.c: Fix formatting.
1075
4be1e8db
AM
10762021-05-25 Alan Modra <amodra@gmail.com>
1077
1078 * elf-attrs.c (elf_attr_strdup): New function.
1079 (_bfd_elf_attr_strdup): Use it here.
1080 (elf_add_obj_attr_string): New function, extracted from..
1081 (bfd_elf_add_obj_attr_string): ..here.
1082 (elf_add_obj_attr_int_string): New function, extracted from..
1083 (bfd_elf_add_obj_attr_int_string): ..here.
1084 (_bfd_elf_parse_attributes): Don't allocate an extra byte for a
1085 string terminator. Instead ensure parsing doesn't go past
1086 end of sub-section. Use size_t variables for lengths.
1087
574ec108
AM
10882021-05-22 Alan Modra <amodra@gmail.com>
1089
1090 * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter.
1091 Replace data pointer with pointer to pointer. Increment pointer
1092 over bytes read.
1093 * libbfd-in.h (_bfd_safe_read_leb128): Update prototype.
1094 * elf-attrs.c (_bfd_elf_parse_attributes): Adjust to suit. Be
1095 careful not to increment data pointer past end. Remove now
1096 redundant pr17512 check.
1097 * wasm-module.c (READ_LEB128): Adjust to suit changes to
1098 _bfd_safe_read_leb128.
1099 * dwarf2.c (read_n_bytes): New inline function, old one renamed to..
1100 (read_blk): ..this. Allocate and return block. Increment bfd_byte**
1101 arg.
1102 (read_3_bytes): New function.
1103 (read_1_byte, read_1_signed_byte, read_2_bytes, read_4_bytes),
1104 (read_8_bytes, read_string, read_indirect_string),
1105 (read_indirect_line_string, read_alt_indirect_string): Take a
1106 byte_byte** arg which is incremented over bytes read. Remove any
1107 bytes_read return. Rewrite limit checks to compare lengths
1108 rather than pointers.
1109 (read_abbrevs, read_attribute_value, read_formatted_entries),
1110 (decode_line_info, find_abstract_instance, read_ranges),
1111 (read_rnglists, scan_unit_for_symbols, parse_comp_unit),
1112 (stash_comp_unit): Adjust to suit. Rewrite limit checks to
1113 compare lengths rather than pointers.
1114 * libbfd.h: Regenerate.
1115
894982bf
LM
11162021-05-21 Luis Machado <luis.machado@linaro.org>
1117
1118 * elf.c (elfcore_make_memtag_note_section): New function.
1119 (elfcore_grok_note): Handle NT_MEMTAG note types.
1120
427e4066
AB
11212021-05-20 Andrew Burgess <andrew.burgess@embecosm.com>
1122
1123 * section.c (bfd_get_section_by_name): Return NULL if name is
1124 NULL.
1125 (bfd_get_section_by_name_if): Likewise.
1126 * dwarf2.c (read_section): Remove unneeded NULL check.
1127 (find_debug_info): Likewise.
1128
83b0a686
NC
11292021-05-19 Nick Clifton <nickc@redhat.com>
1130
1131 * plugin.c (bfd_plugin_open_input): Inform the user if the limit
1132 on the number of open files is reached. If possible, try to
1133 increase this limit before failing.
1134
75f03fa7
NC
11352021-05-14 Nelson Chu <nelson.chu@sifive.com>
1136
1137 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Check the values
1138 of %pcrel_hi, before and after adding the addend. Make sure the
1139 value won't be changed, otherwise, report dangerous error.
1140
7671eff8
NC
11412021-05-13 Nelson Chu <nelson.chu@sifive.com>
1142
1143 * elfxx-riscv.c (check_implicit_always): The check_func, always add
1144 the implicit subset without checking.
1145 (check_implicit_for_i): The check_func for i, only add zicsr and
1146 zifencei when the version of i less than 2.1.
1147 (struct riscv_implicit_subset): Record the subsets and their
1148 corresponding implicit subsets.
1149 (riscv_implicit_subsets): Table records all implicit informations.
1150 (riscv_parse_add_implicit_subsets): Updated and add implicit subsets
1151 according to riscv_implicit_subsets. Remove the redundant codes.
1152
4863cddb
AM
11532021-05-13 Alan Modra <amodra@gmail.com>
1154
1155 PR 27858
1156 * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid
1157 reloc howto.
1158
f0bbe8ba
LM
11592021-05-12 Luis Machado <luis.machado@linaro.org>
1160
1161 * elf-bfd.h (elfcore_write_aarch_mte): New prototype.
1162 * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New
1163 functions.
1164 (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL.
1165 (elfcore_write_register_note): Handle MTE notes.
1166
8ca5537b
AM
11672021-05-11 Alan Modra <amodra@gmail.com>
1168
1169 PR 27844
1170 * pdp11.c (aout_get_external_symbols): Clear first four bytes of
1171 strings array, not just the first byte.
1172 * aoutx.h (aout_get_external_symbols): Likewise.
1173
b397aef4
L
11742021-05-10 H.J. Lu <hongjiu.lu@intel.com>
1175
1176 PR binutils/27839
1177 * simple.c (bfd_simple_get_relocated_section_contents): Remove
1178 strayed fprintf.
1179
23182ac0
NC
11802021-05-10 Nick Clifton <nickc@redhat.com>
1181
1182 PR 27839
1183 * simple.c (simple_dummy_add_to_set): New function.
1184 (simple_dummy_constructor): New function.
1185 (simple_dummy_multiple_common): New function.
1186 (bfd_simple_get_relocated_section_contents): Zero out the
1187 callbacks structure, and then set the add_to_set, constructor and
1188 multiple_common fields.
1189
5b45e89f
DD
11902021-05-10 Dimitar Dimitrov <dimitar@dinux.eu>
1191
1192 * elf32-pru.c (elf_backend_can_gc_sections): Define as 1.
1193
cf758b39
MF
11942021-05-08 Mike Frysinger <vapier@gentoo.org>
1195
1196 * doc/Makefile.am (html-local, bfd/index.html): New targets.
1197 * doc/Makefile.in: Regenerate.
1198
2faf902d
MF
11992021-05-08 Mike Frysinger <vapier@gentoo.org>
1200
1201 * doc/Makefile.am (AM_MAKEINFOFLAGS): Define.
1202 * doc/Makefile.in: Regenerate.
1203
97834047
CC
12042021-05-07 Clément Chigot <clement.chigot@atos.net>
1205
1206 * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
1207 sections.
1208 * coffgen.c (coff_pointerize_aux): Handle C_DWARF.
1209 (coff_print_symbol): Likewise.
1210 * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
1211
17c6c3b9
JB
12122021-05-07 Jan Beulich <jbeulich@suse.com>
1213
1214 * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields
1215 to zero.
1216
a41513ef
AM
12172021-05-07 Alan Modra <amodra@gmail.com>
1218
1219 * bfd-in2.h: Regenerate.
1220 * libbfd.h: Regenerate.
1221
284a1309
SH
12222021-05-06 Stafford Horne <shorne@gmail.com>
1223
1224 PR 27746
1225 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT,
1226 OR1K_ADD, OR1K_ORI): New macros to help with plt creation.
1227 (elf_or1k_link_hash_table): New field plt_count.
1228 (elf_or1k_link_hash_entry): New field plt_index.
1229 (elf_or1k_plt_entry_size): New function.
1230 (or1k_write_plt_entry): Update to support variable size PLTs.
1231 (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry
1232 API.
1233 (or1k_elf_finish_dynamic_symbol): Update to write large PLTs
1234 when needed.
1235 (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for
1236 PLT size.
1237
3c3de29b
SH
12382021-05-06 Stafford Horne <shorne@gmail.com>
1239
1240 PR 21464
1241 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16
1242 overflow check if we have R_OR1K_GOT_AHI16 followed by
1243 R_OR1K_GOT16.
1244
0b3e14c9
SH
12452021-05-06 Stafford Horne <shorne@gmail.com>
1246
1247 PR 21464
1248 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
1249 * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
1250 (or1k_final_link_relocate, or1k_elf_relocate_section,
1251 or1k_elf_check_relocs): Likewise.
1252 * libbfd.h (bfd_reloc_code_real_names): Likewise.
1253 * reloc.c: Likewise.
1254
a76ef689
SH
12552021-05-06 Stafford Horne <shorne@gmail.com>
1256
1257 PR 27624
1258 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change
1259 condition used to cleanup plt entries to cleanup forced local
1260 entries.
1261
4467df35
L
12622021-05-05 H.J. Lu <hongjiu.lu@intel.com>
1263
1264 PR ld/27825
1265 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT"
1266 to local symbols.
1267
c38c6234
AM
12682021-05-05 Alan Modra <amodra@gmail.com>
1269
1270 * vms-lib.c (vms_traverse_index): Account for vms_kbn size when
1271 sanity checking keylen.
1272
bd6d8601
NC
12732021-05-04 Nick Clifton <nickc@redhat.com>
1274
1275 * libbfd.c (bfd_malloc): Provide some documenation. Treat a size
1276 of 0 as 1.
1277 (bfd_realloc): Likewise.
1278 (bfd_zmalloc): Likewise.
1279 (bfd_realloc_or_free): Provide some documentation. Treat a size
1280 of 0 as a request to free.
1281 * libbfd-in.h (bfd_realloc): Remove prototype.
1282 (bfd_realloc_or_free): Remove prototype.
1283 (bfd_zmalloc): Remove prototype.
1284 * libbfd.h: Regenerate.
1285
4c398cc0
JB
12862021-05-03 Jan Beulich <jbeulich@suse.com>
1287
1288 * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to
1289 complain_overflow_dont.
1290 * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit
1291 relocs to complain_overflow_dont.
1292
49160308
AM
12932021-05-03 Alan Modra <amodra@gmail.com>
1294
1295 * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak
1296 symbols when -z dynamic-undefined-weak or when there are no
1297 dynamic relocs in read-only sections and -z nodynamic-undefined-weak
1298 is not given.
1299 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1300
b2936612
AM
13012021-05-03 Alan Modra <amodra@gmail.com>
1302
1303 * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for
1304 weak undefined symols that only appear on PLT relocs.
1305 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1306
337d0bf8
AM
13072021-05-03 Alan Modra <amodra@gmail.com>
1308
1309 PR 27755
1310 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.
1311
5072b52d
AM
13122021-05-03 Alan Modra <amodra@gmail.com>
1313
1314 * elf32-csky.c (is_mapping_symbol_name): New function.
1315 (csky_elf_is_target_special_symbol): Likewise.
1316 (csky_elf_maybe_function_sym): Likewise.
1317 (bfd_elf32_bfd_is_target_special_symbol): Define.
1318 (elf_backend_maybe_function_sym): Define.
1319
d1fbc3ba
NC
13202021-04-30 Nick Clifton <nickc@redhat.com>
1321
1322 PR 27801
1323 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
1324 read 32-bit value.
1325
9f84cb38
NC
13262021-04-30 Nick Clifton <nickc@redhat.com>
1327
1328 PR 27799
1329 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
1330 that are too small.
1331
6cb40a67
NC
13322021-04-30 Nick Clifton <nickc@redhat.com>
1333
1334 PR 27797
1335 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
1336 been realloc'ed to size 0.
1337
bceb87ef
NC
13382021-04-30 Nick Clifton <nickc@redhat.com>
1339
1340 PR 27795
1341 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
1342 lengths.
1343
09e40e44
NC
13442021-04-29 Nick Clifton <nickc@redhat.com>
1345
1346 PR 27793
1347 * som.c (som_slurp_symbol_table): Assign symbols without any scope
1348 to the undefined section.
1349 (som_decode_symclass): Check for a missing symbol section.
1350 * syms.c (bfd_decode_symclass): Likewise.
1351
063e75c9
NC
13522021-04-29 Nick Clifton <nickc@redhat.com>
1353
1354 PR 27792
1355 * som.c (som_slurp_string_table): Place a terminating NUL byte at
1356 the end of the table.
1357 (som_slurp_symbol_table): Check for an over-large offset into the
1358 string string table.
1359
24aebc79
NC
13602021-04-28 Nick Clifton <nickc@redhat.com>
1361
1362 * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin
1363 symbols as potential function symbols.
1364 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise.
1365 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
1366 * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise.
1367
3955e346
MF
13682021-04-26 Mike Frysinger <vapier@gentoo.org>
1369
1370 * elf-bfd.h: Include stdlib.h.
1371
a7664973
JB
13722021-04-26 Jan Beulich <jbeulich@suse.com>
1373
1374 * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to
1375 complain_overflow_signed.
1376 * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16
1377 to complain_overflow_signed.
1378
f5e98b7d
EB
13792021-04-23 Eric Botcazou <ebotcazou@adacore.com>
1380
1381 * elf.c (special_sections_p): Add .persistent.bss.
1382
c21346c5
JB
13832021-04-23 Jan Beulich <jbeulich@suse.com>
1384
1385 * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero
1386 size field.
1387 * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL
1388 has zero size field.
1389
bdd2aaf6
CC
13902021-04-22 Clément Chigot <clement.chigot@atos.net>
1391
1392 * hash.c (struct bfd_strtab_hash): Remove xcoff field.
1393 Add length_field_size field.
1394 (_bfd_stringtab_init): Change prototype.
1395 Adapt to new length_field_size.
1396 (_bfd_xcoff_stringtab_init): Likewise.
1397 (_bfd_stringtab_add): Likewise.
1398 (_bfd_stringtab_emit): Likewise.
1399 * libbfd-in.h (_bfd_xcoff_stringtab_init):
1400 Change prototype.
1401 * libbfd.h: Regenerate.
1402 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
1403 Call _bfd_xcoff_stringtab_init with isxcoff64 value.
1404
b11b2969
CC
14052021-04-22 Clément Chigot <clement.chigot@atos.net>
1406
1407 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for
1408 unsupported storage class or auxialiry entries.
1409 Improve and adapt to new aux structures.
1410 Add C_DWARF support.
1411 (_bfd_xcoff_swap_aux_out): Likewise.
1412 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
1413 (_bfd_xcoff64_swap_aux_out): Likewise.
1414
18e9a809
EZ
14152021-04-21 Eli Zaretskii <eliz@gnu.org>
1416
1417 PR 27760
1418 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
1419 of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
1420 IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
1421 Decode the contents of the DllCharacteristics field.
1422
33fe00c1
NC
14232021-04-21 Nick Clifton <nickc@redhat.com>
1424
1425 PR 27759
1426 * srec.c (srec_read_section): Replace assertions with error
1427 returns.
1428
c5df7e44
CC
14292021-04-20 Clément Chigot <clement.chigot@atos.net>
1430
1431 PR binutils/21700
1432 * reloc.c (BFD_RELOC_PPC_NEG): New relocation.
1433 * bfd-in2.h: Regenerate.
1434 * libbfd.h: Regenerate.
1435 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add
1436 BFD_RELOC_PPC_NEG handler.
1437 (xcoff_reloc_type_neg): Correctly substract addend.
1438 * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32
1439 howto.
1440 (xcoff64_rtype2howto): Add handler for R_NEG_32.
1441 (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler.
1442 * xcofflink.c (xcoff_need_ldrel_p): Check output section
1443 for R_POS-like relocations. New argument added.
1444 (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument.
1445 (xcoff_link_input_bfd): Likewise.
1446
6f8f6017
AM
14472021-04-16 Alan Modra <amodra@gmail.com>
1448
1449 PR 27567
1450 * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags.
1451 (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT,
1452 ignore alignment checks when return is false. Formatting.
1453
ddfe525f
NC
14542021-04-15 Nelson Chu <nelson.chu@sifive.com>
1455
1456 PR27584
1457 * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to
1458 omit local and empty symbols since they usually generated to
1459 mark the auipc instructions.
1460
f6a1f957
LX
14612021-04-15 Lifang Xia<lifang_xia@c-sky.com>
1462
1463 * elf32-csky.c (csky_elf_howto_table)
1464 <R_CKCORE_PCREL_IMM16BY2>: Set special_function to
1465 bfd_elf_generic_reloc.
1466 <R_CKCORE_PCREL_IMM16BY4>: Likewise.
1467 <R_CKCORE_PCREL_IMM10BY4>: Likewise.
1468 <R_CKCORE_PCREL_IMM18BY2>: Likewise.
1469 <R_CKCORE_PCREL_FLRW_IMM8BY4>: Likewise.
1470
9917b559
L
14712021-04-14 H.J. Lu <hongjiu.lu@intel.com>
1472
1473 PR binutils/27708
1474 * elf.c (assign_file_positions_for_non_load_sections): Set
1475 p_memsz to p_filesz for the loadable PT_NOTE segment.
1476
5f47741b
FC
14772021-04-14 Frederic Cambus <fred@statdns.com>
1478
1479 * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
1480 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
1481
8985b74b
AM
14822021-04-14 Alan Modra <amodra@gmail.com>
1483
1484 PR 27631
1485 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
1486 when hh might be NULL, test for NULL first.
1487
c9f9a78d
AM
14882021-04-14 Alan Modra <amodra@gmail.com>
1489
1490 PR 27630
1491 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
1492 hash might be NULL, cast instead.
1493
d2f1139e
CC
14942021-04-13 Clément Chigot <clement.chigot@atos.net>
1495
1496 * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
1497
e3839c10
NC
14982021-04-13 Nelson Chu <nelson.chu@sifive.com>
1499
1500 * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning
1501 when the version of input or output is RISCV_UNKNOWN_VERSION, since
1502 the extension is added implicitly.
1503 * elfxx-riscv.c: Updated the obsolete comments.
1504 (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h.
1505 * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
1506
43e05cd4
AM
15072021-04-12 Alan Modra <amodra@gmail.com>
1508
1509 * elf-bfd.h (ENABLE_CHECKING): Define.
1510 (elf_link_hash_lookup): Abort if wrong type of hash table.
1511 * configure.ac (--enable-checking): Add support.
1512 * config.in: Regenerate.
1513 * configure: Regenerate.
1514
2cc15b10
AM
15152021-04-12 Alan Modra <amodra@gmail.com>
1516
1517 * elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
1518 (elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
1519 (elf_hash_table, elf_hash_table_id): Likewise.
1520 * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
1521 is_elf_hash_table check.
1522 * elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
1523 * elf32-hppa.c (clobber_millicode_symbols): Correct param types.
1524 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1525 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
1526 (elfNN_ia64_global_dyn_sym_thunk: Likewise.
1527 * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
1528 (elf64_ia64_global_dyn_sym_thunk): Likewise.
1529 (elf64_vms_link_add_object_symbols): Pass base type of hash table
1530 to is_elf_hash_table.
1531 * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
1532 (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
1533 (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
1534 (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
1535 (bfd_elf_final_link): Likewise.
1536 * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
1537 * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup.
1538
b585e899
AM
15392021-04-12 Alan Modra <amodra@gmail.com>
1540
1541 * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry*
1542 from elf_backend_archive_symbol_lookup.
1543 (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*.
1544 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check
1545 we have a ppc_hash_table before accessing ppc_link_hash_entry
1546 fields.
1547 * elflink.c (_bfd_elf_archive_symbol_lookup): Return
1548 bfd_link_hash_entry*.
1549 (elf_link_add_archive_symbols): Adjust to suit.
1550
f5b10973
NC
15512021-04-12 Nelson Chu <nelson.chu@sifive.com>
1552
1553 * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
1554 i-ext when expanding g-ext.
1555
f0bae255
NC
15562021-04-12 Nelson Chu <nelson.chu@sifive.com>
1557
1558 * elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
1559 (riscv_parse_add_subset): Always add the implicit extensions, even if
1560 their versions are RISCV_UNKNOWN_VERSION.
1561 (riscv_parse_std_ext): Delay to add i-ext as the implicit extension
1562 in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the
1563 implicit extension after it has been expanded.
1564 (riscv_parse_add_implicit_subsets): Updated.
1565
e601909a
NC
15662021-04-12 Nelson Chu <nelson.chu@sifive.com>
1567
1568 * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward.
1569 (riscv_std_s_ext_strtab): Likewise.
1570 (riscv_std_h_ext_strtab): Likewise.
1571 (riscv_std_zxm_ext_strtab): Added for the zxm prefix.
1572 (enum riscv_prefix_ext_class): Moved forward and renamed from
1573 riscv_isa_ext_class. Reorder them according to the parsing order,
1574 since the enum values are used to check the orders in the
1575 riscv_compare_subsets.
1576 (struct riscv_parse_prefix_config): Moved forward and renamed from
1577 riscv_parse_config_t. Also removed the ext_valid_p field, the
1578 related functions are replaced by riscv_valid_prefixed_ext.
1579 (parse_config): Moved forward and updated. The more letters of the
1580 prefix string, the more forward it must be defined. Otherwise, we
1581 will get the wrong mapping when using strncmp in riscv_get_prefix_class.
1582 (riscv_get_prefix_class): Moved forward. Support to parse the
1583 multi-letter prefix, like zxm.
1584 (riscv_known_prefixed_ext): New function, check if the prefixed
1585 extension is supported according to the right riscv_std_*_ext_strtab.
1586 (riscv_valid_prefixed_ext): New function, used to replace the
1587 riscv_ext_*_valid_p functions.
1588 (riscv_init_ext_order): Do not set the values for prefix keywords
1589 since they may have multiple letters for now.
1590 (riscv_compare_subsets): Set the order values of prefix keywords
1591 to negative numbers according to the riscv_prefix_ext_class.
1592 (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we
1593 have parsed the prefixed extensions.
1594 (riscv_parse_prefixed_ext): Updated and removed the parameter config.
1595 Report error when the prefix is unknown.
1596 (riscv_parse_subset): Do not parse the prefixed extensions according
1597 to the orders in the parse_config. Remove the confused message and
1598 let riscv_parse_prefixed_ext to report the details.
1599 * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c.
1600 (riscv_get_prefix_class): Removed to static.
1601
eec8bf7e
MF
16022021-04-08 Mike Frysinger <vapier@gentoo.org>
1603
1604 * configure.ac (ACX_BUGURL): Use https://.
1605 * configure.com (COPY_TEXT): Likewise.
1606 * configure: Regenerate.
1607
83c79df8
AM
16082021-04-05 Alan Modra <amodra@gmail.com>
1609
1610 * configure.ac: Don't check for long long or long double type.
1611 Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
1612 strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check
1613 for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
1614 vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS.
1615 (AC_ISC_POSIX): Don't invoke.
1616 (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise.
1617 * sysdep.h: Remove many HAVE_*_H checks and fallback declarations.
1618 Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder
1619 header order as per automake AC_INCLUDES_DEFAULT.
1620 * bfd-in.h: Include inttypes.h unconditionally.
1621 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and
1622 long double are available.
1623 (bfd_scan_vma): Assume long long and strtoull are available.
1624 * elflink.c: Include limits.h unconditionally.
1625 * elfnn-riscv.c: Likewise.
1626 * wasm-module.c: Likewise.
1627 * hpux-core.c: Include dirent.h unconditionally.
1628 * trad-core.c: Likewise.
1629 * hosts/x86-64linux.h: Include stdlib.h unconditionally.
1630 * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks.
1631 * elf32-m68hc1x.c: Don't include alloca-conf.h.
1632 * elf64-hppa.c: Likewise.
1633 * som.c: Likewise.
1634 * wasm-module.c: Likewise.
1635 * xsym.c: Likewise.
1636 * bfd-in2.h: Regenerate.
1637 * config.in: Regenerate.
1638 * configure: Regenerate.
1639
74edb473
TC
16402021-04-01 Tamar Christina <tamar.christina@arm.com>
1641
1642 PR ld/26659
1643 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
1644
e9b095a5
ML
16452021-04-01 Martin Liska <mliska@suse.cz>
1646
1647 * ecoff.c (strneq): Remove strneq and use startswith.
1648 (_bfd_ecoff_slurp_armap): Likewise.
1649
3f3328b8
ML
16502021-04-01 Martin Liska <mliska@suse.cz>
1651
1652 * elf-bfd.h (bfd_section_is_ctf): Use startswith function.
1653 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1654 (elf_get_reloc_section): Likewise.
1655 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
1656 * elf32-m32r.c (m32r_elf_section_flags): Likewise.
1657 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise.
1658 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
1659 (nds32_elf_relocate_section): Likewise.
1660 (nds32_elf_action_discarded): Likewise.
1661 (nds32_elf_check_relocs): Likewise.
1662 (nds32_elf_section_flags): Likewise.
1663 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1664 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1665 * elf32-rx.c (rx_table_find): Likewise.
1666 (rx_table_map): Likewise.
1667 * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise.
1668 (spu_elf_find_overlays): Likewise.
1669 (needs_ovl_stub): Likewise.
1670 (allocate_spuear_stubs): Likewise.
1671 (build_spuear_stubs): Likewise.
1672 (mark_overlay_section): Likewise.
1673 (spu_elf_auto_overlay): Likewise.
1674 (spu_elf_output_symbol_hook): Likewise.
1675 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
1676 * elf32-xtensa.c (xtensa_property_section_name): Likewise.
1677 * elf64-ppc.c (ppc64_elf_section_flags): Likewise.
1678 (ppc64_elf_relocate_section): Likewise.
1679 * elflink.c (resolve_section): Likewise.
1680 (UNARY_OP): Likewise.
1681 (BINARY_OP_HEAD): Likewise.
1682 (elf_link_input_bfd): Likewise.
1683 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
1684 * elfxx-riscv.c (riscv_parse_subset): Likewise.
1685 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
1686 * opncls.c (get_build_id): Likewise.
1687
65c5fbd4
AM
16882021-03-31 Alan Modra <amodra@gmail.com>
1689
1690 PR 27671
1691 * bfd-in.h: Don't poison FALSE or TRUE.
1692 * bfd-in2.h: Regenerate.
1693
0a1b45a2
AM
16942021-03-31 Alan Modra <amodra@gmail.com>
1695
1696 * sysdep.h: POISON_BFD_BOOLEAN: Define.
1697 * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
1698 * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
1699 * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
1700 * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
1701 * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
1702 * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
1703 * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
1704 * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
1705 * coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
1706 * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
1707 * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
1708 * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
1709 * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
1710 * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
1711 * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
1712 * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
1713 * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
1714 * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
1715 * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
1716 * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
1717 * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
1718 * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
1719 * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
1720 * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
1721 * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
1722 * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
1723 * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
1724 * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
1725 * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
1726 * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
1727 * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
1728 * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
1729 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
1730 * elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
1731 * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
1732 * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
1733 * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
1734 * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
1735 * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
1736 * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1737 * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
1738 * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
1739 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
1740 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1741 * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
1742 * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1743 * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
1744 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
1745 * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
1746 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
1747 * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
1748 * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
1749 * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
1750 * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
1751 * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
1752 * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1753 * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
1754 * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
1755 * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1756 * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
1757 * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
1758 * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
1759 * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
1760 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
1761 * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
1762 * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
1763 * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
1764 * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
1765 * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
1766 * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
1767 * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
1768 * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
1769 * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
1770 * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
1771 * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
1772 * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
1773 * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
1774 * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
1775 * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
1776 * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
1777 * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
1778 * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
1779 * xsym.h: Replace bfd_boolean with bool, FALSE with false, and
1780 TRUE with true throughout.
1781 * bfd-in2.h: Regenerate.
1782 * libbfd.h: Regenerate.
1783 * libcoff.h: Regenerate.
1784
ad9e24ad
AM
17852021-03-31 Alan Modra <amodra@gmail.com>
1786
1787 * bfd-in.h: Include stdbool.h.
1788 (bfd_boolean): Define as bool
1789 * bfd-in2.h: Regenerate.
1790
3dfb1b6d
AM
17912021-03-31 Alan Modra <amodra@gmail.com>
1792
1793 * .gitignore: Delete bfd_stdint.h entry.
1794 * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
1795 (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
1796 * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
1797 * configure.ac: Don't invoke GCC_HEADER_STDINT.
1798 * configure.com: Don't create bfd_stdint.h.
1799 * Makefile.in: Regenerate.
1800 * aclocal.m4: Regenerate.
1801 * bfd-in2.h: Regenerate.
1802 * config.in: Regenerate.
1803 * configure: Regenerate.
1804 * doc/Makefile.in: Regenerate.
1805 * po/BLD-POTFILES.in: Regenerate.
1806
57ae980e
AM
18072021-03-31 Alan Modra <amodra@gmail.com>
1808
1809 * bfd-in.h: Include string.h.
1810 (LITMEMCPY, LITSTRCPY): Delete.
1811 * bfd-in2.h: Regenerate.
1812
d1cbe007
AM
18132021-03-30 Alan Modra <amodra@gmail.com>
1814
1815 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
1816 unless is_elf_hash_table.
1817
63b4cc53
AM
18182021-03-29 Alan Modra <amodra@gmail.com>
1819
1820 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
1821 to bfd_boolean.
1822 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
1823 against FALSE.
1824 * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
1825 (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
1826 (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
1827 (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
1828 * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
1829 * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
1830 * elf32-rx.c (rx_set_section_contents): Likewise.
1831 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1832 * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
1833 * mach-o.c (bfd_mach_o_read_command): Likewise.
1834 * targets.c (bfd_get_target_info): Likewise.
1835
f4f9ede0
AM
18362021-03-29 Alan Modra <amodra@gmail.com>
1837
1838 * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
1839 * elf32-z80.c (z80_is_local_label_name): Likewise.
1840 * elf32-spu.c (spu_elf_modify_headers): Likewise.
1841 * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
1842 Change type to int.
1843 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
1844 for error return from vms_write_data_block.
1845
1201fda6
AM
18462021-03-29 Alan Modra <amodra@gmail.com>
1847
1848 * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
1849 * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
1850 (elf64_ia64_local_dyn_sym_thunk): Likewise.
1851 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
1852 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
1853 (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
1854 * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
1855 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
1856 * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
1857 (riscv_pcrel_reloc_eq): Likewise.
1858 (riscv_elf_finish_local_dynamic_symbol): Likewise.
1859 * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
1860 (finish_local_dynamic_symbol): Likewise.
1861 * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
1862 * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
1863 (mips_elf_count_got_symbols): Change return type to bfd_boolean.
1864
37bb890f
AM
18652021-03-29 Alan Modra <amodra@gmail.com>
1866
1867 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
1868 a void pointer.
1869 (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
1870 elf_link_output_symstrtab when calling output_arch_syms and
1871 output_arch_local_syms.
1872 * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
1873 elf_backend_output_arch_local_syms>): Change return type of func
1874 arg to match elf_link_output_symstrtab.
1875 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
1876 return type.
1877 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
1878 (nds32_elf_output_arch_syms): Correct func return type.
1879
0f684201
AM
18802021-03-29 Alan Modra <amodra@gmail.com>
1881
1882 * elf-m10200.c (mn10200_elf_relocate_section): Return int.
1883 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1884 * elf32-arc.c (elf_arc_relocate_section): Likewise.
1885 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1886 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1887 * elf32-bfin.c (bfin_relocate_section): Likewise.
1888 (bfinfdpic_relocate_section): Likewise.
1889 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1890 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1891 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1892 * elf32-csky.c (csky_elf_relocate_section): Likewise.
1893 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1894 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1895 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1896 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1897 * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
1898 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1899 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1900 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1901 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1902 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1903 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1904 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1905 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1906 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1907 * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
1908 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1909 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1910 * elf32-mep.c (mep_elf_relocate_section): Likewise.
1911 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1912 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1913 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1914 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1915 * elf32-mt.c (mt_elf_relocate_section): Likewise.
1916 * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
1917 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1918 * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
1919 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1920 * elf32-pru.c (pru_elf32_relocate_section): Likewise.
1921 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1922 * elf32-rx.c (rx_elf_relocate_section): Likewise.
1923 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1924 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1925 (_bfd_score_elf_relocate_section): Likewise.
1926 * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
1927 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1928 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1929 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1930 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1931 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1932 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1933 * elf32-visium.c (visium_elf_relocate_section): Likewise.
1934 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1935 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1936 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1937 * elf32-z80.c (z80_elf_relocate_section): Likewise.
1938 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1939 (elf64_alpha_relocate_section): Likewise.
1940 * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
1941 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1942 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1943 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1944 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1945 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1946 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1947 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1948 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1949 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1950 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1951 * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
1952 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1953 * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
1954 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1955 * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
1956
ff5b3e14
KS
19572021-03-26 Keith Seitz <keiths@redhat.com>
1958
1959 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
1960 offset of program headers after calling elf_read_notes.
1961
f596b03f
JB
19622021-03-23 Jan Beulich <jbeulich@suse.com>
1963
1964 * dwarf2.c (read_indexed_string): Rename index to idx.
1965
08dedd66
ML
19662021-03-22 Martin Liska <mliska@suse.cz>
1967
1968 * bfd-in.h (startswith): Add startswith function.
1969 (CONST_STRNEQ): Remove.
1970 * bfd-in2.h (startswith): Regenerate with make headers.
1971 * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
1972 (_bfd_slurp_extended_name_table): Likewise.
1973 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1974 * bfd.c (bfd_get_sign_extend_vma): Likewise.
1975 (bfd_convert_section_size): Likewise.
1976 (bfd_convert_section_contents): Likewise.
1977 * coff-stgo32.c (go32exe_create_stub): Likewise.
1978 (go32exe_check_format): Likewise.
1979 * coffcode.h (styp_to_sec_flags): Likewise.
1980 (GNU_DEBUGALTLINK): Likewise.
1981 * coffgen.c (_bfd_coff_section_already_linked): Likewise.
1982 (coff_gc_sweep): Likewise.
1983 (bfd_coff_gc_sections): Likewise.
1984 * cofflink.c (coff_link_add_symbols): Likewise.
1985 (process_embedded_commands): Likewise.
1986 * compress.c (bfd_is_section_compressed_with_header): Likewise.
1987 (bfd_init_section_decompress_status): Likewise.
1988 * dwarf2.c (find_debug_info): Likewise.
1989 (place_sections): Likewise.
1990 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
1991 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1992 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1993 (assign_section_numbers): Likewise.
1994 (elfcore_grok_win32pstatus): Likewise.
1995 * elf32-arm.c (cmse_scan): Likewise.
1996 (elf32_arm_gc_mark_extra_sections): Likewise.
1997 (elf32_arm_size_dynamic_sections): Likewise.
1998 (is_arm_elf_unwind_section_name): Likewise.
1999 * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
2000 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
2001 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
2002 * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
2003 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
2004 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
2005 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
2006 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
2007 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2008 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
2009 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
2010 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
2011 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
2012 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2013 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2014 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
2015 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
2016 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
2017 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
2018 (elf32_tic6x_size_dynamic_sections): Likewise.
2019 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
2020 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
2021 (xtensa_is_insntable_section): Likewise.
2022 (xtensa_is_littable_section): Likewise.
2023 (xtensa_is_proptable_section): Likewise.
2024 (xtensa_property_section_name): Likewise.
2025 (xtensa_callback_required_dependence): Likewise.
2026 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
2027 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
2028 * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
2029 (get_reloc_section): Likewise.
2030 (elf64_ia64_size_dynamic_sections): Likewise.
2031 (elf64_ia64_object_p): Likewise.
2032 * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
2033 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
2034 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2035 * elflink.c (elf_link_add_object_symbols): Likewise.
2036 (_bfd_elf_gc_mark_extra_sections): Likewise.
2037 (bfd_elf_parse_eh_frame_entries): Likewise.
2038 (_bfd_elf_section_already_linked): Likewise.
2039 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
2040 * elfnn-ia64.c (is_unwind_section_name): Likewise.
2041 (elfNN_ia64_size_dynamic_sections): Likewise.
2042 (elfNN_ia64_object_p): Likewise.
2043 * elfxx-mips.c (FN_STUB_P): Likewise.
2044 (CALL_STUB_P): Likewise.
2045 (CALL_FP_STUB_P): Likewise.
2046 (_bfd_mips_elf_section_from_shdr): Likewise.
2047 (_bfd_mips_elf_fake_sections): Likewise.
2048 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2049 (_bfd_mips_final_write_processing): Likewise.
2050 (_bfd_mips_elf_final_link): Likewise.
2051 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2052 * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
2053 (elf_x86_64_is_reloc_section): Likewise.
2054 * hpux-core.c (thread_section_p): Likewise.
2055 * libcoff.h (bfd_pei_p): Likewise.
2056 * linker.c (REAL): Likewise.
2057 (unwrap_hash_lookup): Likewise.
2058 (_bfd_generic_link_add_one_symbol): Likewise.
2059 * mmo.c (mmo_internal_write_section): Likewise.
2060 * osf-core.c (osf_core_core_file_p): Likewise.
2061 * pef.c (bfd_pef_print_symbol): Likewise.
2062 * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
2063 * som.c (som_slurp_symbol_table): Likewise.
2064 (som_slurp_armap): Likewise.
2065 * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
2066
2aaf2ce8
JB
20672021-03-22 Jan Beulich <jbeulich@suse.com>
2068
2069 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
2070 language translation wrapping to _bfd_error_handler()
2071 invocations.
2072
e9338841
AM
20732021-03-21 Alan Modra <amodra@gmail.com>
2074
2075 * bfd-in.h (startswith): New inline.
2076 (CONST_STRNEQ): Use startswith.
2077 * bfd-in2.h: Regenerate.
2078
15407e7e
AM
20792021-03-20 Alan Modra <amodra@gmail.com>
2080
2081 PR 27590
2082 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
2083 test for .gnu.debuglto*.
2084
3818d4ab
L
20852021-03-18 H.J. Lu <hongjiu.lu@intel.com>
2086
2087 PR ld/27590
15407e7e 2088 * elf.c (_bfd_elf_make_section_from_shdr): Treat
3818d4ab
L
2089 .gnu.debuglto_.debug_ section as debugging section unless it is
2090 marked with SHF_EXCLUDE.
2091 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
2092 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
2093 matching non-debugging sections or linkonce section with comdat
2094 section.
2095
51f6e7a9
L
20962021-03-18 H.J. Lu <hongjiu.lu@intel.com>
2097
2098 PR ld/27587
2099 * dwarf2.c (read_attribute_value): Check version >= 3 for
2100 DW_FORM_ref_addr.
2101
012d4426
NC
21022021-03-16 Nick Clifton <nickc@redhat.com>
2103
2104 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
2105 overrun by using sizeof of the destination x_fname field as the
2106 limit for a memcpy.
2107
80d49d6a
KLC
21082021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2109
2110 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
2111
1b2cb8e2
CC
21122021-03-12 Clément Chigot <clement.chigot@atos.net>
2113
2114 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
2115 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
2116 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
2117 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
2118 BFD_RELOC_PPC64_TLS_ML): New relocations.
2119 * bfd-in2.h: Regenerate.
2120 * libbfd.h: Regenerate.
2121 * coff-rs6000.c (xcoff_calculate_relocation): Call
2122 xcoff_reloc_type_tls for TLS relocations.
2123 (xcoff_howto_table): Implement TLS relocations.
2124 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
2125 (xcoff_reloc_type_tls): New function.
2126 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
2127 (xcoff_howto_table): Likewise.
2128 (_bfd_xcoff_reloc_type_lookup): Likewise.
2129 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
2130 (styp_to_sec_flags): Likewise.
2131 (coff_compute_section_file_positions): Avoid file offset
2132 optimisation for .data when the previous section is .tdata.
2133 (coff_write_object_contents): Handle TLS sections.
2134 * coffswap.h (coff_swap_aouthdr_out): Add support for
2135 new fields in aouthdr.
2136 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
2137 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
2138 (xcoff_need_ldrel_p): Add cases for TLS relocations.
2139 (xcoff_create_ldrel): Add l_symndx for TLS sections.
2140
4a403be0
CC
21412021-03-12 Clément Chigot <clement.chigot@atos.net>
2142
2143 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
2144 New relocations.
2145 * bfd-in2.h: Regenerate.
2146 * libbfd.h: Regenerate.
2147 * coff-rs6000.c (xcoff_calculate_relocation): Call
2148 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
2149 (xcoff_howto_table): Remove src_mask for TOC relocations.
2150 Add R_TOCU and R_TOCL howtos.
2151 (_bfd_xcoff_reloc_type_lookup): Add cases for
2152 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
2153 (xcoff_reloc_type_toc): Compute the whole offset.
2154 Implement R_TOCU and R_TOCL.
2155 * coff64-rs6000.c (xcoff64_calculate_relocation):
2156 Likewise.
2157 (xcoff64_howto_table): Likewise.
2158 (xcoff64_reloc_type_lookup): Likewise.
2159
2c1bef53
CC
21602021-03-12 Clément Chigot <clement.chigot@atos.net>
2161
2162 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
2163 add new relocations.
2164 (xcoff_howto_table): Likewise.
2165 (xcoff_rtype2howto): Increase r_type maximum value.
2166 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
2167 of create a new one from scratch. Enable only some relocations
2168 to have a changing r_size.
2169 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
2170 (xcoff64_howto_table): Likewise.
2171 (xcoff64_rtype2howto): Likewise.
2172 (xcoff64_ppc_relocate_section): Likewise.
2173 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
2174
0c929e83
CC
21752021-03-12 Clément Chigot <clement.chigot@atos.net>
2176
2177 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
2178
6d4d9328
CC
21792021-03-12 Clément Chigot <clement.chigot@atos.net>
2180
2181 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
2182 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
2183 support for o_cputype field. Avoid creating an empty a.out header
2184 for XCOFF64.
2185
8aa2d023
CC
21862021-03-12 Clément Chigot <clement.chigot@atos.net>
2187
2188 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
2189 missing smclass.
2190
ebdcad3f
NC
21912021-03-11 Nelson Chu <nelson.chu@sifive.com>
2192
2193 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
2194 restart_relax, used to check if we need to run the whole
2195 relaxations from relax pass 0 to 2 again.
2196 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
2197 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
2198 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
2199 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
2200 after_allocation to check if we need to run the whole relaxations again.
2201 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
2202 when the restart_relax is FALSE; At last set restart_relax to TRUE if
2203 again is TRUE, too.
2204 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
2205 (bfd_elf64_riscv_restart_relax_sections): Likewise.
2206
67b0f684
JB
22072021-03-10 Jan Beulich <jbeulich@suse.com>
2208
2209 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
2210 offset.
2211
2dfa8341
AM
22122021-03-10 Alan Modra <amodra@gmail.com>
2213 Jan Beulich <jbeulich@suse.com>
2214
2215 * elf.c (bfd_elf_generic_reloc): Make references between debug
2216 sections use section relative values.
2217
87fa7d56
JB
22182021-03-09 Jan Beulich <jbeulich@suse.com>
2219
2220 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
2221
8c0546e9
L
22222021-03-05 H.J. Lu <hongjiu.lu@intel.com>
2223
2224 PR ld/27425
2225 PR ld/27432
2226 * bfd.c (_bfd_get_link_info): New function.
2227 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
2228 (elf_link_info): New.
2229 * libbfd-in.h (_bfd_get_link_info): New prototype.
2230 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
2231 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
2232 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
2233 (pex64_link_add_symbols): New function.
2234 (coff_bfd_link_add_symbols): New macro.
2235 * libbfd.h: Regenerated.
2236
db6092f3
AB
22372021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
2238 Andrew Burgess <andrew.burgess@embecosm.com>
2239
2240 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
2241 * elf.c (elfcore_grok_riscv_csr): New function.
2242 (elfcore_grok_note): Handle NT_RISCV_CSR.
2243 (elfcore_write_riscv_csr): New function.
2244 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
2245
0897bb7d
AB
22462021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
2247 Andrew Burgess <andrew.burgess@embecosm.com>
2248
2249 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
2250 (PRPSINFO_PR_PSARGS_LENGTH): Define.
2251 (riscv_write_core_note): New function.
2252 (riscv_elf_grok_psinfo): Make use of two new length defines.
2253 (elf_backend_write_core_note): Define.
2254
b63a5e38
AB
22552021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
2256 Andrew Burgess <andrew.burgess@embecosm.com>
2257
2258 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
2259 * elf.c (elfcore_grok_gdb_tdesc): New function.
2260 (elfcore_grok_note): Handle NT_GDB_TDESC.
2261 (elfcore_write_gdb_tdesc): New function.
2262 (elfcore_write_register_note): Handle NT_GDB_TDESC.
2263
2017f387
NC
22642021-03-05 Nick Clifton <nickc@redhat.com>
2265
2266 PR 27521
2267 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
2268 (read_indexed_string): Placeholder function.
2269 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
2270 forms.
2271
b01b5d9a
AM
22722021-03-05 Alan Modra <amodra@gmail.com>
2273
2274 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
2275 2020-09-16 changes.
2276 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
2277 adjustments here instead. Separate pc-relative adjustments
2278 from symbol related adjustments. Tidy comments and formatting.
2279
6b5465b9
JB
22802021-03-04 Jan Beulich <jbeulich@suse.com>
2281
2282 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
2283 final PE images.
2284
0b7733b6
AM
22852021-03-04 Alan Modra <amodra@gmail.com>
2286
2287 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
2288
5789f845
AM
22892021-03-03 Alan Modra <amodra@gmail.com>
2290
2291 PR 27500
2292 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
2293 processing not when start/stop symbol section is unmarked but
2294 on first time a start/stop symbol is processed.
2295
dc83f2d2
AM
22962021-03-03 Alan Modra <amodra@gmail.com>
2297
2298 * reloc.c: Include x86_64.h rather than internal.h.
2299
ca8f6bc6
NC
23002021-03-02 Nick Clifton <nickc@redhat.com>
2301
2302 PR 27484
2303 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
2304 function and variable tags and a second time to resolve their
2305 attributes.
2306
211bcd01
NA
23072021-03-02 Nick Alcock <nick.alcock@oracle.com>
2308
2309 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
2310
b80e421f
AM
23112021-03-02 Alan Modra <amodra@gmail.com>
2312
2313 PR 27451
2314 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
2315 linker defined start/stop symbols when start_stop_gc.
2316
f5b9c288
AM
23172021-03-02 Alan Modra <amodra@gmail.com>
2318
2319 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
2320 indirect to pc-relative or toc-relative for undefined symbols.
2321
8ee10e86
AM
23222021-03-01 Alan Modra <amodra@gmail.com>
2323 Fangrui Song <maskray@google.com>
2324
2325 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
2326 defined start/stop symbols when start_stop_gc.
2327 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
2328 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
2329 * linker.c (bfd_generic_define_start_stop): Likewise.
2330
bbaddd4b
AM
23312021-02-25 Alan Modra <amodra@gmail.com>
2332
2333 PR 27441
2334 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
2335 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
2336 use when deciding an as-needed library should be loaded instead
2337 of using the binding of the library definition.
2338
93af1b04
AM
23392021-02-24 Alan Modra <amodra@gmail.com>
2340
2341 PR 27459
2342 * coff-stgo32.c (go32exe_check_format): Sanity check size of
2343 header to avoid a buffer overflow.
2344
e9d18e06
AM
23452021-02-22 Alan Modra <amodra@gmail.com>
2346
2347 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
2348 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
2349
5a9f5403
NC
23502021-02-19 Nelson Chu <nelson.chu@sifive.com>
2351
2352 PR 27158
2353 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
2354 (_bfd_riscv_relax_call): Likewise.
2355 (_bfd_riscv_relax_lui): Likewise.
2356 * elfxx-riscv.c (howto_table): Likewise.
2357
3d73d29e
NC
23582021-02-18 Nelson Chu <nelson.chu@sifive.com>
2359
2360 * Makefile.am: Added cpu-riscv.h.
2361 * Makefile.in: Regenerated.
2362 * po/SRC-POTFILES.in: Regenerated.
2363 * cpu-riscv.h: Added to support spec versions controlling.
2364 Also added extern arrays and functions for cpu-riscv.c.
2365 (enum riscv_spec_class): Define all spec classes here uniformly.
2366 (struct riscv_spec): Added for all specs.
2367 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
2368 (RISCV_GET_SPEC_NAME): Likewise.
2369 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
2370 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
2371 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
2372 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
2373 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
2374 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
2375 (riscv_priv_specs): Moved below.
2376 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
2377 (riscv_isa_specs): Moved from include/opcode/riscv.h.
2378 * elfnn-riscv.c: Included cpu-riscv.h.
2379 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
2380 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
2381 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
2382 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
2383
b9b204b3
AM
23842021-02-17 Alan Modra <amodra@gmail.com>
2385
2386 * wasm-module.c: Guard include of limits.h.
2387 (CHAR_BIT): Provide backup define.
2388 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
2389 Correct signed overflow checking.
2390
0d6aab77
NC
23912021-02-17 Nelson Chu <nelson.chu@sifive.com>
2392
2393 PR 27200
2394 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
2395 copying the elf flags from input BFD to output BFD, until we have
2396 checked if the input BFD has no code section or not. Also fix the
2397 problem that we only check the first section rather than the entire
2398 sections for input BFD.
2399
7b54cadd
AM
24002021-02-16 Alan Modra <amodra@gmail.com>
2401
2402 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
2403 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
2404
8c674061
JB
24052021-02-15 Jan Beulich <jbeulich@suse.com>
2406
2407 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
2408 * doc/Makefile.in: Re-generate.
2409
1781a9d0
AM
24102021-02-15 Alan Modra <amodra@gmail.com>
2411
2412 * elf32-nds32.c (nds32_get_section_contents): Replace
2413 bfd_malloc_and_get_section with bfd_get_full_section_contents.
2414 (nds32_elf_relax_delete_blanks): Init contents.
2415 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
2416
8b78cbec
AM
24172021-02-15 Alan Modra <amodra@gmail.com>
2418
2419 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
2420 bfd_get_full_section_contents.
2421
d7a7af8f
AM
24222021-02-14 Alan Modra <amodra@gmail.com>
2423
2424 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
2425 all fixes to bfd_generic_get_relocated_section_contents since this
2426 function was split out.
2427
234b98ce
AM
24282021-02-11 Alan Modra <amodra@gmail.com>
2429
2430 * config.bfd: Remove ia64 from obsolete list.
2431
769c253f
AM
24322021-02-11 Alan Modra <amodra@gmail.com>
2433
2434 PR ld/22269
2435 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
2436
31c711a2
AM
24372021-02-11 Alan Modra <amodra@gmail.com>
2438
2439 PR 27294
2440 * elf32-avr.c (avr_elf32_load_records_from_section): Use
2441 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
2442 unnecessary casts.
2443
6db658c5
AM
24442021-02-11 Alan Modra <amodra@gmail.com>
2445
2446 PR 27291
2447 * section.c (bfd_get_section_contents): Avoid possible overflow
2448 when range checking offset and count.
2449 (bfd_set_section_contents): Likewise.
2450
95148614
NA
24512021-02-03 Nick Alcock <nick.alcock@oracle.com>
2452
2453 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
2454 favour of LIBINTL.
2455 * configure: Regenerated.
2456
a57d1773
AM
24572021-02-09 Alan Modra <amodra@gmail.com>
2458
2459 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
2460 * configure.ac: Delete symbian entries.
2461 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
2462 * elf32-arm.c: Remove symbian support. Formatting.
2463 * targets.c: Delete symbian entries.
2464 * configure: Regenerate.
2465
1a2f1b54
L
24662021-02-04 H.J. Lu <hongjiu.lu@intel.com>
2467
2468 PR ld/19609
2469 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
2470 info when failed to convert GOTPCREL relocation.
2471
24075dcc
NC
24722021-02-04 Nelson Chu <nelson.chu@sifive.com>
2473
2474 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
2475
7d409ac0
AM
24762021-02-04 Alan Modra <amodra@gmail.com>
2477
2478 PR 27311
2479 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
2480 libraries for IR references on pass over libraries after LTO
2481 recompilation.
2482
f01fb44c
AM
24832021-02-03 Alan Modra <amodra@gmail.com>
2484
2485 PR 27311
2486 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
2487 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
2488 libraries when H is an indirect symbol after calling
2489 _bfd_elf_add_default_symbol.
2490
69551367
AM
24912021-02-03 Alan Modra <amodra@gmail.com>
2492
2493 PR 27311
2494 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
2495 undecorated symbol will have a different version.
2496
9918bff7
AM
24972021-02-02 Alan Modra <amodra@gmail.com>
2498
2499 PR 27311
2500 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
2501 Use when handling default versioned symbol. Rename existing
2502 override variable to nondef_override and use for non-default
2503 versioned symbol.
2504 (elf_link_add_object_symbols): Adjust call to suit. Don't
2505 pull in as-needed libraries when override is set.
2506
1f568f9a
EH
25072021-02-01 Emery Hemingway <ehmry@posteo.net>
2508
2509 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
2510
34c10233
EV
25112021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
2512
2513 PR 27254
2514 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
2515 offset for the R_RL78_RH_SADDR relocation.
2516
c4566785
AM
25172021-01-29 Alan Modra <amodra@gmail.com>
2518
2519 PR 27271
2520 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
2521 on symbols defined in absolute or other special sections.
2522
def97fb9
AM
25232021-01-28 Alan Modra <amodra@gmail.com>
2524
2525 PR 27259
2526 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
2527 prevent endless looping of linked-to sections.
2528
4cb1265b
MS
25292020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
2530
2531 * bfd-elf.h (elfcore_write_file_note): New function.
2532 * elf.c (elfcore_write_file_note): New function.
2533
4287950e
AM
25342021-01-26 Alan Modra <amodra@gmail.com>
2535
2536 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
2537
940d0202
L
25382021-01-24 H.J. Lu <hongjiu.lu@intel.com>
2539
2540 PR binutils/27231
2541 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
2542 number tables.
2543
18454c15
L
25442021-01-23 H.J. Lu <hongjiu.lu@intel.com>
2545
2546 PR binutils/27231
2547 * dwarf2.c (read_rnglists): Advance rngs_ptr after
2548 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
2549
4bd7c902
AM
25502021-01-20 Alan Modra <amodra@gmail.com>
2551
2552 * elf32-ppc.c: Delete outdated comment.
2553 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
2554 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
2555
8bd10d6b
AM
25562021-01-20 Alan Modra <amodra@gmail.com>
2557
2558 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
2559 section symbols are present.
2560
30845f11
AM
25612021-01-19 Alan Modra <amodra@gmail.com>
2562
2563 * elf64-ppc.c (elf_hash_entry): New inline function. Use
2564 throughout to replace casts.
2565 (branch_reloc_hash_match): Remove const from params.
2566 (use_local_plt): New function.
2567 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
2568 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
2569 Use use_local_plt.
2570 * elf32-ppc.c (use_local_plt): New function.
2571 (allocate_dynrelocs, ppc_elf_relocate_section),
2572 (write_global_sym_plt): Use use_local_plt.
2573
994b2513
L
25742021-01-17 H.J. Lu <hongjiu.lu@intel.com>
2575
2576 PR ld/27193
2577 * elflink.c (elf_create_symbuf): Also ignore section symbols.
2578
75a933f3
L
25792021-01-16 H.J. Lu <hongjiu.lu@intel.com>
2580
2581 PR ld/23169
2582 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
2583 check pointer_equality_needed.
2584
68b00778
L
25852021-01-15 H.J. Lu <hongjiu.lu@intel.com>
2586
2587 * elf-linker-x86.h (elf_linker_x86_params): Add
2588 report_relative_reloc.
2589 * elf32-i386.c (elf_i386_relocate_section): Call
2590 _bfd_x86_elf_link_report_relative_reloc to report relative
2591 relocations for -z report-relative-reloc.
2592 (elf_i386_finish_dynamic_symbol): Likewse.
2593 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
2594 (elf_x86_64_finish_dynamic_symbol): Likewse.
2595 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
2596 function.
2597 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
2598 prototype.
2599
ad92f33d
AM
26002021-01-16 Alan Modra <amodra@gmail.com>
2601
2602 * compress.c (decompress_contents): Tidy inflateEnd result test.
2603
eb6e6af8
AM
26042021-01-16 Alan Modra <amodra@gmail.com>
2605
2606 PR 26002
2607 * elflink.c (elf_link_output_extsym): Use version 1 in
2608 .gnu.version for undefined unversioned symbols.
2609
4bb5732e
NC
26102021-01-15 Nelson Chu <nelson.chu@sifive.com>
2611
2612 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
2613 caused the by previous commit accidentally.
2614
1942a048
NC
26152021-01-15 Nelson Chu <nelson.chu@sifive.com>
2616
2617 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
2618 also aligned the code.
2619
b800637e
NC
26202021-01-15 Nelson Chu <nelson.chu@sifive.com>
2621
2622 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
2623
dcd709e0
NC
26242021-01-15 Nelson Chu <nelson.chu@sifive.com>
2625
2626 * elfnn-riscv.c: Comments tidy and improvement.
2627 * elfxx-riscv.c: Likewise.
2628 * elfxx-riscv.h: Likewise.
2629
8ca9c7eb
L
26302021-01-14 H.J. Lu <hongjiu.lu@intel.com>
2631
2632 PR ld/26688
2633 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
2634 section for R_BFIN_FUNCDESC.
2635
7e0d77ef
NC
26362021-01-14 Nick Clifton <nickc@redhat.com>
2637
2638 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
2639
5347ed60
AM
26402021-01-13 Alan Modra <amodra@gmail.com>
2641
2642 * Makefile.in: Regenerate.
2643 * doc/Makefile.in: Regenerate.
2644
b209b5a6
AM
26452021-01-13 Alan Modra <amodra@gmail.com>
2646
2647 PR 27160
2648 * section.c (struct bfd_section): Remove pattern field.
2649 (BFD_FAKE_SECTION): Adjust to suit.
2650 * bfd-in2.h: Regenerate.
2651 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
2652 (bfd_elf_final_link): Don't call elf_fixup_link_order.
2653
d546b610
L
26542021-01-12 H.J. Lu <hongjiu.lu@intel.com>
2655
2656 PR binutils/26792
2657 * configure.ac: Use GNU_MAKE_JOBSERVER.
2658 * aclocal.m4: Regenerated.
2659 * configure: Likewise.
2660
c2e9a4a3
L
26612021-01-12 H.J. Lu <hongjiu.lu@intel.com>
2662
2663 PR ld/27171
2664 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
2665 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
2666
83b33c6c
L
26672021-01-11 H.J. Lu <hongjiu.lu@intel.com>
2668
2669 PR ld/27173
2670 * configure: Regenerated.
2671
a8aa72b9
NC
26722021-01-11 Nick Clifton <nickc@redhat.com>
2673
2674 * po/fr.po: Updated French translation.
2675 * po/pt.po: Updated Portuguese translation.
2676 * po/sr.po: Updated Serbian translation.
2677 * po/uk.po: Updated Ukranian translation.
2678
a4966cd9
L
26792021-01-09 H.J. Lu <hongjiu.lu@intel.com>
2680
2681 * configure: Regenerated.
2682
0a94990b
L
26832021-01-09 H.J. Lu <hongjiu.lu@intel.com>
2684
2685 PR ld/27166
2686 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
2687 -z lam-u48 and -z lam-u57.
2688
573fe3fb
NC
26892021-01-09 Nick Clifton <nickc@redhat.com>
2690
2691 * version.m4: Change to 2.36.50.
2692 * configure: Regenerate.
2693 * po/bfd.pot: Regenerate.
2694
055bc77a
NC
26952021-01-09 Nick Clifton <nickc@redhat.com>
2696
2697 * 2.36 release branch crated.
2698
ba9e922f
L
26992021-01-08 H.J. Lu <hongjiu.lu@intel.com>
2700
2701 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
2702 LAM_U57 when setting LAM_U48.
2703
b1b29aa5
L
27042021-01-08 H.J. Lu <hongjiu.lu@intel.com>
2705
2706 PR ld/26256
2707 PR ld/27160
2708 * elflink.c (elf_fixup_link_order): Verify that fixing up
2709 SHF_LINK_ORDER doesn't increase the output section size.
2710
64307045
AM
27112021-01-09 Alan Modra <amodra@gmail.com>
2712
2713 * configure: Regenerate.
2714
f4782128
ST
27152021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
2716
2717 * configure: Regenerate.
2718
d1bcae83
L
27192021-01-07 H.J. Lu <hongjiu.lu@intel.com>
2720
2721 PR 27109
2722 * aix386-core.c (core_aix386_vec): Initialize
2723 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
2724 * aout-target.h (MY (vec)): Likewise.
2725 * binary.c (binary_vec): Likewise.
2726 * cisco-core.c (core_cisco_be_vec): Likewise.
2727 (core_cisco_le_vec): Likewise.
2728 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
2729 * coff-i386.c (TARGET_SYM): Likewise.
2730 (TARGET_SYM_BIG): Likewise.
2731 * coff-ia64.c (TARGET_SYM): Likewise.
2732 * coff-mips.c (mips_ecoff_le_vec): Likewise.
2733 (mips_ecoff_be_vec): Likewise.
2734 (mips_ecoff_bele_vec): Likewise.
2735 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
2736 (powerpc_xcoff_vec): Likewise.
2737 * coff-sh.c (sh_coff_small_vec): Likewise.
2738 (sh_coff_small_le_vec): Likewise.
2739 * coff-tic30.c (tic30_coff_vec): Likewise.
2740 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
2741 (tic54x_coff0_beh_vec): Likewise.
2742 (tic54x_coff1_vec): Likewise.
2743 (tic54x_coff1_beh_vec): Likewise.
2744 (tic54x_coff2_vec): Likewise.
2745 (tic54x_coff2_beh_vec): Likewise.
2746 * coff-x86_64.c (TARGET_SYM): Likewise.
2747 (TARGET_SYM_BIG): Likewise.
2748 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
2749 (rs6000_xcoff64_aix_vec): Likewise.
2750 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
2751 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
2752 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
2753 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
2754 (TARGET_LITTLE_SYM): Likewise.
2755 * hppabsd-core.c (core_hppabsd_vec): Likewise.
2756 * hpux-core.c (core_hpux_vec): Likewise.
2757 * i386msdos.c (i386_msdos_vec): Likewise.
2758 * ihex.c (ihex_vec): Likewise.
2759 * irix-core.c (core_irix_vec): Likewise.
2760 * mach-o-target.c (TARGET_NAME): Likewise.
2761 * mmo.c (mmix_mmo_vec): Likewise.
2762 * netbsd-core.c (core_netbsd_vec): Likewise.
2763 * osf-core.c (core_osf_vec): Likewise.
2764 * pdp11.c (MY (vec)): Likewise.
2765 * pef.c (pef_vec): Likewise.
2766 (pef_xlib_vec): Likewise.
2767 * plugin.c (plugin_vec): Likewise.
2768 * ppcboot.c (powerpc_boot_vec): Likewise.
2769 * ptrace-core.c (core_ptrace_vec): Likewise.
2770 * sco5-core.c (core_sco5_vec): Likewise.
2771 * som.c (hppa_som_vec): Likewise.
2772 * srec.c (srec_vec): Likewise.
2773 (symbolsrec_vec): Likewise.
2774 * tekhex.c (tekhex_vec): Likewise.
2775 * trad-core.c (core_trad_vec): Likewise.
2776 * verilog.c (verilog_vec): Likewise.
2777 * vms-alpha.c (alpha_vms_vec): Likewise.
2778 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
2779 * wasm-module.c (wasm_vec): Likewise.
2780 * xsym.c (sym_vec): Likewise.
2781 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
2782 isn't set.
2783 (elf_map_symbols): Don't include ignored section symbols.
2784 * elfcode.h (elf_slurp_symbol_table): Also set
2785 BSF_SECTION_SYM_USED on STT_SECTION symbols.
2786 * elflink.c (bfd_elf_final_link): Generated section symbols only
2787 when emitting relocations or reqired.
2788 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
2789 * syms.c (BSF_SECTION_SYM_USED): New.
2790 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
2791 (bfd_target): Add keep_unused_section_symbols.
2792 (bfd_keep_unused_section_symbols): New.
2793 * bfd-in2.h: Regenerated.
2794
17d60030
NC
27952021-01-07 Nick Clifton <nickc@redhat.com>
2796
2797 PR 25713
2798 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
2799 absolute paths and check to see if they are longer than MAX_PATH.
2800
aa881ecd
PT
28012021-01-07 Philipp Tomsich <prt@gnu.org>
2802
2803 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
2804
2652cfad
CXW
28052021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
2806 Jim Wilson <jimw@sifive.com>
2807 Andrew Waterman <andrew@sifive.com>
2808 Maxim Blinov <maxim.blinov@embecosm.com>
2809 Kito Cheng <kito.cheng@sifive.com>
2810 Nelson Chu <nelson.chu@sifive.com>
2811
2812 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
2813
d4e57b87
L
28142021-01-06 H.J. Lu <hongjiu.lu@intel.com>
2815
2816 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
2817 (bfinfdpic_check_relocs): Likewise.
2818
599c86c4
AM
28192021-01-06 Alan Modra <amodra@gmail.com>
2820
2821 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
2822 on unknown r_type.
2823 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2824
3677b729
AM
28252021-01-06 Alan Modra <amodra@gmail.com>
2826
2827 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
2828 (sparc64-*-solaris2*): Add sparc_elf64_vec and
2829 sparc_elf32_vec.
2830
fbc09e7a
MC
28312021-01-06 Marcus Comstedt <marcus@mc.pp.se>
2832
2833 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
2834 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
2835 * configure.ac: Handle riscv_elf[32|64]_be_vec.
2836 * configure: Regenerate.
2837 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
2838 riscv_is_insn_reloc.
2839 (riscv_get_insn): RISC-V instructions are always little endian, but
2840 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
2841 the insturctions.
2842 (riscv_put_insn): Likewsie.
2843 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
2844 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
2845 use riscv_[get|put]_insn or bfd_[get|put].
2846 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
2847 or bfd_[get|put]l16 for code.
2848 (riscv_elf_relocate_section): Likewise.
2849 (riscv_elf_finish_dynamic_symbol): Likewise.
2850 (riscv_elf_finish_dynamic_sections): Likewise.
2851 (_bfd_riscv_relax_call): Likewise.
2852 (_bfd_riscv_relax_lui): Likewise.
2853 (_bfd_riscv_relax_align): Likewise.
2854 (_bfd_riscv_relax_pc): Likewise.
2855 (riscv_elf_object_p): Handled for big endian.
2856 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
2857 * targets.c: Add riscv_elf[32|64]_be_vec.
2858 (_bfd_target_vector): Likewise.
2859
c8bad65e
AM
28602021-01-05 Alan Modra <amodra@gmail.com>
2861
2862 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
2863 for relocatable executable.
2864
de6a7ee4
AM
28652021-01-05 Alan Modra <amodra@gmail.com>
2866
2867 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
2868
18b98722
NC
28692021-01-05 Nelson Chu <nelson.chu@sifive.com>
2870
2871 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
2872 make sure gp symbol is output as a dynamic symbol.
2873
cd6d537c
L
28742021-01-04 H.J. Lu <hongjiu.lu@intel.com>
2875
2876 PR ld/26256
2877 * elflink.c (compare_link_order): Place unordered sections before
2878 ordered sections.
2879 (elf_fixup_link_order): Add a link info argument. Allow mixed
2880 ordered and unordered input sections for non-relocatable link.
2881 Sort the consecutive bfd_indirect_link_order sections with the
2882 same pattern. Change the offsets of the bfd_indirect_link_order
2883 sections only.
2884 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
2885 * section.c (bfd_section): Add pattern.
2886 (BFD_FAKE_SECTION): Initialize pattern to NULL.
2887 * bfd-in2.h: Regenerated.
2888
dbb078f6
AF
28892021-01-04 Alexander Fedotov <alfedotov@gmail.com>
2890
2891 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
2892 of private flags with 0x.
2893 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
2894
5b4293ba
AM
28952021-01-04 Alan Modra <amodra@gmail.com>
2896
2897 PR 26822
2898 * elflink.c (elf_link_input_bfd): Use the file base name in
2899 linker generated STT_FILE symbols.
2900
4c0e540e
NC
29012021-01-04 Nelson Chu <nelson.chu@sifive.com>
2902
2903 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
2904 * elfxx-riscv.h: Add declaration.
2905 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
2906 riscv_compare_subsets to check the orders.
2907 (riscv_skip_prefix): Removed.
2908 (riscv_prefix_cmp): Removed.
2909
e9cf3691
AM
29102021-01-04 Alan Modra <amodra@gmail.com>
2911
2912 PR 26741
2913 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
2914 calculating subset version length.
2915
f9a6a8f0
AM
29162021-01-01 Nicolas Boulenguez <nicolas@debian.org>
2917
2918 * xcofflink.c: Correct spelling in comments.
2919
250d07de
AM
29202021-01-01 Alan Modra <amodra@gmail.com>
2921
2922 Update year range in copyright notice of all files.
2923
c2795844 2924For older changes see ChangeLog-2020
3499769a 2925\f
d87bef3a 2926Copyright (C) 2021-2023 Free Software Foundation, Inc.
3499769a
AM
2927
2928Copying and distribution of this file, with or without modification,
2929are permitted in any medium without royalty provided the copyright
2930notice and this notice are preserved.
2931
2932Local Variables:
2933mode: change-log
2934left-margin: 8
2935fill-column: 74
2936version-control: never
2937End: