1 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
4 check if previous instruction matches a conditional jump inserted
5 earlier. Invert conditional jump and delete branch in this case.
7 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
10 msp430_elf_relax_add_words. Support insertion of either one or two
12 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
13 needs to be grown. Handle insertion of branch instruction to replace
16 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
19 debugging relocations.
20 (msp430_elf_relax_delete_bytes): Likewise.
21 (msp430_elf_relax_add_two_words): Likewise.
22 (msp430_elf_relax_section): Likewise.
24 2020-02-10 Alan Modra <amodra@gmail.com>
26 * archures.c: Wrap overlong z80 comments.
27 * bfd-in2.h: Regenerate.
29 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
32 * archures.c: Add GBZ80 and Z80N machine values.
33 * reloc.c: Add BFD_RELOC_Z80_16_BE.
34 * coff-z80.c: Add support for new reloc.
35 * coffcode.h: Add support for new machine values.
36 * cpu-z80.c: Add support for new machine names.
37 * elf32-z80.c: Add support for new reloc.
38 * bfd-in2.h: Regenerate.
39 * libbfd.h: Regenerate.
41 2020-02-07 Nick Clifton <nickc@redhat.com>
44 * elf.c (rewrite_elf_program_header): Do not complain if no
45 sections are mapped to a segment.
47 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
50 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
51 for garbage collection on __patchable_function_entries section
52 without linked-to section.
54 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
57 * bfd-in2.h: Regenerated.
58 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
59 on section if gc_mark of any of its linked-to sections is set
60 and don't set gc_mark again.
61 * section.c (asection): Add linked_to_symbol_name to map_head
64 2020-02-06 Maciej W. Rozycki <macro@wdc.com>
66 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
67 reporting an unrecognized instruction with R_V850_LONGJUMP.
69 2020-02-05 Alan Modra <amodra@gmail.com>
71 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
73 2020-02-04 Alan Modra <amodra@gmail.com>
75 * elf32-ppc.c (ppc_elf_relocate_section): After applying
76 R_PPC_VLE_ADDR20, goto copy_reloc.
78 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
80 * bfd-in2.h: Regenerated.
81 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
83 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
86 * bfd-in2.h: Regenerated.
87 * ecoff.c (bfd_debug_section): Add section_id.
88 * section.c (bfd_section): Add section_id.
89 (SEC_ASSEMBLER_SECTION_ID): New.
90 (BFD_FAKE_SECTION): Add section_id.
92 2020-02-01 Nick Clifton <nickc@redhat.com>
94 * config.bfd: Move the c30-aout and tic30-aout targets onto the
97 2020-01-31 Sandra Loosemore <sandra@codesourcery.com>
99 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
100 encodings are relative to the GOT on nios2, too.
102 2020-01-31 Alan Modra <amodra@gmail.com>
104 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
105 file. Use $< and $@ in rules.
106 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
107 (elf32-ia64.c, elf64-ia64.c): Likewise.
108 (elf32-riscv.c, elf64-riscv.c): Likewise.
109 (peigen.c, pepigen.c, pex64igen.c): Likewise.
110 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
111 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
112 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
113 (peigen.c, pepigen.c, pex64igen.c): Likewise.
114 * Makefile.in: Regenerate.
116 2020-01-31 Alan Modra <amodra@gmail.com>
119 * elf.c (setup_group): Don't clear entire section contents,
120 just the padding after group flags. Release alloc'd memory
121 after a seek or read failure.
123 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
125 * peXXigen.c (pe_is_repro): New function.
126 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
127 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
129 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
131 * peXXigen.c (debug_type_names): Add names for new debug data type
134 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
136 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
137 inner loop. Fix a memory leak.
139 2020-01-30 Alan Modra <amodra@gmail.com>
141 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
142 or obj_coff_keep_strings here.
143 (coff_get_normalized_symtab): Free external syms directly.
144 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
147 2020-01-27 Jim Wilson <jimw@sifive.com>
149 * cpu-riscv.c (riscv_scan): New.
150 (N): Change bfd_default_scan to riscv_scan.
152 2020-01-27 Andreas Schwab <schwab@suse.de>
154 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
155 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
156 * Makefile.in: Regenerate.
157 * cpu-plugin.c: Remove.
158 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
159 (bfd_plugin_arch): Remove declaration.
160 * bfd-in2.h: Regenerate.
161 * po/SRC-POTFILES.in: Regenerate.
163 2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
164 Alan Modra <amodra@gmail.com>
167 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
169 2020-01-24 Jim Wilson <jimw@sifive.com>
171 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
172 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
173 avoid over long line.
175 2020-01-24 Nick Clifton <nickc@redhat.com>
178 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
179 syms and keep strings flags as these may have been set in order to
180 prevent a bogus call to free.
182 2020-01-23 Nick Clifton <nickc@redhat.com>
184 * po/fr.po: Updated French translation.
186 2020-01-23 Alan Modra <amodra@gmail.com>
189 * elf.c (assign_file_positions_for_load_sections): Avoid divide
190 by zero when p_align is zero.
192 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
194 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
195 (riscv_prefix_cmp): Likewise.
196 (riscv_non_std_ext_p): Deleted.
197 (riscv_std_sv_ext_p): Likewise.
198 (riscv_non_std_sv_ext_p): Likewise.
199 (riscv_merge_non_std_and_sv_ext): Rename to...
200 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
201 (riscv_merge_arch_attr_info): Replace 3 calls to
202 riscv_merge_non_std_and_sv_ext with single call to
203 riscv_merge_multi_letter_ext.
204 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
205 encounter a 'z' prefix.
206 (riscv_get_prefix_class): New function, return prefix class based
207 on first few characters of input string.
208 (riscv_parse_config): New structure to factor out minor differences
209 in extension class parsing behaviour.
210 (riscv_parse_sv_or_non_std_ext): Rename to...
211 (riscv_parse_prefixed_ext): and parameterise with
213 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
214 (riscv_multi_letter_ext_valid_p): New.
215 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
216 (riscv_parse_subset): Delegate all non-single-letter parsing work
217 to riscv_parse_prefixed_ext.
218 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
219 (riscv_get_prefix_class): Declare.
221 2020-01-22 Alan Modra <amodra@gmail.com>
223 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
224 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
226 (ppc64_elf_size_stubs): Add section for linker generated
227 __tls_get_addr_desc wrapper function. Loop at least once if
228 generating this function.
229 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
230 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
232 2020-01-22 Alan Modra <amodra@gmail.com>
234 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
235 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
237 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
238 (STDU_R1_0R1, ADDI_R1_R1): Define.
239 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
240 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
241 tga_desc_fd to opt_fd, and tga_desc to opt. Set
242 no_tls_get_addr_regsave.
243 (branch_reloc_hash_match): Add hash3 and hash4.
244 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
245 (ppc64_elf_size_dynamic_sections): Likewise.
246 (ppc64_elf_relocate_section): Likewise.
247 (plt_stub_size, build_plt_stub): Likewise. Size regsave
249 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
251 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
252 eh_frame for regsave __tls_get_addr.
254 2020-01-22 Alan Modra <amodra@gmail.com>
256 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
257 which __tls_get_addr calls will be eliminated.
259 2020-01-20 Nick Clifton <nickc@redhat.com>
261 * po/pt.po: Updates Portuguese translation.
262 * po/ru.po: Updated Russian translation.
263 * po/uk.po: Updated Ukranian translation.
265 2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
268 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
269 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
271 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
272 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
273 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
274 "rex leal x@tlsdesc(%rip), %reg" to
275 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
276 "call *(%eax)" to "nopl (%rax)".
278 2020-01-20 Alan Modra <amodra@gmail.com>
280 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
281 (MTLR_R11): Don't define.
282 (LD_R0_0R3, CMPDI_R0_0): Define.
283 (build_tls_get_addr_stub): Don't use r11 in stub.
285 2020-01-20 Alan Modra <amodra@gmail.com>
287 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
288 (defined_sym_val, is_tls_get_addr): Likewise.
290 2020-01-18 Nick Clifton <nickc@redhat.com>
292 * version.m4 (BFD_VERSION): Set to 2.34.50.
293 * configure: Regenerate.
294 * po/bfd.pot: Regenerate.
296 2020-01-18 Nick Clifton <nickc@redhat.com>
298 Binutils 2.34 branch created.
300 2020-01-17 Christian Biesinger <cbiesinger@google.com>
302 * coff-arm.c: Fix spelling error (seperate).
303 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
305 * sysdep.h (strnlen): Fix spelling error (seperate).
307 2020-01-15 Lars Brinkhoff <lars@nocrew.org>
310 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
312 2020-01-15 Alan Modra <amodra@gmail.com>
315 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
316 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
317 of function symbols unless dot symbols are present. Do warn
318 whenever one is created, regardles of whether a PLT entry is
319 also emitted for the function symbol.
321 2020-01-14 Alan Modra <amodra@gmail.com>
323 * som.c (som_bfd_count_ar_symbols): Error when file position
324 of symbols on chains is not strictly increasing.
326 2020-01-14 Alan Modra <amodra@gmail.com>
328 * vms.h (VMS_DEBUG): Define as 0.
329 * vms-alpha.c (image_write): Move debug output after bounds check.
331 (_bfd_vms_slurp_eihd): Warning fix.
332 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
334 2020-01-13 Alan Modra <amodra@gmail.com>
336 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
337 for "ignored" records.
339 2020-01-13 Alan Modra <amodra@gmail.com>
341 * wasm-module.c (wasm_scan_name_function_section): Formatting.
342 Delete asect name check. Move asect NULL check to wasm_object_p.
343 Correct bounds check of sizes against end. Replace uses of
344 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
345 just one bfd_release.
346 (wasm_scan): Don't use malloc/strdup for section names,
347 bfd_alloc instead. Simplify code prefixing section name.
348 Formatting. Don't attempt to free memory here..
349 (wasm_object_p): ..do so here.
351 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
354 * elf32-arm.c (elf32_arm_final_link_relocate): Use
355 UNDEFWEAK_NO_DYNAMIC_RELOC.
356 (allocate_dynrelocs_for_symbol): Likewise.
358 2020-01-10 Tamar Christina <tamar.christina@arm.com>
361 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
363 2020-01-10 Alan Modra <amodra@gmail.com>
365 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
367 2020-01-09 Nick Clifton <nickc@redhat.com>
370 * bfd.c (bfd_convert_section_contents): Check for a compress
371 header size that is larger than the actual section size.
373 2020-01-08 Alan Modra <amodra@gmail.com>
376 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
377 after removing sections.
379 2020-01-06 Jim Wilson <jimw@sifive.com>
382 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
383 check for !bfd_link_pic (info).
384 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
385 <R_RISCV_JAL>: Add comment.
386 (_bfd_riscv_relax_section): For plt.offset check, add check for
387 bfd_link_pic (info). Add comment.
389 2020-01-06 Alan Modra <amodra@gmail.com>
391 * format.c (bfd_check_format_matches): Ignore bfd_error on target
392 match failures. Don't init to bfd_error_wrong_format before
393 calling _bfd_check_format.
395 2020-01-06 Alan Modra <amodra@gmail.com>
397 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
398 status rather than exiting on stack overflow or underflow.
399 (_bfd_vms_slurp_etir): Adjust to suit.
401 2020-01-06 Alan Modra <amodra@gmail.com>
403 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
405 2020-01-06 Alan Modra <amodra@gmail.com>
407 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
408 command. Check name offset is within command.
409 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
410 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
411 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
412 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
413 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
414 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
415 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
416 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
417 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
418 (bfd_mach_o_read_segment): Similarly.
419 (bfd_mach_o_read_thread): Properly bound check thread struct.
420 Don't repeat checks on second loop.
421 (bfd_mach_o_read_command): Fail on invalid command length.
423 2020-01-04 Alan Modra <amodra@gmail.com>
425 * format.c (bfd_check_format_matches): Add preserve_match.
426 Save initial bfd state in "preserve", matched bfd state in
427 "preserve_match". Save just the first match. Release
428 bfd_alloc memory. Restore and finish preserved state as
429 appropriate on all function exit paths.
431 2020-01-04 Alan Modra <amodra@gmail.com>
433 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
435 2020-01-04 Alan Modra <amodra@gmail.com>
437 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
440 2020-01-03 Nick Clifton <nickc@redhat.com>
443 (bfd_pef_parse_function_stubs): Correct the test that ensures that
444 there is enough data remaining in the code buffer before
445 attempting to read a function stub.
447 2020-01-03 Nick Clifton <nickc@redhat.com>
450 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
451 return value from bfd_malloc.
452 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
453 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
454 (elf32_arm_filter_cmse_symbols): Likewise.
455 (elf32_arm_write_section): Likewise.
456 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
457 (bfd_mach_o_follow_dsym): Likewise.
458 * pef.c (bfd_pef_print_loader_section): Likewise.
459 (bfd_pef_scan_start_address): Likewise.
460 (bfd_pef_parse_function_stubs): Likewise.
461 (bfd_pef_parse_symbols): Likewise.
463 2020-01-03 Sergei Trofimovich <siarheit@google.com>
465 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
466 on binary inputs ld/PR25316.
467 (is_ia64_elf): new helper to filter on ia64 objects.
469 2020-01-03 Jan Beulich <jbeulich@suse.com>
471 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
473 (bfd_mach_o_scan): Insert underscore in two variable names.
475 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
477 * Makefile.am: Add z80-elf target support.
478 * configure.ac: Likewise.
479 * targets.c: Likewise.
480 * Makefile.in: Regenerate.
481 * configure: Regenerate.
482 * config.bfd: Add z80-elf target support and new arches: ez80 and
484 * elf32-z80.c: New file.
485 * archures.c: Add new z80 architectures: eZ80 and Z180.
486 * coffcode.h: Likewise.
487 * cpu-z80.c: Likewise.
488 * coff-z80.c: Add new relocations for Z80 target and local label
490 * reloc.c: Add new relocs.
491 * bfd-in2.h: Regenerate.
492 * libbfd.h: Regenerate.
494 2020-01-02 Tamar Christina <tamar.christina@arm.com>
498 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
500 2020-01-01 Alan Modra <amodra@gmail.com>
502 Update year range in copyright notice of all files.
504 For older changes see ChangeLog-2019
506 Copyright (C) 2020 Free Software Foundation, Inc.
508 Copying and distribution of this file, with or without modification,
509 are permitted in any medium without royalty provided the copyright
510 notice and this notice are preserved.
516 version-control: never