1 2021-03-20 Alan Modra <amodra@gmail.com>
4 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
5 test for .gnu.debuglto*.
7 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
10 * elf.c (_bfd_elf_make_section_from_shdr): Treat
11 .gnu.debuglto_.debug_ section as debugging section unless it is
12 marked with SHF_EXCLUDE.
13 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
14 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
15 matching non-debugging sections or linkonce section with comdat
18 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
21 * dwarf2.c (read_attribute_value): Check version >= 3 for
24 2021-03-16 Nick Clifton <nickc@redhat.com>
26 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
27 overrun by using sizeof of the destination x_fname field as the
30 2021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
32 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
34 2021-03-12 Clément Chigot <clement.chigot@atos.net>
36 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
37 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
38 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
39 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
40 BFD_RELOC_PPC64_TLS_ML): New relocations.
41 * bfd-in2.h: Regenerate.
42 * libbfd.h: Regenerate.
43 * coff-rs6000.c (xcoff_calculate_relocation): Call
44 xcoff_reloc_type_tls for TLS relocations.
45 (xcoff_howto_table): Implement TLS relocations.
46 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
47 (xcoff_reloc_type_tls): New function.
48 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
49 (xcoff_howto_table): Likewise.
50 (_bfd_xcoff_reloc_type_lookup): Likewise.
51 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
52 (styp_to_sec_flags): Likewise.
53 (coff_compute_section_file_positions): Avoid file offset
54 optimisation for .data when the previous section is .tdata.
55 (coff_write_object_contents): Handle TLS sections.
56 * coffswap.h (coff_swap_aouthdr_out): Add support for
57 new fields in aouthdr.
58 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
59 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
60 (xcoff_need_ldrel_p): Add cases for TLS relocations.
61 (xcoff_create_ldrel): Add l_symndx for TLS sections.
63 2021-03-12 Clément Chigot <clement.chigot@atos.net>
65 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
67 * bfd-in2.h: Regenerate.
68 * libbfd.h: Regenerate.
69 * coff-rs6000.c (xcoff_calculate_relocation): Call
70 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
71 (xcoff_howto_table): Remove src_mask for TOC relocations.
72 Add R_TOCU and R_TOCL howtos.
73 (_bfd_xcoff_reloc_type_lookup): Add cases for
74 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
75 (xcoff_reloc_type_toc): Compute the whole offset.
76 Implement R_TOCU and R_TOCL.
77 * coff64-rs6000.c (xcoff64_calculate_relocation):
79 (xcoff64_howto_table): Likewise.
80 (xcoff64_reloc_type_lookup): Likewise.
82 2021-03-12 Clément Chigot <clement.chigot@atos.net>
84 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
86 (xcoff_howto_table): Likewise.
87 (xcoff_rtype2howto): Increase r_type maximum value.
88 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
89 of create a new one from scratch. Enable only some relocations
90 to have a changing r_size.
91 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
92 (xcoff64_howto_table): Likewise.
93 (xcoff64_rtype2howto): Likewise.
94 (xcoff64_ppc_relocate_section): Likewise.
95 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
97 2021-03-12 Clément Chigot <clement.chigot@atos.net>
99 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
101 2021-03-12 Clément Chigot <clement.chigot@atos.net>
103 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
104 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
105 support for o_cputype field. Avoid creating an empty a.out header
108 2021-03-12 Clément Chigot <clement.chigot@atos.net>
110 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
113 2021-03-11 Nelson Chu <nelson.chu@sifive.com>
115 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
116 restart_relax, used to check if we need to run the whole
117 relaxations from relax pass 0 to 2 again.
118 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
119 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
120 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
121 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
122 after_allocation to check if we need to run the whole relaxations again.
123 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
124 when the restart_relax is FALSE; At last set restart_relax to TRUE if
126 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
127 (bfd_elf64_riscv_restart_relax_sections): Likewise.
129 2021-03-10 Jan Beulich <jbeulich@suse.com>
131 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
134 2021-03-10 Alan Modra <amodra@gmail.com>
135 Jan Beulich <jbeulich@suse.com>
137 * elf.c (bfd_elf_generic_reloc): Make references between debug
138 sections use section relative values.
140 2021-03-09 Jan Beulich <jbeulich@suse.com>
142 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
144 2021-03-05 H.J. Lu <hongjiu.lu@intel.com>
148 * bfd.c (_bfd_get_link_info): New function.
149 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
150 (elf_link_info): New.
151 * libbfd-in.h (_bfd_get_link_info): New prototype.
152 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
153 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
154 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
155 (pex64_link_add_symbols): New function.
156 (coff_bfd_link_add_symbols): New macro.
157 * libbfd.h: Regenerated.
159 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
160 Andrew Burgess <andrew.burgess@embecosm.com>
162 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
163 * elf.c (elfcore_grok_riscv_csr): New function.
164 (elfcore_grok_note): Handle NT_RISCV_CSR.
165 (elfcore_write_riscv_csr): New function.
166 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
168 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
169 Andrew Burgess <andrew.burgess@embecosm.com>
171 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
172 (PRPSINFO_PR_PSARGS_LENGTH): Define.
173 (riscv_write_core_note): New function.
174 (riscv_elf_grok_psinfo): Make use of two new length defines.
175 (elf_backend_write_core_note): Define.
177 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
178 Andrew Burgess <andrew.burgess@embecosm.com>
180 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
181 * elf.c (elfcore_grok_gdb_tdesc): New function.
182 (elfcore_grok_note): Handle NT_GDB_TDESC.
183 (elfcore_write_gdb_tdesc): New function.
184 (elfcore_write_register_note): Handle NT_GDB_TDESC.
186 2021-03-05 Nick Clifton <nickc@redhat.com>
189 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
190 (read_indexed_string): Placeholder function.
191 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
194 2021-03-05 Alan Modra <amodra@gmail.com>
196 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
198 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
199 adjustments here instead. Separate pc-relative adjustments
200 from symbol related adjustments. Tidy comments and formatting.
202 2021-03-04 Jan Beulich <jbeulich@suse.com>
204 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
207 2021-03-04 Alan Modra <amodra@gmail.com>
209 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
211 2021-03-03 Alan Modra <amodra@gmail.com>
214 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
215 processing not when start/stop symbol section is unmarked but
216 on first time a start/stop symbol is processed.
218 2021-03-03 Alan Modra <amodra@gmail.com>
220 * reloc.c: Include x86_64.h rather than internal.h.
222 2021-03-02 Nick Clifton <nickc@redhat.com>
225 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
226 function and variable tags and a second time to resolve their
229 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
231 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
233 2021-03-02 Alan Modra <amodra@gmail.com>
236 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
237 linker defined start/stop symbols when start_stop_gc.
239 2021-03-02 Alan Modra <amodra@gmail.com>
241 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
242 indirect to pc-relative or toc-relative for undefined symbols.
244 2021-03-01 Alan Modra <amodra@gmail.com>
245 Fangrui Song <maskray@google.com>
247 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
248 defined start/stop symbols when start_stop_gc.
249 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
250 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
251 * linker.c (bfd_generic_define_start_stop): Likewise.
253 2021-02-25 Alan Modra <amodra@gmail.com>
256 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
257 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
258 use when deciding an as-needed library should be loaded instead
259 of using the binding of the library definition.
261 2021-02-24 Alan Modra <amodra@gmail.com>
264 * coff-stgo32.c (go32exe_check_format): Sanity check size of
265 header to avoid a buffer overflow.
267 2021-02-22 Alan Modra <amodra@gmail.com>
269 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
270 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
272 2021-02-19 Nelson Chu <nelson.chu@sifive.com>
275 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
276 (_bfd_riscv_relax_call): Likewise.
277 (_bfd_riscv_relax_lui): Likewise.
278 * elfxx-riscv.c (howto_table): Likewise.
280 2021-02-18 Nelson Chu <nelson.chu@sifive.com>
282 * Makefile.am: Added cpu-riscv.h.
283 * Makefile.in: Regenerated.
284 * po/SRC-POTFILES.in: Regenerated.
285 * cpu-riscv.h: Added to support spec versions controlling.
286 Also added extern arrays and functions for cpu-riscv.c.
287 (enum riscv_spec_class): Define all spec classes here uniformly.
288 (struct riscv_spec): Added for all specs.
289 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
290 (RISCV_GET_SPEC_NAME): Likewise.
291 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
292 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
293 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
294 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
295 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
296 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
297 (riscv_priv_specs): Moved below.
298 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
299 (riscv_isa_specs): Moved from include/opcode/riscv.h.
300 * elfnn-riscv.c: Included cpu-riscv.h.
301 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
302 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
303 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
304 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
306 2021-02-17 Alan Modra <amodra@gmail.com>
308 * wasm-module.c: Guard include of limits.h.
309 (CHAR_BIT): Provide backup define.
310 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
311 Correct signed overflow checking.
313 2021-02-17 Nelson Chu <nelson.chu@sifive.com>
316 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
317 copying the elf flags from input BFD to output BFD, until we have
318 checked if the input BFD has no code section or not. Also fix the
319 problem that we only check the first section rather than the entire
320 sections for input BFD.
322 2021-02-16 Alan Modra <amodra@gmail.com>
324 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
325 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
327 2021-02-15 Jan Beulich <jbeulich@suse.com>
329 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
330 * doc/Makefile.in: Re-generate.
332 2021-02-15 Alan Modra <amodra@gmail.com>
334 * elf32-nds32.c (nds32_get_section_contents): Replace
335 bfd_malloc_and_get_section with bfd_get_full_section_contents.
336 (nds32_elf_relax_delete_blanks): Init contents.
337 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
339 2021-02-15 Alan Modra <amodra@gmail.com>
341 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
342 bfd_get_full_section_contents.
344 2021-02-14 Alan Modra <amodra@gmail.com>
346 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
347 all fixes to bfd_generic_get_relocated_section_contents since this
348 function was split out.
350 2021-02-11 Alan Modra <amodra@gmail.com>
352 * config.bfd: Remove ia64 from obsolete list.
354 2021-02-11 Alan Modra <amodra@gmail.com>
357 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
359 2021-02-11 Alan Modra <amodra@gmail.com>
362 * elf32-avr.c (avr_elf32_load_records_from_section): Use
363 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
366 2021-02-11 Alan Modra <amodra@gmail.com>
369 * section.c (bfd_get_section_contents): Avoid possible overflow
370 when range checking offset and count.
371 (bfd_set_section_contents): Likewise.
373 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
375 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
377 * configure: Regenerated.
379 2021-02-09 Alan Modra <amodra@gmail.com>
381 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
382 * configure.ac: Delete symbian entries.
383 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
384 * elf32-arm.c: Remove symbian support. Formatting.
385 * targets.c: Delete symbian entries.
386 * configure: Regenerate.
388 2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
391 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
392 info when failed to convert GOTPCREL relocation.
394 2021-02-04 Nelson Chu <nelson.chu@sifive.com>
396 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
398 2021-02-04 Alan Modra <amodra@gmail.com>
401 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
402 libraries for IR references on pass over libraries after LTO
405 2021-02-03 Alan Modra <amodra@gmail.com>
408 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
409 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
410 libraries when H is an indirect symbol after calling
411 _bfd_elf_add_default_symbol.
413 2021-02-03 Alan Modra <amodra@gmail.com>
416 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
417 undecorated symbol will have a different version.
419 2021-02-02 Alan Modra <amodra@gmail.com>
422 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
423 Use when handling default versioned symbol. Rename existing
424 override variable to nondef_override and use for non-default
426 (elf_link_add_object_symbols): Adjust call to suit. Don't
427 pull in as-needed libraries when override is set.
429 2021-02-01 Emery Hemingway <ehmry@posteo.net>
431 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
433 2021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
436 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
437 offset for the R_RL78_RH_SADDR relocation.
439 2021-01-29 Alan Modra <amodra@gmail.com>
442 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
443 on symbols defined in absolute or other special sections.
445 2021-01-28 Alan Modra <amodra@gmail.com>
448 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
449 prevent endless looping of linked-to sections.
451 2020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
453 * bfd-elf.h (elfcore_write_file_note): New function.
454 * elf.c (elfcore_write_file_note): New function.
456 2021-01-26 Alan Modra <amodra@gmail.com>
458 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
460 2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
463 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
466 2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
469 * dwarf2.c (read_rnglists): Advance rngs_ptr after
470 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
472 2021-01-20 Alan Modra <amodra@gmail.com>
474 * elf32-ppc.c: Delete outdated comment.
475 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
476 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
478 2021-01-20 Alan Modra <amodra@gmail.com>
480 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
481 section symbols are present.
483 2021-01-19 Alan Modra <amodra@gmail.com>
485 * elf64-ppc.c (elf_hash_entry): New inline function. Use
486 throughout to replace casts.
487 (branch_reloc_hash_match): Remove const from params.
488 (use_local_plt): New function.
489 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
490 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
492 * elf32-ppc.c (use_local_plt): New function.
493 (allocate_dynrelocs, ppc_elf_relocate_section),
494 (write_global_sym_plt): Use use_local_plt.
496 2021-01-17 H.J. Lu <hongjiu.lu@intel.com>
499 * elflink.c (elf_create_symbuf): Also ignore section symbols.
501 2021-01-16 H.J. Lu <hongjiu.lu@intel.com>
504 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
505 check pointer_equality_needed.
507 2021-01-15 H.J. Lu <hongjiu.lu@intel.com>
509 * elf-linker-x86.h (elf_linker_x86_params): Add
510 report_relative_reloc.
511 * elf32-i386.c (elf_i386_relocate_section): Call
512 _bfd_x86_elf_link_report_relative_reloc to report relative
513 relocations for -z report-relative-reloc.
514 (elf_i386_finish_dynamic_symbol): Likewse.
515 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
516 (elf_x86_64_finish_dynamic_symbol): Likewse.
517 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
519 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
522 2021-01-16 Alan Modra <amodra@gmail.com>
524 * compress.c (decompress_contents): Tidy inflateEnd result test.
526 2021-01-16 Alan Modra <amodra@gmail.com>
529 * elflink.c (elf_link_output_extsym): Use version 1 in
530 .gnu.version for undefined unversioned symbols.
532 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
534 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
535 caused the by previous commit accidentally.
537 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
539 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
540 also aligned the code.
542 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
544 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
546 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
548 * elfnn-riscv.c: Comments tidy and improvement.
549 * elfxx-riscv.c: Likewise.
550 * elfxx-riscv.h: Likewise.
552 2021-01-14 H.J. Lu <hongjiu.lu@intel.com>
555 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
556 section for R_BFIN_FUNCDESC.
558 2021-01-14 Nick Clifton <nickc@redhat.com>
560 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
562 2021-01-13 Alan Modra <amodra@gmail.com>
564 * Makefile.in: Regenerate.
565 * doc/Makefile.in: Regenerate.
567 2021-01-13 Alan Modra <amodra@gmail.com>
570 * section.c (struct bfd_section): Remove pattern field.
571 (BFD_FAKE_SECTION): Adjust to suit.
572 * bfd-in2.h: Regenerate.
573 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
574 (bfd_elf_final_link): Don't call elf_fixup_link_order.
576 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
579 * configure.ac: Use GNU_MAKE_JOBSERVER.
580 * aclocal.m4: Regenerated.
581 * configure: Likewise.
583 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
586 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
587 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
589 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
592 * configure: Regenerated.
594 2021-01-11 Nick Clifton <nickc@redhat.com>
596 * po/fr.po: Updated French translation.
597 * po/pt.po: Updated Portuguese translation.
598 * po/sr.po: Updated Serbian translation.
599 * po/uk.po: Updated Ukranian translation.
601 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
603 * configure: Regenerated.
605 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
608 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
609 -z lam-u48 and -z lam-u57.
611 2021-01-09 Nick Clifton <nickc@redhat.com>
613 * version.m4: Change to 2.36.50.
614 * configure: Regenerate.
615 * po/bfd.pot: Regenerate.
617 2021-01-09 Nick Clifton <nickc@redhat.com>
619 * 2.36 release branch crated.
621 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
623 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
624 LAM_U57 when setting LAM_U48.
626 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
630 * elflink.c (elf_fixup_link_order): Verify that fixing up
631 SHF_LINK_ORDER doesn't increase the output section size.
633 2021-01-09 Alan Modra <amodra@gmail.com>
635 * configure: Regenerate.
637 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
639 * configure: Regenerate.
641 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
644 * aix386-core.c (core_aix386_vec): Initialize
645 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
646 * aout-target.h (MY (vec)): Likewise.
647 * binary.c (binary_vec): Likewise.
648 * cisco-core.c (core_cisco_be_vec): Likewise.
649 (core_cisco_le_vec): Likewise.
650 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
651 * coff-i386.c (TARGET_SYM): Likewise.
652 (TARGET_SYM_BIG): Likewise.
653 * coff-ia64.c (TARGET_SYM): Likewise.
654 * coff-mips.c (mips_ecoff_le_vec): Likewise.
655 (mips_ecoff_be_vec): Likewise.
656 (mips_ecoff_bele_vec): Likewise.
657 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
658 (powerpc_xcoff_vec): Likewise.
659 * coff-sh.c (sh_coff_small_vec): Likewise.
660 (sh_coff_small_le_vec): Likewise.
661 * coff-tic30.c (tic30_coff_vec): Likewise.
662 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
663 (tic54x_coff0_beh_vec): Likewise.
664 (tic54x_coff1_vec): Likewise.
665 (tic54x_coff1_beh_vec): Likewise.
666 (tic54x_coff2_vec): Likewise.
667 (tic54x_coff2_beh_vec): Likewise.
668 * coff-x86_64.c (TARGET_SYM): Likewise.
669 (TARGET_SYM_BIG): Likewise.
670 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
671 (rs6000_xcoff64_aix_vec): Likewise.
672 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
673 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
674 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
675 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
676 (TARGET_LITTLE_SYM): Likewise.
677 * hppabsd-core.c (core_hppabsd_vec): Likewise.
678 * hpux-core.c (core_hpux_vec): Likewise.
679 * i386msdos.c (i386_msdos_vec): Likewise.
680 * ihex.c (ihex_vec): Likewise.
681 * irix-core.c (core_irix_vec): Likewise.
682 * mach-o-target.c (TARGET_NAME): Likewise.
683 * mmo.c (mmix_mmo_vec): Likewise.
684 * netbsd-core.c (core_netbsd_vec): Likewise.
685 * osf-core.c (core_osf_vec): Likewise.
686 * pdp11.c (MY (vec)): Likewise.
687 * pef.c (pef_vec): Likewise.
688 (pef_xlib_vec): Likewise.
689 * plugin.c (plugin_vec): Likewise.
690 * ppcboot.c (powerpc_boot_vec): Likewise.
691 * ptrace-core.c (core_ptrace_vec): Likewise.
692 * sco5-core.c (core_sco5_vec): Likewise.
693 * som.c (hppa_som_vec): Likewise.
694 * srec.c (srec_vec): Likewise.
695 (symbolsrec_vec): Likewise.
696 * tekhex.c (tekhex_vec): Likewise.
697 * trad-core.c (core_trad_vec): Likewise.
698 * verilog.c (verilog_vec): Likewise.
699 * vms-alpha.c (alpha_vms_vec): Likewise.
700 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
701 * wasm-module.c (wasm_vec): Likewise.
702 * xsym.c (sym_vec): Likewise.
703 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
705 (elf_map_symbols): Don't include ignored section symbols.
706 * elfcode.h (elf_slurp_symbol_table): Also set
707 BSF_SECTION_SYM_USED on STT_SECTION symbols.
708 * elflink.c (bfd_elf_final_link): Generated section symbols only
709 when emitting relocations or reqired.
710 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
711 * syms.c (BSF_SECTION_SYM_USED): New.
712 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
713 (bfd_target): Add keep_unused_section_symbols.
714 (bfd_keep_unused_section_symbols): New.
715 * bfd-in2.h: Regenerated.
717 2021-01-07 Nick Clifton <nickc@redhat.com>
720 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
721 absolute paths and check to see if they are longer than MAX_PATH.
723 2021-01-07 Philipp Tomsich <prt@gnu.org>
725 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
727 2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
728 Jim Wilson <jimw@sifive.com>
729 Andrew Waterman <andrew@sifive.com>
730 Maxim Blinov <maxim.blinov@embecosm.com>
731 Kito Cheng <kito.cheng@sifive.com>
732 Nelson Chu <nelson.chu@sifive.com>
734 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
736 2021-01-06 H.J. Lu <hongjiu.lu@intel.com>
738 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
739 (bfinfdpic_check_relocs): Likewise.
741 2021-01-06 Alan Modra <amodra@gmail.com>
743 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
745 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
747 2021-01-06 Alan Modra <amodra@gmail.com>
749 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
750 (sparc64-*-solaris2*): Add sparc_elf64_vec and
753 2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
755 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
756 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
757 * configure.ac: Handle riscv_elf[32|64]_be_vec.
758 * configure: Regenerate.
759 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
761 (riscv_get_insn): RISC-V instructions are always little endian, but
762 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
764 (riscv_put_insn): Likewsie.
765 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
766 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
767 use riscv_[get|put]_insn or bfd_[get|put].
768 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
769 or bfd_[get|put]l16 for code.
770 (riscv_elf_relocate_section): Likewise.
771 (riscv_elf_finish_dynamic_symbol): Likewise.
772 (riscv_elf_finish_dynamic_sections): Likewise.
773 (_bfd_riscv_relax_call): Likewise.
774 (_bfd_riscv_relax_lui): Likewise.
775 (_bfd_riscv_relax_align): Likewise.
776 (_bfd_riscv_relax_pc): Likewise.
777 (riscv_elf_object_p): Handled for big endian.
778 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
779 * targets.c: Add riscv_elf[32|64]_be_vec.
780 (_bfd_target_vector): Likewise.
782 2021-01-05 Alan Modra <amodra@gmail.com>
784 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
785 for relocatable executable.
787 2021-01-05 Alan Modra <amodra@gmail.com>
789 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
791 2021-01-05 Nelson Chu <nelson.chu@sifive.com>
793 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
794 make sure gp symbol is output as a dynamic symbol.
796 2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
799 * elflink.c (compare_link_order): Place unordered sections before
801 (elf_fixup_link_order): Add a link info argument. Allow mixed
802 ordered and unordered input sections for non-relocatable link.
803 Sort the consecutive bfd_indirect_link_order sections with the
804 same pattern. Change the offsets of the bfd_indirect_link_order
806 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
807 * section.c (bfd_section): Add pattern.
808 (BFD_FAKE_SECTION): Initialize pattern to NULL.
809 * bfd-in2.h: Regenerated.
811 2021-01-04 Alexander Fedotov <alfedotov@gmail.com>
813 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
814 of private flags with 0x.
815 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
817 2021-01-04 Alan Modra <amodra@gmail.com>
820 * elflink.c (elf_link_input_bfd): Use the file base name in
821 linker generated STT_FILE symbols.
823 2021-01-04 Nelson Chu <nelson.chu@sifive.com>
825 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
826 * elfxx-riscv.h: Add declaration.
827 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
828 riscv_compare_subsets to check the orders.
829 (riscv_skip_prefix): Removed.
830 (riscv_prefix_cmp): Removed.
832 2021-01-04 Alan Modra <amodra@gmail.com>
835 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
836 calculating subset version length.
838 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
840 * xcofflink.c: Correct spelling in comments.
842 2021-01-01 Alan Modra <amodra@gmail.com>
844 Update year range in copyright notice of all files.
846 For older changes see ChangeLog-2020
848 Copyright (C) 2021 Free Software Foundation, Inc.
850 Copying and distribution of this file, with or without modification,
851 are permitted in any medium without royalty provided the copyright
852 notice and this notice are preserved.
858 version-control: never