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