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