bfd/binutils: add support for RISC-V CSRs in core files
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
2 Andrew Burgess <andrew.burgess@embecosm.com>
3
4 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
5 * elf.c (elfcore_grok_riscv_csr): New function.
6 (elfcore_grok_note): Handle NT_RISCV_CSR.
7 (elfcore_write_riscv_csr): New function.
8 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
9
10 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
11 Andrew Burgess <andrew.burgess@embecosm.com>
12
13 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
14 (PRPSINFO_PR_PSARGS_LENGTH): Define.
15 (riscv_write_core_note): New function.
16 (riscv_elf_grok_psinfo): Make use of two new length defines.
17 (elf_backend_write_core_note): Define.
18
19 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
20 Andrew Burgess <andrew.burgess@embecosm.com>
21
22 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
23 * elf.c (elfcore_grok_gdb_tdesc): New function.
24 (elfcore_grok_note): Handle NT_GDB_TDESC.
25 (elfcore_write_gdb_tdesc): New function.
26 (elfcore_write_register_note): Handle NT_GDB_TDESC.
27
28 2021-03-05 Nick Clifton <nickc@redhat.com>
29
30 PR 27521
31 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
32 (read_indexed_string): Placeholder function.
33 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
34 forms.
35
36 2021-03-05 Alan Modra <amodra@gmail.com>
37
38 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
39 2020-09-16 changes.
40 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
41 adjustments here instead. Separate pc-relative adjustments
42 from symbol related adjustments. Tidy comments and formatting.
43
44 2021-03-04 Jan Beulich <jbeulich@suse.com>
45
46 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
47 final PE images.
48
49 2021-03-04 Alan Modra <amodra@gmail.com>
50
51 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
52
53 2021-03-03 Alan Modra <amodra@gmail.com>
54
55 PR 27500
56 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
57 processing not when start/stop symbol section is unmarked but
58 on first time a start/stop symbol is processed.
59
60 2021-03-03 Alan Modra <amodra@gmail.com>
61
62 * reloc.c: Include x86_64.h rather than internal.h.
63
64 2021-03-02 Nick Clifton <nickc@redhat.com>
65
66 PR 27484
67 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
68 function and variable tags and a second time to resolve their
69 attributes.
70
71 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
72
73 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
74
75 2021-03-02 Alan Modra <amodra@gmail.com>
76
77 PR 27451
78 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
79 linker defined start/stop symbols when start_stop_gc.
80
81 2021-03-02 Alan Modra <amodra@gmail.com>
82
83 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
84 indirect to pc-relative or toc-relative for undefined symbols.
85
86 2021-03-01 Alan Modra <amodra@gmail.com>
87 Fangrui Song <maskray@google.com>
88
89 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
90 defined start/stop symbols when start_stop_gc.
91 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
92 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
93 * linker.c (bfd_generic_define_start_stop): Likewise.
94
95 2021-02-25 Alan Modra <amodra@gmail.com>
96
97 PR 27441
98 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
99 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
100 use when deciding an as-needed library should be loaded instead
101 of using the binding of the library definition.
102
103 2021-02-24 Alan Modra <amodra@gmail.com>
104
105 PR 27459
106 * coff-stgo32.c (go32exe_check_format): Sanity check size of
107 header to avoid a buffer overflow.
108
109 2021-02-22 Alan Modra <amodra@gmail.com>
110
111 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
112 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
113
114 2021-02-19 Nelson Chu <nelson.chu@sifive.com>
115
116 PR 27158
117 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
118 (_bfd_riscv_relax_call): Likewise.
119 (_bfd_riscv_relax_lui): Likewise.
120 * elfxx-riscv.c (howto_table): Likewise.
121
122 2021-02-18 Nelson Chu <nelson.chu@sifive.com>
123
124 * Makefile.am: Added cpu-riscv.h.
125 * Makefile.in: Regenerated.
126 * po/SRC-POTFILES.in: Regenerated.
127 * cpu-riscv.h: Added to support spec versions controlling.
128 Also added extern arrays and functions for cpu-riscv.c.
129 (enum riscv_spec_class): Define all spec classes here uniformly.
130 (struct riscv_spec): Added for all specs.
131 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
132 (RISCV_GET_SPEC_NAME): Likewise.
133 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
134 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
135 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
136 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
137 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
138 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
139 (riscv_priv_specs): Moved below.
140 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
141 (riscv_isa_specs): Moved from include/opcode/riscv.h.
142 * elfnn-riscv.c: Included cpu-riscv.h.
143 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
144 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
145 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
146 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
147
148 2021-02-17 Alan Modra <amodra@gmail.com>
149
150 * wasm-module.c: Guard include of limits.h.
151 (CHAR_BIT): Provide backup define.
152 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
153 Correct signed overflow checking.
154
155 2021-02-17 Nelson Chu <nelson.chu@sifive.com>
156
157 PR 27200
158 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
159 copying the elf flags from input BFD to output BFD, until we have
160 checked if the input BFD has no code section or not. Also fix the
161 problem that we only check the first section rather than the entire
162 sections for input BFD.
163
164 2021-02-16 Alan Modra <amodra@gmail.com>
165
166 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
167 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
168
169 2021-02-15 Jan Beulich <jbeulich@suse.com>
170
171 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
172 * doc/Makefile.in: Re-generate.
173
174 2021-02-15 Alan Modra <amodra@gmail.com>
175
176 * elf32-nds32.c (nds32_get_section_contents): Replace
177 bfd_malloc_and_get_section with bfd_get_full_section_contents.
178 (nds32_elf_relax_delete_blanks): Init contents.
179 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
180
181 2021-02-15 Alan Modra <amodra@gmail.com>
182
183 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
184 bfd_get_full_section_contents.
185
186 2021-02-14 Alan Modra <amodra@gmail.com>
187
188 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
189 all fixes to bfd_generic_get_relocated_section_contents since this
190 function was split out.
191
192 2021-02-11 Alan Modra <amodra@gmail.com>
193
194 * config.bfd: Remove ia64 from obsolete list.
195
196 2021-02-11 Alan Modra <amodra@gmail.com>
197
198 PR ld/22269
199 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
200
201 2021-02-11 Alan Modra <amodra@gmail.com>
202
203 PR 27294
204 * elf32-avr.c (avr_elf32_load_records_from_section): Use
205 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
206 unnecessary casts.
207
208 2021-02-11 Alan Modra <amodra@gmail.com>
209
210 PR 27291
211 * section.c (bfd_get_section_contents): Avoid possible overflow
212 when range checking offset and count.
213 (bfd_set_section_contents): Likewise.
214
215 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
216
217 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
218 favour of LIBINTL.
219 * configure: Regenerated.
220
221 2021-02-09 Alan Modra <amodra@gmail.com>
222
223 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
224 * configure.ac: Delete symbian entries.
225 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
226 * elf32-arm.c: Remove symbian support. Formatting.
227 * targets.c: Delete symbian entries.
228 * configure: Regenerate.
229
230 2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
231
232 PR ld/19609
233 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
234 info when failed to convert GOTPCREL relocation.
235
236 2021-02-04 Nelson Chu <nelson.chu@sifive.com>
237
238 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
239
240 2021-02-04 Alan Modra <amodra@gmail.com>
241
242 PR 27311
243 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
244 libraries for IR references on pass over libraries after LTO
245 recompilation.
246
247 2021-02-03 Alan Modra <amodra@gmail.com>
248
249 PR 27311
250 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
251 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
252 libraries when H is an indirect symbol after calling
253 _bfd_elf_add_default_symbol.
254
255 2021-02-03 Alan Modra <amodra@gmail.com>
256
257 PR 27311
258 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
259 undecorated symbol will have a different version.
260
261 2021-02-02 Alan Modra <amodra@gmail.com>
262
263 PR 27311
264 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
265 Use when handling default versioned symbol. Rename existing
266 override variable to nondef_override and use for non-default
267 versioned symbol.
268 (elf_link_add_object_symbols): Adjust call to suit. Don't
269 pull in as-needed libraries when override is set.
270
271 2021-02-01 Emery Hemingway <ehmry@posteo.net>
272
273 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
274
275 2021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
276
277 PR 27254
278 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
279 offset for the R_RL78_RH_SADDR relocation.
280
281 2021-01-29 Alan Modra <amodra@gmail.com>
282
283 PR 27271
284 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
285 on symbols defined in absolute or other special sections.
286
287 2021-01-28 Alan Modra <amodra@gmail.com>
288
289 PR 27259
290 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
291 prevent endless looping of linked-to sections.
292
293 2020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
294
295 * bfd-elf.h (elfcore_write_file_note): New function.
296 * elf.c (elfcore_write_file_note): New function.
297
298 2021-01-26 Alan Modra <amodra@gmail.com>
299
300 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
301
302 2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
303
304 PR binutils/27231
305 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
306 number tables.
307
308 2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
309
310 PR binutils/27231
311 * dwarf2.c (read_rnglists): Advance rngs_ptr after
312 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
313
314 2021-01-20 Alan Modra <amodra@gmail.com>
315
316 * elf32-ppc.c: Delete outdated comment.
317 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
318 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
319
320 2021-01-20 Alan Modra <amodra@gmail.com>
321
322 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
323 section symbols are present.
324
325 2021-01-19 Alan Modra <amodra@gmail.com>
326
327 * elf64-ppc.c (elf_hash_entry): New inline function. Use
328 throughout to replace casts.
329 (branch_reloc_hash_match): Remove const from params.
330 (use_local_plt): New function.
331 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
332 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
333 Use use_local_plt.
334 * elf32-ppc.c (use_local_plt): New function.
335 (allocate_dynrelocs, ppc_elf_relocate_section),
336 (write_global_sym_plt): Use use_local_plt.
337
338 2021-01-17 H.J. Lu <hongjiu.lu@intel.com>
339
340 PR ld/27193
341 * elflink.c (elf_create_symbuf): Also ignore section symbols.
342
343 2021-01-16 H.J. Lu <hongjiu.lu@intel.com>
344
345 PR ld/23169
346 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
347 check pointer_equality_needed.
348
349 2021-01-15 H.J. Lu <hongjiu.lu@intel.com>
350
351 * elf-linker-x86.h (elf_linker_x86_params): Add
352 report_relative_reloc.
353 * elf32-i386.c (elf_i386_relocate_section): Call
354 _bfd_x86_elf_link_report_relative_reloc to report relative
355 relocations for -z report-relative-reloc.
356 (elf_i386_finish_dynamic_symbol): Likewse.
357 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
358 (elf_x86_64_finish_dynamic_symbol): Likewse.
359 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
360 function.
361 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
362 prototype.
363
364 2021-01-16 Alan Modra <amodra@gmail.com>
365
366 * compress.c (decompress_contents): Tidy inflateEnd result test.
367
368 2021-01-16 Alan Modra <amodra@gmail.com>
369
370 PR 26002
371 * elflink.c (elf_link_output_extsym): Use version 1 in
372 .gnu.version for undefined unversioned symbols.
373
374 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
375
376 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
377 caused the by previous commit accidentally.
378
379 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
380
381 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
382 also aligned the code.
383
384 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
385
386 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
387
388 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
389
390 * elfnn-riscv.c: Comments tidy and improvement.
391 * elfxx-riscv.c: Likewise.
392 * elfxx-riscv.h: Likewise.
393
394 2021-01-14 H.J. Lu <hongjiu.lu@intel.com>
395
396 PR ld/26688
397 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
398 section for R_BFIN_FUNCDESC.
399
400 2021-01-14 Nick Clifton <nickc@redhat.com>
401
402 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
403
404 2021-01-13 Alan Modra <amodra@gmail.com>
405
406 * Makefile.in: Regenerate.
407 * doc/Makefile.in: Regenerate.
408
409 2021-01-13 Alan Modra <amodra@gmail.com>
410
411 PR 27160
412 * section.c (struct bfd_section): Remove pattern field.
413 (BFD_FAKE_SECTION): Adjust to suit.
414 * bfd-in2.h: Regenerate.
415 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
416 (bfd_elf_final_link): Don't call elf_fixup_link_order.
417
418 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
419
420 PR binutils/26792
421 * configure.ac: Use GNU_MAKE_JOBSERVER.
422 * aclocal.m4: Regenerated.
423 * configure: Likewise.
424
425 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
426
427 PR ld/27171
428 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
429 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
430
431 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
432
433 PR ld/27173
434 * configure: Regenerated.
435
436 2021-01-11 Nick Clifton <nickc@redhat.com>
437
438 * po/fr.po: Updated French translation.
439 * po/pt.po: Updated Portuguese translation.
440 * po/sr.po: Updated Serbian translation.
441 * po/uk.po: Updated Ukranian translation.
442
443 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
444
445 * configure: Regenerated.
446
447 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
448
449 PR ld/27166
450 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
451 -z lam-u48 and -z lam-u57.
452
453 2021-01-09 Nick Clifton <nickc@redhat.com>
454
455 * version.m4: Change to 2.36.50.
456 * configure: Regenerate.
457 * po/bfd.pot: Regenerate.
458
459 2021-01-09 Nick Clifton <nickc@redhat.com>
460
461 * 2.36 release branch crated.
462
463 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
464
465 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
466 LAM_U57 when setting LAM_U48.
467
468 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
469
470 PR ld/26256
471 PR ld/27160
472 * elflink.c (elf_fixup_link_order): Verify that fixing up
473 SHF_LINK_ORDER doesn't increase the output section size.
474
475 2021-01-09 Alan Modra <amodra@gmail.com>
476
477 * configure: Regenerate.
478
479 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
480
481 * configure: Regenerate.
482
483 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
484
485 PR 27109
486 * aix386-core.c (core_aix386_vec): Initialize
487 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
488 * aout-target.h (MY (vec)): Likewise.
489 * binary.c (binary_vec): Likewise.
490 * cisco-core.c (core_cisco_be_vec): Likewise.
491 (core_cisco_le_vec): Likewise.
492 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
493 * coff-i386.c (TARGET_SYM): Likewise.
494 (TARGET_SYM_BIG): Likewise.
495 * coff-ia64.c (TARGET_SYM): Likewise.
496 * coff-mips.c (mips_ecoff_le_vec): Likewise.
497 (mips_ecoff_be_vec): Likewise.
498 (mips_ecoff_bele_vec): Likewise.
499 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
500 (powerpc_xcoff_vec): Likewise.
501 * coff-sh.c (sh_coff_small_vec): Likewise.
502 (sh_coff_small_le_vec): Likewise.
503 * coff-tic30.c (tic30_coff_vec): Likewise.
504 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
505 (tic54x_coff0_beh_vec): Likewise.
506 (tic54x_coff1_vec): Likewise.
507 (tic54x_coff1_beh_vec): Likewise.
508 (tic54x_coff2_vec): Likewise.
509 (tic54x_coff2_beh_vec): Likewise.
510 * coff-x86_64.c (TARGET_SYM): Likewise.
511 (TARGET_SYM_BIG): Likewise.
512 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
513 (rs6000_xcoff64_aix_vec): Likewise.
514 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
515 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
516 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
517 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
518 (TARGET_LITTLE_SYM): Likewise.
519 * hppabsd-core.c (core_hppabsd_vec): Likewise.
520 * hpux-core.c (core_hpux_vec): Likewise.
521 * i386msdos.c (i386_msdos_vec): Likewise.
522 * ihex.c (ihex_vec): Likewise.
523 * irix-core.c (core_irix_vec): Likewise.
524 * mach-o-target.c (TARGET_NAME): Likewise.
525 * mmo.c (mmix_mmo_vec): Likewise.
526 * netbsd-core.c (core_netbsd_vec): Likewise.
527 * osf-core.c (core_osf_vec): Likewise.
528 * pdp11.c (MY (vec)): Likewise.
529 * pef.c (pef_vec): Likewise.
530 (pef_xlib_vec): Likewise.
531 * plugin.c (plugin_vec): Likewise.
532 * ppcboot.c (powerpc_boot_vec): Likewise.
533 * ptrace-core.c (core_ptrace_vec): Likewise.
534 * sco5-core.c (core_sco5_vec): Likewise.
535 * som.c (hppa_som_vec): Likewise.
536 * srec.c (srec_vec): Likewise.
537 (symbolsrec_vec): Likewise.
538 * tekhex.c (tekhex_vec): Likewise.
539 * trad-core.c (core_trad_vec): Likewise.
540 * verilog.c (verilog_vec): Likewise.
541 * vms-alpha.c (alpha_vms_vec): Likewise.
542 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
543 * wasm-module.c (wasm_vec): Likewise.
544 * xsym.c (sym_vec): Likewise.
545 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
546 isn't set.
547 (elf_map_symbols): Don't include ignored section symbols.
548 * elfcode.h (elf_slurp_symbol_table): Also set
549 BSF_SECTION_SYM_USED on STT_SECTION symbols.
550 * elflink.c (bfd_elf_final_link): Generated section symbols only
551 when emitting relocations or reqired.
552 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
553 * syms.c (BSF_SECTION_SYM_USED): New.
554 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
555 (bfd_target): Add keep_unused_section_symbols.
556 (bfd_keep_unused_section_symbols): New.
557 * bfd-in2.h: Regenerated.
558
559 2021-01-07 Nick Clifton <nickc@redhat.com>
560
561 PR 25713
562 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
563 absolute paths and check to see if they are longer than MAX_PATH.
564
565 2021-01-07 Philipp Tomsich <prt@gnu.org>
566
567 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
568
569 2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
570 Jim Wilson <jimw@sifive.com>
571 Andrew Waterman <andrew@sifive.com>
572 Maxim Blinov <maxim.blinov@embecosm.com>
573 Kito Cheng <kito.cheng@sifive.com>
574 Nelson Chu <nelson.chu@sifive.com>
575
576 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
577
578 2021-01-06 H.J. Lu <hongjiu.lu@intel.com>
579
580 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
581 (bfinfdpic_check_relocs): Likewise.
582
583 2021-01-06 Alan Modra <amodra@gmail.com>
584
585 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
586 on unknown r_type.
587 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
588
589 2021-01-06 Alan Modra <amodra@gmail.com>
590
591 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
592 (sparc64-*-solaris2*): Add sparc_elf64_vec and
593 sparc_elf32_vec.
594
595 2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
596
597 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
598 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
599 * configure.ac: Handle riscv_elf[32|64]_be_vec.
600 * configure: Regenerate.
601 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
602 riscv_is_insn_reloc.
603 (riscv_get_insn): RISC-V instructions are always little endian, but
604 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
605 the insturctions.
606 (riscv_put_insn): Likewsie.
607 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
608 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
609 use riscv_[get|put]_insn or bfd_[get|put].
610 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
611 or bfd_[get|put]l16 for code.
612 (riscv_elf_relocate_section): Likewise.
613 (riscv_elf_finish_dynamic_symbol): Likewise.
614 (riscv_elf_finish_dynamic_sections): Likewise.
615 (_bfd_riscv_relax_call): Likewise.
616 (_bfd_riscv_relax_lui): Likewise.
617 (_bfd_riscv_relax_align): Likewise.
618 (_bfd_riscv_relax_pc): Likewise.
619 (riscv_elf_object_p): Handled for big endian.
620 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
621 * targets.c: Add riscv_elf[32|64]_be_vec.
622 (_bfd_target_vector): Likewise.
623
624 2021-01-05 Alan Modra <amodra@gmail.com>
625
626 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
627 for relocatable executable.
628
629 2021-01-05 Alan Modra <amodra@gmail.com>
630
631 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
632
633 2021-01-05 Nelson Chu <nelson.chu@sifive.com>
634
635 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
636 make sure gp symbol is output as a dynamic symbol.
637
638 2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
639
640 PR ld/26256
641 * elflink.c (compare_link_order): Place unordered sections before
642 ordered sections.
643 (elf_fixup_link_order): Add a link info argument. Allow mixed
644 ordered and unordered input sections for non-relocatable link.
645 Sort the consecutive bfd_indirect_link_order sections with the
646 same pattern. Change the offsets of the bfd_indirect_link_order
647 sections only.
648 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
649 * section.c (bfd_section): Add pattern.
650 (BFD_FAKE_SECTION): Initialize pattern to NULL.
651 * bfd-in2.h: Regenerated.
652
653 2021-01-04 Alexander Fedotov <alfedotov@gmail.com>
654
655 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
656 of private flags with 0x.
657 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
658
659 2021-01-04 Alan Modra <amodra@gmail.com>
660
661 PR 26822
662 * elflink.c (elf_link_input_bfd): Use the file base name in
663 linker generated STT_FILE symbols.
664
665 2021-01-04 Nelson Chu <nelson.chu@sifive.com>
666
667 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
668 * elfxx-riscv.h: Add declaration.
669 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
670 riscv_compare_subsets to check the orders.
671 (riscv_skip_prefix): Removed.
672 (riscv_prefix_cmp): Removed.
673
674 2021-01-04 Alan Modra <amodra@gmail.com>
675
676 PR 26741
677 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
678 calculating subset version length.
679
680 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
681
682 * xcofflink.c: Correct spelling in comments.
683
684 2021-01-01 Alan Modra <amodra@gmail.com>
685
686 Update year range in copyright notice of all files.
687
688 For older changes see ChangeLog-2020
689 \f
690 Copyright (C) 2021 Free Software Foundation, Inc.
691
692 Copying and distribution of this file, with or without modification,
693 are permitted in any medium without royalty provided the copyright
694 notice and this notice are preserved.
695
696 Local Variables:
697 mode: change-log
698 left-margin: 8
699 fill-column: 74
700 version-control: never
701 End:
This page took 0.044139 seconds and 5 git commands to generate.