]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
gdb: some int to bool conversion
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
fd1b3e0e
XQ
12023-01-17 Xianmiao Qu <cooper.qu@linux.alibaba.com>
2
3 * elf32-csky.c (elf32_csky_merge_attributes): Don't save
4 and restore the ARCH attribute, it will actually clear
5 the ARCH attribute.
6 (csky_elf_merge_private_bfd_data): Store the machine flag
7 correctly.
8
6f9f4481
NC
92023-01-13 Nick Clifton <nickc@redhat.com>
10
11 * po/ro.po: Updated Romainian translation.
12
11d171f1
NC
132023-01-11 Nick Clifton <nickc@redhat.com>
14
15 PR 29988
16 * dwarf2.c (read_indexed_address): Fix check for an out of range
17 offset.
18
59e1f50f
NC
192023-01-06 Nick Clifton <nickc@redhat.com>
20
21 * po/ru.po: Updated Russian translation.
22
a8cf07d3
H
232023-01-03 Himal <himalr@proton.me>
24
25 PR 29947
26 * bfdio.c (_bfd_real_fopen): Do not add a prefix to the Windows'
27 nul device filename.
28
11982f9f
NC
292023-01-03 Nick Clifton <nickc@redhat.com>
30
31 * po/fr.po: Updated French trabslation.
32 * po/uk.po: Updated Ukrainian trabslation.
33
a72b0718
NC
342022-12-31 Nick Clifton <nickc@redhat.com>
35
36 * 2.40 branch created.
37
8af23b30
NC
382022-12-23 Nick Clifton <nickc@redhat.com>
39
40 PR 29936
41 * dwarf2.c (concat_filename): Fix check for a directory index off
42 the end of the directory table.
43
ea6ed58e
NC
442022-12-21 Nick Clifton <nickc@redhat.com>
45
46 * po/ro.po: Updated Romanian translation.
47
83f18e5e
NC
482022-12-06 Nick Clifton <nickc@redhat.com>
49
50 PR 29852
51 * elf32-arm.c (cmse_scan): Check for NULL entries in the
52 sym_hashes array.
53 (elf32_arm_gc_mark_extra_sections): Likewise.
54
942fa4fb
NC
552022-12-05 Nick Clifton <nickc@redhat.com>
56
57 PR 29848
58 * vms-alpha.c (parse_module): Fix potential out of bounds memory
59 access.
60
6ef35c04
NC
612022-12-01 Nick Clifton <nickc@redhat.com>
62
63 PR 25202
64 * bfd.c (VerilogDataEndianness): New variable.
65 (verilog_write_record): Use VerilogDataEndianness, if set, to
66 choose the endianness of the output.
67 (verilog_write_section): Adjust the address by the data width.
68
1a7e622b
NC
692022-11-21 Nick Clifton <nickc@redhat.com>
70
71 PR 29764
72 * cpu-arm.c (scan): Accept machine names prefixed with "arm:".
73 * cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:".
74
5c831a3c
NC
752022-10-19 Nick Clifton <nickc@redhat.com>
76
77 PR 29699
78 * elf.c (_bfd_elf_slurp_version_tables): Fail if the sh_info field
79 of the section header is zero.
80
efc1521e
NC
812022-09-09 Nick Clifton <nickc@redhat.com>
82
83 PR 29532
84 * elf.c (setup_group): Do not return false if there is no group
85 information available.
86
6e7a29c7
AM
872022-09-02 Aaron Merey <amerey@redhat.com>
88
89 * aout-target.h (MY_find_nearest_line_with_alt): New macro.
90 * bfd-in2.h: Regenerate.
91 * bfd.c (bfd_find_nearest_line_with_alt): New macro.
92 * binary.c (binary_find_nearest_line_with_alt): New macro.
93 * coff-rs6000.c (_bfd_xcoff_find_nearest_line_with_alt): New macro.
94 (rs6000_xcoff64_vec): Add coff_find_nearest_line_with_alt.
95 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Calls
96 _bfd_dwarf2_find_nearest_line_with_alt.
97 (_bfd_dwarf2_find_nearest_line_with_alt): New function. Implements the
98 former _bfd_dwarf2_find_nearest_line. Adds parameter alt_filename.
99 Attempt to open alt_filename and use it as the .dwz file if not NULL.
100 * elf-bfd.h (_bfd_elf_find_nearest_line_with_alt): New declaration.
101 * elf.c (_bfd_elf_find_nearest_line): Calls
102 _bfd_elf_find_nearest_line_with_alt.
103 (_bfd_elf_find_nearest_line_with_alt): New function. Implements the
104 former _bfd_elf_find_nearest_line. Adds parameter alt_filename.
105 * elf32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro.
106 * elf64-mips.c (bfd_elf64_find_nearest_line_with_alt): New macro.
107 * elfn32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro.
108 * elfxx-mips.h (_bfd_mips_elf_find_nearest_line_with_alt): New macro.
109 * elfxx-target.h (bfd_elfNN_find_nearest_line_with_alt): New macro.
110 * i386mdos.c (msdos_find_nearest_line_with_alt): New macro.
111 * ihex.c (ihex_find_nearest_line_with_alt): New macro.
112 * libbfd-in.h (_bfd_nosymbols_find_nearest_line_with_alt): New
113 declaration.
114 (_bfd_dwarf2_find_nearest_line_with_alt): New declaration.
115 * libbfd.h: Regenerate.
116 * libcoff-in.h (coff_find_nearest_line_with_alt): New macro.
117 * libcoff.h: Regenerate.
118 * libecoff.h (_bfd_ecoff_find_nearest_line_with_alt): New macro.
119 * mach-o.h (bfd_mach_o_find_nearest_line_with_alt): New macro.
120 * mmo.c (mmo_find_nearest_line_with_alt): New macro.
121 * pef.c (bfd_pef_find_nearest_line_with_alt): New macro.
122 * plugin.c (bfd_plugin_find_nearest_line_with_alt): New macro.
123 * ppcboot.c (ppcboot_find_nearest_line_with_alt): New macro.
124 * som.h (som_find_nearest_line_with_alt): New macro.
125 * srec.c (srec_find_nearest_line_with_alt): New macro.
126 * syms.c (_bfd_nosymbols_find_nearest_line_with_alt): New function.
127 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add symbol for
128 NAME##_find_nearest_line_with_alt.
129 (_bfd_find_nearest_line_with_alt): Add declaration.
130 * tekhex.c (tekhex_find_nearest_line_with_alt): New macro.
131 * verilog.c (verilog_find_nearest_line_with_alt): New macro.
132 * vms-alpha.c (_bfd_vms_find_nearest_line_with_alt): New macro.
133 * wasm-module.c (wasm_find_nearest_line_with_alt): New macro.
134 * xsym.c (bfd_sym_find_nearest_line_with_alt): New macro.
135
d0a122d3
FC
1362022-09-02 Frederic Cambus <fred@statdns.com>
137
138 * config.bfd (arm-*-openbsd*): Restore target.
139
37833b96
NC
1402022-08-30 Nick Clifton <nickc@redhat.com>
141
142 PR 29529
143 * dwarf2.c (struct line_info_table): Add new field:
144 use_dir_and_file_0.
145 (concat_filename): Use new field to help select the correct table
146 slot.
147 (read_formatted_entries): Do not skip entry 0.
148 (decode_line_info): Set new field depending upon the version of
149 DWARF being parsed. Initialise filename based upon the setting of
150 the new field.
151
ba86e750
FC
1522022-08-22 Frederic Cambus <fred@statdns.com>
153
154 * config.bfd (aarch64-*-openbsd*): Add target.
155
a6ad7914
AM
1562022-08-03 Nick Clifton <nickc@redhat.com>
157
158 PR 29389
159 * bfd.c (BFD_CLOSED_BY_CACHE): New bfd flag.
160 * cache.c (bfd_cache_delete): Set BFD_CLOSED_BY_DELETE on the
161 closed bfd.
162 (bfd_cache_lookup_worker): Clear BFD_CLOSED_BY_DELETE on the newly
163 reopened bfd.
164 * opncls.c (bfd_set_filename): Refuse to change the name of a bfd
165 that has been closed by bfd_cache_delete. Mark changed bfds as
166 uncacheable.
167 * bfd-in2.h: Regenerate.
168
b44cfc5d
NC
1692022-07-29 Nick Clifton <nickc@redhat.com>
170
171 PR 29424
172 * dwarf2.c (read_attribute_value): Handle DW_FORM_rnglistx and
173 DW_FORM_loclistx.
174
27121f67
NC
1752022-07-26 Nick Clifton <nickc@redhat.com>
176
177 * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix
178 indentation.
179
0bd09323
NC
1802022-07-08 Nick Clifton <nickc@redhat.com>
181
182 * 2.39 branch created.
183
5f3fc928
YR
1842022-05-19 Yvan Roux <yvan.roux@foss.st.com>
185
186 PR 25713
187 * bfdio.c (_bfd_real_fopen): Delete ccs string.
188
8e6afe40
JB
1892022-04-27 John Baldwin <jhb@FreeBSD.org>
190
191 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes.
192
0d38576a
NC
1932022-04-25 Nick Clifton <nickc@redhat.com>
194
195 PR 29072
196 * elflink.c (bfd_elf_size_dynamic_sections): Display a note to the
197 user that the current ehaviour of creating an executable stack
198 because of a missing .note.GNU-stack section is deprecated and
199 will be changed in a future release.
200
2d23f965
CC
2012022-04-20 Clément Chigot <clement.chigot@atos.net>
202
203 * coff-rs6000.c (xcoff_reloc_type_noop): Add info argument.
204 (xcoff_reloc_type_fail): Likewise.
205 (xcoff_reloc_type_pos): Likewise.
206 (xcoff_reloc_type_neg): Likewise.
207 (xcoff_reloc_type_rel): Likewise.
208 (xcoff_reloc_type_toc): Likewise.
209 (xcoff_reloc_type_ba): Likewise.
210 (xcoff_reloc_type_crel): Likewise.
211 (xcoff_reloc_type_tls): Likewise.
212 (xcoff_reloc_type_br): Add stub handler.
213 (xcoff_ppc_relocate_section): Add info to
214 xcoff_calculate_relocation.
215 (xcoff_stub_indirect_call_code): New constant.
216 (xcoff_stub_shared_call_code): Likewise.
217 (bfd_xcoff_backend_data): Add stub code fields.
218 (bfd_pmac_xcoff_backend_data): Likewise.
219 * coff64-rs6000.c (xcoff64_reloc_type_br): Add stub handler.
220 (xcoff64_ppc_relocate_section): Add info to
221 xcoff64_calculate_relocation.
222 (xcoff64_stub_indirect_call_code): New constant.
223 (xcoff64_stub_shared_call_code): Likewise.
224 (bfd_xcoff_backend_data): Add stub code fields.
225 (bfd_xcoff_aix5_backend_data): Likewise.
226 * libxcoff.h (struct xcoff_backend_data_rec): Add stub fields.
227 (bfd_xcoff_stub_indirect_call_code): New define.
228 (bfd_xcoff_stub_indirect_call_size): New define.
229 (bfd_xcoff_stub_shared_call_code): New define.
230 (bfd_xcoff_stub_shared_call_size): New define.
231 (xcoff_reloc_function): Add info argument.
232 (enum xcoff_stub_type): New enum.
233 (struct xcoff_stub_hash_entry): New structure.
234 * xcofflink.c (struct xcoff_link_hash_table): Add stub hash
235 table and params fields.
236 (xcoff_stub_hash_entry): New define.
237 (xcoff_stub_hash_lookup): New define.
238 (stub_hash_newfunc): New function.
239 (_bfd_xcoff_bfd_link_hash_table_free): Free the new stub hash
240 table.
241 (_bfd_xcoff_bfd_link_hash_table_create): Create the new stub
242 hash table.
243 (xcoff_link_add_symbols): Save rawsize for XTY_SD.
244 (bfd_xcoff_link_init): New function.
245 (xcoff_stub_csect_name): New function.
246 (xcoff_stub_get_csect_in_range): New function.
247 (xcoff_stub_name): New function.
248 (bfd_xcoff_get_stub_entry): New function.
249 (bfd_xcoff_type_of_stub): New function.
250 (xcoff_add_stub): New function.
251 (xcoff_build_one_stub): New function.
252 (bfd_xcoff_size_stubs): New function.
253 (bfd_xcoff_build_stubs): New function.
254 (xcoff_stub_create_relocations): New function.
255 (xcoff_link_input_bfd): Adapt relocations to stub.
256 (xcoff_write_global_symbol): Adapt to new TOC entries generated
257 for stubs.
258 (_bfd_xcoff_bfd_final_link): Handle stub file.
259 * xcofflink.h (struct bfd_xcoff_link_params): New structure.
260
1876a542
CC
2612022-04-20 Clément Chigot <clement.chigot@atos.net>
262
263 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Write len in
264 ldinfo->strings instead of directly in the output_bfd.
265 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
266 * xcofflink.c (struct xcoff_link_hash_table): Remove ldrel_count
267 field. Add ldinfo field.
268 (xcoff_mark_symbol): Adjust to new ldinfo field.
269 (xcoff_mark): Likewise.
270 (bfd_xcoff_link_count_reloc): Likewise.
271 (xcoff_build_loader_section): Split into two functions: one that
272 build the loader section (this function) and one that only size
273 it...
274 (xcoff_size_loader_section): ... (this function).
275 (bfd_xcoff_size_dynamic_sections): Adapt to new ldinfo field.
276 Move the part where the dynamic sections are build to ...
277 (bfd_xcoff_build_dynamic_sections): ... this function.
278 * xcofflink.h: Add bfd_xcoff_build_dynamic_sections prototype.
279
f5e76050
AGI
2802022-04-13 Alexander von Gluck IV <kallisti5@unixzen.com>
281
282 * config.bfd (x86-haiku): Add i386_pei_vec as a selectable format.
283
7d41169b
NC
2842022-04-08 Nick Clifton <nickc@redhat.com>
285
286 PR 29038
287 * coffgen.c (coff_find_nearest_line_with_names): Fix typo
288 retrieving saved bias.
289
145667f8
MH
2902022-04-07 Mark Harmstone <mark@harmstone.com>
291
292 * coff-i386.c (in_reloc_p): Add R_SECTION.
293 (howto_table): Add R_SECTION.
294 (coff_pe_i386_relocation_section): Add support for R_SECTION.
295 (coff_i386_reloc_type_lookup): Add support for
296 BFD_RELOC_16_SECCIDX.
297 * coff-x86_64.c (in_reloc_p): Add R_SECTION.
298 (howto_table): Add R_SECTION.
299 (coff_pe_amd64_relocation_section): Add support for R_SECTION.
300 (coff_amd64_reloc_type_lookup): Add support for
301 BFD_RELOC_16_SECCIDX.
302 * reloc.c: Add BFD_RELOC_16_SECIDX.
303 * bfd-in2.h: Regenerate.
304 * libbfd.h: Regenerate.
305
b5c2367c
JB
3062022-04-01 John Baldwin <jhb@FreeBSD.org>
307
308 * elf-bfd.h (elfcore_write_x86_segbases): New.
309 * elf.c (elfcore_grok_freebsd_note): Add pseudosections for
310 NT_FREEBSD_X86_SEGBASES register notes.
311 (elfcore_write_x86_segbases): New.
312 (elfcore_write_register_note): Write NT_FREEBSD_X86_SEGBASES
313 register notes.
314
e330d4c0
JB
3152022-04-01 John Baldwin <jhb@FreeBSD.org>
316
317 * elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.
318
86ed2a5e
SG
3192022-03-22 Steiner H Gunderson <steinar+sourceware@gunderson.no>
320
321 * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is
322 found, but no line number info, then return a result of 2.
323
30cbd32a
SG
3242022-03-21 Steiner H Gunderson <steinar+sourceware@gunderson.no>
325
326 PR 28978
327 * dwarf2.c (scan_unit_for_symbols): When performing second pass,
328 check to see if the function or variable being processed is the
329 same as the previous one.
330
a747a286
VP
3312022-03-18 Viorel Preoteasa <viorel.preoteasa@gmail.com>
332
333 PR 28924
334 * elf32-arm.c (THM_MAX_FWD_BRANCH_OFFSET): Fix definition.
335 (THM2_MAX_FWD_BRANCH_OFFSET): Likewise.
336
978602e8
SM
3372022-03-16 Simon Marchi <simon.marchi@efficios.com>
338
339 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES):
340 Add cpu-amdgcn.c.
341 (BFD64_BACKENDS): Add elf64-amdgcn.lo.
342 (BFD64_BACKENDS_CFILES): Add elf64-amdgcn.c.
343 * Makefile.in: Re-generate.
344 * cpu-amdgcn.c: New.
345 * elf64-amdgcn.c: New.
346 * archures.c (bfd_architecture): Add bfd_arch_amdgcn and related
347 mach defines.
348 (bfd_amdgcn_arch): New.
349 (bfd_archures_list): Add bfd_amdgcn_arch.
350 * bfd-in2.h: Re-generate.
351 * config.bfd: Handle amdgcn* target.
352 * configure.ac: Handle amdgcn_elf64_le_vec.
353 * configure: Re-generate.
354 * elf-bfd.h (elf_target_id): Add AMDGCN_ELF_DATA.
355 * targets.c (amdgcn_elf64_le_vec): New.
356 (_bfd_target_vector): Add amdgcn_elf64_le_vec.
357
ba0eb22c
NC
3582022-03-01 Torbjörn Svensson <torbjorn.svensson@st.com>
359 Fred Eisele <fredrick.eisele@gmail.com>
360
361 PR 25713
362 * bfdio.c (_bfd_real_fopen): Fix typo.
363
81c9e0f6
NC
3642022-03-01 Nick Clifton <nickc@redhat.com>
365
366 PR 28848
367 * elf32-arm.c (elf32_arm_merge_eabi_attributes): If the first
368 input bfd has a Tag_ABI_HardFP_use set to 3 but does not also have
369 TAG_FP_arch set then reset the TAG_ABI_HardFP_use.
370
cb7da2a6 3712022-02-28 Torbjörn Svensson <torbjorn.svensson@st.com>
ba0eb22c 372 Fred Eisele <fredrick.eisele@gmail.com>
cb7da2a6
TS
373
374 PR 25713
ba0eb22c 375 * bfdio.c (_bfd_real_fopen): Fix handling of paths longer than 260
cb7da2a6
TS
376 characters on Windows hosts.
377
eda240cd
NC
3782022-02-28 Nick Clifton <nickc@redhat.com>
379
380 PR 28886
381 * config.bfd: Update error message for obsolete configurations.
382
36d285b9
NC
3832022-02-17 Nick Clifton <nickc@redhat.com>
384
385 * po/sr.po: Updated Serbian translation.
386
c212f39d
FS
3872022-02-16 Fangrui Song <maskray@google.com>
388 Nick Clifton <nickc@redhat.com>
389
390 PR ld/28841
391 * bfd-in2.h (struct bfd_section): Add type.
392 (discarded_section): Add field.
393 * elf.c (elf_fake_sections): Handle bfd_section::type.
394 * section.c (BFD_FAKE_SECTION): Add field.
395 * mri.c (mri_draw_tree): Update function call.
396
5d0d011b
MF
3972022-02-11 Michael Forney <mforney@mforney.org>
398
399 * bfd.c (bfd_set_gp_value): Remove return with expression
400 in void function.
401
0f38fd87
NC
4022022-02-09 Nick Clifton <nickc@redhat.com>
403
404 * config.bfd: Move pending obsolesence targets into the definitely
405 obsolete list.
406
41ba8b76
NC
4072022-02-02 Nick Clifton <nickc@redhat.com>
408
409 PR 28834
410 * dwarf2.c (read_section): Change the heuristic that checks for
411 overlarge dwarf debug info sections.
412
c7c6e55b
SH
4132022-02-02 Stafford Horne <shorne@gmail.com>
414
415 PR 28735
416 * elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define.
417 (or1k_elf_relocate_section): Use new howto instead of trying to
418 mask out relocation bits.
419
fdf55097
RM
4202022-01-24 Roland McGrath <mcgrathr@google.com>
421
422 * doc/local.mk (%D%/bfdver.texi): Add mkdir command.
423
5fe73d46
NC
4242022-01-24 Nick Clifton <nickc@redhat.com>
425
426 * po/fr.po: Updated French translation.
427 * po/ro.po: Updated Romanian translation.
428 * po/uk.po: Updated Ukranian translation.
429
f908e960
NC
4302022-01-22 Nick Clifton <nickc@redhat.com>
431
432 * version.m4: Change to 2.38.50.
433 * configure: Regenerate.
434 * po/bfd.pot: Regenerate.
435
a74e1cb3
NC
4362022-01-22 Nick Clifton <nickc@redhat.com>
437
438 * 2.38 release branch created.
439
6c037fdb
NC
4402022-01-17 Nick Clifton <nickc@redhat.com>
441
442 * Makefile.in: Regenerate.
443 * configure: Regenerate.
444 * doc/Makefile.in: Regenerate.
445 * po/bfd.pot: Regenerate.
446
4d3605c8
NP
4472021-12-15 Nikita Popov <npv1310@gmail.com>
448
449 PR 28687
450 * dwarf1.c (parse_die): Fix undefined behaviour in range tests.
451
ee9e412f
NC
4522021-11-17 Nick Clifton <nickc@redhat.com>
453
454 PR 28452
455 * elf.c (assign_file_positions_for_non_load_sections): Replace
456 assertion with a warning message.
457
cf487499
NC
4582021-10-19 Nick Clifton <nickc@redhat.com>
459
460 * linker.c (_bfd_generic_link_add_one_symbol): Test for a NULL
461 name before checking to see if the symbol is __gnu_lto_slim.
462 * archive.c (_bfd_compute_and_write_armap): Likewise.
463
b9004024
NA
4642021-09-27 Nick Alcock <nick.alcock@oracle.com>
465
466 * configure: Regenerate.
467
b4745472
AB
4682021-09-15 Andrew Burgess <andrew.burgess@embecosm.com>
469
470 * archures.c (bfd_arch_list): Use 'char *' instead of 'char **'
471 when calculating space for a string list.
472
09a7e912
CZ
4732021-09-014 Cupertino Miranda <cmiranda@synopsys.com>
474 Claudiu Zissulescu <claziss@synopsys.com>
475
476 * arc-got.h (arc_static_sym_data): New structure.
477 (get_static_sym_data): New function.
478 (relocate_fix_got_relocs_for_got_info): Move the computation fo
479 symbol value and section to above introduced function, and use
480 this new function.
481
64dbf74d
LM
4822021-09-07 Luis Machado <luis.machado@linaro.org>
483
484 Revert: [AArch64] MTE corefile support
485
486 2021-05-21 Luis Machado <luis.machado@linaro.org>
487
488 * elf.c (elfcore_make_memtag_note_section): New function.
489 (elfcore_grok_note): Handle NT_MEMTAG note types.
490
3f1a2892
NC
4912021-09-07 Nick Clifton <nickc@redhat.com>
492
9dc2f267
NC
493 PR 28305
494 * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range
495 reloc.
496
3f1a2892
NC
497 PR 28303
498 * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of
499 range relocs.
500
3ee0cd9e
NC
5012021-08-10 Nick Clifton <nickc@redhat.com>
502
503 * po/sr.po: Updated Serbian translation.
504
5c9cbf07
NC
5052021-07-18 Nick Clifton <nickc@redhat.com>
506
507 * config.bfd: Move pending obsoletion targets to obsolete list.
508
05a1dd47
GB
5092021-07-16 Giulio Benetti <giulio.benetti@benettiengineering.com>
510
511 * elf32-or1k.c (or1k_elf_relocate_section): Use a separate entry
512 in switch case R_OR1K_INSN_REL_26 where we need to check for
513 !SYMBOL_CALLS_LOCAL() instead of !SYMBOL_REFERENCES_LOCAL().
514
51d29b8c
CC
5152021-07-14 Clément Chigot <clement.chigot@atos.net>
516
517 * libxcoff.h (struct xcoff_dwsect_name): Add DWARF name.
518 * coff-rs6000.c (xcoff_dwsect_names): Update.
519 * coffcode.h (sec_to_styp_flags): Likewise.
520 (coff_new_section_hook): Likewise.
521
f8dd3646
AM
5222021-07-10 Alan Modra <amodra@gmail.com>
523
524 * dwarf2.c (read_address): Remove accidental commit.
525 (read_ranges): Compare offset rather than pointers.
526
f1cee837
NC
5272021-07-08 Nick Clifton <nickc@redhat.com>
528
529 * po/pt.po: Updated Portuguese translation.
530
ca52626b
NC
5312021-07-07 Nick Clifton <nickc@redhat.com>
532
533 * elfcode.h (elf_swap_symbol_out): Revert accidental change that
534 removed an abort if the shndx pointer is NULL.
535
f07afc65
RO
5362021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
537
538 * sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
539 Solaris.
540
b737d304
RO
5412021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
542
543 * configure.ac: Check for strnlen declaration.
544 * configure, config.in: Regenerate.
545
ffa5352c
NC
5462021-07-07 Nick Clifton <nickc@redhat.com>
547
548 PR 28051
549 * coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in
550 order to fix problems when translating.
551 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
552 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
553 Likewise.
554 * po/bfd.pot: Regenerate.
555
235f5ef4
MM
5562021-07-06 Michael Matz <matz@suse.de>
557
558 PR ld/28021
559 * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any
560 versioning.
561
07b2745f
AM
5622021-07-06 Alan Modra <amodra@gmail.com>
563
564 PR 28055
565 * elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED.
566
b4c4b8aa
AM
5672021-07-05 Alan Modra <amodra@gmail.com>
568
569 PR 28055
570 * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put
571 and bfd_put_32 calls. Correct section limit checks.
572
346d80ef
NC
5732021-07-03 Nick Clifton <nickc@redhat.com>
574
575 * version.m4: Update version number.
576 * configure: Regenerate.
577 * po/opcodes.pot: Regenerate.
578
51419248
NC
5792021-07-03 Nick Clifton <nickc@redhat.com>
580
581 * 2.37 release branch created.
582
49910fd8
NC
5832021-07-02 Nick Clifton <nickc@redhat.com>
584
585 PR 28046
586 * dwarf2.c (read_ranges): Check that range_ptr does not exceed
587 range_end.
588
9a39f738
YS
5892021-06-30 YunQiang Su <yunqiang.su@cipunited.com>
590
591 PR mips/28009
592 * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr,
593 _bfd_mips_elf_fake_sections): Mark LTO debug info as
594 SHT_MIPS_DWARF.
595
c2ce8313
NC
5962021-06-29 Nick Clifton <nickc@redhat.com>
597
598 * config.bfd (obsolete configurations): Add netbsdpe.
599
50331d64
NC
6002021-06-22 Nelson Chu <nelson.chu@sifive.com>
601
602 * elfnn-riscv.c (riscv_pcrel_hi_reloc): Added field to store
603 the original relocation type, in case the type is converted to
604 R_RISCV_HI20.
605 (riscv_pcrel_lo_reloc): Removed unused name field.
606 (riscv_pcrel_relocs): Added comments.
607 (riscv_zero_pcrel_hi_reloc): Removed unused input_bfd.
608 (riscv_record_pcrel_hi_reloc): Updated.
609 (riscv_record_pcrel_lo_reloc): Likewise.
610 (riscv_resolve_pcrel_lo_relocs): Likewise. Check the original
611 type of auipc, to make sure the %pcrel_lo without any addends.
612 Otherwise, report dangerous relocation error.
613 (riscv_elf_relocate_section): Updated above functions are changed.
614 For R_RISCV_GOT_HI20, report dangerous relocation error when addend
615 isn't zero.
616
406b4ada
L
6172021-06-19 H.J. Lu <hongjiu.lu@intel.com>
618
619 PR ld/27998
620 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Count PLT for GOTOFF
621 relocation against IFUNC symbols.
622 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
623
83b1d8f4
L
6242021-06-19 H.J. Lu <hongjiu.lu@intel.com>
625
626 * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in
627 PDE.
628
5a767724
L
6292021-06-18 H.J. Lu <hongjiu.lu@intel.com>
630
631 * elf-properties.c (_bfd_elf_parse_gnu_properties): Handle
632 GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
633 GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
634 (elf_merge_gnu_properties): Likewise.
635
f64b9b13
AM
6362021-06-11 Alan Modra <amodra@gmail.com>
637
638 PR 27952
639 * elf-bfd.h (struct elf_obj_tdata): Add is_pie.
640 * elflink.c (elf_link_add_object_symbols): Set is_pie.
641
f75bcf7e
NC
6422021-06-09 Nick Clifton <nickc@redhat.com>
643
644 PR 27666
645 * config.bfd: Do not add the sparc_elf32_vec or sparc_elf64_vec
646 vectors to Sparc Solaris2 targets.
647
5804373d
MM
6482021-06-08 Michael Matz <matz@suse.de>
649
650 * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag.
651 (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
652
6bee34a1
JB
6532021-06-07 Jan Beulich <jbeulich@suse.com>
654
655 * dwarf2.c (read_ranges, read_rnglists): Add u suffix to constant.
656
45342c7c
AM
6572021-06-02 Alan Modra <amodra@gmail.com>
658
659 * elf-attrs.c (_bfd_elf_parse_attributes): Break out of loop if
660 subsection length is too small to cover tag and length field.
661
ef9d2565
NC
6622021-05-31 Nelson Chu <nelson.chu@sifive.com>
663 Lifang Xia <lifang_xia@c-sky.com>
664
665 PR 27566
666 * elfnn-riscv.c (struct riscv_elf_link_hash_table): New integer pointer
667 to monitor the data segment phase.
668 (bfd_elfNN_riscv_set_data_segment_info): New function called by
669 after_allocation, to set the data_segment_phase from expld.dataseg.
670 (_bfd_riscv_relax_section): Don't relax when data_segment_phase is
671 exp_seg_relro_adjust (0x4).
672 * elfxx-riscv.h (bfd_elf32_riscv_set_data_segment_info): New extern.
673 (bfd_elf64_riscv_set_data_segment_info): Likewise
674
1273b2f8
L
6752021-05-28 H.J. Lu <hongjiu.lu@intel.com>
676
677 PR ld/27905
678 * elf32-i386.c: Don't include "libiberty.h".
679 (elf_howto_table): Revert commits a7664973b24 and 50c95a739c9.
680 (elf_i386_rtype_to_howto): Revert commit 50c95a739c9.
681 (elf_i386_info_to_howto_rel): Likewise.
682 (elf_i386_tls_transition): Likewise.
683 (elf_i386_relocate_section): Likewise.
684 * elf64-x86-64.c (x86_64_elf_howto_table): Revert commits
685 a7664973b24 and 50c95a739c9.
686 (elf_x86_64_rtype_to_howto): Revert commit 50c95a739c9.
687 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Likewise.
688 * elfxx-x86.h (elf_x86_obj_tdata): Likewise.
689 (elf_x86_has_code16): Likewise.
690
50c95a73
L
6912021-05-26 H.J. Lu <hongjiu.lu@intel.com>
692
693 PR ld/27905
694 * elf32-i386.c: Include "libiberty.h".
695 (elf_howto_table): Add 16-bit R_386_PC16 entry.
696 (elf_i386_rtype_to_howto): Add a BFD argument. Use 16-bit
697 R_386_PC16 if input has 16-bit mode instructions.
698 (elf_i386_info_to_howto_rel): Update elf_i386_rtype_to_howto
699 call.
700 (elf_i386_tls_transition): Likewise.
701 (elf_i386_relocate_section): Likewise.
702 * elf64-x86-64.c (x86_64_elf_howto_table): Add 16-bit
703 R_X86_64_PC16 entry.
704 (elf_x86_64_rtype_to_howto): Use 16-bit R_X86_64_PC16 if input
705 has 16-bit mode instructions.
706 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Set
707 elf_x86_has_code16 if relocatable input is marked with
708 GNU_PROPERTY_X86_FEATURE_2_CODE16.
709 * elfxx-x86.h (elf_x86_obj_tdata): Add has_code16.
710 (elf_x86_has_code16): New.
711
fe1f847d
NC
7122021-05-26 Nelson Chu <nelson.chu@sifive.com>
713
714 * elfxx-riscv.h (check_unknown_prefixed_ext): New bool.
715 * elfxx-riscv.c (riscv_parse_prefixed_ext): Do not check the
716 prefixed extension name if check_unknown_prefixed_ext is false.
717 * elfnn-riscv.c (riscv_merge_arch_attr_info): Set
718 check_unknown_prefixed_ext to false for linker.
719
74fd118f
NC
7202021-05-25 Nick Clifton <nickc@redhat.com>
721
722 * elf32-arn.c (struct elf_arm_obj_tdata): Add num_entries field.
723 (elf32_arm_num_entries): New macro.
724 (elf32_arm_allocate_local_sym_info): Initialise the new field.
725 Allocate arrays individually so that buffer overruns can be
726 detected by memory checkers.
727 (elf32_arm_create_local_iplt): Check num_entries.
728 (elf32_arm_get_plt_info): Likewise.
729 (elf32_arm_final_link_relocate): Likewise.
730 (elf32_arm_check_relocs): Likewise.
731 (elf32_arm_size_dynamic_sections): Likewise.
732 (elf32_arm_output_arch_local_syms): Likewise.
733
cc850f74
NC
7342021-05-25 Nick Clifton <nickc@redhat.com>
735
736 * elf32-arm.c: Fix formatting.
737
4be1e8db
AM
7382021-05-25 Alan Modra <amodra@gmail.com>
739
740 * elf-attrs.c (elf_attr_strdup): New function.
741 (_bfd_elf_attr_strdup): Use it here.
742 (elf_add_obj_attr_string): New function, extracted from..
743 (bfd_elf_add_obj_attr_string): ..here.
744 (elf_add_obj_attr_int_string): New function, extracted from..
745 (bfd_elf_add_obj_attr_int_string): ..here.
746 (_bfd_elf_parse_attributes): Don't allocate an extra byte for a
747 string terminator. Instead ensure parsing doesn't go past
748 end of sub-section. Use size_t variables for lengths.
749
574ec108
AM
7502021-05-22 Alan Modra <amodra@gmail.com>
751
752 * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter.
753 Replace data pointer with pointer to pointer. Increment pointer
754 over bytes read.
755 * libbfd-in.h (_bfd_safe_read_leb128): Update prototype.
756 * elf-attrs.c (_bfd_elf_parse_attributes): Adjust to suit. Be
757 careful not to increment data pointer past end. Remove now
758 redundant pr17512 check.
759 * wasm-module.c (READ_LEB128): Adjust to suit changes to
760 _bfd_safe_read_leb128.
761 * dwarf2.c (read_n_bytes): New inline function, old one renamed to..
762 (read_blk): ..this. Allocate and return block. Increment bfd_byte**
763 arg.
764 (read_3_bytes): New function.
765 (read_1_byte, read_1_signed_byte, read_2_bytes, read_4_bytes),
766 (read_8_bytes, read_string, read_indirect_string),
767 (read_indirect_line_string, read_alt_indirect_string): Take a
768 byte_byte** arg which is incremented over bytes read. Remove any
769 bytes_read return. Rewrite limit checks to compare lengths
770 rather than pointers.
771 (read_abbrevs, read_attribute_value, read_formatted_entries),
772 (decode_line_info, find_abstract_instance, read_ranges),
773 (read_rnglists, scan_unit_for_symbols, parse_comp_unit),
774 (stash_comp_unit): Adjust to suit. Rewrite limit checks to
775 compare lengths rather than pointers.
776 * libbfd.h: Regenerate.
777
894982bf
LM
7782021-05-21 Luis Machado <luis.machado@linaro.org>
779
780 * elf.c (elfcore_make_memtag_note_section): New function.
781 (elfcore_grok_note): Handle NT_MEMTAG note types.
782
427e4066
AB
7832021-05-20 Andrew Burgess <andrew.burgess@embecosm.com>
784
785 * section.c (bfd_get_section_by_name): Return NULL if name is
786 NULL.
787 (bfd_get_section_by_name_if): Likewise.
788 * dwarf2.c (read_section): Remove unneeded NULL check.
789 (find_debug_info): Likewise.
790
83b0a686
NC
7912021-05-19 Nick Clifton <nickc@redhat.com>
792
793 * plugin.c (bfd_plugin_open_input): Inform the user if the limit
794 on the number of open files is reached. If possible, try to
795 increase this limit before failing.
796
75f03fa7
NC
7972021-05-14 Nelson Chu <nelson.chu@sifive.com>
798
799 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Check the values
800 of %pcrel_hi, before and after adding the addend. Make sure the
801 value won't be changed, otherwise, report dangerous error.
802
7671eff8
NC
8032021-05-13 Nelson Chu <nelson.chu@sifive.com>
804
805 * elfxx-riscv.c (check_implicit_always): The check_func, always add
806 the implicit subset without checking.
807 (check_implicit_for_i): The check_func for i, only add zicsr and
808 zifencei when the version of i less than 2.1.
809 (struct riscv_implicit_subset): Record the subsets and their
810 corresponding implicit subsets.
811 (riscv_implicit_subsets): Table records all implicit informations.
812 (riscv_parse_add_implicit_subsets): Updated and add implicit subsets
813 according to riscv_implicit_subsets. Remove the redundant codes.
814
4863cddb
AM
8152021-05-13 Alan Modra <amodra@gmail.com>
816
817 PR 27858
818 * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid
819 reloc howto.
820
f0bbe8ba
LM
8212021-05-12 Luis Machado <luis.machado@linaro.org>
822
823 * elf-bfd.h (elfcore_write_aarch_mte): New prototype.
824 * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New
825 functions.
826 (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL.
827 (elfcore_write_register_note): Handle MTE notes.
828
8ca5537b
AM
8292021-05-11 Alan Modra <amodra@gmail.com>
830
831 PR 27844
832 * pdp11.c (aout_get_external_symbols): Clear first four bytes of
833 strings array, not just the first byte.
834 * aoutx.h (aout_get_external_symbols): Likewise.
835
b397aef4
L
8362021-05-10 H.J. Lu <hongjiu.lu@intel.com>
837
838 PR binutils/27839
839 * simple.c (bfd_simple_get_relocated_section_contents): Remove
840 strayed fprintf.
841
23182ac0
NC
8422021-05-10 Nick Clifton <nickc@redhat.com>
843
844 PR 27839
845 * simple.c (simple_dummy_add_to_set): New function.
846 (simple_dummy_constructor): New function.
847 (simple_dummy_multiple_common): New function.
848 (bfd_simple_get_relocated_section_contents): Zero out the
849 callbacks structure, and then set the add_to_set, constructor and
850 multiple_common fields.
851
5b45e89f
DD
8522021-05-10 Dimitar Dimitrov <dimitar@dinux.eu>
853
854 * elf32-pru.c (elf_backend_can_gc_sections): Define as 1.
855
cf758b39
MF
8562021-05-08 Mike Frysinger <vapier@gentoo.org>
857
858 * doc/Makefile.am (html-local, bfd/index.html): New targets.
859 * doc/Makefile.in: Regenerate.
860
2faf902d
MF
8612021-05-08 Mike Frysinger <vapier@gentoo.org>
862
863 * doc/Makefile.am (AM_MAKEINFOFLAGS): Define.
864 * doc/Makefile.in: Regenerate.
865
97834047
CC
8662021-05-07 Clément Chigot <clement.chigot@atos.net>
867
868 * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
869 sections.
870 * coffgen.c (coff_pointerize_aux): Handle C_DWARF.
871 (coff_print_symbol): Likewise.
872 * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
873
17c6c3b9
JB
8742021-05-07 Jan Beulich <jbeulich@suse.com>
875
876 * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields
877 to zero.
878
a41513ef
AM
8792021-05-07 Alan Modra <amodra@gmail.com>
880
881 * bfd-in2.h: Regenerate.
882 * libbfd.h: Regenerate.
883
284a1309
SH
8842021-05-06 Stafford Horne <shorne@gmail.com>
885
886 PR 27746
887 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT,
888 OR1K_ADD, OR1K_ORI): New macros to help with plt creation.
889 (elf_or1k_link_hash_table): New field plt_count.
890 (elf_or1k_link_hash_entry): New field plt_index.
891 (elf_or1k_plt_entry_size): New function.
892 (or1k_write_plt_entry): Update to support variable size PLTs.
893 (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry
894 API.
895 (or1k_elf_finish_dynamic_symbol): Update to write large PLTs
896 when needed.
897 (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for
898 PLT size.
899
3c3de29b
SH
9002021-05-06 Stafford Horne <shorne@gmail.com>
901
902 PR 21464
903 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16
904 overflow check if we have R_OR1K_GOT_AHI16 followed by
905 R_OR1K_GOT16.
906
0b3e14c9
SH
9072021-05-06 Stafford Horne <shorne@gmail.com>
908
909 PR 21464
910 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
911 * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
912 (or1k_final_link_relocate, or1k_elf_relocate_section,
913 or1k_elf_check_relocs): Likewise.
914 * libbfd.h (bfd_reloc_code_real_names): Likewise.
915 * reloc.c: Likewise.
916
a76ef689
SH
9172021-05-06 Stafford Horne <shorne@gmail.com>
918
919 PR 27624
920 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change
921 condition used to cleanup plt entries to cleanup forced local
922 entries.
923
4467df35
L
9242021-05-05 H.J. Lu <hongjiu.lu@intel.com>
925
926 PR ld/27825
927 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT"
928 to local symbols.
929
c38c6234
AM
9302021-05-05 Alan Modra <amodra@gmail.com>
931
932 * vms-lib.c (vms_traverse_index): Account for vms_kbn size when
933 sanity checking keylen.
934
bd6d8601
NC
9352021-05-04 Nick Clifton <nickc@redhat.com>
936
937 * libbfd.c (bfd_malloc): Provide some documenation. Treat a size
938 of 0 as 1.
939 (bfd_realloc): Likewise.
940 (bfd_zmalloc): Likewise.
941 (bfd_realloc_or_free): Provide some documentation. Treat a size
942 of 0 as a request to free.
943 * libbfd-in.h (bfd_realloc): Remove prototype.
944 (bfd_realloc_or_free): Remove prototype.
945 (bfd_zmalloc): Remove prototype.
946 * libbfd.h: Regenerate.
947
4c398cc0
JB
9482021-05-03 Jan Beulich <jbeulich@suse.com>
949
950 * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to
951 complain_overflow_dont.
952 * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit
953 relocs to complain_overflow_dont.
954
49160308
AM
9552021-05-03 Alan Modra <amodra@gmail.com>
956
957 * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak
958 symbols when -z dynamic-undefined-weak or when there are no
959 dynamic relocs in read-only sections and -z nodynamic-undefined-weak
960 is not given.
961 * elf64-ppc.c (allocate_dynrelocs): Likewise.
962
b2936612
AM
9632021-05-03 Alan Modra <amodra@gmail.com>
964
965 * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for
966 weak undefined symols that only appear on PLT relocs.
967 * elf64-ppc.c (allocate_dynrelocs): Likewise.
968
337d0bf8
AM
9692021-05-03 Alan Modra <amodra@gmail.com>
970
971 PR 27755
972 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.
973
5072b52d
AM
9742021-05-03 Alan Modra <amodra@gmail.com>
975
976 * elf32-csky.c (is_mapping_symbol_name): New function.
977 (csky_elf_is_target_special_symbol): Likewise.
978 (csky_elf_maybe_function_sym): Likewise.
979 (bfd_elf32_bfd_is_target_special_symbol): Define.
980 (elf_backend_maybe_function_sym): Define.
981
d1fbc3ba
NC
9822021-04-30 Nick Clifton <nickc@redhat.com>
983
984 PR 27801
985 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
986 read 32-bit value.
987
9f84cb38
NC
9882021-04-30 Nick Clifton <nickc@redhat.com>
989
990 PR 27799
991 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
992 that are too small.
993
6cb40a67
NC
9942021-04-30 Nick Clifton <nickc@redhat.com>
995
996 PR 27797
997 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
998 been realloc'ed to size 0.
999
bceb87ef
NC
10002021-04-30 Nick Clifton <nickc@redhat.com>
1001
1002 PR 27795
1003 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
1004 lengths.
1005
09e40e44
NC
10062021-04-29 Nick Clifton <nickc@redhat.com>
1007
1008 PR 27793
1009 * som.c (som_slurp_symbol_table): Assign symbols without any scope
1010 to the undefined section.
1011 (som_decode_symclass): Check for a missing symbol section.
1012 * syms.c (bfd_decode_symclass): Likewise.
1013
063e75c9
NC
10142021-04-29 Nick Clifton <nickc@redhat.com>
1015
1016 PR 27792
1017 * som.c (som_slurp_string_table): Place a terminating NUL byte at
1018 the end of the table.
1019 (som_slurp_symbol_table): Check for an over-large offset into the
1020 string string table.
1021
24aebc79
NC
10222021-04-28 Nick Clifton <nickc@redhat.com>
1023
1024 * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin
1025 symbols as potential function symbols.
1026 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise.
1027 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
1028 * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise.
1029
3955e346
MF
10302021-04-26 Mike Frysinger <vapier@gentoo.org>
1031
1032 * elf-bfd.h: Include stdlib.h.
1033
a7664973
JB
10342021-04-26 Jan Beulich <jbeulich@suse.com>
1035
1036 * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to
1037 complain_overflow_signed.
1038 * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16
1039 to complain_overflow_signed.
1040
f5e98b7d
EB
10412021-04-23 Eric Botcazou <ebotcazou@adacore.com>
1042
1043 * elf.c (special_sections_p): Add .persistent.bss.
1044
c21346c5
JB
10452021-04-23 Jan Beulich <jbeulich@suse.com>
1046
1047 * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero
1048 size field.
1049 * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL
1050 has zero size field.
1051
bdd2aaf6
CC
10522021-04-22 Clément Chigot <clement.chigot@atos.net>
1053
1054 * hash.c (struct bfd_strtab_hash): Remove xcoff field.
1055 Add length_field_size field.
1056 (_bfd_stringtab_init): Change prototype.
1057 Adapt to new length_field_size.
1058 (_bfd_xcoff_stringtab_init): Likewise.
1059 (_bfd_stringtab_add): Likewise.
1060 (_bfd_stringtab_emit): Likewise.
1061 * libbfd-in.h (_bfd_xcoff_stringtab_init):
1062 Change prototype.
1063 * libbfd.h: Regenerate.
1064 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
1065 Call _bfd_xcoff_stringtab_init with isxcoff64 value.
1066
b11b2969
CC
10672021-04-22 Clément Chigot <clement.chigot@atos.net>
1068
1069 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for
1070 unsupported storage class or auxialiry entries.
1071 Improve and adapt to new aux structures.
1072 Add C_DWARF support.
1073 (_bfd_xcoff_swap_aux_out): Likewise.
1074 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
1075 (_bfd_xcoff64_swap_aux_out): Likewise.
1076
18e9a809
EZ
10772021-04-21 Eli Zaretskii <eliz@gnu.org>
1078
1079 PR 27760
1080 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
1081 of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
1082 IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
1083 Decode the contents of the DllCharacteristics field.
1084
33fe00c1
NC
10852021-04-21 Nick Clifton <nickc@redhat.com>
1086
1087 PR 27759
1088 * srec.c (srec_read_section): Replace assertions with error
1089 returns.
1090
c5df7e44
CC
10912021-04-20 Clément Chigot <clement.chigot@atos.net>
1092
1093 PR binutils/21700
1094 * reloc.c (BFD_RELOC_PPC_NEG): New relocation.
1095 * bfd-in2.h: Regenerate.
1096 * libbfd.h: Regenerate.
1097 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add
1098 BFD_RELOC_PPC_NEG handler.
1099 (xcoff_reloc_type_neg): Correctly substract addend.
1100 * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32
1101 howto.
1102 (xcoff64_rtype2howto): Add handler for R_NEG_32.
1103 (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler.
1104 * xcofflink.c (xcoff_need_ldrel_p): Check output section
1105 for R_POS-like relocations. New argument added.
1106 (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument.
1107 (xcoff_link_input_bfd): Likewise.
1108
6f8f6017
AM
11092021-04-16 Alan Modra <amodra@gmail.com>
1110
1111 PR 27567
1112 * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags.
1113 (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT,
1114 ignore alignment checks when return is false. Formatting.
1115
ddfe525f
NC
11162021-04-15 Nelson Chu <nelson.chu@sifive.com>
1117
1118 PR27584
1119 * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to
1120 omit local and empty symbols since they usually generated to
1121 mark the auipc instructions.
1122
f6a1f957
LX
11232021-04-15 Lifang Xia<lifang_xia@c-sky.com>
1124
1125 * elf32-csky.c (csky_elf_howto_table)
1126 <R_CKCORE_PCREL_IMM16BY2>: Set special_function to
1127 bfd_elf_generic_reloc.
1128 <R_CKCORE_PCREL_IMM16BY4>: Likewise.
1129 <R_CKCORE_PCREL_IMM10BY4>: Likewise.
1130 <R_CKCORE_PCREL_IMM18BY2>: Likewise.
1131 <R_CKCORE_PCREL_FLRW_IMM8BY4>: Likewise.
1132
9917b559
L
11332021-04-14 H.J. Lu <hongjiu.lu@intel.com>
1134
1135 PR binutils/27708
1136 * elf.c (assign_file_positions_for_non_load_sections): Set
1137 p_memsz to p_filesz for the loadable PT_NOTE segment.
1138
5f47741b
FC
11392021-04-14 Frederic Cambus <fred@statdns.com>
1140
1141 * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
1142 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
1143
8985b74b
AM
11442021-04-14 Alan Modra <amodra@gmail.com>
1145
1146 PR 27631
1147 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
1148 when hh might be NULL, test for NULL first.
1149
c9f9a78d
AM
11502021-04-14 Alan Modra <amodra@gmail.com>
1151
1152 PR 27630
1153 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
1154 hash might be NULL, cast instead.
1155
d2f1139e
CC
11562021-04-13 Clément Chigot <clement.chigot@atos.net>
1157
1158 * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
1159
e3839c10
NC
11602021-04-13 Nelson Chu <nelson.chu@sifive.com>
1161
1162 * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning
1163 when the version of input or output is RISCV_UNKNOWN_VERSION, since
1164 the extension is added implicitly.
1165 * elfxx-riscv.c: Updated the obsolete comments.
1166 (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h.
1167 * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
1168
43e05cd4
AM
11692021-04-12 Alan Modra <amodra@gmail.com>
1170
1171 * elf-bfd.h (ENABLE_CHECKING): Define.
1172 (elf_link_hash_lookup): Abort if wrong type of hash table.
1173 * configure.ac (--enable-checking): Add support.
1174 * config.in: Regenerate.
1175 * configure: Regenerate.
1176
2cc15b10
AM
11772021-04-12 Alan Modra <amodra@gmail.com>
1178
1179 * elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
1180 (elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
1181 (elf_hash_table, elf_hash_table_id): Likewise.
1182 * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
1183 is_elf_hash_table check.
1184 * elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
1185 * elf32-hppa.c (clobber_millicode_symbols): Correct param types.
1186 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1187 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
1188 (elfNN_ia64_global_dyn_sym_thunk: Likewise.
1189 * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
1190 (elf64_ia64_global_dyn_sym_thunk): Likewise.
1191 (elf64_vms_link_add_object_symbols): Pass base type of hash table
1192 to is_elf_hash_table.
1193 * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
1194 (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
1195 (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
1196 (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
1197 (bfd_elf_final_link): Likewise.
1198 * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
1199 * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup.
1200
b585e899
AM
12012021-04-12 Alan Modra <amodra@gmail.com>
1202
1203 * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry*
1204 from elf_backend_archive_symbol_lookup.
1205 (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*.
1206 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check
1207 we have a ppc_hash_table before accessing ppc_link_hash_entry
1208 fields.
1209 * elflink.c (_bfd_elf_archive_symbol_lookup): Return
1210 bfd_link_hash_entry*.
1211 (elf_link_add_archive_symbols): Adjust to suit.
1212
f5b10973
NC
12132021-04-12 Nelson Chu <nelson.chu@sifive.com>
1214
1215 * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
1216 i-ext when expanding g-ext.
1217
f0bae255
NC
12182021-04-12 Nelson Chu <nelson.chu@sifive.com>
1219
1220 * elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
1221 (riscv_parse_add_subset): Always add the implicit extensions, even if
1222 their versions are RISCV_UNKNOWN_VERSION.
1223 (riscv_parse_std_ext): Delay to add i-ext as the implicit extension
1224 in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the
1225 implicit extension after it has been expanded.
1226 (riscv_parse_add_implicit_subsets): Updated.
1227
e601909a
NC
12282021-04-12 Nelson Chu <nelson.chu@sifive.com>
1229
1230 * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward.
1231 (riscv_std_s_ext_strtab): Likewise.
1232 (riscv_std_h_ext_strtab): Likewise.
1233 (riscv_std_zxm_ext_strtab): Added for the zxm prefix.
1234 (enum riscv_prefix_ext_class): Moved forward and renamed from
1235 riscv_isa_ext_class. Reorder them according to the parsing order,
1236 since the enum values are used to check the orders in the
1237 riscv_compare_subsets.
1238 (struct riscv_parse_prefix_config): Moved forward and renamed from
1239 riscv_parse_config_t. Also removed the ext_valid_p field, the
1240 related functions are replaced by riscv_valid_prefixed_ext.
1241 (parse_config): Moved forward and updated. The more letters of the
1242 prefix string, the more forward it must be defined. Otherwise, we
1243 will get the wrong mapping when using strncmp in riscv_get_prefix_class.
1244 (riscv_get_prefix_class): Moved forward. Support to parse the
1245 multi-letter prefix, like zxm.
1246 (riscv_known_prefixed_ext): New function, check if the prefixed
1247 extension is supported according to the right riscv_std_*_ext_strtab.
1248 (riscv_valid_prefixed_ext): New function, used to replace the
1249 riscv_ext_*_valid_p functions.
1250 (riscv_init_ext_order): Do not set the values for prefix keywords
1251 since they may have multiple letters for now.
1252 (riscv_compare_subsets): Set the order values of prefix keywords
1253 to negative numbers according to the riscv_prefix_ext_class.
1254 (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we
1255 have parsed the prefixed extensions.
1256 (riscv_parse_prefixed_ext): Updated and removed the parameter config.
1257 Report error when the prefix is unknown.
1258 (riscv_parse_subset): Do not parse the prefixed extensions according
1259 to the orders in the parse_config. Remove the confused message and
1260 let riscv_parse_prefixed_ext to report the details.
1261 * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c.
1262 (riscv_get_prefix_class): Removed to static.
1263
eec8bf7e
MF
12642021-04-08 Mike Frysinger <vapier@gentoo.org>
1265
1266 * configure.ac (ACX_BUGURL): Use https://.
1267 * configure.com (COPY_TEXT): Likewise.
1268 * configure: Regenerate.
1269
83c79df8
AM
12702021-04-05 Alan Modra <amodra@gmail.com>
1271
1272 * configure.ac: Don't check for long long or long double type.
1273 Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
1274 strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check
1275 for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
1276 vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS.
1277 (AC_ISC_POSIX): Don't invoke.
1278 (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise.
1279 * sysdep.h: Remove many HAVE_*_H checks and fallback declarations.
1280 Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder
1281 header order as per automake AC_INCLUDES_DEFAULT.
1282 * bfd-in.h: Include inttypes.h unconditionally.
1283 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and
1284 long double are available.
1285 (bfd_scan_vma): Assume long long and strtoull are available.
1286 * elflink.c: Include limits.h unconditionally.
1287 * elfnn-riscv.c: Likewise.
1288 * wasm-module.c: Likewise.
1289 * hpux-core.c: Include dirent.h unconditionally.
1290 * trad-core.c: Likewise.
1291 * hosts/x86-64linux.h: Include stdlib.h unconditionally.
1292 * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks.
1293 * elf32-m68hc1x.c: Don't include alloca-conf.h.
1294 * elf64-hppa.c: Likewise.
1295 * som.c: Likewise.
1296 * wasm-module.c: Likewise.
1297 * xsym.c: Likewise.
1298 * bfd-in2.h: Regenerate.
1299 * config.in: Regenerate.
1300 * configure: Regenerate.
1301
74edb473
TC
13022021-04-01 Tamar Christina <tamar.christina@arm.com>
1303
1304 PR ld/26659
1305 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
1306
e9b095a5
ML
13072021-04-01 Martin Liska <mliska@suse.cz>
1308
1309 * ecoff.c (strneq): Remove strneq and use startswith.
1310 (_bfd_ecoff_slurp_armap): Likewise.
1311
3f3328b8
ML
13122021-04-01 Martin Liska <mliska@suse.cz>
1313
1314 * elf-bfd.h (bfd_section_is_ctf): Use startswith function.
1315 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1316 (elf_get_reloc_section): Likewise.
1317 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
1318 * elf32-m32r.c (m32r_elf_section_flags): Likewise.
1319 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise.
1320 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
1321 (nds32_elf_relocate_section): Likewise.
1322 (nds32_elf_action_discarded): Likewise.
1323 (nds32_elf_check_relocs): Likewise.
1324 (nds32_elf_section_flags): Likewise.
1325 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1326 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1327 * elf32-rx.c (rx_table_find): Likewise.
1328 (rx_table_map): Likewise.
1329 * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise.
1330 (spu_elf_find_overlays): Likewise.
1331 (needs_ovl_stub): Likewise.
1332 (allocate_spuear_stubs): Likewise.
1333 (build_spuear_stubs): Likewise.
1334 (mark_overlay_section): Likewise.
1335 (spu_elf_auto_overlay): Likewise.
1336 (spu_elf_output_symbol_hook): Likewise.
1337 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
1338 * elf32-xtensa.c (xtensa_property_section_name): Likewise.
1339 * elf64-ppc.c (ppc64_elf_section_flags): Likewise.
1340 (ppc64_elf_relocate_section): Likewise.
1341 * elflink.c (resolve_section): Likewise.
1342 (UNARY_OP): Likewise.
1343 (BINARY_OP_HEAD): Likewise.
1344 (elf_link_input_bfd): Likewise.
1345 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
1346 * elfxx-riscv.c (riscv_parse_subset): Likewise.
1347 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
1348 * opncls.c (get_build_id): Likewise.
1349
65c5fbd4
AM
13502021-03-31 Alan Modra <amodra@gmail.com>
1351
1352 PR 27671
1353 * bfd-in.h: Don't poison FALSE or TRUE.
1354 * bfd-in2.h: Regenerate.
1355
0a1b45a2
AM
13562021-03-31 Alan Modra <amodra@gmail.com>
1357
1358 * sysdep.h: POISON_BFD_BOOLEAN: Define.
1359 * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
1360 * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
1361 * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
1362 * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
1363 * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
1364 * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
1365 * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
1366 * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
1367 * coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
1368 * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
1369 * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
1370 * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
1371 * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
1372 * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
1373 * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
1374 * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
1375 * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
1376 * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
1377 * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
1378 * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
1379 * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
1380 * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
1381 * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
1382 * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
1383 * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
1384 * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
1385 * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
1386 * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
1387 * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
1388 * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
1389 * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
1390 * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
1391 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
1392 * elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
1393 * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
1394 * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
1395 * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
1396 * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
1397 * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
1398 * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1399 * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
1400 * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
1401 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
1402 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1403 * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
1404 * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1405 * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
1406 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
1407 * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
1408 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
1409 * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
1410 * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
1411 * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
1412 * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
1413 * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
1414 * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1415 * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
1416 * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
1417 * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1418 * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
1419 * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
1420 * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
1421 * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
1422 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
1423 * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
1424 * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
1425 * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
1426 * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
1427 * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
1428 * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
1429 * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
1430 * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
1431 * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
1432 * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
1433 * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
1434 * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
1435 * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
1436 * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
1437 * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
1438 * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
1439 * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
1440 * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
1441 * xsym.h: Replace bfd_boolean with bool, FALSE with false, and
1442 TRUE with true throughout.
1443 * bfd-in2.h: Regenerate.
1444 * libbfd.h: Regenerate.
1445 * libcoff.h: Regenerate.
1446
ad9e24ad
AM
14472021-03-31 Alan Modra <amodra@gmail.com>
1448
1449 * bfd-in.h: Include stdbool.h.
1450 (bfd_boolean): Define as bool
1451 * bfd-in2.h: Regenerate.
1452
3dfb1b6d
AM
14532021-03-31 Alan Modra <amodra@gmail.com>
1454
1455 * .gitignore: Delete bfd_stdint.h entry.
1456 * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
1457 (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
1458 * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
1459 * configure.ac: Don't invoke GCC_HEADER_STDINT.
1460 * configure.com: Don't create bfd_stdint.h.
1461 * Makefile.in: Regenerate.
1462 * aclocal.m4: Regenerate.
1463 * bfd-in2.h: Regenerate.
1464 * config.in: Regenerate.
1465 * configure: Regenerate.
1466 * doc/Makefile.in: Regenerate.
1467 * po/BLD-POTFILES.in: Regenerate.
1468
57ae980e
AM
14692021-03-31 Alan Modra <amodra@gmail.com>
1470
1471 * bfd-in.h: Include string.h.
1472 (LITMEMCPY, LITSTRCPY): Delete.
1473 * bfd-in2.h: Regenerate.
1474
d1cbe007
AM
14752021-03-30 Alan Modra <amodra@gmail.com>
1476
1477 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
1478 unless is_elf_hash_table.
1479
63b4cc53
AM
14802021-03-29 Alan Modra <amodra@gmail.com>
1481
1482 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
1483 to bfd_boolean.
1484 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
1485 against FALSE.
1486 * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
1487 (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
1488 (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
1489 (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
1490 * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
1491 * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
1492 * elf32-rx.c (rx_set_section_contents): Likewise.
1493 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1494 * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
1495 * mach-o.c (bfd_mach_o_read_command): Likewise.
1496 * targets.c (bfd_get_target_info): Likewise.
1497
f4f9ede0
AM
14982021-03-29 Alan Modra <amodra@gmail.com>
1499
1500 * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
1501 * elf32-z80.c (z80_is_local_label_name): Likewise.
1502 * elf32-spu.c (spu_elf_modify_headers): Likewise.
1503 * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
1504 Change type to int.
1505 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
1506 for error return from vms_write_data_block.
1507
1201fda6
AM
15082021-03-29 Alan Modra <amodra@gmail.com>
1509
1510 * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
1511 * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
1512 (elf64_ia64_local_dyn_sym_thunk): Likewise.
1513 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
1514 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
1515 (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
1516 * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
1517 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
1518 * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
1519 (riscv_pcrel_reloc_eq): Likewise.
1520 (riscv_elf_finish_local_dynamic_symbol): Likewise.
1521 * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
1522 (finish_local_dynamic_symbol): Likewise.
1523 * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
1524 * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
1525 (mips_elf_count_got_symbols): Change return type to bfd_boolean.
1526
37bb890f
AM
15272021-03-29 Alan Modra <amodra@gmail.com>
1528
1529 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
1530 a void pointer.
1531 (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
1532 elf_link_output_symstrtab when calling output_arch_syms and
1533 output_arch_local_syms.
1534 * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
1535 elf_backend_output_arch_local_syms>): Change return type of func
1536 arg to match elf_link_output_symstrtab.
1537 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
1538 return type.
1539 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
1540 (nds32_elf_output_arch_syms): Correct func return type.
1541
0f684201
AM
15422021-03-29 Alan Modra <amodra@gmail.com>
1543
1544 * elf-m10200.c (mn10200_elf_relocate_section): Return int.
1545 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1546 * elf32-arc.c (elf_arc_relocate_section): Likewise.
1547 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1548 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1549 * elf32-bfin.c (bfin_relocate_section): Likewise.
1550 (bfinfdpic_relocate_section): Likewise.
1551 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1552 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1553 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1554 * elf32-csky.c (csky_elf_relocate_section): Likewise.
1555 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1556 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1557 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1558 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1559 * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
1560 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1561 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1562 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1563 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1564 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1565 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1566 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1567 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1568 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1569 * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
1570 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1571 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1572 * elf32-mep.c (mep_elf_relocate_section): Likewise.
1573 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1574 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1575 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1576 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1577 * elf32-mt.c (mt_elf_relocate_section): Likewise.
1578 * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
1579 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1580 * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
1581 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1582 * elf32-pru.c (pru_elf32_relocate_section): Likewise.
1583 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1584 * elf32-rx.c (rx_elf_relocate_section): Likewise.
1585 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1586 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1587 (_bfd_score_elf_relocate_section): Likewise.
1588 * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
1589 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1590 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1591 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1592 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1593 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1594 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1595 * elf32-visium.c (visium_elf_relocate_section): Likewise.
1596 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1597 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1598 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1599 * elf32-z80.c (z80_elf_relocate_section): Likewise.
1600 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1601 (elf64_alpha_relocate_section): Likewise.
1602 * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
1603 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1604 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1605 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1606 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1607 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1608 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1609 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1610 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1611 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1612 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1613 * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
1614 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1615 * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
1616 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1617 * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
1618
ff5b3e14
KS
16192021-03-26 Keith Seitz <keiths@redhat.com>
1620
1621 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
1622 offset of program headers after calling elf_read_notes.
1623
f596b03f
JB
16242021-03-23 Jan Beulich <jbeulich@suse.com>
1625
1626 * dwarf2.c (read_indexed_string): Rename index to idx.
1627
08dedd66
ML
16282021-03-22 Martin Liska <mliska@suse.cz>
1629
1630 * bfd-in.h (startswith): Add startswith function.
1631 (CONST_STRNEQ): Remove.
1632 * bfd-in2.h (startswith): Regenerate with make headers.
1633 * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
1634 (_bfd_slurp_extended_name_table): Likewise.
1635 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1636 * bfd.c (bfd_get_sign_extend_vma): Likewise.
1637 (bfd_convert_section_size): Likewise.
1638 (bfd_convert_section_contents): Likewise.
1639 * coff-stgo32.c (go32exe_create_stub): Likewise.
1640 (go32exe_check_format): Likewise.
1641 * coffcode.h (styp_to_sec_flags): Likewise.
1642 (GNU_DEBUGALTLINK): Likewise.
1643 * coffgen.c (_bfd_coff_section_already_linked): Likewise.
1644 (coff_gc_sweep): Likewise.
1645 (bfd_coff_gc_sections): Likewise.
1646 * cofflink.c (coff_link_add_symbols): Likewise.
1647 (process_embedded_commands): Likewise.
1648 * compress.c (bfd_is_section_compressed_with_header): Likewise.
1649 (bfd_init_section_decompress_status): Likewise.
1650 * dwarf2.c (find_debug_info): Likewise.
1651 (place_sections): Likewise.
1652 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
1653 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1654 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1655 (assign_section_numbers): Likewise.
1656 (elfcore_grok_win32pstatus): Likewise.
1657 * elf32-arm.c (cmse_scan): Likewise.
1658 (elf32_arm_gc_mark_extra_sections): Likewise.
1659 (elf32_arm_size_dynamic_sections): Likewise.
1660 (is_arm_elf_unwind_section_name): Likewise.
1661 * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
1662 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
1663 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
1664 * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
1665 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1666 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1667 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
1668 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
1669 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1670 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
1671 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
1672 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
1673 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
1674 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1675 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1676 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1677 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1678 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1679 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
1680 (elf32_tic6x_size_dynamic_sections): Likewise.
1681 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
1682 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
1683 (xtensa_is_insntable_section): Likewise.
1684 (xtensa_is_littable_section): Likewise.
1685 (xtensa_is_proptable_section): Likewise.
1686 (xtensa_property_section_name): Likewise.
1687 (xtensa_callback_required_dependence): Likewise.
1688 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1689 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1690 * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
1691 (get_reloc_section): Likewise.
1692 (elf64_ia64_size_dynamic_sections): Likewise.
1693 (elf64_ia64_object_p): Likewise.
1694 * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
1695 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
1696 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1697 * elflink.c (elf_link_add_object_symbols): Likewise.
1698 (_bfd_elf_gc_mark_extra_sections): Likewise.
1699 (bfd_elf_parse_eh_frame_entries): Likewise.
1700 (_bfd_elf_section_already_linked): Likewise.
1701 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
1702 * elfnn-ia64.c (is_unwind_section_name): Likewise.
1703 (elfNN_ia64_size_dynamic_sections): Likewise.
1704 (elfNN_ia64_object_p): Likewise.
1705 * elfxx-mips.c (FN_STUB_P): Likewise.
1706 (CALL_STUB_P): Likewise.
1707 (CALL_FP_STUB_P): Likewise.
1708 (_bfd_mips_elf_section_from_shdr): Likewise.
1709 (_bfd_mips_elf_fake_sections): Likewise.
1710 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1711 (_bfd_mips_final_write_processing): Likewise.
1712 (_bfd_mips_elf_final_link): Likewise.
1713 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1714 * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
1715 (elf_x86_64_is_reloc_section): Likewise.
1716 * hpux-core.c (thread_section_p): Likewise.
1717 * libcoff.h (bfd_pei_p): Likewise.
1718 * linker.c (REAL): Likewise.
1719 (unwrap_hash_lookup): Likewise.
1720 (_bfd_generic_link_add_one_symbol): Likewise.
1721 * mmo.c (mmo_internal_write_section): Likewise.
1722 * osf-core.c (osf_core_core_file_p): Likewise.
1723 * pef.c (bfd_pef_print_symbol): Likewise.
1724 * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
1725 * som.c (som_slurp_symbol_table): Likewise.
1726 (som_slurp_armap): Likewise.
1727 * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
1728
2aaf2ce8
JB
17292021-03-22 Jan Beulich <jbeulich@suse.com>
1730
1731 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
1732 language translation wrapping to _bfd_error_handler()
1733 invocations.
1734
e9338841
AM
17352021-03-21 Alan Modra <amodra@gmail.com>
1736
1737 * bfd-in.h (startswith): New inline.
1738 (CONST_STRNEQ): Use startswith.
1739 * bfd-in2.h: Regenerate.
1740
15407e7e
AM
17412021-03-20 Alan Modra <amodra@gmail.com>
1742
1743 PR 27590
1744 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
1745 test for .gnu.debuglto*.
1746
3818d4ab
L
17472021-03-18 H.J. Lu <hongjiu.lu@intel.com>
1748
1749 PR ld/27590
15407e7e 1750 * elf.c (_bfd_elf_make_section_from_shdr): Treat
3818d4ab
L
1751 .gnu.debuglto_.debug_ section as debugging section unless it is
1752 marked with SHF_EXCLUDE.
1753 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
1754 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
1755 matching non-debugging sections or linkonce section with comdat
1756 section.
1757
51f6e7a9
L
17582021-03-18 H.J. Lu <hongjiu.lu@intel.com>
1759
1760 PR ld/27587
1761 * dwarf2.c (read_attribute_value): Check version >= 3 for
1762 DW_FORM_ref_addr.
1763
012d4426
NC
17642021-03-16 Nick Clifton <nickc@redhat.com>
1765
1766 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
1767 overrun by using sizeof of the destination x_fname field as the
1768 limit for a memcpy.
1769
80d49d6a
KLC
17702021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1771
1772 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
1773
1b2cb8e2
CC
17742021-03-12 Clément Chigot <clement.chigot@atos.net>
1775
1776 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
1777 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
1778 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
1779 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
1780 BFD_RELOC_PPC64_TLS_ML): New relocations.
1781 * bfd-in2.h: Regenerate.
1782 * libbfd.h: Regenerate.
1783 * coff-rs6000.c (xcoff_calculate_relocation): Call
1784 xcoff_reloc_type_tls for TLS relocations.
1785 (xcoff_howto_table): Implement TLS relocations.
1786 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
1787 (xcoff_reloc_type_tls): New function.
1788 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
1789 (xcoff_howto_table): Likewise.
1790 (_bfd_xcoff_reloc_type_lookup): Likewise.
1791 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
1792 (styp_to_sec_flags): Likewise.
1793 (coff_compute_section_file_positions): Avoid file offset
1794 optimisation for .data when the previous section is .tdata.
1795 (coff_write_object_contents): Handle TLS sections.
1796 * coffswap.h (coff_swap_aouthdr_out): Add support for
1797 new fields in aouthdr.
1798 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
1799 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
1800 (xcoff_need_ldrel_p): Add cases for TLS relocations.
1801 (xcoff_create_ldrel): Add l_symndx for TLS sections.
1802
4a403be0
CC
18032021-03-12 Clément Chigot <clement.chigot@atos.net>
1804
1805 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
1806 New relocations.
1807 * bfd-in2.h: Regenerate.
1808 * libbfd.h: Regenerate.
1809 * coff-rs6000.c (xcoff_calculate_relocation): Call
1810 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
1811 (xcoff_howto_table): Remove src_mask for TOC relocations.
1812 Add R_TOCU and R_TOCL howtos.
1813 (_bfd_xcoff_reloc_type_lookup): Add cases for
1814 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
1815 (xcoff_reloc_type_toc): Compute the whole offset.
1816 Implement R_TOCU and R_TOCL.
1817 * coff64-rs6000.c (xcoff64_calculate_relocation):
1818 Likewise.
1819 (xcoff64_howto_table): Likewise.
1820 (xcoff64_reloc_type_lookup): Likewise.
1821
2c1bef53
CC
18222021-03-12 Clément Chigot <clement.chigot@atos.net>
1823
1824 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
1825 add new relocations.
1826 (xcoff_howto_table): Likewise.
1827 (xcoff_rtype2howto): Increase r_type maximum value.
1828 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
1829 of create a new one from scratch. Enable only some relocations
1830 to have a changing r_size.
1831 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
1832 (xcoff64_howto_table): Likewise.
1833 (xcoff64_rtype2howto): Likewise.
1834 (xcoff64_ppc_relocate_section): Likewise.
1835 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
1836
0c929e83
CC
18372021-03-12 Clément Chigot <clement.chigot@atos.net>
1838
1839 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
1840
6d4d9328
CC
18412021-03-12 Clément Chigot <clement.chigot@atos.net>
1842
1843 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
1844 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
1845 support for o_cputype field. Avoid creating an empty a.out header
1846 for XCOFF64.
1847
8aa2d023
CC
18482021-03-12 Clément Chigot <clement.chigot@atos.net>
1849
1850 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
1851 missing smclass.
1852
ebdcad3f
NC
18532021-03-11 Nelson Chu <nelson.chu@sifive.com>
1854
1855 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
1856 restart_relax, used to check if we need to run the whole
1857 relaxations from relax pass 0 to 2 again.
1858 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
1859 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
1860 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
1861 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
1862 after_allocation to check if we need to run the whole relaxations again.
1863 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
1864 when the restart_relax is FALSE; At last set restart_relax to TRUE if
1865 again is TRUE, too.
1866 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
1867 (bfd_elf64_riscv_restart_relax_sections): Likewise.
1868
67b0f684
JB
18692021-03-10 Jan Beulich <jbeulich@suse.com>
1870
1871 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
1872 offset.
1873
2dfa8341
AM
18742021-03-10 Alan Modra <amodra@gmail.com>
1875 Jan Beulich <jbeulich@suse.com>
1876
1877 * elf.c (bfd_elf_generic_reloc): Make references between debug
1878 sections use section relative values.
1879
87fa7d56
JB
18802021-03-09 Jan Beulich <jbeulich@suse.com>
1881
1882 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
1883
8c0546e9
L
18842021-03-05 H.J. Lu <hongjiu.lu@intel.com>
1885
1886 PR ld/27425
1887 PR ld/27432
1888 * bfd.c (_bfd_get_link_info): New function.
1889 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
1890 (elf_link_info): New.
1891 * libbfd-in.h (_bfd_get_link_info): New prototype.
1892 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
1893 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
1894 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
1895 (pex64_link_add_symbols): New function.
1896 (coff_bfd_link_add_symbols): New macro.
1897 * libbfd.h: Regenerated.
1898
db6092f3
AB
18992021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1900 Andrew Burgess <andrew.burgess@embecosm.com>
1901
1902 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
1903 * elf.c (elfcore_grok_riscv_csr): New function.
1904 (elfcore_grok_note): Handle NT_RISCV_CSR.
1905 (elfcore_write_riscv_csr): New function.
1906 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
1907
0897bb7d
AB
19082021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1909 Andrew Burgess <andrew.burgess@embecosm.com>
1910
1911 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
1912 (PRPSINFO_PR_PSARGS_LENGTH): Define.
1913 (riscv_write_core_note): New function.
1914 (riscv_elf_grok_psinfo): Make use of two new length defines.
1915 (elf_backend_write_core_note): Define.
1916
b63a5e38
AB
19172021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1918 Andrew Burgess <andrew.burgess@embecosm.com>
1919
1920 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
1921 * elf.c (elfcore_grok_gdb_tdesc): New function.
1922 (elfcore_grok_note): Handle NT_GDB_TDESC.
1923 (elfcore_write_gdb_tdesc): New function.
1924 (elfcore_write_register_note): Handle NT_GDB_TDESC.
1925
2017f387
NC
19262021-03-05 Nick Clifton <nickc@redhat.com>
1927
1928 PR 27521
1929 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
1930 (read_indexed_string): Placeholder function.
1931 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
1932 forms.
1933
b01b5d9a
AM
19342021-03-05 Alan Modra <amodra@gmail.com>
1935
1936 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
1937 2020-09-16 changes.
1938 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
1939 adjustments here instead. Separate pc-relative adjustments
1940 from symbol related adjustments. Tidy comments and formatting.
1941
6b5465b9
JB
19422021-03-04 Jan Beulich <jbeulich@suse.com>
1943
1944 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
1945 final PE images.
1946
0b7733b6
AM
19472021-03-04 Alan Modra <amodra@gmail.com>
1948
1949 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
1950
5789f845
AM
19512021-03-03 Alan Modra <amodra@gmail.com>
1952
1953 PR 27500
1954 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
1955 processing not when start/stop symbol section is unmarked but
1956 on first time a start/stop symbol is processed.
1957
dc83f2d2
AM
19582021-03-03 Alan Modra <amodra@gmail.com>
1959
1960 * reloc.c: Include x86_64.h rather than internal.h.
1961
ca8f6bc6
NC
19622021-03-02 Nick Clifton <nickc@redhat.com>
1963
1964 PR 27484
1965 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
1966 function and variable tags and a second time to resolve their
1967 attributes.
1968
211bcd01
NA
19692021-03-02 Nick Alcock <nick.alcock@oracle.com>
1970
1971 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
1972
b80e421f
AM
19732021-03-02 Alan Modra <amodra@gmail.com>
1974
1975 PR 27451
1976 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
1977 linker defined start/stop symbols when start_stop_gc.
1978
f5b9c288
AM
19792021-03-02 Alan Modra <amodra@gmail.com>
1980
1981 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
1982 indirect to pc-relative or toc-relative for undefined symbols.
1983
8ee10e86
AM
19842021-03-01 Alan Modra <amodra@gmail.com>
1985 Fangrui Song <maskray@google.com>
1986
1987 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
1988 defined start/stop symbols when start_stop_gc.
1989 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1990 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
1991 * linker.c (bfd_generic_define_start_stop): Likewise.
1992
bbaddd4b
AM
19932021-02-25 Alan Modra <amodra@gmail.com>
1994
1995 PR 27441
1996 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
1997 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
1998 use when deciding an as-needed library should be loaded instead
1999 of using the binding of the library definition.
2000
93af1b04
AM
20012021-02-24 Alan Modra <amodra@gmail.com>
2002
2003 PR 27459
2004 * coff-stgo32.c (go32exe_check_format): Sanity check size of
2005 header to avoid a buffer overflow.
2006
e9d18e06
AM
20072021-02-22 Alan Modra <amodra@gmail.com>
2008
2009 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
2010 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
2011
5a9f5403
NC
20122021-02-19 Nelson Chu <nelson.chu@sifive.com>
2013
2014 PR 27158
2015 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
2016 (_bfd_riscv_relax_call): Likewise.
2017 (_bfd_riscv_relax_lui): Likewise.
2018 * elfxx-riscv.c (howto_table): Likewise.
2019
3d73d29e
NC
20202021-02-18 Nelson Chu <nelson.chu@sifive.com>
2021
2022 * Makefile.am: Added cpu-riscv.h.
2023 * Makefile.in: Regenerated.
2024 * po/SRC-POTFILES.in: Regenerated.
2025 * cpu-riscv.h: Added to support spec versions controlling.
2026 Also added extern arrays and functions for cpu-riscv.c.
2027 (enum riscv_spec_class): Define all spec classes here uniformly.
2028 (struct riscv_spec): Added for all specs.
2029 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
2030 (RISCV_GET_SPEC_NAME): Likewise.
2031 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
2032 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
2033 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
2034 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
2035 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
2036 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
2037 (riscv_priv_specs): Moved below.
2038 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
2039 (riscv_isa_specs): Moved from include/opcode/riscv.h.
2040 * elfnn-riscv.c: Included cpu-riscv.h.
2041 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
2042 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
2043 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
2044 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
2045
b9b204b3
AM
20462021-02-17 Alan Modra <amodra@gmail.com>
2047
2048 * wasm-module.c: Guard include of limits.h.
2049 (CHAR_BIT): Provide backup define.
2050 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
2051 Correct signed overflow checking.
2052
0d6aab77
NC
20532021-02-17 Nelson Chu <nelson.chu@sifive.com>
2054
2055 PR 27200
2056 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
2057 copying the elf flags from input BFD to output BFD, until we have
2058 checked if the input BFD has no code section or not. Also fix the
2059 problem that we only check the first section rather than the entire
2060 sections for input BFD.
2061
7b54cadd
AM
20622021-02-16 Alan Modra <amodra@gmail.com>
2063
2064 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
2065 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
2066
8c674061
JB
20672021-02-15 Jan Beulich <jbeulich@suse.com>
2068
2069 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
2070 * doc/Makefile.in: Re-generate.
2071
1781a9d0
AM
20722021-02-15 Alan Modra <amodra@gmail.com>
2073
2074 * elf32-nds32.c (nds32_get_section_contents): Replace
2075 bfd_malloc_and_get_section with bfd_get_full_section_contents.
2076 (nds32_elf_relax_delete_blanks): Init contents.
2077 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
2078
8b78cbec
AM
20792021-02-15 Alan Modra <amodra@gmail.com>
2080
2081 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
2082 bfd_get_full_section_contents.
2083
d7a7af8f
AM
20842021-02-14 Alan Modra <amodra@gmail.com>
2085
2086 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
2087 all fixes to bfd_generic_get_relocated_section_contents since this
2088 function was split out.
2089
234b98ce
AM
20902021-02-11 Alan Modra <amodra@gmail.com>
2091
2092 * config.bfd: Remove ia64 from obsolete list.
2093
769c253f
AM
20942021-02-11 Alan Modra <amodra@gmail.com>
2095
2096 PR ld/22269
2097 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
2098
31c711a2
AM
20992021-02-11 Alan Modra <amodra@gmail.com>
2100
2101 PR 27294
2102 * elf32-avr.c (avr_elf32_load_records_from_section): Use
2103 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
2104 unnecessary casts.
2105
6db658c5
AM
21062021-02-11 Alan Modra <amodra@gmail.com>
2107
2108 PR 27291
2109 * section.c (bfd_get_section_contents): Avoid possible overflow
2110 when range checking offset and count.
2111 (bfd_set_section_contents): Likewise.
2112
95148614
NA
21132021-02-03 Nick Alcock <nick.alcock@oracle.com>
2114
2115 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
2116 favour of LIBINTL.
2117 * configure: Regenerated.
2118
a57d1773
AM
21192021-02-09 Alan Modra <amodra@gmail.com>
2120
2121 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
2122 * configure.ac: Delete symbian entries.
2123 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
2124 * elf32-arm.c: Remove symbian support. Formatting.
2125 * targets.c: Delete symbian entries.
2126 * configure: Regenerate.
2127
1a2f1b54
L
21282021-02-04 H.J. Lu <hongjiu.lu@intel.com>
2129
2130 PR ld/19609
2131 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
2132 info when failed to convert GOTPCREL relocation.
2133
24075dcc
NC
21342021-02-04 Nelson Chu <nelson.chu@sifive.com>
2135
2136 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
2137
7d409ac0
AM
21382021-02-04 Alan Modra <amodra@gmail.com>
2139
2140 PR 27311
2141 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
2142 libraries for IR references on pass over libraries after LTO
2143 recompilation.
2144
f01fb44c
AM
21452021-02-03 Alan Modra <amodra@gmail.com>
2146
2147 PR 27311
2148 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
2149 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
2150 libraries when H is an indirect symbol after calling
2151 _bfd_elf_add_default_symbol.
2152
69551367
AM
21532021-02-03 Alan Modra <amodra@gmail.com>
2154
2155 PR 27311
2156 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
2157 undecorated symbol will have a different version.
2158
9918bff7
AM
21592021-02-02 Alan Modra <amodra@gmail.com>
2160
2161 PR 27311
2162 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
2163 Use when handling default versioned symbol. Rename existing
2164 override variable to nondef_override and use for non-default
2165 versioned symbol.
2166 (elf_link_add_object_symbols): Adjust call to suit. Don't
2167 pull in as-needed libraries when override is set.
2168
1f568f9a
EH
21692021-02-01 Emery Hemingway <ehmry@posteo.net>
2170
2171 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
2172
34c10233
EV
21732021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
2174
2175 PR 27254
2176 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
2177 offset for the R_RL78_RH_SADDR relocation.
2178
c4566785
AM
21792021-01-29 Alan Modra <amodra@gmail.com>
2180
2181 PR 27271
2182 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
2183 on symbols defined in absolute or other special sections.
2184
def97fb9
AM
21852021-01-28 Alan Modra <amodra@gmail.com>
2186
2187 PR 27259
2188 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
2189 prevent endless looping of linked-to sections.
2190
4cb1265b
MS
21912020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
2192
2193 * bfd-elf.h (elfcore_write_file_note): New function.
2194 * elf.c (elfcore_write_file_note): New function.
2195
4287950e
AM
21962021-01-26 Alan Modra <amodra@gmail.com>
2197
2198 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
2199
940d0202
L
22002021-01-24 H.J. Lu <hongjiu.lu@intel.com>
2201
2202 PR binutils/27231
2203 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
2204 number tables.
2205
18454c15
L
22062021-01-23 H.J. Lu <hongjiu.lu@intel.com>
2207
2208 PR binutils/27231
2209 * dwarf2.c (read_rnglists): Advance rngs_ptr after
2210 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
2211
4bd7c902
AM
22122021-01-20 Alan Modra <amodra@gmail.com>
2213
2214 * elf32-ppc.c: Delete outdated comment.
2215 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
2216 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
2217
8bd10d6b
AM
22182021-01-20 Alan Modra <amodra@gmail.com>
2219
2220 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
2221 section symbols are present.
2222
30845f11
AM
22232021-01-19 Alan Modra <amodra@gmail.com>
2224
2225 * elf64-ppc.c (elf_hash_entry): New inline function. Use
2226 throughout to replace casts.
2227 (branch_reloc_hash_match): Remove const from params.
2228 (use_local_plt): New function.
2229 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
2230 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
2231 Use use_local_plt.
2232 * elf32-ppc.c (use_local_plt): New function.
2233 (allocate_dynrelocs, ppc_elf_relocate_section),
2234 (write_global_sym_plt): Use use_local_plt.
2235
994b2513
L
22362021-01-17 H.J. Lu <hongjiu.lu@intel.com>
2237
2238 PR ld/27193
2239 * elflink.c (elf_create_symbuf): Also ignore section symbols.
2240
75a933f3
L
22412021-01-16 H.J. Lu <hongjiu.lu@intel.com>
2242
2243 PR ld/23169
2244 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
2245 check pointer_equality_needed.
2246
68b00778
L
22472021-01-15 H.J. Lu <hongjiu.lu@intel.com>
2248
2249 * elf-linker-x86.h (elf_linker_x86_params): Add
2250 report_relative_reloc.
2251 * elf32-i386.c (elf_i386_relocate_section): Call
2252 _bfd_x86_elf_link_report_relative_reloc to report relative
2253 relocations for -z report-relative-reloc.
2254 (elf_i386_finish_dynamic_symbol): Likewse.
2255 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
2256 (elf_x86_64_finish_dynamic_symbol): Likewse.
2257 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
2258 function.
2259 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
2260 prototype.
2261
ad92f33d
AM
22622021-01-16 Alan Modra <amodra@gmail.com>
2263
2264 * compress.c (decompress_contents): Tidy inflateEnd result test.
2265
eb6e6af8
AM
22662021-01-16 Alan Modra <amodra@gmail.com>
2267
2268 PR 26002
2269 * elflink.c (elf_link_output_extsym): Use version 1 in
2270 .gnu.version for undefined unversioned symbols.
2271
4bb5732e
NC
22722021-01-15 Nelson Chu <nelson.chu@sifive.com>
2273
2274 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
2275 caused the by previous commit accidentally.
2276
1942a048
NC
22772021-01-15 Nelson Chu <nelson.chu@sifive.com>
2278
2279 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
2280 also aligned the code.
2281
b800637e
NC
22822021-01-15 Nelson Chu <nelson.chu@sifive.com>
2283
2284 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
2285
dcd709e0
NC
22862021-01-15 Nelson Chu <nelson.chu@sifive.com>
2287
2288 * elfnn-riscv.c: Comments tidy and improvement.
2289 * elfxx-riscv.c: Likewise.
2290 * elfxx-riscv.h: Likewise.
2291
8ca9c7eb
L
22922021-01-14 H.J. Lu <hongjiu.lu@intel.com>
2293
2294 PR ld/26688
2295 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
2296 section for R_BFIN_FUNCDESC.
2297
7e0d77ef
NC
22982021-01-14 Nick Clifton <nickc@redhat.com>
2299
2300 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
2301
5347ed60
AM
23022021-01-13 Alan Modra <amodra@gmail.com>
2303
2304 * Makefile.in: Regenerate.
2305 * doc/Makefile.in: Regenerate.
2306
b209b5a6
AM
23072021-01-13 Alan Modra <amodra@gmail.com>
2308
2309 PR 27160
2310 * section.c (struct bfd_section): Remove pattern field.
2311 (BFD_FAKE_SECTION): Adjust to suit.
2312 * bfd-in2.h: Regenerate.
2313 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
2314 (bfd_elf_final_link): Don't call elf_fixup_link_order.
2315
d546b610
L
23162021-01-12 H.J. Lu <hongjiu.lu@intel.com>
2317
2318 PR binutils/26792
2319 * configure.ac: Use GNU_MAKE_JOBSERVER.
2320 * aclocal.m4: Regenerated.
2321 * configure: Likewise.
2322
c2e9a4a3
L
23232021-01-12 H.J. Lu <hongjiu.lu@intel.com>
2324
2325 PR ld/27171
2326 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
2327 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
2328
83b33c6c
L
23292021-01-11 H.J. Lu <hongjiu.lu@intel.com>
2330
2331 PR ld/27173
2332 * configure: Regenerated.
2333
a8aa72b9
NC
23342021-01-11 Nick Clifton <nickc@redhat.com>
2335
2336 * po/fr.po: Updated French translation.
2337 * po/pt.po: Updated Portuguese translation.
2338 * po/sr.po: Updated Serbian translation.
2339 * po/uk.po: Updated Ukranian translation.
2340
a4966cd9
L
23412021-01-09 H.J. Lu <hongjiu.lu@intel.com>
2342
2343 * configure: Regenerated.
2344
0a94990b
L
23452021-01-09 H.J. Lu <hongjiu.lu@intel.com>
2346
2347 PR ld/27166
2348 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
2349 -z lam-u48 and -z lam-u57.
2350
573fe3fb
NC
23512021-01-09 Nick Clifton <nickc@redhat.com>
2352
2353 * version.m4: Change to 2.36.50.
2354 * configure: Regenerate.
2355 * po/bfd.pot: Regenerate.
2356
055bc77a
NC
23572021-01-09 Nick Clifton <nickc@redhat.com>
2358
2359 * 2.36 release branch crated.
2360
ba9e922f
L
23612021-01-08 H.J. Lu <hongjiu.lu@intel.com>
2362
2363 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
2364 LAM_U57 when setting LAM_U48.
2365
b1b29aa5
L
23662021-01-08 H.J. Lu <hongjiu.lu@intel.com>
2367
2368 PR ld/26256
2369 PR ld/27160
2370 * elflink.c (elf_fixup_link_order): Verify that fixing up
2371 SHF_LINK_ORDER doesn't increase the output section size.
2372
64307045
AM
23732021-01-09 Alan Modra <amodra@gmail.com>
2374
2375 * configure: Regenerate.
2376
f4782128
ST
23772021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
2378
2379 * configure: Regenerate.
2380
d1bcae83
L
23812021-01-07 H.J. Lu <hongjiu.lu@intel.com>
2382
2383 PR 27109
2384 * aix386-core.c (core_aix386_vec): Initialize
2385 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
2386 * aout-target.h (MY (vec)): Likewise.
2387 * binary.c (binary_vec): Likewise.
2388 * cisco-core.c (core_cisco_be_vec): Likewise.
2389 (core_cisco_le_vec): Likewise.
2390 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
2391 * coff-i386.c (TARGET_SYM): Likewise.
2392 (TARGET_SYM_BIG): Likewise.
2393 * coff-ia64.c (TARGET_SYM): Likewise.
2394 * coff-mips.c (mips_ecoff_le_vec): Likewise.
2395 (mips_ecoff_be_vec): Likewise.
2396 (mips_ecoff_bele_vec): Likewise.
2397 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
2398 (powerpc_xcoff_vec): Likewise.
2399 * coff-sh.c (sh_coff_small_vec): Likewise.
2400 (sh_coff_small_le_vec): Likewise.
2401 * coff-tic30.c (tic30_coff_vec): Likewise.
2402 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
2403 (tic54x_coff0_beh_vec): Likewise.
2404 (tic54x_coff1_vec): Likewise.
2405 (tic54x_coff1_beh_vec): Likewise.
2406 (tic54x_coff2_vec): Likewise.
2407 (tic54x_coff2_beh_vec): Likewise.
2408 * coff-x86_64.c (TARGET_SYM): Likewise.
2409 (TARGET_SYM_BIG): Likewise.
2410 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
2411 (rs6000_xcoff64_aix_vec): Likewise.
2412 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
2413 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
2414 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
2415 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
2416 (TARGET_LITTLE_SYM): Likewise.
2417 * hppabsd-core.c (core_hppabsd_vec): Likewise.
2418 * hpux-core.c (core_hpux_vec): Likewise.
2419 * i386msdos.c (i386_msdos_vec): Likewise.
2420 * ihex.c (ihex_vec): Likewise.
2421 * irix-core.c (core_irix_vec): Likewise.
2422 * mach-o-target.c (TARGET_NAME): Likewise.
2423 * mmo.c (mmix_mmo_vec): Likewise.
2424 * netbsd-core.c (core_netbsd_vec): Likewise.
2425 * osf-core.c (core_osf_vec): Likewise.
2426 * pdp11.c (MY (vec)): Likewise.
2427 * pef.c (pef_vec): Likewise.
2428 (pef_xlib_vec): Likewise.
2429 * plugin.c (plugin_vec): Likewise.
2430 * ppcboot.c (powerpc_boot_vec): Likewise.
2431 * ptrace-core.c (core_ptrace_vec): Likewise.
2432 * sco5-core.c (core_sco5_vec): Likewise.
2433 * som.c (hppa_som_vec): Likewise.
2434 * srec.c (srec_vec): Likewise.
2435 (symbolsrec_vec): Likewise.
2436 * tekhex.c (tekhex_vec): Likewise.
2437 * trad-core.c (core_trad_vec): Likewise.
2438 * verilog.c (verilog_vec): Likewise.
2439 * vms-alpha.c (alpha_vms_vec): Likewise.
2440 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
2441 * wasm-module.c (wasm_vec): Likewise.
2442 * xsym.c (sym_vec): Likewise.
2443 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
2444 isn't set.
2445 (elf_map_symbols): Don't include ignored section symbols.
2446 * elfcode.h (elf_slurp_symbol_table): Also set
2447 BSF_SECTION_SYM_USED on STT_SECTION symbols.
2448 * elflink.c (bfd_elf_final_link): Generated section symbols only
2449 when emitting relocations or reqired.
2450 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
2451 * syms.c (BSF_SECTION_SYM_USED): New.
2452 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
2453 (bfd_target): Add keep_unused_section_symbols.
2454 (bfd_keep_unused_section_symbols): New.
2455 * bfd-in2.h: Regenerated.
2456
17d60030
NC
24572021-01-07 Nick Clifton <nickc@redhat.com>
2458
2459 PR 25713
2460 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
2461 absolute paths and check to see if they are longer than MAX_PATH.
2462
aa881ecd
PT
24632021-01-07 Philipp Tomsich <prt@gnu.org>
2464
2465 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
2466
2652cfad
CXW
24672021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
2468 Jim Wilson <jimw@sifive.com>
2469 Andrew Waterman <andrew@sifive.com>
2470 Maxim Blinov <maxim.blinov@embecosm.com>
2471 Kito Cheng <kito.cheng@sifive.com>
2472 Nelson Chu <nelson.chu@sifive.com>
2473
2474 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
2475
d4e57b87
L
24762021-01-06 H.J. Lu <hongjiu.lu@intel.com>
2477
2478 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
2479 (bfinfdpic_check_relocs): Likewise.
2480
599c86c4
AM
24812021-01-06 Alan Modra <amodra@gmail.com>
2482
2483 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
2484 on unknown r_type.
2485 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2486
3677b729
AM
24872021-01-06 Alan Modra <amodra@gmail.com>
2488
2489 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
2490 (sparc64-*-solaris2*): Add sparc_elf64_vec and
2491 sparc_elf32_vec.
2492
fbc09e7a
MC
24932021-01-06 Marcus Comstedt <marcus@mc.pp.se>
2494
2495 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
2496 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
2497 * configure.ac: Handle riscv_elf[32|64]_be_vec.
2498 * configure: Regenerate.
2499 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
2500 riscv_is_insn_reloc.
2501 (riscv_get_insn): RISC-V instructions are always little endian, but
2502 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
2503 the insturctions.
2504 (riscv_put_insn): Likewsie.
2505 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
2506 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
2507 use riscv_[get|put]_insn or bfd_[get|put].
2508 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
2509 or bfd_[get|put]l16 for code.
2510 (riscv_elf_relocate_section): Likewise.
2511 (riscv_elf_finish_dynamic_symbol): Likewise.
2512 (riscv_elf_finish_dynamic_sections): Likewise.
2513 (_bfd_riscv_relax_call): Likewise.
2514 (_bfd_riscv_relax_lui): Likewise.
2515 (_bfd_riscv_relax_align): Likewise.
2516 (_bfd_riscv_relax_pc): Likewise.
2517 (riscv_elf_object_p): Handled for big endian.
2518 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
2519 * targets.c: Add riscv_elf[32|64]_be_vec.
2520 (_bfd_target_vector): Likewise.
2521
c8bad65e
AM
25222021-01-05 Alan Modra <amodra@gmail.com>
2523
2524 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
2525 for relocatable executable.
2526
de6a7ee4
AM
25272021-01-05 Alan Modra <amodra@gmail.com>
2528
2529 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
2530
18b98722
NC
25312021-01-05 Nelson Chu <nelson.chu@sifive.com>
2532
2533 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
2534 make sure gp symbol is output as a dynamic symbol.
2535
cd6d537c
L
25362021-01-04 H.J. Lu <hongjiu.lu@intel.com>
2537
2538 PR ld/26256
2539 * elflink.c (compare_link_order): Place unordered sections before
2540 ordered sections.
2541 (elf_fixup_link_order): Add a link info argument. Allow mixed
2542 ordered and unordered input sections for non-relocatable link.
2543 Sort the consecutive bfd_indirect_link_order sections with the
2544 same pattern. Change the offsets of the bfd_indirect_link_order
2545 sections only.
2546 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
2547 * section.c (bfd_section): Add pattern.
2548 (BFD_FAKE_SECTION): Initialize pattern to NULL.
2549 * bfd-in2.h: Regenerated.
2550
dbb078f6
AF
25512021-01-04 Alexander Fedotov <alfedotov@gmail.com>
2552
2553 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
2554 of private flags with 0x.
2555 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
2556
5b4293ba
AM
25572021-01-04 Alan Modra <amodra@gmail.com>
2558
2559 PR 26822
2560 * elflink.c (elf_link_input_bfd): Use the file base name in
2561 linker generated STT_FILE symbols.
2562
4c0e540e
NC
25632021-01-04 Nelson Chu <nelson.chu@sifive.com>
2564
2565 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
2566 * elfxx-riscv.h: Add declaration.
2567 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
2568 riscv_compare_subsets to check the orders.
2569 (riscv_skip_prefix): Removed.
2570 (riscv_prefix_cmp): Removed.
2571
e9cf3691
AM
25722021-01-04 Alan Modra <amodra@gmail.com>
2573
2574 PR 26741
2575 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
2576 calculating subset version length.
2577
f9a6a8f0
AM
25782021-01-01 Nicolas Boulenguez <nicolas@debian.org>
2579
2580 * xcofflink.c: Correct spelling in comments.
2581
250d07de
AM
25822021-01-01 Alan Modra <amodra@gmail.com>
2583
2584 Update year range in copyright notice of all files.
2585
c2795844 2586For older changes see ChangeLog-2020
3499769a 2587\f
d87bef3a 2588Copyright (C) 2021-2023 Free Software Foundation, Inc.
3499769a
AM
2589
2590Copying and distribution of this file, with or without modification,
2591are permitted in any medium without royalty provided the copyright
2592notice and this notice are preserved.
2593
2594Local Variables:
2595mode: change-log
2596left-margin: 8
2597fill-column: 74
2598version-control: never
2599End: