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