1 2020-02-10 H.J. Lu <hongjiu.lu@intel.com>
4 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
5 (EXECUTABLE_SUFFIX): Likewise.
6 * config.in: Regenerated.
8 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
9 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
10 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
11 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
12 (get_lto_wrapper): New.
13 (setup_lto_wrapper_env): Likewise.
14 (current_plugin): Likewise.
15 (register_all_symbols_read): Likewise.
16 (register_cleanup): Likewise.
17 (get_symbols): Likewise.
18 (add_input_file): Likewise.
19 (bfd_plugin_close_and_cleanup): Likewise.
20 (claim_file): Removed.
21 (register_claim_file): Set current_plugin->claim_file.
22 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
23 lto_syms in current_plugin.
24 (try_claim): Use current_plugin->claim_file. Call LTO plugin
25 all_symbols_read handler. Copy real symbols to plugin_data.
26 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
27 (try_load_plugin): Don't reuse the previous plugin for LTO
28 wrapper. Set up GCC LTO wrapper if possible. Don't set
29 plugin_list_iter->claim_file.
30 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
32 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
35 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
37 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
38 check if previous instruction matches a conditional jump inserted
39 earlier. Invert conditional jump and delete branch in this case.
41 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
43 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
44 msp430_elf_relax_add_words. Support insertion of either one or two
46 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
47 needs to be grown. Handle insertion of branch instruction to replace
50 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
52 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
53 debugging relocations.
54 (msp430_elf_relax_delete_bytes): Likewise.
55 (msp430_elf_relax_add_two_words): Likewise.
56 (msp430_elf_relax_section): Likewise.
58 2020-02-10 Alan Modra <amodra@gmail.com>
60 * archures.c: Wrap overlong z80 comments.
61 * bfd-in2.h: Regenerate.
63 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
66 * archures.c: Add GBZ80 and Z80N machine values.
67 * reloc.c: Add BFD_RELOC_Z80_16_BE.
68 * coff-z80.c: Add support for new reloc.
69 * coffcode.h: Add support for new machine values.
70 * cpu-z80.c: Add support for new machine names.
71 * elf32-z80.c: Add support for new reloc.
72 * bfd-in2.h: Regenerate.
73 * libbfd.h: Regenerate.
75 2020-02-07 Nick Clifton <nickc@redhat.com>
78 * elf.c (rewrite_elf_program_header): Do not complain if no
79 sections are mapped to a segment.
81 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
84 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
85 for garbage collection on __patchable_function_entries section
86 without linked-to section.
88 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
91 * bfd-in2.h: Regenerated.
92 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
93 on section if gc_mark of any of its linked-to sections is set
94 and don't set gc_mark again.
95 * section.c (asection): Add linked_to_symbol_name to map_head
98 2020-02-06 Maciej W. Rozycki <macro@wdc.com>
100 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
101 reporting an unrecognized instruction with R_V850_LONGJUMP.
103 2020-02-05 Alan Modra <amodra@gmail.com>
105 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
107 2020-02-04 Alan Modra <amodra@gmail.com>
109 * elf32-ppc.c (ppc_elf_relocate_section): After applying
110 R_PPC_VLE_ADDR20, goto copy_reloc.
112 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
114 * bfd-in2.h: Regenerated.
115 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
117 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
120 * bfd-in2.h: Regenerated.
121 * ecoff.c (bfd_debug_section): Add section_id.
122 * section.c (bfd_section): Add section_id.
123 (SEC_ASSEMBLER_SECTION_ID): New.
124 (BFD_FAKE_SECTION): Add section_id.
126 2020-02-01 Nick Clifton <nickc@redhat.com>
128 * config.bfd: Move the c30-aout and tic30-aout targets onto the
131 2020-01-31 Sandra Loosemore <sandra@codesourcery.com>
133 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
134 encodings are relative to the GOT on nios2, too.
136 2020-01-31 Alan Modra <amodra@gmail.com>
138 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
139 file. Use $< and $@ in rules.
140 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
141 (elf32-ia64.c, elf64-ia64.c): Likewise.
142 (elf32-riscv.c, elf64-riscv.c): Likewise.
143 (peigen.c, pepigen.c, pex64igen.c): Likewise.
144 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
145 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
146 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
147 (peigen.c, pepigen.c, pex64igen.c): Likewise.
148 * Makefile.in: Regenerate.
150 2020-01-31 Alan Modra <amodra@gmail.com>
153 * elf.c (setup_group): Don't clear entire section contents,
154 just the padding after group flags. Release alloc'd memory
155 after a seek or read failure.
157 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
159 * peXXigen.c (pe_is_repro): New function.
160 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
161 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
163 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
165 * peXXigen.c (debug_type_names): Add names for new debug data type
168 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
170 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
171 inner loop. Fix a memory leak.
173 2020-01-30 Alan Modra <amodra@gmail.com>
175 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
176 or obj_coff_keep_strings here.
177 (coff_get_normalized_symtab): Free external syms directly.
178 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
181 2020-01-27 Jim Wilson <jimw@sifive.com>
183 * cpu-riscv.c (riscv_scan): New.
184 (N): Change bfd_default_scan to riscv_scan.
186 2020-01-27 Andreas Schwab <schwab@suse.de>
188 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
189 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
190 * Makefile.in: Regenerate.
191 * cpu-plugin.c: Remove.
192 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
193 (bfd_plugin_arch): Remove declaration.
194 * bfd-in2.h: Regenerate.
195 * po/SRC-POTFILES.in: Regenerate.
197 2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
198 Alan Modra <amodra@gmail.com>
201 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
203 2020-01-24 Jim Wilson <jimw@sifive.com>
205 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
206 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
207 avoid over long line.
209 2020-01-24 Nick Clifton <nickc@redhat.com>
212 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
213 syms and keep strings flags as these may have been set in order to
214 prevent a bogus call to free.
216 2020-01-23 Nick Clifton <nickc@redhat.com>
218 * po/fr.po: Updated French translation.
220 2020-01-23 Alan Modra <amodra@gmail.com>
223 * elf.c (assign_file_positions_for_load_sections): Avoid divide
224 by zero when p_align is zero.
226 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
228 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
229 (riscv_prefix_cmp): Likewise.
230 (riscv_non_std_ext_p): Deleted.
231 (riscv_std_sv_ext_p): Likewise.
232 (riscv_non_std_sv_ext_p): Likewise.
233 (riscv_merge_non_std_and_sv_ext): Rename to...
234 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
235 (riscv_merge_arch_attr_info): Replace 3 calls to
236 riscv_merge_non_std_and_sv_ext with single call to
237 riscv_merge_multi_letter_ext.
238 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
239 encounter a 'z' prefix.
240 (riscv_get_prefix_class): New function, return prefix class based
241 on first few characters of input string.
242 (riscv_parse_config): New structure to factor out minor differences
243 in extension class parsing behaviour.
244 (riscv_parse_sv_or_non_std_ext): Rename to...
245 (riscv_parse_prefixed_ext): and parameterise with
247 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
248 (riscv_multi_letter_ext_valid_p): New.
249 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
250 (riscv_parse_subset): Delegate all non-single-letter parsing work
251 to riscv_parse_prefixed_ext.
252 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
253 (riscv_get_prefix_class): Declare.
255 2020-01-22 Alan Modra <amodra@gmail.com>
257 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
258 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
260 (ppc64_elf_size_stubs): Add section for linker generated
261 __tls_get_addr_desc wrapper function. Loop at least once if
262 generating this function.
263 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
264 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
266 2020-01-22 Alan Modra <amodra@gmail.com>
268 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
269 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
271 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
272 (STDU_R1_0R1, ADDI_R1_R1): Define.
273 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
274 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
275 tga_desc_fd to opt_fd, and tga_desc to opt. Set
276 no_tls_get_addr_regsave.
277 (branch_reloc_hash_match): Add hash3 and hash4.
278 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
279 (ppc64_elf_size_dynamic_sections): Likewise.
280 (ppc64_elf_relocate_section): Likewise.
281 (plt_stub_size, build_plt_stub): Likewise. Size regsave
283 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
285 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
286 eh_frame for regsave __tls_get_addr.
288 2020-01-22 Alan Modra <amodra@gmail.com>
290 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
291 which __tls_get_addr calls will be eliminated.
293 2020-01-20 Nick Clifton <nickc@redhat.com>
295 * po/pt.po: Updates Portuguese translation.
296 * po/ru.po: Updated Russian translation.
297 * po/uk.po: Updated Ukranian translation.
299 2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
302 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
303 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
305 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
306 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
307 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
308 "rex leal x@tlsdesc(%rip), %reg" to
309 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
310 "call *(%eax)" to "nopl (%rax)".
312 2020-01-20 Alan Modra <amodra@gmail.com>
314 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
315 (MTLR_R11): Don't define.
316 (LD_R0_0R3, CMPDI_R0_0): Define.
317 (build_tls_get_addr_stub): Don't use r11 in stub.
319 2020-01-20 Alan Modra <amodra@gmail.com>
321 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
322 (defined_sym_val, is_tls_get_addr): Likewise.
324 2020-01-18 Nick Clifton <nickc@redhat.com>
326 * version.m4 (BFD_VERSION): Set to 2.34.50.
327 * configure: Regenerate.
328 * po/bfd.pot: Regenerate.
330 2020-01-18 Nick Clifton <nickc@redhat.com>
332 Binutils 2.34 branch created.
334 2020-01-17 Christian Biesinger <cbiesinger@google.com>
336 * coff-arm.c: Fix spelling error (seperate).
337 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
339 * sysdep.h (strnlen): Fix spelling error (seperate).
341 2020-01-15 Lars Brinkhoff <lars@nocrew.org>
344 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
346 2020-01-15 Alan Modra <amodra@gmail.com>
349 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
350 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
351 of function symbols unless dot symbols are present. Do warn
352 whenever one is created, regardles of whether a PLT entry is
353 also emitted for the function symbol.
355 2020-01-14 Alan Modra <amodra@gmail.com>
357 * som.c (som_bfd_count_ar_symbols): Error when file position
358 of symbols on chains is not strictly increasing.
360 2020-01-14 Alan Modra <amodra@gmail.com>
362 * vms.h (VMS_DEBUG): Define as 0.
363 * vms-alpha.c (image_write): Move debug output after bounds check.
365 (_bfd_vms_slurp_eihd): Warning fix.
366 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
368 2020-01-13 Alan Modra <amodra@gmail.com>
370 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
371 for "ignored" records.
373 2020-01-13 Alan Modra <amodra@gmail.com>
375 * wasm-module.c (wasm_scan_name_function_section): Formatting.
376 Delete asect name check. Move asect NULL check to wasm_object_p.
377 Correct bounds check of sizes against end. Replace uses of
378 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
379 just one bfd_release.
380 (wasm_scan): Don't use malloc/strdup for section names,
381 bfd_alloc instead. Simplify code prefixing section name.
382 Formatting. Don't attempt to free memory here..
383 (wasm_object_p): ..do so here.
385 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
388 * elf32-arm.c (elf32_arm_final_link_relocate): Use
389 UNDEFWEAK_NO_DYNAMIC_RELOC.
390 (allocate_dynrelocs_for_symbol): Likewise.
392 2020-01-10 Tamar Christina <tamar.christina@arm.com>
395 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
397 2020-01-10 Alan Modra <amodra@gmail.com>
399 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
401 2020-01-09 Nick Clifton <nickc@redhat.com>
404 * bfd.c (bfd_convert_section_contents): Check for a compress
405 header size that is larger than the actual section size.
407 2020-01-08 Alan Modra <amodra@gmail.com>
410 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
411 after removing sections.
413 2020-01-06 Jim Wilson <jimw@sifive.com>
416 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
417 check for !bfd_link_pic (info).
418 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
419 <R_RISCV_JAL>: Add comment.
420 (_bfd_riscv_relax_section): For plt.offset check, add check for
421 bfd_link_pic (info). Add comment.
423 2020-01-06 Alan Modra <amodra@gmail.com>
425 * format.c (bfd_check_format_matches): Ignore bfd_error on target
426 match failures. Don't init to bfd_error_wrong_format before
427 calling _bfd_check_format.
429 2020-01-06 Alan Modra <amodra@gmail.com>
431 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
432 status rather than exiting on stack overflow or underflow.
433 (_bfd_vms_slurp_etir): Adjust to suit.
435 2020-01-06 Alan Modra <amodra@gmail.com>
437 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
439 2020-01-06 Alan Modra <amodra@gmail.com>
441 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
442 command. Check name offset is within command.
443 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
444 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
445 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
446 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
447 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
448 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
449 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
450 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
451 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
452 (bfd_mach_o_read_segment): Similarly.
453 (bfd_mach_o_read_thread): Properly bound check thread struct.
454 Don't repeat checks on second loop.
455 (bfd_mach_o_read_command): Fail on invalid command length.
457 2020-01-04 Alan Modra <amodra@gmail.com>
459 * format.c (bfd_check_format_matches): Add preserve_match.
460 Save initial bfd state in "preserve", matched bfd state in
461 "preserve_match". Save just the first match. Release
462 bfd_alloc memory. Restore and finish preserved state as
463 appropriate on all function exit paths.
465 2020-01-04 Alan Modra <amodra@gmail.com>
467 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
469 2020-01-04 Alan Modra <amodra@gmail.com>
471 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
474 2020-01-03 Nick Clifton <nickc@redhat.com>
477 (bfd_pef_parse_function_stubs): Correct the test that ensures that
478 there is enough data remaining in the code buffer before
479 attempting to read a function stub.
481 2020-01-03 Nick Clifton <nickc@redhat.com>
484 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
485 return value from bfd_malloc.
486 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
487 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
488 (elf32_arm_filter_cmse_symbols): Likewise.
489 (elf32_arm_write_section): Likewise.
490 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
491 (bfd_mach_o_follow_dsym): Likewise.
492 * pef.c (bfd_pef_print_loader_section): Likewise.
493 (bfd_pef_scan_start_address): Likewise.
494 (bfd_pef_parse_function_stubs): Likewise.
495 (bfd_pef_parse_symbols): Likewise.
497 2020-01-03 Sergei Trofimovich <siarheit@google.com>
499 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
500 on binary inputs ld/PR25316.
501 (is_ia64_elf): new helper to filter on ia64 objects.
503 2020-01-03 Jan Beulich <jbeulich@suse.com>
505 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
507 (bfd_mach_o_scan): Insert underscore in two variable names.
509 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
511 * Makefile.am: Add z80-elf target support.
512 * configure.ac: Likewise.
513 * targets.c: Likewise.
514 * Makefile.in: Regenerate.
515 * configure: Regenerate.
516 * config.bfd: Add z80-elf target support and new arches: ez80 and
518 * elf32-z80.c: New file.
519 * archures.c: Add new z80 architectures: eZ80 and Z180.
520 * coffcode.h: Likewise.
521 * cpu-z80.c: Likewise.
522 * coff-z80.c: Add new relocations for Z80 target and local label
524 * reloc.c: Add new relocs.
525 * bfd-in2.h: Regenerate.
526 * libbfd.h: Regenerate.
528 2020-01-02 Tamar Christina <tamar.christina@arm.com>
532 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
534 2020-01-01 Alan Modra <amodra@gmail.com>
536 Update year range in copyright notice of all files.
538 For older changes see ChangeLog-2019
540 Copyright (C) 2020 Free Software Foundation, Inc.
542 Copying and distribution of this file, with or without modification,
543 are permitted in any medium without royalty provided the copyright
544 notice and this notice are preserved.
550 version-control: never