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