diff -ruN binutils-2.25/bfd/ChangeLog binutils-2.25.1/bfd/ChangeLog --- binutils-2.25/bfd/ChangeLog 2014-12-23 15:22:04.000000000 +0100 +++ binutils-2.25.1/bfd/ChangeLog 2015-07-21 15:42:55.000000000 +0200 @@ -1,3 +1,967 @@ +2015-07-21 Tristan Gingold + + * version.m4: Bump version to 2.25.1 + * configure: Regenerate. + +2015-07-10 Alan Modra + + Apply from master + 2015-07-05 Richard Sandiford + * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value + plus addend rather than the original st_value when looking up + entries in opd->adjust. + + 2015-06-16 Alan Modra + * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of + dynamic relocs. + + 2015-06-05 Alan Modra + * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text + relocs with insns moved by --ppc476-workaround. Correct + output of REL16 relocs. + + 2015-04-23 Alan Modra + * elf64-ppc.c (TOC_BASE_ALIGN): Define. + (ppc64_elf_next_toc_section): Align multi-got toc base. + (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol. + + 2015-03-24 Alan Modra + * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to + stubs, even those for undefined weak symbols. Otherwise, don't + report relocation overflow on branches to undefined strong + symbols. Fix memory leak. + * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation + overflow on branches to undefined strong symbols. + +2015-06-23 Jiong Wang + + Apply from master: + 2015-06-23 Jiong. Wang + + * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function. + (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check + relocations against read-only sections. + +2015-06-19 Nick Clifton + + PR 18481 + * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL. + +2015-05-05 Jiong Wang + + Apply from master: + + 2015-04-24 Jiong. Wang + + PR ld/18270 + * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for + GOT_NORMAL for both sgot/srelgot section. + (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address + and generate necessary runtime relocation for GOT entry. + +2015-05-05 Jiong Wang + + Apply from master: + + 2015-04-24 Jiong. Wang + + * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject + PC-relative relocation for external symbol. + +2015-04-10 Alan Modra + + PR ld/18222 + * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error + on adding a protected visibility variable to .dynbss. + +2015-04-10 Alan Modra + + Revert 2015-03-06 H.J. Lu + PR ld/pr15228 + PR ld/pr17709 + * elf-bfd.h (elf_backend_data): Delete extern_protected_data. + * elf32-i386.c (elf_backend_extern_protected_data): Delete. + * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise. + * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove + extern_protected_data test. + (_bfd_elf_symbol_refs_local_p): Likewise. + * elfxx-target.h (elf_backend_extern_protected_data): Delete. + (elfNN_bed): Delete elf_backend_extern_protected_data init. + +2015-03-27 Alan Modra + + PR ld/15228 + PR ld/18167 + * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set + protected_def when symbol section is read-only. Adjust all calls. + * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment. + +2015-03-26 Tejas Belagod + + * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic + _bfd_final_link_relocate with aarch64_relocate. + +2015-03-25 Nick Clifton + + Apply from master: + 2015-02-26 Nick Clifton + + PR binutils/17512 + * elf.c (elf_fake_sections): Handle excessive alignmment powers. + (assign_file_positions_for_non_load_sections): Replace assertion + with an error message. + (rewrite_elf_program_header): Handle excessive segment + alignments. + + 2015-02-13 Alan Modra + + PR binutils/17512 + * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove + now redundant assert. + + 2015-02-12 Nick Clifton + + PR binutils/17512 + * dwarf2.c (read_1_byte, read_1_signed_byte, read_2_bytes) + (read_4_bytes, read_8_bytes, read_n_bytes, read_string) + (read_indirect_string, read_alt_indirect_string) + (read_alt_indirect_ref, read_address, read_abbrevs) + (read_attribute_value, read_attribute, decode_line_info) + (find_abstract_instance_name, read_rangelist) + (scan_unit_for_symbols, parse_comp_unit) + (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass + end pointers to reading functions and check for offsets taking + pointers out of range. Replace calls to read_*_leb128 with calls + to safe_read_leb128. + + * elf64-ppc.c (opd_entry_value): Add a check for an overlarge + offset. + + 2015-02-03 Nick Clifton + + PR binutils/17512 + * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message. + * elf32-arc.c (arc_info_to_howto_rel): Likewise. + * elf32-avr.c (avr_info_to_howto_rela): Likewise. + * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. + * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise. + * elf32-cris.c (cris_info_to_howto_rela): Likewise. + * elf32-crx.c (elf_crx_info_to_howto): Likewise. + * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. + * elf32-d30v.c (d30v_info_to_howto_rel): Likewise. + * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. + * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. + * elf32-frv.c (frv_info_to_howto_rela): Likewise. + * elf32-i370.c (i370_elf_info_to_howto): Likewise. + * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. + * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. + * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. + * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. + * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. + * elf32-m32r.c (m32r_info_to_howto_rel): Likewise. + * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. + * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. + * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. + * elf32-mep.c (mep_info_to_howto_rela): Likewise. + * elf32-metag.c (metag_info_to_howto_rela): Likewise. + * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. + * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. + * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. + * elf32-mt.c (mt_info_to_howto_rela): Likewise. + * elf32-nds32.c (nds32_info_to_howto_rel): Likewise. + * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. + * elf32-pj.c (pj_elf_info_to_howto): Likewise. + * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. + * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. + * elf32-rx.c (rx_info_to_howto_rela): Likewise. + * elf32-sh.c (sh_elf_info_to_howto): Likewise. + * elf32-spu.c (spu_elf_info_to_howto): Likewise. + * elf32-v850.c (v850_elf_perform_relocation): Likewise. + * elf32-vax.c (rtype_to_howto): Likewise. + * elf32-visium.c (visium_info_to_howto_rela): Likewise. + * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. + * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. + * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. + * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. + + 2015-01-27 Nick Clifton + + PR binutils/17512 + * dwarf2.c (concat_filename): Check for an empty directory table. + (scan_unit_for_symbols): Check for reading off the end of the + unit. + (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a + non-string form. + + 2015-01-15 Nick Clifton + + PR binutils/17512 + * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an + error message. Never return an invalid howto pointer. + * elf32-cr16.c (cr16_info_to_howto): Likewise. + * elf32-crx.c (elf_crx_info_to_howto): Likewise. + * elf32-i370.c (i370_elf_info_to_howto): Likewise. + * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. + * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. + * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise. + * elf32-pj.c (pj_elf_info_to_howto): Likewise. + * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. + * elf32-spu.c (spu_elf_info_to_howto): Likewise. + * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise. + * elf32-vax.c (rtype_to_howto): Likewise. + * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. + * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise. + * elfn32-mips.c (sh_elf_info_to_howto): Likewise. + * elf32-sh.c (sh_elf_info_to_howto): Likewise. + (sh_elf_reloc): Check that the reloc is in range. + * reloc.c (bfd_perform_relocation): Check that the section is big + enough for the entire reloc. + (bfd_generic_get_relocated_section_contents): Report unexpected + return values from perform_reloc. + + 2015-01-08 Nick Clifton + + PR binutils/17512 + * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum + maxpagesize of 1. + + 2015-01-06 H.J. Lu + + PR binutils/17512 + * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation. + * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. + + 2014-12-22 Nick Clifton + + PR binutils/17512 + * elf32-arc.c (arc_info_to_howto_rel): Replace BFD_ASSERT with + error message. + * elf32-avr.c (avr_info_to_howto_rela): Likewise. + * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise. + * elf32-cris.c (cris_info_to_howto_rela): Likewise. + * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. + * elf32-d30v.c (d30v_info_to_howto_rel): Likewise. + * elf32-dlx.c (dlx_rtype_to_howto): Likewise. + * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. + * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. + * elf32-frv.c (frv_info_to_howto_rela): Likewise. + * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. + * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. + * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. + * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. + * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. + * elf32-m32r.c (m32r_info_to_howto_rel): Likewise. + * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. + * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. + * elf32-mep.c (mep_info_to_howto_rela): Likewise. + * elf32-metag.c (metag_info_to_howto_rela): Likewise. + * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. + * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. + * elf32-mt.c (mt_info_to_howto_rela): Likewise. + * elf32-nds32.c (nds32_info_to_howto_rel): Likewise. + * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. + * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. + * elf32-rx.c (rx_info_to_howto_rela): Likewise. + * elf32-v850.c (v850_elf_info_to_howto_rel): Likewise. + * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. + * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. + * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. + * elf64-x86-64.c (elf_x86_64_reloc_type_lookup): Likewise. + * elfnn-aarch64.c (elfNN_aarch64_bfd_reloc_from_type): Likewise. + * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Add range + checking of reloc symbol index. + + 2014-12-09 Nick Clifton + + PR binutils/17512 + * elf-attrs.c (_bfd_elf_parse_attributes): Use safe_read_leb128. + Check for an over-long subsection length. + * elf.c (elf_parse_notes): Check that the namedata is long enough + for the string comparison that is about to be performed. + (elf_read_notes): Zero-terminate the note buffer. + + 2014-12-01 Nick Clifton + + PR binutils/17512 + * elf-attrs.c (_bfd_elf_parse_attributes): Check for an empty + header. Add range checks to avoid running off the end of the + section. + * elf.c (bfd_elf_get_str_section): Seek before allocating so that + if the seek fails, no memory is allocated. + (bfd_elf_string_from_elf_section): Do not allocate a string from a + non string section. It only leads to trouble later on. + (_bfd_elf_print_private_bfd_data): Check for there being too + little external dynamic data. + (bfd_section_from_shdr): Replace assertion with a failure mode. + (bfd_section_from_shdr): When walking a loaded group section use + the internal structure size, not the external size. Check for the + group section being empty. + * elf32-i386.c (elf_i386_rtype_to_howto): Replace assertion with a + failure mode. + * elfcode.h (elf_slurp_reloc_table): Likewise. + + 2014-11-27 Nick Clifton + + PR binutils/17512 + * elf.c (_bfd_elf_print_private_bfd_data): Fix the range check + scanning the external dynamic entries. + +2015-03-25 Nick Clifton + + Apply from master: + 2015-02-26 Nick Clifton + + PR binutils/17512 + * mach-o.c (bfd_mach_o_read_section_32): Likewise. + (bfd_mach_o_read_section_64): Likewise. + + 2015-02-10 Nick Clifton + + PR binutils/17512 + * versados.c (process_otr): Check the esdid value before using it + to access the EDATA. + + 2015-02-03 Nick Clifton + + PR binutils/17512 + * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays. + (bfd_mach_o_canonicalize_one_reloc): Fix check on out + of range symbol indicies. + (bfd_mach_o_canonicalize_relocs): Check for out of range alloc. + (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. + (bfd_mach_o_build_dysymtab): Likewise. + (bfd_mach_o_write_symtab_content): Set the string table size to + zero upon error. + (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the + read fails. + * tekhex.c (first_phase): Check for src pointer reaching end of + buffer. + + 2015-01-27 Nick Clifton + + PR binutils/17512 + * pdp11.c (aout_get_external_symbols): Return false if there are + no symbols. + + 2015-01-22 DJ Delorie + + * elf32-m32c.c (m32c_apply_reloc_24): New. + (m32c_elf_howto_table): Use it for R_M32C_24. + (m32c_elf_relocate_section): Handle R_M32C_24 specially. + + 2015-01-21 Nick Clifton + + PR binutils/17512 + * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always + initialise the fields of the dyld_info structure. + (bfd_mach_o_build_exec_seg_command): Replace assertion with an + error message and a return value. + (bfd_mach_o_layout_commands): Change the function to boolean. + Return FALSE if the function fails. + (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands + fails. + (bfd_mach_o_read_command): Fail if an unrecognised command is + encountered. + * tekhex.c (first_phase): Fail if the section is too big. + * versados.c (struct esdid): Add content_size field. + (process_otr): Use and check the new field. + (versados_get_section_contents): Check that the section exists and + that the requested data is available. + + 2015-01-19 Alan Modra + + * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from.. + (bfd_get_section_limit): ..here. + * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check. + (bfd_install_relocation, _bfd_final_link_relocate): Add same check here. + * bfd-in2.h: Regenerate. + + * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok + on zero size relocs. + * ecoff.c (ecoff_reloc_link_order): Likewise. + * elf32-nds32.c (nds32_relocate_contents): Likewise. + * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. + + * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs. + (_bfd_clear_contents): Likewise. + * elfxx-mips.c (mips_elf_obtain_contents): Likewise. + (mips_elf_perform_relocation): Likewise. + + * aoutx.h (aout_link_reloc_link_order): Allow for NULL return + from malloc on zero size alloc. + * cofflink.c (_bfd_coff_reloc_link_order): Likewise. + * elflink.c (elf_reloc_link_order): Likewise. + * linker.c (_bfd_generic_reloc_link_order): Likewise. + * pdp11.c (aout_link_reloc_link_order): Likewise. + * xcofflink.c (xcoff_reloc_link_order): Likewise. + + * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3, + bitsize 0, and complain_overflow_dont. + * coff-sparc.c (coff_sparc_howto_table): Likewise. + * elf-hppa.h (elf_hppa_howto_table): Likewise. + * elf-m10200.c (elf_mn10200_howto_table): Likewise. + * elf-m10300.c (elf_mn10300_howto_table): Likewise. + * elf32-arc.c (elf_arc_howto_table): Likewise. + * elf32-arm.c (elf32_arm_howto_table_1): Likewise. + * elf32-avr.c (elf_avr_howto_table): Likewise. + * elf32-bfin.c (bfin_howto_table): Likewise. + * elf32-cr16.c (cr16_elf_howto_table): Likewise. + * elf32-cris.c (cris_elf_howto_table): Likewise. + * elf32-crx.c (crx_elf_howto_table): Likewise. + * elf32-d10v.c (elf_d10v_howto_table): Likewise. + * elf32-d30v.c (elf_d30v_howto_table): Likewise. + * elf32-dlx.c (dlx_elf_howto_table): Likewise. + * elf32-epiphany.c (epiphany_elf_howto_table): Likewise. + * elf32-fr30.c (fr30_elf_howto_table): Likewise. + * elf32-frv.c (elf32_frv_howto_table): Likewise. + * elf32-h8300.c (h8_elf_howto_table): Likewise. + * elf32-i370.c (i370_elf_howto_raw): Likewise. + * elf32-i386.c (elf_howto_table): Likewise. + * elf32-i860.c (elf32_i860_howto_table): Likewise. + * elf32-i960.c (elf32_i960_relocate): Likewise. + * elf32-ip2k.c (ip2k_elf_howto_table): Likewise. + * elf32-iq2000.c (iq2000_elf_howto_table): Likewise. + * elf32-lm32.c (lm32_elf_howto_table): Likewise. + * elf32-m32c.c (m32c_elf_howto_table): Likewise. + * elf32-m32r.c (m32r_elf_howto_table): Likewise. + * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise. + * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise. + * elf32-m68k.c (howto_table): Likewise. + * elf32-mcore.c (mcore_elf_howto_raw): Likewise. + * elf32-mep.c (mep_elf_howto_table): Likewise. + * elf32-metag.c (elf_metag_howto_table): Likewise. + * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise. + * elf32-mips.c (elf_mips_howto_table_rel): Likewise. + * elf32-moxie.c (moxie_elf_howto_table): Likewise. + * elf32-msp430.c (elf_msp430_howto_table): Likewise. + * elf32-mt.c (mt_elf_howto_table): Likewise. + * elf32-nds32.c (nds32_elf_howto_table): Likewise. + * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise. + * elf32-or1k.c (or1k_elf_howto_table): Likewise. + * elf32-pj.c (pj_elf_howto_table): Likewise. + * elf32-ppc.c (ppc_elf_howto_raw): Likewise. + * elf32-rl78.c (rl78_elf_howto_table): Likewise. + * elf32-rx.c (rx_elf_howto_table): Likewise. + * elf32-s390.c (elf_howto_table): Likewise. + * elf32-score.c (elf32_score_howto_table): Likewise. + * elf32-score7.c (elf32_score_howto_table): Likewise. + * elf32-sh-relocs.h (R_SH_NONE): Likewise. + * elf32-spu.c (elf_howto_table): Likewise. + * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise. + * elf32-tilepro.c (tilepro_elf_howto_table): Likewise. + * elf32-v850.c (v850_elf_howto_table): Likewise. + * elf32-vax.c (howto_table): Likewise. + * elf32-xc16x.c (xc16x_elf_howto_table): Likewise. + * elf32-xgate.c (elf_xgate_howto_table): Likewise. + * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise. + * elf32-xtensa.c (elf_howto_table): Likewise. + * elf64-alpha.c (elf64_alpha_howto_table): Likewise. + * elf64-mips.c (mips_elf64_howto_table_rel): Likewise. + * elf64-mmix.c (elf_mmix_howto_table): Likewise. + * elf64-ppc.c (ppc64_elf_howto_raw): Likewise. + * elf64-s390.c (elf_howto_table): Likewise. + * elf64-sh64.c (sh_elf64_howto_table): Likewise. + * elf64-x86-64.c (x86_64_elf_howto_table): Likewise. + * elfn32-mips.c (elf_mips_howto_table_rel): Likewise. + * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. + (elfNN_aarch64_howto_none): Likewise. + * elfxx-ia64.c (ia64_howto_table): Likewise. + * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise. + * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise. + * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise. + + 2015-01-06 Nick Clifton + + PR binutils/17512 + * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the + string table. + + * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1. + (bfd_perform_relocation): Include the size of the reloc in the + test for an out of range relocation. + (bfd_generic_get_relocated_section_contents): Remove reloc range + test. + + * tekhex.c (getvalue): Add an end pointer parameter. Use it to + avoid reading off the end of the buffer. + (getsym): Likewise. + (first_phase): Likewise. + (pass_over): Pass an end pointer to the invoked function. + + 2015-01-05 Nick Clifton + + PR binutils/17512 + * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized + is at least big enough for the header to be read. + * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks. + (bfd_mach_o_read_command): Prevetn duplicate error messages about + unrecognized commands. + * syms.c (_bfd_stab_section_find_nearest_line): Add range checks + when indexing into the string table. + + 2014-12-22 Nick Clifton + + PR binutils/17512 + * archive.c (do_slurp_bsd_armap): Return if the parsed_size is + zero. + (bfd_slurp_armap): Zero terminate the name. + (bfd_generic_stat_arch_elt): If there is no header, fail. + * mach-o.c (bfd_mach_o_canonicalize_one_reloc): If no symbols have + been provided then set the reloc's symbol to undefined. + * reloc.c (bfd_generic_get_relocated_section_contents): Add range + checking of the reloc to be applied. + * versados.c (process_otr): Add more range checks. + (versados_canonicalize_reloc): If the section is unknown, set the + symbol to undefined. + * vms-alpha.c (_bfd_vms_slurp_eisd): Add range checks. + (alpha_vms_object_p): Likewise. + + 2014-12-16 Nick Clifton + + PR binutils/17512 + * format.c (bfd_check_format_matches): Check for a matching vector + before using match priorities. + * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Fix off-by-one + errors with previous delta. + + 2014-12-09 Nick Clifton + + PR binutils/17512 + * archive64.c (bfd_elf64_archive_slurp_armap): Add range checks. + * libbfd.c (safe_read_leb128): New function. + * libbfd-in.h (safe_read_leb128): Add prototype. + * libbfd.h: Regenerate. + + 2014-12-03 Nick Clifton + + PR binutils/17512 + * compress.c (bfd_get_full_section_contents): Fail if there are no + section contents available when the compress_status is + COMPRESS_SECTION_DONE. + * libbfd.c (bfd_malloc): Refuse to allocate a negative size. + (bfd_malloc2): Use bfd_malloc. + (bfd_realloc): Refuse to reallocate a negative size. + (bfd_realloc2): Use bfd_realloc. + (bfd_realloc_or_free): Use bfd_realloc. + (bfd_zmalloc): Use bfd_malloc. + (bfd_zmalloc): Use bfd_malloc2. + * opncls.c (bfd_alloc): Refuse to allocate a negative size. + + 2014-12-01 Nick Clifton + + PR binutils/17512 + * archive.c (do_slurp_coff_armap): Add range checks to prevent + running off the end of the string table. + * compress.c (bfd_get_full_section_contents): Return a NULL + pointer for zero sized sections. Do not attempt to copy a buffer + onto itself. + * reloc.c (bfd_perform_relocation): Avoid seg-fault if the howto + parameter is NULL. + + 2014-11-26 Nick Clifton + + PR binutils/17512 + * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Likewise. + (bfd_mach_o_mangle_sections): Move test for too many sections to + before the allocation of the section table. + (bfd_mach_o_read_symtab_strtab): If the read fails, free the + memory and nullify the symbol pointer. + * reloc.c (bfd_generic_get_relocated_section_contents): Add + handling of a bfd_reloc_notsupported return value. + * versados.c (EDATA): Add range checking. + (get_record): Likewise. + (process_otr): Check for contents being available before updating + them. + (versados_canonicalize_reloc): Add range check. + + 2014-11-21 Nick Clifton + + PR binutils/17512 + * ieee.c (next_byte): Convert to a function. Return FALSE if the + next byte is beyond the end of the buffer. + (parse_int): Test the return value of next_byte. + (parse_expression): Convert to boolean. Return FALSE if the + parsing failed. Test the return value of next_byte. + (ieee_seek): Convert to a function. Return FALSE if the seek goes + beyond the end of the buffer. + (ieee_slurp_external_symbols): Test the return value of ieee_seek + and next_byte. + (ieee_slurp_sections): Convert to boolean. Return FALSE if the + operation failed. Test the return value of ieee_seek and + next_byte. + (ieee_archive_p): Test the return value of ieee_seek and + next_byte. + (do_one): Likewise. + (ieee_slurp_section_data): Likewise. + (ieee_object_p): Likewise. Store the size of the buffer in the + total_amt field in the header. + * libieee.h (common_header_type): Add amt field. + * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Check that the + reloc's value is within range. + (bfd_mach_o_read_symtab_symbols): Nullify the symbols field if the + operation fails. + * versados.c (process_otr): Check that the section exists before + taking its size. + (versados_object_p): Make sure that enough data was read for the + header to be checked. + * vms-alpha.c (vms_get_remaining_object_record): Change + read_so_far parameter to an unsigned int. Check that the amount + read is in range. + +2015-03-24 Nick Clifton + + Apply from master: + 2015-02-26 Nick Clifton + + PR binutils/17512 + * coffcode.h (coff_compute_section_file_positions): Report + negative page sizes. + + 2015-02-10 Nick Clifton + + PR binutils/17512 + * coffcode.h (styp_to_sec_flags): Use an unsigned long type to + hold the flag bits. + + 2015-02-06 Nick Clifton + + PR binutils/17512 + * peXXigen.c (rsrc_print_resource_entries): Add range check for + addresses that wrap around the address space. + (rsrc_parse_entry): Likewise. + + 2015-02-03 Nick Clifton + + PR binutils/17512 + * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays. + (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol + index or an out of range fdr index. + * peXXigen.c (pe_print_edata): Check for numeric overflow in edt + fields. + + 2015-01-22 Nick Clifton + + PR binutils/17512 + * coffcode.h (handle_COMDAT): When searching for the section + symbol, make sure that there is space left in the symbol table. + + 2015-01-21 Nick Clifton + + PR binutils/17512 + * coffcode.h (coff_set_arch_mach_hook): Check return value from + bfd_malloc. + (coff_slurp_line_table): Return FALSE if the line number + information was corrupt. + (coff_slurp_symbol_table): Return FALSE if the symbol information + was corrupt. + * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the + read fails. + (slurp_symtab): Check the return from bfd_malloc. + (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy + encountered an error. + (_bfd_XXi_final_link_postscript): Fail if a section could not be + copied. + * peicode.h (pe_bfd_object_p): Fail if the header could not be + swapped in. + + 2015-01-08 Nick Clifton + + PR binutils/17512 + * coffcode.h (coff_slurp_symbol_table): Return false if we failed + to load the line table. + + 2015-01-06 Nick Clifton + + PR binutils/17512 + * coff-i860.c (CALC_ADDEND): Always set an addend value. + + 2014-11-27 Nick Clifton + + PR binutils/17512 + * ecoff.c (_bfd_ecoff_slurp_symbol_table): Warn about and correct + a discrepancy between the isymMax and ifdMax values in the + symbolic header. + + 2014-11-26 Nick Clifton + + PR binutils/17512 + * coff-h8300.c (rtype2howto): Replace abort with returning a NULL + value. + * coff-h8500.c (rtype2howto): Likewise. + * coff-tic30.c (rtype2howto): Likewise. + * coff-z80.c (rtype2howto): Likewise. + * coff-z8k.c (rtype2howto): Likewise. + * coff-ia64.c (RTYPE2HOWTO): Always return a valid howto. + * coff-m68k.c (m68k_rtype2howto): Return a NULL howto if none + could be found. + * coff-mcore.c (RTYPE2HOWTO): Add range checking. + * coff-w65.c (rtype2howto): Likewise. + * coff-we32k.c (RTYPE2HOWTO): Likewise. + * pe-mips.c (RTYPE2HOWTO): Likewise. + * coff-x86_64.c (coff_amd64_reloc): Likewise. Replace abort with + an error return. + * coffcode.h (coff_slurp_reloc_table): Allow the rel parameter to + be unused. + * coffgen.c (make_a_section_from_file): Check the length of a + section name before testing to see if it is a debug section name. + (coff_object_p): Zero out any uninitialised bytes in the opt + header. + * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Test for the raw + source being empty when there are values to be processed. + (_bfd_ecoff_slurp_symbol_table): Add range check. + + 2014-11-21 Nick Clifton + + PR binutils/17512 + * coffgen.c (coff_get_normalized_symtab): Check for an excessive + number of auxillary entries. + + 2014-11-21 Alexander Cherepanov + + PR binutils/17512 + * coffgen.c (_bfd_coff_read_string_table): Test allocation of + string table before clearing the first few bytes. + +2014-11-18 Nick Clifton + + PR binutils/17512 + * peXXigen.c (pe_print_pdata): Fail if the section's virtual size + is larger than its real size. + (rsrc_print_section): Fix off-by-one error checking for overflow. + * pei-x86_64.c (pex64_bfd_print_pdata): Handle empty unwind + sections. + +2015-03-18 Alan Modra + + Apply from master + 2015-03-14 Andreas Krebbel + * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort + relocs against code sections. + * elf32-s390.c: Define elf_backend_sort_relocs_p. + * elf64-s390.c: Likewise. + + 2015-03-11 Alan Modra + * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in + reverse order. Account for larger size of __tls_get_addr_opt stub. + + 2015-02-28 Alan Modra + * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if + not PLT_NEW. + + 2015-02-26 Alan Modra + * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build + thread-safe stubs for iplt. + (build_tls_get_addr_stub): Restore r2 immediately after call. + + 2015-02-26 Alan Modra + * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc. + Use text relocs rather than giving an error on trying to use + .dynbss for protected shared lib vars. + * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. + +2015-03-06 H.J. Lu + + Backport from master + 2015-03-05 H.J. Lu + + PR ld/pr15228 + PR ld/pr17709 + * elf-bfd.h (elf_backend_data): Add extern_protected_data. + * elf32-i386.c (elf_backend_extern_protected_data): New. + Defined to 1. + * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise. + * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on + copy relocs against protected symbols if extern_protected_data + is true. + (_bfd_elf_symbol_refs_local_p): Don't return true on protected + non-function symbols if extern_protected_data is true. + * elfxx-target.h (elf_backend_extern_protected_data): New. + Default to 0. + (elfNN_bed): Initialize extern_protected_data with + elf_backend_extern_protected_data. + +2015-02-11 Alan Modra + + Apply from master. + 2015-02-09 Alan Modra + * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL + tls_sec. + * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. + * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec. + + 2015-01-29 Alan Modra + * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD + optimization. Tidy mask for GOT_TLSGD optimization. + * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct + location of nop zapping high insn too. + + 2015-01-20 Alan Modra + PR ld/17615 + * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop + ELF_COMMON_DEF syms. + + 2015-01-19 Alan Modra + PR 17165 + * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for + linker script assignments too. + * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms. + (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly. + + 2015-01-15 Alan Modra + * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for + any output section matching a linker created dynobj section. + + 2015-01-15 Alan Modra + PR 17842 + * elflink.c (elf_link_output_sym): Assert elf_onesymtab set. + (bfd_elf_final_link): Always create a symbol table when emit_relocs. + Don't assign symtab file position unless symbols will be output. + Merge blocks with condition in common. Don't call + elf_backend_output_arch_local_syms or elf_backend_output_arch_syms + unless other symbols are output. Move assignment of symtab_shndx + file position. Localize variable. + + 2014-12-26 Alan Modra + PR 17755 + * elf64-sh64.c (sh_elf64_copy_private_data_internal): Delete code + copying SHF_SH5_ISA32. + + 2014-12-23 Alan Modra + * elflink.c (_bfd_elf_define_linkage_sym): Set linker_def. + * linker.c (_bfd_generic_link_add_one_symbol): Clear linker_def + for CDEF, DEF, DEFW, COM. + + 2014-12-18 Richard Henderson + * elf32-ppc.c (ELF_COMMONPAGESIZE): Set to 64k. + * elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise. + + 2014-12-12 Alan Modra + PR 15228 + * elflink.c (_bfd_elf_adjust_dynamic_copy): Call bfd_set_error. + + 2014-12-12 Alan Modra + PR 15228 + * elflink.c (_bfd_elf_adjust_dynamic_copy): Add "info" param. + Error on copy relocs against protected symbols. + (elf_merge_st_other): Set h->protected_def. + * elf-bfd.h (struct elf_link_hash_entry): Add "protected_def". + (_bfd_elf_adjust_dynamic_copy): Update prototype. + * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Update + _bfd_elf_adjust_dynamic_copy call. + * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise. + * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise. + * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise. + * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise. + * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise. + * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise. + * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise. + * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise. + * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise. + * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise. + * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise. + * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. + * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. + * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise. + * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise. + * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise. + * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise. + * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. + * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. + * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise. + * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. + * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise. + * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise. + * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. + * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise. + + 2014-12-10 Alan Modra + PR 17541 + * dwarf2.c (struct comp_unit): Add "lang". + (non_mangled): New function. + (struct funcinfo): Add "is_linkage". Reorder for better packing. + Make "name" a const char*. + (lookup_address_in_function_table): Delete functionname_ptr param. + (find_abstract_instance_name): Add is_linkage param. Set if we + have DW_AT_linkage_name or non_mangled DW_AT_name. + (scan_unit_for_symbols): Similarly set func->is_linkage. + (parse_comp_unit): Stash DW_AT_language. + (comp_unit_find_nearest_line): Replace functionname_ptr param + with function_ptr param. + (_bfd_dwarf2_find_nearest_line): Adjust above calls. Set + functionname_ptr from function->name. Call _bfd_elf_find_function + to retrieve symbol for function if not linkage name. + (_bfd_elf_find_function): Add bfd_target_elf_flavour test, moved from.. + * elf.c (elf_find_function): ..here. + (_bfd_elf_find_nearest_line): Adjust calls. + * elf-bfd.h (_bfd_elf_find_function): Declare. + + 2014-12-10 Alan Modra + PR 17666 + * elf-bfd.h (struct elf_backend_data): Add sort_relocs_p. + * elfxx-target.h (elf_backend_sort_relocs_p): Define. + (elfNN_bed): Init new field. + * elflink.c (elf_link_adjust_relocs): Conditionally sort. + (bfd_elf_final_link): Control sorting of relocs. + * elfxx-mips.c (_bfd_mips_elf_sort_relocs_p): New function. + * elfxx-mips.h (_bfd_mips_elf_sort_relocs_p): Declare. + * elf32-mips.c (elf_backend_sort_relocs_p): Define. + * elf64-mips.c (elf_backend_sort_relocs_p): Define. + + 2014-12-09 Alan Modra + * elf64-ppc.c (sort_r_offset): Delete. + (ppc64_elf_edit_opd): Don't sort input relocs. + + 2014-12-04 Alan Modra + PR 17666 + * elflink.c: Include bfd_stdint.h. + (cmp_ext32l_r_offset, cmp_ext32b_r_offset) + (cmp_ext64l_r_offset, cmp_ext64b_r_offset): New functions. + (elf_link_adjust_relocs): Sort relocs. Free rel hashes after + sorting invalidates. + + 2014-12-02 Alan Modra + * elf64-ppc.c (OPD_NDX): Define. Use throughout for sizing/indexing + _opd_sec_data array, halving required memory. + (sort_r_offset): New function. + (ppc64_elf_edit_opd): Sort incoming relocs. Accept .opd + sections with a mix of 16 and 24 byte OPD entries. Don't + attempt to honour --non-overlapping-opd for .opd sections with + unexpected relocs. Simplify opd entry size calculations by + first finding the reloc for the next entry. Make edit loop + handle one opd entry per iteration, with an inner loop + handling relocs per entry. + +2015-01-22 Thomas Preud'homme + + Backport from mainline + 2015-01-13 Thomas Preud'homme + + * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND + to check if a symbol should be bound symbolically. + +2015-01-20 Chung-Lin Tang + + Backport from master + * elf32-nios2.c (elf_backend_default_execstack): Define as 0. + +2015-01-11 H.J. Lu + + PR ld/17827 + * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE, + only discard space for pc-relative relocs symbols which turn + out to need copy relocs. + +2015-01-05 H.J. Lu + + PR ld/17773 + * elflink.c (bfd_elf_final_link): Assign the file position for + the symbol string table only there are symbols to be emitted. + +2014-12-23 Tristan Gingold + + * version.m4: Bump version to 2.25.0 + * configure: Regenerate. + 2014-12-23 Tristan Gingold * version.m4: Bump version to 2.25 diff -ruN binutils-2.25/bfd/aoutx.h binutils-2.25.1/bfd/aoutx.h --- binutils-2.25/bfd/aoutx.h 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/aoutx.h 2015-07-21 10:20:58.000000000 +0200 @@ -203,8 +203,8 @@ HOWTO (RELOC_GLOB_DAT,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "GLOB_DAT", FALSE, 0, 0x00000000, FALSE), HOWTO (RELOC_JMP_SLOT,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "JMP_SLOT", FALSE, 0, 0x00000000, FALSE), HOWTO (RELOC_RELATIVE,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "RELATIVE", FALSE, 0, 0x00000000, FALSE), - HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE",FALSE, 0, 0x00000000, TRUE), - HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE",FALSE, 0, 0x00000000, TRUE), + HOWTO (0, 0, 3, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE",FALSE, 0, 0x00000000, TRUE), + HOWTO (0, 0, 3, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE",FALSE, 0, 0x00000000, TRUE), #define RELOC_SPARC_REV32 RELOC_WDISP19 HOWTO (RELOC_SPARC_REV32, 0, 2, 32, FALSE, 0, complain_overflow_dont, 0,"R_SPARC_REV32",FALSE, 0, 0xffffffff, FALSE), }; @@ -3816,7 +3816,7 @@ size = bfd_get_reloc_size (howto); buf = (bfd_byte *) bfd_zmalloc (size); - if (buf == NULL) + if (buf == NULL && size != 0) return FALSE; r = MY_relocate_contents (howto, flaginfo->output_bfd, (bfd_vma) pr->addend, buf); diff -ruN binutils-2.25/bfd/archive.c binutils-2.25.1/bfd/archive.c --- binutils-2.25/bfd/archive.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/archive.c 2015-07-21 10:20:58.000000000 +0200 @@ -311,8 +311,7 @@ struct ar_cache *entry = (struct ar_cache *) htab_find (hash_table, &m); if (!entry) return NULL; - else - return entry->arbfd; + return entry->arbfd; } else return NULL; @@ -902,6 +901,10 @@ return FALSE; parsed_size = mapdata->parsed_size; free (mapdata); + /* PR 17512: file: 883ff754. */ + /* PR 17512: file: 0458885f. */ + if (parsed_size < 4) + return FALSE; raw_armap = (bfd_byte *) bfd_zalloc (abfd, parsed_size); if (raw_armap == NULL) @@ -1038,12 +1041,19 @@ } /* OK, build the carsyms. */ - for (i = 0; i < nsymz; i++) + for (i = 0; i < nsymz && stringsize > 0; i++) { + bfd_size_type len; + rawptr = raw_armap + i; carsyms->file_offset = swap ((bfd_byte *) rawptr); carsyms->name = stringbase; - stringbase += strlen (stringbase) + 1; + /* PR 17512: file: 4a1d50c1. */ + len = strnlen (stringbase, stringsize); + if (len < stringsize) + len ++; + stringbase += len; + stringsize -= len; carsyms++; } *stringbase = 0; @@ -1131,6 +1141,7 @@ return FALSE; if (bfd_seek (abfd, -(file_ptr) (sizeof (hdr) + 20), SEEK_CUR) != 0) return FALSE; + extname[20] = 0; if (CONST_STRNEQ (extname, "__.SYMDEF SORTED") || CONST_STRNEQ (extname, "__.SYMDEF")) return do_slurp_bsd_armap (abfd); @@ -1964,6 +1975,9 @@ } hdr = arch_hdr (abfd); + /* PR 17512: file: 3d9e9fe9. */ + if (hdr == NULL) + return -1; #define foo(arelt, stelt, size) \ buf->stelt = strtol (hdr->arelt, &aloser, size); \ diff -ruN binutils-2.25/bfd/archive64.c binutils-2.25.1/bfd/archive64.c --- binutils-2.25/bfd/archive64.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/archive64.c 2015-07-21 10:20:58.000000000 +0200 @@ -46,6 +46,7 @@ struct areltdata *mapdata; bfd_byte int_buf[8]; char *stringbase; + char *stringend; bfd_byte *raw_armap = NULL; carsym *carsyms; bfd_size_type amt; @@ -92,11 +93,18 @@ ptrsize = 8 * nsymz; amt = carsym_size + stringsize + 1; + if (carsym_size < nsymz || ptrsize < nsymz || amt < nsymz) + { + bfd_set_error (bfd_error_malformed_archive); + return FALSE; + } ardata->symdefs = (struct carsym *) bfd_zalloc (abfd, amt); if (ardata->symdefs == NULL) return FALSE; carsyms = ardata->symdefs; stringbase = ((char *) ardata->symdefs) + carsym_size; + stringbase[stringsize] = 0; + stringend = stringbase + stringsize; raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize); if (raw_armap == NULL) @@ -114,7 +122,8 @@ { carsyms->file_offset = bfd_getb64 (raw_armap + i * 8); carsyms->name = stringbase; - stringbase += strlen (stringbase) + 1; + if (stringbase < stringend) + stringbase += strlen (stringbase) + 1; ++carsyms; } *stringbase = '\0'; diff -ruN binutils-2.25/bfd/bfd-in.h binutils-2.25.1/bfd/bfd-in.h --- binutils-2.25/bfd/bfd-in.h 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/bfd-in.h 2015-07-21 10:20:58.000000000 +0200 @@ -292,10 +292,13 @@ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) +#define bfd_get_section_limit_octets(bfd, sec) \ + ((bfd)->direction != write_direction && (sec)->rawsize != 0 \ + ? (sec)->rawsize : (sec)->size) + /* Find the address one past the end of SEC. */ #define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) + (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd)) /* Return TRUE if input section SEC has been discarded. */ #define discarded_section(sec) \ diff -ruN binutils-2.25/bfd/bfd-in2.h binutils-2.25.1/bfd/bfd-in2.h --- binutils-2.25/bfd/bfd-in2.h 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/bfd-in2.h 2015-07-21 10:20:58.000000000 +0200 @@ -299,10 +299,13 @@ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) +#define bfd_get_section_limit_octets(bfd, sec) \ + ((bfd)->direction != write_direction && (sec)->rawsize != 0 \ + ? (sec)->rawsize : (sec)->size) + /* Find the address one past the end of SEC. */ #define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) + (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd)) /* Return TRUE if input section SEC has been discarded. */ #define discarded_section(sec) \ diff -ruN binutils-2.25/bfd/coff-h8300.c binutils-2.25.1/bfd/coff-h8300.c --- binutils-2.25/bfd/coff-h8300.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-h8300.c 2015-07-21 10:20:58.000000000 +0200 @@ -337,7 +337,7 @@ internal->howto = howto_table + 19; break; default: - abort (); + internal->howto = NULL; break; } } diff -ruN binutils-2.25/bfd/coff-h8500.c binutils-2.25.1/bfd/coff-h8500.c --- binutils-2.25/bfd/coff-h8500.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-h8500.c 2015-07-21 10:20:58.000000000 +0200 @@ -95,7 +95,7 @@ switch (dst->r_type) { default: - abort (); + internal->howto = NULL; break; case R_H8500_IMM8: internal->howto = &r_imm8; diff -ruN binutils-2.25/bfd/coff-i860.c binutils-2.25.1/bfd/coff-i860.c --- binutils-2.25/bfd/coff-i860.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-i860.c 2015-07-21 10:20:58.000000000 +0200 @@ -467,7 +467,10 @@ FIXME: This macro refers to symbols and asect; these are from the calling function, not the macro arguments. */ -#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) +/* PR 17512: file: 0a38fb7c + Set an addend value, even if it is not going to be used. A tool + like coffdump might be used to print out the contents of the reloc. */ +#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) (cache_ptr)->addend = 0 /* We use the special COFF backend linker. */ #define coff_relocate_section _bfd_coff_generic_relocate_section diff -ruN binutils-2.25/bfd/coff-m68k.c binutils-2.25.1/bfd/coff-m68k.c --- binutils-2.25/bfd/coff-m68k.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-m68k.c 2015-07-21 10:20:58.000000000 +0200 @@ -143,6 +143,7 @@ case R_PCRWORD: internal->howto = m68kcoff_howto_table + 4; break; case R_PCRLONG: internal->howto = m68kcoff_howto_table + 5; break; case R_RELLONG_NEG: internal->howto = m68kcoff_howto_table + 6; break; + default: internal->howto = NULL; break; } } diff -ruN binutils-2.25/bfd/coff-mcore.c binutils-2.25.1/bfd/coff-mcore.c --- binutils-2.25/bfd/coff-mcore.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-mcore.c 2015-07-21 10:20:58.000000000 +0200 @@ -273,16 +273,15 @@ } #undef HOW2MAP +#define NUM_HOWTOS NUM_ELEM (mcore_coff_howto_table) + static reloc_howto_type * mcore_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) { unsigned int i; - for (i = 0; - i < (sizeof (mcore_coff_howto_table) - / sizeof (mcore_coff_howto_table[0])); - i++) + for (i = 0; i < NUM_HOWTOS; i++) if (mcore_coff_howto_table[i].name != NULL && strcasecmp (mcore_coff_howto_table[i].name, r_name) == 0) return &mcore_coff_howto_table[i]; @@ -290,8 +289,11 @@ return NULL; } -#define RTYPE2HOWTO(cache_ptr, dst) \ - (cache_ptr)->howto = mcore_coff_howto_table + (dst)->r_type; +#define RTYPE2HOWTO(cache_ptr, dst) \ + ((cache_ptr)->howto = \ + ((dst)->r_type < NUM_HOWTOS \ + ? mcore_coff_howto_table + (dst)->r_type \ + : NULL)) static reloc_howto_type * coff_mcore_rtype_to_howto (bfd * abfd ATTRIBUTE_UNUSED, @@ -303,7 +305,7 @@ { reloc_howto_type * howto; - if (rel->r_type >= NUM_ELEM (mcore_coff_howto_table)) + if (rel->r_type >= NUM_HOWTOS) return NULL; howto = mcore_coff_howto_table + rel->r_type; diff -ruN binutils-2.25/bfd/coff-sparc.c binutils-2.25.1/bfd/coff-sparc.c --- binutils-2.25/bfd/coff-sparc.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-sparc.c 2015-07-21 10:20:58.000000000 +0200 @@ -74,7 +74,7 @@ static reloc_howto_type coff_sparc_howto_table[] = { - HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_NONE", FALSE,0,0x00000000,TRUE), + HOWTO(R_SPARC_NONE, 0,3, 0,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_NONE", FALSE,0,0x00000000,TRUE), HOWTO(R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_8", FALSE,0,0x000000ff,TRUE), HOWTO(R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_16", FALSE,0,0x0000ffff,TRUE), HOWTO(R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_32", FALSE,0,0xffffffff,TRUE), diff -ruN binutils-2.25/bfd/coff-tic30.c binutils-2.25.1/bfd/coff-tic30.c --- binutils-2.25/bfd/coff-tic30.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-tic30.c 2015-07-21 10:20:58.000000000 +0200 @@ -136,7 +136,7 @@ internal->howto = &tic30_coff_howto_table[4]; break; default: - abort (); + internal->howto = NULL; break; } } diff -ruN binutils-2.25/bfd/coff-w65.c binutils-2.25.1/bfd/coff-w65.c --- binutils-2.25/bfd/coff-w65.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-w65.c 2015-07-21 10:20:58.000000000 +0200 @@ -42,6 +42,8 @@ HOWTO (R_W65_DP, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "dp", TRUE, 0x000000ff, 0x000000ff, FALSE), }; +#define NUM_HOWTOS (sizeof (howto_table) / sizeof (howto_table[0])) + /* Turn a howto into a reloc number. */ #define SELECT_RELOC(x,howto) \ @@ -61,7 +63,7 @@ static int select_reloc (reloc_howto_type *howto) { - return howto->type ; + return howto->type; } /* Code to turn a r_type into a howto ptr, uses the above howto table. */ @@ -70,7 +72,10 @@ rtype2howto (arelent *internal, struct internal_reloc *dst) { - internal->howto = howto_table + dst->r_type - 1; + if (dst->r_type > 0 && dst->r_type <= NUM_HOWTOS) + internal->howto = howto_table + dst->r_type - 1; + else + internal->howto = NULL; } #define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry) diff -ruN binutils-2.25/bfd/coff-we32k.c binutils-2.25.1/bfd/coff-we32k.c --- binutils-2.25/bfd/coff-we32k.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-we32k.c 2015-07-21 10:20:58.000000000 +0200 @@ -53,14 +53,19 @@ HOWTO(R_PCRLONG, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", TRUE, 0xffffffff,0xffffffff, FALSE), }; +#define NUM_HOWTOS (sizeof (howto_table) / sizeof (howto_table[0])) + /* Turn a howto into a reloc nunmber */ #define SELECT_RELOC(x,howto) { x.r_type = howto->type; } #define BADMAG(x) WE32KBADMAG(x) #define WE32K 1 -#define RTYPE2HOWTO(cache_ptr, dst) \ - (cache_ptr)->howto = howto_table + (dst)->r_type; +#define RTYPE2HOWTO(cache_ptr, dst) \ + ((cache_ptr)->howto = \ + ((dst)->r_type < NUM_HOWTOS \ + ? howto_table + (dst)->r_type \ + : NULL)) #ifndef bfd_pe_print_pdata #define bfd_pe_print_pdata NULL diff -ruN binutils-2.25/bfd/coff-x86_64.c binutils-2.25.1/bfd/coff-x86_64.c --- binutils-2.25/bfd/coff-x86_64.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/coff-x86_64.c 2015-07-21 10:20:58.000000000 +0200 @@ -143,6 +143,16 @@ reloc_howto_type *howto = reloc_entry->howto; unsigned char *addr = (unsigned char *) data + reloc_entry->address; + /* FIXME: We do not have an end address for data, so we cannot + accurately range check any addresses computed against it. + cf: PR binutils/17512: file: 1085-1761-0.004. + For now we do the best that we can. */ + if (addr < (unsigned char *) data || addr > ((unsigned char *) data) + input_section->size) + { + bfd_set_error (bfd_error_bad_value); + return bfd_reloc_notsupported; + } + switch (howto->size) { case 0: @@ -177,7 +187,8 @@ break; default: - abort (); + bfd_set_error (bfd_error_bad_value); + return bfd_reloc_notsupported; } } diff -ruN binutils-2.25/bfd/coff-z80.c binutils-2.25.1/bfd/coff-z80.c --- binutils-2.25/bfd/coff-z80.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-z80.c 2015-07-21 10:20:58.000000000 +0200 @@ -81,7 +81,7 @@ switch (dst->r_type) { default: - abort (); + internal->howto = NULL; break; case R_IMM8: internal->howto = &r_imm8; diff -ruN binutils-2.25/bfd/coff-z8k.c binutils-2.25.1/bfd/coff-z8k.c --- binutils-2.25/bfd/coff-z8k.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/coff-z8k.c 2015-07-21 10:20:58.000000000 +0200 @@ -85,7 +85,7 @@ switch (dst->r_type) { default: - abort (); + internal->howto = NULL; break; case R_IMM8: internal->howto = &r_imm8; diff -ruN binutils-2.25/bfd/coffcode.h binutils-2.25.1/bfd/coffcode.h --- binutils-2.25/bfd/coffcode.h 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/coffcode.h 2015-07-21 10:20:58.000000000 +0200 @@ -1009,6 +1009,13 @@ seen_state = 1; + /* PR 17512: file: e2cfe54f. */ + if (esym + bfd_coff_symesz (abfd) >= esymend) + { + _bfd_error_handler (_("%B: warning: No symbol for section '%s' found"), + abfd, symname); + break; + } /* This is the section symbol. */ bfd_coff_swap_aux_in (abfd, (esym + bfd_coff_symesz (abfd)), isym.n_type, isym.n_sclass, @@ -1162,7 +1169,7 @@ flagword *flags_ptr) { struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; - long styp_flags = internal_s->s_flags; + unsigned long styp_flags = internal_s->s_flags; flagword sec_flags; bfd_boolean result = TRUE; bfd_boolean is_dbg = FALSE; @@ -1185,7 +1192,7 @@ /* Process each flag bit in styp_flags in turn. */ while (styp_flags) { - long flag = styp_flags & - styp_flags; + unsigned long flag = styp_flags & - styp_flags; char * unhandled = NULL; styp_flags &= ~ flag; @@ -2073,7 +2080,11 @@ #endif if ((internal_f->f_flags & F_GO32STUB) != 0) - coff->go32stub = (char *) bfd_alloc (abfd, (bfd_size_type) GO32_STUBSIZE); + { + coff->go32stub = (char *) bfd_alloc (abfd, (bfd_size_type) GO32_STUBSIZE); + if (coff->go32stub == NULL) + return NULL; + } if (coff->go32stub != NULL) memcpy (coff->go32stub, internal_f->go32stub, GO32_STUBSIZE); @@ -2278,6 +2289,8 @@ bfd_size_type amt = bfd_coff_symesz (abfd); buf = bfd_malloc (amt); + if (buf == NULL) + return FALSE; if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0 || bfd_bread (buf, amt, abfd) != amt) { @@ -2666,10 +2679,16 @@ amt = s->reloc_count; amt *= sizeof (arelent *); p = bfd_malloc (amt); - if (p == NULL && s->reloc_count > 0) - return FALSE; - memcpy (p, s->orelocation, (size_t) amt); - qsort (p, s->reloc_count, sizeof (arelent *), compare_arelent_ptr); + if (p == NULL) + { + if (s->reloc_count > 0) + return FALSE; + } + else + { + memcpy (p, s->orelocation, (size_t) amt); + qsort (p, s->reloc_count, sizeof (arelent *), compare_arelent_ptr); + } } #endif @@ -3151,6 +3170,15 @@ This repairs 'ld -r' for arm-wince-pe target. */ if (page_size == 0) page_size = 1; + + /* PR 17512: file: 0ac816d3. */ + if (page_size < 0) + { + bfd_set_error (bfd_error_file_too_big); + (*_bfd_error_handler) + (_("%B: page size is too large (0x%x)"), abfd, page_size); + return FALSE; + } } else page_size = PE_DEF_FILE_ALIGNMENT; @@ -4526,6 +4554,7 @@ unsigned int nbr_func; LINENO *src; bfd_boolean have_func; + bfd_boolean ret = TRUE; BFD_ASSERT (asect->lineno == NULL); @@ -4575,6 +4604,7 @@ (_("%B: warning: illegal symbol index 0x%lx in line number entry %d"), abfd, (long) symndx, counter); cache_ptr->line_number = -1; + ret = FALSE; continue; } @@ -4587,6 +4617,7 @@ (_("%B: warning: illegal symbol index 0x%lx in line number entry %d"), abfd, (long) symndx, counter); cache_ptr->line_number = -1; + ret = FALSE; continue; } sym = (coff_symbol_type *) (ent->u.syment._n._n_n._n_zeroes); @@ -4599,6 +4630,7 @@ (_("%B: warning: illegal symbol in line number entry %d"), abfd, counter); cache_ptr->line_number = -1; + ret = FALSE; continue; } @@ -4678,11 +4710,15 @@ memcpy (lineno_cache, n_lineno_cache, amt); } + else + ret = FALSE; bfd_release (abfd, func_table); } + else + ret = FALSE; } - return TRUE; + return ret; } /* Slurp in the symbol table, converting it to generic form. Note @@ -4697,6 +4733,7 @@ unsigned int *table_ptr; bfd_size_type amt; unsigned int number_of_symbols = 0; + bfd_boolean ret = TRUE; if (obj_symbols (abfd)) return TRUE; @@ -5012,13 +5049,14 @@ #if defined(TIC80COFF) || defined(TICOFF) case C_UEXT: /* Tentative external definition. */ #endif - case C_EXTLAB: /* External load time label. */ - case C_HIDDEN: /* Ext symbol in dmert public lib. */ default: (*_bfd_error_handler) (_("%B: Unrecognized storage class %d for %s symbol `%s'"), abfd, src->u.syment.n_sclass, dst->symbol.section->name, dst->symbol.name); + ret = FALSE; + case C_EXTLAB: /* External load time label. */ + case C_HIDDEN: /* Ext symbol in dmert public lib. */ dst->symbol.flags = BSF_DEBUGGING; dst->symbol.value = (src->u.syment.n_value); break; @@ -5046,12 +5084,13 @@ p = abfd->sections; while (p) { - coff_slurp_line_table (abfd, p); + if (! coff_slurp_line_table (abfd, p)) + return FALSE; p = p->next; } } - return TRUE; + return ret; } /* Classify a COFF symbol. A couple of targets have globally visible @@ -5310,7 +5349,7 @@ static reloc_howto_type * coff_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, asection *sec ATTRIBUTE_UNUSED, - struct internal_reloc *rel, + struct internal_reloc *rel ATTRIBUTE_UNUSED, struct coff_link_hash_entry *h ATTRIBUTE_UNUSED, struct internal_syment *sym ATTRIBUTE_UNUSED, bfd_vma *addendp ATTRIBUTE_UNUSED) diff -ruN binutils-2.25/bfd/coffgen.c binutils-2.25.1/bfd/coffgen.c --- binutils-2.25/bfd/coffgen.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/coffgen.c 2015-07-21 10:20:58.000000000 +0200 @@ -146,8 +146,9 @@ /* Compress/decompress DWARF debug sections with names: .debug_* and .zdebug_*, after the section flags is set. */ if ((flags & SEC_DEBUGGING) + && strlen (name) > 7 && ((name[1] == 'd' && name[6] == '_') - || (name[1] == 'z' && name[7] == '_'))) + || (strlen (name) > 8 && name[1] == 'z' && name[7] == '_'))) { enum { nothing, compress, decompress } action = nothing; char *new_name = NULL; @@ -365,6 +366,10 @@ bfd_release (abfd, opthdr); return NULL; } + /* PR 17512: file: 11056-1136-0.004. */ + if (internal_f.f_opthdr < aoutsz) + memset (((char *) opthdr) + internal_f.f_opthdr, 0, aoutsz - internal_f.f_opthdr); + bfd_coff_swap_aouthdr_in (abfd, opthdr, (void *) &internal_a); bfd_release (abfd, opthdr); } @@ -463,7 +468,10 @@ if (strings == NULL) return NULL; } - if (sym->_n._n_n._n_offset >= obj_coff_strings_len (abfd)) + /* PR 17910: Only check for string overflow if the length has been set. + Some DLLs, eg those produced by Visual Studio, may not set the length field. */ + if (obj_coff_strings_len (abfd) > 0 + && sym->_n._n_n._n_offset >= obj_coff_strings_len (abfd)) return NULL; return strings + sym->_n._n_n._n_offset; } @@ -760,8 +768,9 @@ for (symbol_index = 0; symbol_index < symbol_count; symbol_index++) { - coff_symbol_type *coff_symbol_ptr = coff_symbol_from (bfd_ptr, symbol_ptr_ptr[symbol_index]); + coff_symbol_type *coff_symbol_ptr; + coff_symbol_ptr = coff_symbol_from (bfd_ptr, symbol_ptr_ptr[symbol_index]); symbol_ptr_ptr[symbol_index]->udata.i = symbol_index; if (coff_symbol_ptr && coff_symbol_ptr->native) { @@ -805,9 +814,9 @@ for (symbol_index = 0; symbol_index < symbol_count; symbol_index++) { - coff_symbol_type *coff_symbol_ptr = - coff_symbol_from (bfd_ptr, symbol_ptr_ptr[symbol_index]); + coff_symbol_type *coff_symbol_ptr; + coff_symbol_ptr = coff_symbol_from (bfd_ptr, symbol_ptr_ptr[symbol_index]); if (coff_symbol_ptr && coff_symbol_ptr->native) { int i; @@ -1711,15 +1720,15 @@ } strings = (char *) bfd_malloc (strsize + 1); + if (strings == NULL) + return NULL; + /* PR 17521 file: 079-54929-0.004. A corrupt file could contain an index that points into the first STRING_SIZE_SIZE bytes of the string table, so make sure that they are zero. */ memset (strings, 0, STRING_SIZE_SIZE); - if (strings == NULL) - return NULL; - if (bfd_bread (strings + STRING_SIZE_SIZE, strsize - STRING_SIZE_SIZE, abfd) != strsize - STRING_SIZE_SIZE) { @@ -1808,6 +1817,16 @@ symbol_ptr = internal_ptr; internal_ptr->is_sym = TRUE; + /* PR 17512: file: 1353-1166-0.004. */ + if (symbol_ptr->u.syment.n_sclass == C_FILE + && symbol_ptr->u.syment.n_numaux > 0 + && raw_src + symesz + symbol_ptr->u.syment.n_numaux + * symesz > raw_end) + { + bfd_release (abfd, internal); + return NULL; + } + for (i = 0; i < symbol_ptr->u.syment.n_numaux; i++) @@ -1815,7 +1834,10 @@ internal_ptr++; /* PR 17512: Prevent buffer overrun. */ if (internal_ptr >= internal_end) - return NULL; + { + bfd_release (abfd, internal); + return NULL; + } raw_src += symesz; bfd_coff_swap_aux_in (abfd, (void *) raw_src, @@ -1823,6 +1845,7 @@ symbol_ptr->u.syment.n_sclass, (int) i, symbol_ptr->u.syment.n_numaux, &(internal_ptr->u.auxent)); + internal_ptr->is_sym = FALSE; coff_pointerize_aux (abfd, internal, symbol_ptr, i, internal_ptr); diff -ruN binutils-2.25/bfd/cofflink.c binutils-2.25.1/bfd/cofflink.c --- binutils-2.25/bfd/cofflink.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/cofflink.c 2015-07-21 10:20:58.000000000 +0200 @@ -2789,7 +2789,7 @@ size = bfd_get_reloc_size (howto); buf = (bfd_byte *) bfd_zmalloc (size); - if (buf == NULL) + if (buf == NULL && size != 0) return FALSE; rstat = _bfd_relocate_contents (howto, output_bfd, diff -ruN binutils-2.25/bfd/compress.c binutils-2.25.1/bfd/compress.c --- binutils-2.25/bfd/compress.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/compress.c 2015-07-21 10:20:58.000000000 +0200 @@ -239,6 +239,8 @@ #endif case COMPRESS_SECTION_DONE: + if (sec->contents == NULL) + return FALSE; if (p == NULL) { p = (bfd_byte *) bfd_malloc (sz); @@ -246,7 +248,9 @@ return FALSE; *ptr = p; } - memcpy (p, sec->contents, sz); + /* PR 17512; file: 5bc29788. */ + if (p != sec->contents) + memcpy (p, sec->contents, sz); return TRUE; default: diff -ruN binutils-2.25/bfd/configure binutils-2.25.1/bfd/configure --- binutils-2.25/bfd/configure 2014-12-23 15:22:04.000000000 +0100 +++ binutils-2.25.1/bfd/configure 2015-07-21 15:42:55.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for bfd 2.25. +# Generated by GNU Autoconf 2.64 for bfd 2.25.1. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -556,8 +556,8 @@ # Identity of this package. PACKAGE_NAME='bfd' PACKAGE_TARNAME='bfd' -PACKAGE_VERSION='2.25' -PACKAGE_STRING='bfd 2.25' +PACKAGE_VERSION='2.25.1' +PACKAGE_STRING='bfd 2.25.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1349,7 +1349,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bfd 2.25 to adapt to many kinds of systems. +\`configure' configures bfd 2.25.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1420,7 +1420,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bfd 2.25:";; + short | recursive ) echo "Configuration of bfd 2.25.1:";; esac cat <<\_ACEOF @@ -1541,7 +1541,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bfd configure 2.25 +bfd configure 2.25.1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2183,7 +2183,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bfd $as_me 2.25, which was +It was created by bfd $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -3991,7 +3991,7 @@ # Define the identity of the package. PACKAGE='bfd' - VERSION='2.25' + VERSION='2.25.1' cat >>confdefs.h <<_ACEOF @@ -16567,7 +16567,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bfd $as_me 2.25, which was +This file was extended by bfd $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16631,7 +16631,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -bfd config.status 2.25 +bfd config.status 2.25.1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -ruN binutils-2.25/bfd/cpu-ns32k.c binutils-2.25.1/bfd/cpu-ns32k.c --- binutils-2.25/bfd/cpu-ns32k.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/cpu-ns32k.c 2015-07-21 10:20:58.000000000 +0200 @@ -585,8 +585,9 @@ switch (size) { default: - case 0: abort (); + case 0: + return bfd_reloc_ok; case 1: case 2: case 4: diff -ruN binutils-2.25/bfd/doc/ChangeLog binutils-2.25.1/bfd/doc/ChangeLog --- binutils-2.25/bfd/doc/ChangeLog 2014-10-15 10:04:16.000000000 +0200 +++ binutils-2.25.1/bfd/doc/ChangeLog 2015-07-21 10:20:58.000000000 +0200 @@ -1,3 +1,24 @@ +2015-06-21 Alan Modra + + * Makefile.am: Expand $<. + * Makefile.in: Regenerate. + +2015-02-11 Alan Modra + + Apply from master. + 2015-01-12 Bernd Edlinger + Alan Modra + PR 17817 + * Makefile.am (aoutx.stamp): cp -p $srcdir/aoutx.texi to keep + timestamps so that makeinfo need not be installed. + (archive.stamp, archures.stamp, bfdt.stamp, cache.stamp, + coffcode.stamp, core.stamp, elf.stamp, elfcode.stamp, mmo.stamp, + format.stamp, libbfd.stamp, bfdio.stamp, bfdwin.stamp, + opncls.stamp, reloc.stamp, section.stamp, syms.stamp, targets.stamp, + init.stamp, hash.stamp, linker.stamp): Similarly. + (bfdver.texi): Use test rather than [ ] in commands. + * Makefile.in: Regenerate. + 2014-08-05 Doug Evans * chew.c (skip_past_newline_1): New function. diff -ruN binutils-2.25/bfd/doc/Makefile.am binutils-2.25.1/bfd/doc/Makefile.am --- binutils-2.25/bfd/doc/Makefile.am 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/doc/Makefile.am 2015-07-21 10:20:58.000000000 +0200 @@ -96,19 +96,22 @@ aoutx.texi: aoutx.stamp ; @true aoutx.stamp: $(srcdir)/../aoutx.h $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >aoutx.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../aoutx.h >aoutx.tmp + test -e aoutx.texi || test ! -f $(srcdir)/aoutx.texi || cp -p $(srcdir)/aoutx.texi . $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi touch $@ archive.texi: archive.stamp ; @true archive.stamp: $(srcdir)/../archive.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >archive.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archive.c >archive.tmp + test -e archive.texi || test ! -f $(srcdir)/archive.texi || cp -p $(srcdir)/archive.texi . $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi touch $@ archures.texi: archures.stamp ; @true archures.stamp: $(srcdir)/../archures.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >archures.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp + test -e archures.texi || test ! -f $(srcdir)/archures.texi || cp -p $(srcdir)/archures.texi . $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi touch $@ @@ -116,115 +119,134 @@ # bfd.texinfo on an 8.3 filesystem. bfdt.texi: bfdt.stamp ; @true bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfd.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp + test -e bfdt.texi || test ! -f $(srcdir)/bfdt.texi || cp -p $(srcdir)/bfdt.texi . $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi touch $@ cache.texi: cache.stamp ; @true cache.stamp: $(srcdir)/../cache.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >cache.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp + test -e cache.texi || test ! -f $(srcdir)/cache.texi || cp -p $(srcdir)/cache.texi . $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi touch $@ coffcode.texi: coffcode.stamp ; @true coffcode.stamp: $(srcdir)/../coffcode.h $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >coffcode.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../coffcode.h >coffcode.tmp + test -e coffcode.texi || test ! -f $(srcdir)/coffcode.texi || cp -p $(srcdir)/coffcode.texi . $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi touch $@ core.texi: core.stamp ; @true core.stamp: $(srcdir)/../corefile.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >core.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../corefile.c >core.tmp + test -e core.texi || test ! -f $(srcdir)/core.texi || cp -p $(srcdir)/core.texi . $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi touch $@ elf.texi: elf.stamp ; @true elf.stamp: $(srcdir)/../elf.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >elf.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../elf.c >elf.tmp + test -e elf.texi || test ! -f $(srcdir)/elf.texi || cp -p $(srcdir)/elf.texi . $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi touch $@ elfcode.texi: elfcode.stamp ; @true elfcode.stamp: $(srcdir)/../elfcode.h $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >elfcode.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../elfcode.h >elfcode.tmp + test -e elfcode.texi || test ! -f $(srcdir)/elfcode.texi || cp -p $(srcdir)/elfcode.texi . $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi touch $@ mmo.texi: mmo.stamp ; @true mmo.stamp: $(srcdir)/../mmo.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >mmo.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../mmo.c >mmo.tmp + test -e mmo.texi || test ! -f $(srcdir)/mmo.texi || cp -p $(srcdir)/mmo.texi . $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi touch $@ format.texi: format.stamp ; @true format.stamp: $(srcdir)/../format.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >format.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../format.c >format.tmp + test -e format.texi || test ! -f $(srcdir)/format.texi || cp -p $(srcdir)/format.texi . $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi touch $@ libbfd.texi: libbfd.stamp ; @true libbfd.stamp: $(srcdir)/../libbfd.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >libbfd.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp + test -e libbfd.texi || test ! -f $(srcdir)/libbfd.texi || cp -p $(srcdir)/libbfd.texi . $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi touch $@ bfdio.texi: bfdio.stamp ; @true bfdio.stamp: $(srcdir)/../bfdio.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdio.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp + test -e bfdio.texi || test ! -f $(srcdir)/bfdio.texi || cp -p $(srcdir)/bfdio.texi . $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi touch $@ bfdwin.texi: bfdwin.stamp ; @true bfdwin.stamp: $(srcdir)/../bfdwin.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdwin.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp + test -e bfdwin.texi || test ! -f $(srcdir)/bfdwin.texi || cp -p $(srcdir)/bfdwin.texi . $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi touch $@ opncls.texi: opncls.stamp ; @true opncls.stamp: $(srcdir)/../opncls.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >opncls.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../opncls.c >opncls.tmp + test -e opncls.texi || test ! -f $(srcdir)/opncls.texi || cp -p $(srcdir)/opncls.texi . $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi touch $@ reloc.texi: reloc.stamp ; @true reloc.stamp: $(srcdir)/../reloc.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >reloc.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../reloc.c >reloc.tmp + test -e reloc.texi || test ! -f $(srcdir)/reloc.texi || cp -p $(srcdir)/reloc.texi . $(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi touch $@ section.texi: section.stamp ; @true section.stamp: $(srcdir)/../section.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >section.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../section.c >section.tmp + test -e section.texi || test ! -f $(srcdir)/section.texi || cp -p $(srcdir)/section.texi . $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi touch $@ syms.texi: syms.stamp ; @true syms.stamp: $(srcdir)/../syms.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >syms.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../syms.c >syms.tmp + test -e syms.texi || test ! -f $(srcdir)/syms.texi || cp -p $(srcdir)/syms.texi . $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi touch $@ targets.texi: targets.stamp ; @true targets.stamp: $(srcdir)/../targets.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >targets.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../targets.c >targets.tmp + test -e targets.texi || test ! -f $(srcdir)/targets.texi || cp -p $(srcdir)/targets.texi . $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi touch $@ init.texi: init.stamp ; @true init.stamp: $(srcdir)/../init.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >init.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../init.c >init.tmp + test -e init.texi || test ! -f $(srcdir)/init.texi || cp -p $(srcdir)/init.texi . $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi touch $@ hash.texi: hash.stamp ; @true hash.stamp: $(srcdir)/../hash.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >hash.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../hash.c >hash.tmp + test -e hash.texi || test ! -f $(srcdir)/hash.texi || cp -p $(srcdir)/hash.texi . $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi touch $@ linker.texi: linker.stamp ; @true linker.stamp: $(srcdir)/../linker.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >linker.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../linker.c >linker.tmp + test -e linker.texi || test ! -f $(srcdir)/linker.texi || cp -p $(srcdir)/linker.texi . $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi touch $@ @@ -316,11 +338,11 @@ bfdver.texi: $(srcdir)/Makefile.in @echo "creating $@"; \ echo "@set VERSION $(VERSION)" > bfdver.texi; \ - if [ -n "$(PKGVERSION)" ]; then \ + if test -n "$(PKGVERSION)"; then \ echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \ fi; \ echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \ - if [ -n "$(REPORT_BUGS_TEXI)" ]; then \ + if test -n "$(REPORT_BUGS_TEXI)"; then \ echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \ fi diff -ruN binutils-2.25/bfd/doc/Makefile.in binutils-2.25.1/bfd/doc/Makefile.in --- binutils-2.25/bfd/doc/Makefile.in 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/doc/Makefile.in 2015-07-21 10:20:58.000000000 +0200 @@ -795,19 +795,22 @@ aoutx.texi: aoutx.stamp ; @true aoutx.stamp: $(srcdir)/../aoutx.h $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >aoutx.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../aoutx.h >aoutx.tmp + test -e aoutx.texi || test ! -f $(srcdir)/aoutx.texi || cp -p $(srcdir)/aoutx.texi . $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi touch $@ archive.texi: archive.stamp ; @true archive.stamp: $(srcdir)/../archive.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >archive.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archive.c >archive.tmp + test -e archive.texi || test ! -f $(srcdir)/archive.texi || cp -p $(srcdir)/archive.texi . $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi touch $@ archures.texi: archures.stamp ; @true archures.stamp: $(srcdir)/../archures.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >archures.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp + test -e archures.texi || test ! -f $(srcdir)/archures.texi || cp -p $(srcdir)/archures.texi . $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi touch $@ @@ -815,115 +818,134 @@ # bfd.texinfo on an 8.3 filesystem. bfdt.texi: bfdt.stamp ; @true bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfd.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp + test -e bfdt.texi || test ! -f $(srcdir)/bfdt.texi || cp -p $(srcdir)/bfdt.texi . $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi touch $@ cache.texi: cache.stamp ; @true cache.stamp: $(srcdir)/../cache.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >cache.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp + test -e cache.texi || test ! -f $(srcdir)/cache.texi || cp -p $(srcdir)/cache.texi . $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi touch $@ coffcode.texi: coffcode.stamp ; @true coffcode.stamp: $(srcdir)/../coffcode.h $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >coffcode.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../coffcode.h >coffcode.tmp + test -e coffcode.texi || test ! -f $(srcdir)/coffcode.texi || cp -p $(srcdir)/coffcode.texi . $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi touch $@ core.texi: core.stamp ; @true core.stamp: $(srcdir)/../corefile.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >core.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../corefile.c >core.tmp + test -e core.texi || test ! -f $(srcdir)/core.texi || cp -p $(srcdir)/core.texi . $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi touch $@ elf.texi: elf.stamp ; @true elf.stamp: $(srcdir)/../elf.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >elf.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../elf.c >elf.tmp + test -e elf.texi || test ! -f $(srcdir)/elf.texi || cp -p $(srcdir)/elf.texi . $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi touch $@ elfcode.texi: elfcode.stamp ; @true elfcode.stamp: $(srcdir)/../elfcode.h $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >elfcode.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../elfcode.h >elfcode.tmp + test -e elfcode.texi || test ! -f $(srcdir)/elfcode.texi || cp -p $(srcdir)/elfcode.texi . $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi touch $@ mmo.texi: mmo.stamp ; @true mmo.stamp: $(srcdir)/../mmo.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >mmo.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../mmo.c >mmo.tmp + test -e mmo.texi || test ! -f $(srcdir)/mmo.texi || cp -p $(srcdir)/mmo.texi . $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi touch $@ format.texi: format.stamp ; @true format.stamp: $(srcdir)/../format.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >format.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../format.c >format.tmp + test -e format.texi || test ! -f $(srcdir)/format.texi || cp -p $(srcdir)/format.texi . $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi touch $@ libbfd.texi: libbfd.stamp ; @true libbfd.stamp: $(srcdir)/../libbfd.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >libbfd.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp + test -e libbfd.texi || test ! -f $(srcdir)/libbfd.texi || cp -p $(srcdir)/libbfd.texi . $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi touch $@ bfdio.texi: bfdio.stamp ; @true bfdio.stamp: $(srcdir)/../bfdio.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdio.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp + test -e bfdio.texi || test ! -f $(srcdir)/bfdio.texi || cp -p $(srcdir)/bfdio.texi . $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi touch $@ bfdwin.texi: bfdwin.stamp ; @true bfdwin.stamp: $(srcdir)/../bfdwin.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdwin.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp + test -e bfdwin.texi || test ! -f $(srcdir)/bfdwin.texi || cp -p $(srcdir)/bfdwin.texi . $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi touch $@ opncls.texi: opncls.stamp ; @true opncls.stamp: $(srcdir)/../opncls.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >opncls.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../opncls.c >opncls.tmp + test -e opncls.texi || test ! -f $(srcdir)/opncls.texi || cp -p $(srcdir)/opncls.texi . $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi touch $@ reloc.texi: reloc.stamp ; @true reloc.stamp: $(srcdir)/../reloc.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >reloc.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../reloc.c >reloc.tmp + test -e reloc.texi || test ! -f $(srcdir)/reloc.texi || cp -p $(srcdir)/reloc.texi . $(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi touch $@ section.texi: section.stamp ; @true section.stamp: $(srcdir)/../section.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >section.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../section.c >section.tmp + test -e section.texi || test ! -f $(srcdir)/section.texi || cp -p $(srcdir)/section.texi . $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi touch $@ syms.texi: syms.stamp ; @true syms.stamp: $(srcdir)/../syms.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >syms.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../syms.c >syms.tmp + test -e syms.texi || test ! -f $(srcdir)/syms.texi || cp -p $(srcdir)/syms.texi . $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi touch $@ targets.texi: targets.stamp ; @true targets.stamp: $(srcdir)/../targets.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >targets.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../targets.c >targets.tmp + test -e targets.texi || test ! -f $(srcdir)/targets.texi || cp -p $(srcdir)/targets.texi . $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi touch $@ init.texi: init.stamp ; @true init.stamp: $(srcdir)/../init.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >init.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../init.c >init.tmp + test -e init.texi || test ! -f $(srcdir)/init.texi || cp -p $(srcdir)/init.texi . $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi touch $@ hash.texi: hash.stamp ; @true hash.stamp: $(srcdir)/../hash.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >hash.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../hash.c >hash.tmp + test -e hash.texi || test ! -f $(srcdir)/hash.texi || cp -p $(srcdir)/hash.texi . $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi touch $@ linker.texi: linker.stamp ; @true linker.stamp: $(srcdir)/../linker.c $(srcdir)/doc.str $(MKDOC) - ./$(MKDOC) -f $(srcdir)/doc.str < $< >linker.tmp + ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../linker.c >linker.tmp + test -e linker.texi || test ! -f $(srcdir)/linker.texi || cp -p $(srcdir)/linker.texi . $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi touch $@ @@ -970,11 +992,11 @@ bfdver.texi: $(srcdir)/Makefile.in @echo "creating $@"; \ echo "@set VERSION $(VERSION)" > bfdver.texi; \ - if [ -n "$(PKGVERSION)" ]; then \ + if test -n "$(PKGVERSION)"; then \ echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \ fi; \ echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \ - if [ -n "$(REPORT_BUGS_TEXI)" ]; then \ + if test -n "$(REPORT_BUGS_TEXI)"; then \ echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \ fi diff -ruN binutils-2.25/bfd/doc/bfdver.texi binutils-2.25.1/bfd/doc/bfdver.texi --- binutils-2.25/bfd/doc/bfdver.texi 2014-12-23 15:37:36.000000000 +0100 +++ binutils-2.25.1/bfd/doc/bfdver.texi 2015-07-21 15:45:00.000000000 +0200 @@ -1,4 +1,4 @@ -@set VERSION 2.25 +@set VERSION 2.25.1 @set VERSION_PACKAGE (GNU Binutils) -@set UPDATED December 2014 +@set UPDATED July 2015 @set BUGURL @uref{http://www.sourceware.org/bugzilla/} diff -ruN binutils-2.25/bfd/dwarf2.c binutils-2.25.1/bfd/dwarf2.c --- binutils-2.25/bfd/dwarf2.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/dwarf2.c 2015-07-21 10:20:58.000000000 +0200 @@ -222,6 +222,9 @@ /* The abbrev hash table. */ struct abbrev_info **abbrevs; + /* DW_AT_language. */ + int lang; + /* Note that an error was found by comp_unit_find_nearest_line. */ int error; @@ -553,83 +556,124 @@ return TRUE; } -/* VERBATIM - The following function up to the END VERBATIM mark are - copied directly from dwarf2read.c. */ - /* Read dwarf information from a buffer. */ static unsigned int -read_1_byte (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf) +read_1_byte (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf, bfd_byte *end) { + if (buf + 1 > end) + return 0; return bfd_get_8 (abfd, buf); } static int -read_1_signed_byte (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf) +read_1_signed_byte (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf, bfd_byte *end) { + if (buf + 1 > end) + return 0; return bfd_get_signed_8 (abfd, buf); } static unsigned int -read_2_bytes (bfd *abfd, bfd_byte *buf) +read_2_bytes (bfd *abfd, bfd_byte *buf, bfd_byte *end) { + if (buf + 2 > end) + return 0; return bfd_get_16 (abfd, buf); } static unsigned int -read_4_bytes (bfd *abfd, bfd_byte *buf) +read_4_bytes (bfd *abfd, bfd_byte *buf, bfd_byte *end) { + if (buf + 4 > end) + return 0; return bfd_get_32 (abfd, buf); } static bfd_uint64_t -read_8_bytes (bfd *abfd, bfd_byte *buf) +read_8_bytes (bfd *abfd, bfd_byte *buf, bfd_byte *end) { + if (buf + 8 > end) + return 0; return bfd_get_64 (abfd, buf); } static bfd_byte * read_n_bytes (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf, + bfd_byte *end, unsigned int size ATTRIBUTE_UNUSED) { + if (buf + size > end) + return NULL; return buf; } +/* Scans a NUL terminated string starting at BUF, returning a pointer to it. + Returns the number of characters in the string, *including* the NUL byte, + in BYTES_READ_PTR. This value is set even if the function fails. Bytes + at or beyond BUF_END will not be read. Returns NULL if there was a + problem, or if the string is empty. */ + static char * -read_string (bfd *abfd ATTRIBUTE_UNUSED, - bfd_byte *buf, - unsigned int *bytes_read_ptr) +read_string (bfd * abfd ATTRIBUTE_UNUSED, + bfd_byte * buf, + bfd_byte * buf_end, + unsigned int * bytes_read_ptr) { - /* Return a pointer to the embedded string. */ - char *str = (char *) buf; + bfd_byte *str = buf; + + if (buf >= buf_end) + { + * bytes_read_ptr = 0; + return NULL; + } if (*str == '\0') { - *bytes_read_ptr = 1; + * bytes_read_ptr = 1; return NULL; } - *bytes_read_ptr = strlen (str) + 1; - return str; + while (buf < buf_end) + if (* buf ++ == 0) + { + * bytes_read_ptr = buf - str; + return (char *) str; + } + + * bytes_read_ptr = buf - str; + return NULL; } -/* END VERBATIM */ +/* Reads an offset from BUF and then locates the string at this offset + inside the debug string section. Returns a pointer to the string. + Returns the number of bytes read from BUF, *not* the length of the string, + in BYTES_READ_PTR. This value is set even if the function fails. Bytes + at or beyond BUF_END will not be read from BUF. Returns NULL if there was + a problem, or if the string is empty. Does not check for NUL termination + of the string. */ static char * read_indirect_string (struct comp_unit * unit, bfd_byte * buf, + bfd_byte * buf_end, unsigned int * bytes_read_ptr) { bfd_uint64_t offset; struct dwarf2_debug *stash = unit->stash; char *str; + if (buf + unit->offset_size > buf_end) + { + * bytes_read_ptr = 0; + return NULL; + } + if (unit->offset_size == 4) - offset = read_4_bytes (unit->abfd, buf); + offset = read_4_bytes (unit->abfd, buf, buf_end); else - offset = read_8_bytes (unit->abfd, buf); + offset = read_8_bytes (unit->abfd, buf, buf_end); *bytes_read_ptr = unit->offset_size; @@ -638,6 +682,8 @@ &stash->dwarf_str_buffer, &stash->dwarf_str_size)) return NULL; + if (offset >= stash->dwarf_str_size) + return NULL; str = (char *) stash->dwarf_str_buffer + offset; if (*str == '\0') return NULL; @@ -651,16 +697,23 @@ static char * read_alt_indirect_string (struct comp_unit * unit, bfd_byte * buf, + bfd_byte * buf_end, unsigned int * bytes_read_ptr) { bfd_uint64_t offset; struct dwarf2_debug *stash = unit->stash; char *str; + if (buf + unit->offset_size > buf_end) + { + * bytes_read_ptr = 0; + return NULL; + } + if (unit->offset_size == 4) - offset = read_4_bytes (unit->abfd, buf); + offset = read_4_bytes (unit->abfd, buf, buf_end); else - offset = read_8_bytes (unit->abfd, buf); + offset = read_8_bytes (unit->abfd, buf, buf_end); *bytes_read_ptr = unit->offset_size; @@ -684,7 +737,7 @@ } stash->alt_bfd_ptr = debug_bfd; } - + if (! read_section (unit->stash->alt_bfd_ptr, stash->debug_sections + debug_str_alt, NULL, /* FIXME: Do we need to load alternate symbols ? */ @@ -693,6 +746,8 @@ &stash->alt_dwarf_str_size)) return NULL; + if (offset >= stash->alt_dwarf_str_size) + return NULL; str = (char *) stash->alt_dwarf_str_buffer + offset; if (*str == '\0') return NULL; @@ -730,7 +785,7 @@ } stash->alt_bfd_ptr = debug_bfd; } - + if (! read_section (unit->stash->alt_bfd_ptr, stash->debug_sections + debug_info_alt, NULL, /* FIXME: Do we need to load alternate symbols ? */ @@ -739,17 +794,22 @@ &stash->alt_dwarf_info_size)) return NULL; + if (offset >= stash->alt_dwarf_info_size) + return NULL; return stash->alt_dwarf_info_buffer + offset; } static bfd_uint64_t -read_address (struct comp_unit *unit, bfd_byte *buf) +read_address (struct comp_unit *unit, bfd_byte *buf, bfd_byte * buf_end) { int signed_vma = 0; if (bfd_get_flavour (unit->abfd) == bfd_target_elf_flavour) signed_vma = get_elf_backend_data (unit->abfd)->sign_extend_vma; + if (buf + unit->addr_size > buf_end) + return 0; + if (signed_vma) { switch (unit->addr_size) @@ -812,6 +872,7 @@ { struct abbrev_info **abbrevs; bfd_byte *abbrev_ptr; + bfd_byte *abbrev_end; struct abbrev_info *cur_abbrev; unsigned int abbrev_number, bytes_read, abbrev_name; unsigned int abbrev_form, hash_number; @@ -822,13 +883,17 @@ &stash->dwarf_abbrev_buffer, &stash->dwarf_abbrev_size)) return NULL; + if (offset >= stash->dwarf_abbrev_size) + return NULL; + amt = sizeof (struct abbrev_info*) * ABBREV_HASH_SIZE; abbrevs = (struct abbrev_info **) bfd_zalloc (abfd, amt); if (abbrevs == NULL) return NULL; abbrev_ptr = stash->dwarf_abbrev_buffer + offset; - abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_end = stash->dwarf_abbrev_buffer + stash->dwarf_abbrev_size; + abbrev_number = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end); abbrev_ptr += bytes_read; /* Loop until we reach an abbrev number of 0. */ @@ -842,15 +907,15 @@ /* Read in abbrev header. */ cur_abbrev->number = abbrev_number; cur_abbrev->tag = (enum dwarf_tag) - read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end); abbrev_ptr += bytes_read; - cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr); + cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr, abbrev_end); abbrev_ptr += 1; /* Now read in declarations. */ - abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_name = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end); abbrev_ptr += bytes_read; - abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_form = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end); abbrev_ptr += bytes_read; while (abbrev_name) @@ -885,9 +950,9 @@ = (enum dwarf_attribute) abbrev_name; cur_abbrev->attrs[cur_abbrev->num_attrs++].form = (enum dwarf_form) abbrev_form; - abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_name = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end); abbrev_ptr += bytes_read; - abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_form = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end); abbrev_ptr += bytes_read; } @@ -905,9 +970,9 @@ if ((unsigned int) (abbrev_ptr - stash->dwarf_abbrev_buffer) >= stash->dwarf_abbrev_size) break; - abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_number = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end); abbrev_ptr += bytes_read; - if (lookup_abbrev (abbrev_number,abbrevs) != NULL) + if (lookup_abbrev (abbrev_number, abbrevs) != NULL) break; } @@ -922,19 +987,29 @@ return form == DW_FORM_string || form == DW_FORM_strp || form == DW_FORM_GNU_strp_alt; } -/* Read an attribute value described by an attribute form. */ +/* Read and fill in the value of attribute ATTR as described by FORM. + Read data starting from INFO_PTR, but never at or beyond INFO_PTR_END. + Returns an updated INFO_PTR taking into account the amount of data read. */ static bfd_byte * -read_attribute_value (struct attribute *attr, - unsigned form, - struct comp_unit *unit, - bfd_byte *info_ptr) +read_attribute_value (struct attribute * attr, + unsigned form, + struct comp_unit * unit, + bfd_byte * info_ptr, + bfd_byte * info_ptr_end) { bfd *abfd = unit->abfd; unsigned int bytes_read; struct dwarf_block *blk; bfd_size_type amt; + if (info_ptr >= info_ptr_end) + { + (*_bfd_error_handler) (_("Dwarf Error: Info pointer extends beyond end of attributes")); + bfd_set_error (bfd_error_bad_value); + return info_ptr; + } + attr->form = (enum dwarf_form) form; switch (form) @@ -945,23 +1020,23 @@ if (unit->version == 3 || unit->version == 4) { if (unit->offset_size == 4) - attr->u.val = read_4_bytes (unit->abfd, info_ptr); + attr->u.val = read_4_bytes (unit->abfd, info_ptr, info_ptr_end); else - attr->u.val = read_8_bytes (unit->abfd, info_ptr); + attr->u.val = read_8_bytes (unit->abfd, info_ptr, info_ptr_end); info_ptr += unit->offset_size; break; } /* FALLTHROUGH */ case DW_FORM_addr: - attr->u.val = read_address (unit, info_ptr); + attr->u.val = read_address (unit, info_ptr, info_ptr_end); info_ptr += unit->addr_size; break; case DW_FORM_GNU_ref_alt: case DW_FORM_sec_offset: if (unit->offset_size == 4) - attr->u.val = read_4_bytes (unit->abfd, info_ptr); + attr->u.val = read_4_bytes (unit->abfd, info_ptr, info_ptr_end); else - attr->u.val = read_8_bytes (unit->abfd, info_ptr); + attr->u.val = read_8_bytes (unit->abfd, info_ptr, info_ptr_end); info_ptr += unit->offset_size; break; case DW_FORM_block2: @@ -969,9 +1044,9 @@ blk = (struct dwarf_block *) bfd_alloc (abfd, amt); if (blk == NULL) return NULL; - blk->size = read_2_bytes (abfd, info_ptr); + blk->size = read_2_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 2; - blk->data = read_n_bytes (abfd, info_ptr, blk->size); + blk->data = read_n_bytes (abfd, info_ptr, info_ptr_end, blk->size); info_ptr += blk->size; attr->u.blk = blk; break; @@ -980,34 +1055,34 @@ blk = (struct dwarf_block *) bfd_alloc (abfd, amt); if (blk == NULL) return NULL; - blk->size = read_4_bytes (abfd, info_ptr); + blk->size = read_4_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 4; - blk->data = read_n_bytes (abfd, info_ptr, blk->size); + blk->data = read_n_bytes (abfd, info_ptr, info_ptr_end, blk->size); info_ptr += blk->size; attr->u.blk = blk; break; case DW_FORM_data2: - attr->u.val = read_2_bytes (abfd, info_ptr); + attr->u.val = read_2_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 2; break; case DW_FORM_data4: - attr->u.val = read_4_bytes (abfd, info_ptr); + attr->u.val = read_4_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 4; break; case DW_FORM_data8: - attr->u.val = read_8_bytes (abfd, info_ptr); + attr->u.val = read_8_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 8; break; case DW_FORM_string: - attr->u.str = read_string (abfd, info_ptr, &bytes_read); + attr->u.str = read_string (abfd, info_ptr, info_ptr_end, &bytes_read); info_ptr += bytes_read; break; case DW_FORM_strp: - attr->u.str = read_indirect_string (unit, info_ptr, &bytes_read); + attr->u.str = read_indirect_string (unit, info_ptr, info_ptr_end, &bytes_read); info_ptr += bytes_read; break; case DW_FORM_GNU_strp_alt: - attr->u.str = read_alt_indirect_string (unit, info_ptr, &bytes_read); + attr->u.str = read_alt_indirect_string (unit, info_ptr, info_ptr_end, &bytes_read); info_ptr += bytes_read; break; case DW_FORM_exprloc: @@ -1016,9 +1091,9 @@ blk = (struct dwarf_block *) bfd_alloc (abfd, amt); if (blk == NULL) return NULL; - blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + blk->size = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end); info_ptr += bytes_read; - blk->data = read_n_bytes (abfd, info_ptr, blk->size); + blk->data = read_n_bytes (abfd, info_ptr, info_ptr_end, blk->size); info_ptr += blk->size; attr->u.blk = blk; break; @@ -1027,59 +1102,59 @@ blk = (struct dwarf_block *) bfd_alloc (abfd, amt); if (blk == NULL) return NULL; - blk->size = read_1_byte (abfd, info_ptr); + blk->size = read_1_byte (abfd, info_ptr, info_ptr_end); info_ptr += 1; - blk->data = read_n_bytes (abfd, info_ptr, blk->size); + blk->data = read_n_bytes (abfd, info_ptr, info_ptr_end, blk->size); info_ptr += blk->size; attr->u.blk = blk; break; case DW_FORM_data1: - attr->u.val = read_1_byte (abfd, info_ptr); + attr->u.val = read_1_byte (abfd, info_ptr, info_ptr_end); info_ptr += 1; break; case DW_FORM_flag: - attr->u.val = read_1_byte (abfd, info_ptr); + attr->u.val = read_1_byte (abfd, info_ptr, info_ptr_end); info_ptr += 1; break; case DW_FORM_flag_present: attr->u.val = 1; break; case DW_FORM_sdata: - attr->u.sval = read_signed_leb128 (abfd, info_ptr, &bytes_read); + attr->u.sval = safe_read_leb128 (abfd, info_ptr, &bytes_read, TRUE, info_ptr_end); info_ptr += bytes_read; break; case DW_FORM_udata: - attr->u.val = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + attr->u.val = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end); info_ptr += bytes_read; break; case DW_FORM_ref1: - attr->u.val = read_1_byte (abfd, info_ptr); + attr->u.val = read_1_byte (abfd, info_ptr, info_ptr_end); info_ptr += 1; break; case DW_FORM_ref2: - attr->u.val = read_2_bytes (abfd, info_ptr); + attr->u.val = read_2_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 2; break; case DW_FORM_ref4: - attr->u.val = read_4_bytes (abfd, info_ptr); + attr->u.val = read_4_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 4; break; case DW_FORM_ref8: - attr->u.val = read_8_bytes (abfd, info_ptr); + attr->u.val = read_8_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 8; break; case DW_FORM_ref_sig8: - attr->u.val = read_8_bytes (abfd, info_ptr); + attr->u.val = read_8_bytes (abfd, info_ptr, info_ptr_end); info_ptr += 8; break; case DW_FORM_ref_udata: - attr->u.val = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + attr->u.val = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end); info_ptr += bytes_read; break; case DW_FORM_indirect: - form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + form = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end); info_ptr += bytes_read; - info_ptr = read_attribute_value (attr, form, unit, info_ptr); + info_ptr = read_attribute_value (attr, form, unit, info_ptr, info_ptr_end); break; default: (*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %#x."), @@ -1093,16 +1168,44 @@ /* Read an attribute described by an abbreviated attribute. */ static bfd_byte * -read_attribute (struct attribute *attr, - struct attr_abbrev *abbrev, - struct comp_unit *unit, - bfd_byte *info_ptr) +read_attribute (struct attribute * attr, + struct attr_abbrev * abbrev, + struct comp_unit * unit, + bfd_byte * info_ptr, + bfd_byte * info_ptr_end) { attr->name = abbrev->name; - info_ptr = read_attribute_value (attr, abbrev->form, unit, info_ptr); + info_ptr = read_attribute_value (attr, abbrev->form, unit, info_ptr, info_ptr_end); return info_ptr; } +/* Return whether DW_AT_name will return the same as DW_AT_linkage_name + for a function. */ + +static bfd_boolean +non_mangled (int lang) +{ + switch (lang) + { + default: + return FALSE; + + case DW_LANG_C89: + case DW_LANG_C: + case DW_LANG_Ada83: + case DW_LANG_Cobol74: + case DW_LANG_Cobol85: + case DW_LANG_Fortran77: + case DW_LANG_Pascal83: + case DW_LANG_C99: + case DW_LANG_Ada95: + case DW_LANG_PLI: + case DW_LANG_UPC: + case DW_LANG_C11: + return TRUE; + } +} + /* Source line information table routines. */ #define FILE_ALLOC_CHUNK 5 @@ -1161,14 +1264,15 @@ struct funcinfo *caller_func; /* Source location file name where caller_func inlines this func. */ char *caller_file; - /* Source location line number where caller_func inlines this func. */ - int caller_line; /* Source location file name. */ char *file; + /* Source location line number where caller_func inlines this func. */ + int caller_line; /* Source location line number. */ int line; int tag; - char *name; + bfd_boolean is_linkage; + const char *name; struct arange arange; /* Where the symbol is defined. */ asection *sec; @@ -1356,7 +1460,11 @@ char *name; size_t len; - if (table->files[file - 1].dir) + if (table->files[file - 1].dir + /* PR 17512: file: 0317e960. */ + && table->files[file - 1].dir <= table->num_dirs + /* PR 17512: file: 7f3d2e4b. */ + && table->dirs != NULL) subdir_name = table->dirs[table->files[file - 1].dir - 1]; if (!subdir_name || !IS_ABSOLUTE_PATH (subdir_name)) @@ -1577,27 +1685,47 @@ table->lcl_head = NULL; + if (stash->dwarf_line_size < 16) + { + (*_bfd_error_handler) + (_("Dwarf Error: Line info section is too small (%ld)"), + (long) stash->dwarf_line_size); + bfd_set_error (bfd_error_bad_value); + return NULL; + } line_ptr = stash->dwarf_line_buffer + unit->line_offset; + line_end = stash->dwarf_line_buffer + stash->dwarf_line_size; /* Read in the prologue. */ - lh.total_length = read_4_bytes (abfd, line_ptr); + lh.total_length = read_4_bytes (abfd, line_ptr, line_end); line_ptr += 4; offset_size = 4; if (lh.total_length == 0xffffffff) { - lh.total_length = read_8_bytes (abfd, line_ptr); + lh.total_length = read_8_bytes (abfd, line_ptr, line_end); line_ptr += 8; offset_size = 8; } else if (lh.total_length == 0 && unit->addr_size == 8) { /* Handle (non-standard) 64-bit DWARF2 formats. */ - lh.total_length = read_4_bytes (abfd, line_ptr); + lh.total_length = read_4_bytes (abfd, line_ptr, line_end); line_ptr += 4; offset_size = 8; } + + if (lh.total_length > stash->dwarf_line_size) + { + (*_bfd_error_handler) + (_("Dwarf Error: Line info data is bigger (0x%lx) than the section (0x%lx)"), + (long) lh.total_length, (long) stash->dwarf_line_size); + bfd_set_error (bfd_error_bad_value); + return NULL; + } + line_end = line_ptr + lh.total_length; - lh.version = read_2_bytes (abfd, line_ptr); + + lh.version = read_2_bytes (abfd, line_ptr, line_end); if (lh.version < 2 || lh.version > 4) { (*_bfd_error_handler) @@ -1606,20 +1734,32 @@ return NULL; } line_ptr += 2; + + if (line_ptr + offset_size + (lh.version >=4 ? 6 : 5) >= line_end) + { + (*_bfd_error_handler) + (_("Dwarf Error: Ran out of room reading prologue")); + bfd_set_error (bfd_error_bad_value); + return NULL; + } + if (offset_size == 4) - lh.prologue_length = read_4_bytes (abfd, line_ptr); + lh.prologue_length = read_4_bytes (abfd, line_ptr, line_end); else - lh.prologue_length = read_8_bytes (abfd, line_ptr); + lh.prologue_length = read_8_bytes (abfd, line_ptr, line_end); line_ptr += offset_size; - lh.minimum_instruction_length = read_1_byte (abfd, line_ptr); + + lh.minimum_instruction_length = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; + if (lh.version >= 4) { - lh.maximum_ops_per_insn = read_1_byte (abfd, line_ptr); + lh.maximum_ops_per_insn = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; } else lh.maximum_ops_per_insn = 1; + if (lh.maximum_ops_per_insn == 0) { (*_bfd_error_handler) @@ -1627,14 +1767,26 @@ bfd_set_error (bfd_error_bad_value); return NULL; } - lh.default_is_stmt = read_1_byte (abfd, line_ptr); + + lh.default_is_stmt = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; - lh.line_base = read_1_signed_byte (abfd, line_ptr); + + lh.line_base = read_1_signed_byte (abfd, line_ptr, line_end); line_ptr += 1; - lh.line_range = read_1_byte (abfd, line_ptr); + + lh.line_range = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; - lh.opcode_base = read_1_byte (abfd, line_ptr); + + lh.opcode_base = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; + + if (line_ptr + (lh.opcode_base - 1) >= line_end) + { + (*_bfd_error_handler) (_("Dwarf Error: Ran out of room reading opcodes")); + bfd_set_error (bfd_error_bad_value); + return NULL; + } + amt = lh.opcode_base * sizeof (unsigned char); lh.standard_opcode_lengths = (unsigned char *) bfd_alloc (abfd, amt); @@ -1642,12 +1794,12 @@ for (i = 1; i < lh.opcode_base; ++i) { - lh.standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr); + lh.standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; } /* Read directory table. */ - while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL) + while ((cur_dir = read_string (abfd, line_ptr, line_end, &bytes_read)) != NULL) { line_ptr += bytes_read; @@ -1670,7 +1822,7 @@ line_ptr += bytes_read; /* Read file name table. */ - while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL) + while ((cur_file = read_string (abfd, line_ptr, line_end, &bytes_read)) != NULL) { line_ptr += bytes_read; @@ -1689,13 +1841,11 @@ table->files[table->num_files].name = cur_file; table->files[table->num_files].dir = - read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; - table->files[table->num_files].time = - read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + table->files[table->num_files].time = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; - table->files[table->num_files].size = - read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + table->files[table->num_files].size = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; table->num_files++; } @@ -1725,13 +1875,15 @@ /* Decode the table. */ while (! end_sequence) { - op_code = read_1_byte (abfd, line_ptr); + op_code = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; if (op_code >= lh.opcode_base) { /* Special operand. */ adj_opcode = op_code - lh.opcode_base; + if (lh.line_range == 0) + goto line_fail; if (lh.maximum_ops_per_insn == 1) address += (adj_opcode / lh.line_range * lh.minimum_instruction_length); @@ -1757,9 +1909,9 @@ else switch (op_code) { case DW_LNS_extended_op: - exop_len = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + exop_len = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; - extended_op = read_1_byte (abfd, line_ptr); + extended_op = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; switch (extended_op) @@ -1778,12 +1930,12 @@ goto line_fail; break; case DW_LNE_set_address: - address = read_address (unit, line_ptr); + address = read_address (unit, line_ptr, line_end); op_index = 0; line_ptr += unit->addr_size; break; case DW_LNE_define_file: - cur_file = read_string (abfd, line_ptr, &bytes_read); + cur_file = read_string (abfd, line_ptr, line_end, &bytes_read); line_ptr += bytes_read; if ((table->num_files % FILE_ALLOC_CHUNK) == 0) { @@ -1798,19 +1950,19 @@ } table->files[table->num_files].name = cur_file; table->files[table->num_files].dir = - read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; table->files[table->num_files].time = - read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; table->files[table->num_files].size = - read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; table->num_files++; break; case DW_LNE_set_discriminator: discriminator = - read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; break; case DW_LNE_HP_source_file_correlation: @@ -1839,12 +1991,12 @@ case DW_LNS_advance_pc: if (lh.maximum_ops_per_insn == 1) address += (lh.minimum_instruction_length - * read_unsigned_leb128 (abfd, line_ptr, - &bytes_read)); + * safe_read_leb128 (abfd, line_ptr, &bytes_read, + FALSE, line_end)); else { - bfd_vma adjust = read_unsigned_leb128 (abfd, line_ptr, - &bytes_read); + bfd_vma adjust = safe_read_leb128 (abfd, line_ptr, &bytes_read, + FALSE, line_end); address = ((op_index + adjust) / lh.maximum_ops_per_insn * lh.minimum_instruction_length); op_index = (op_index + adjust) % lh.maximum_ops_per_insn; @@ -1852,7 +2004,7 @@ line_ptr += bytes_read; break; case DW_LNS_advance_line: - line += read_signed_leb128 (abfd, line_ptr, &bytes_read); + line += safe_read_leb128 (abfd, line_ptr, &bytes_read, TRUE, line_end); line_ptr += bytes_read; break; case DW_LNS_set_file: @@ -1861,7 +2013,7 @@ /* The file and directory tables are 0 based, the references are 1 based. */ - file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + file = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; if (filename) free (filename); @@ -1869,7 +2021,7 @@ break; } case DW_LNS_set_column: - column = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + column = safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; break; case DW_LNS_negate_stmt: @@ -1891,7 +2043,7 @@ } break; case DW_LNS_fixed_advance_pc: - address += read_2_bytes (abfd, line_ptr); + address += read_2_bytes (abfd, line_ptr, line_end); op_index = 0; line_ptr += 2; break; @@ -1899,7 +2051,7 @@ /* Unknown standard opcode, ignore it. */ for (i = 0; i < lh.standard_opcode_lengths[op_code]; i++) { - (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + (void) safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); line_ptr += bytes_read; } break; @@ -1992,7 +2144,7 @@ /* Function table functions. */ -/* If ADDR is within UNIT's function tables, set FUNCTIONNAME_PTR, and return +/* If ADDR is within UNIT's function tables, set FUNCTION_PTR, and return TRUE. Note that we need to find the function that has the smallest range that contains ADDR, to handle inlined functions without depending upon them being ordered in TABLE by increasing range. */ @@ -2000,8 +2152,7 @@ static bfd_boolean lookup_address_in_function_table (struct comp_unit *unit, bfd_vma addr, - struct funcinfo **function_ptr, - const char **functionname_ptr) + struct funcinfo **function_ptr) { struct funcinfo* each_func; struct funcinfo* best_fit = NULL; @@ -2030,14 +2181,10 @@ if (best_fit) { - *functionname_ptr = best_fit->name; *function_ptr = best_fit; return TRUE; } - else - { - return FALSE; - } + return FALSE; } /* If SYM at ADDR is within function table of UNIT, set FILENAME_PTR @@ -2128,10 +2275,12 @@ static char * find_abstract_instance_name (struct comp_unit *unit, - struct attribute *attr_ptr) + struct attribute *attr_ptr, + bfd_boolean *is_linkage) { bfd *abfd = unit->abfd; bfd_byte *info_ptr; + bfd_byte *info_ptr_end; unsigned int abbrev_number, bytes_read, i; struct abbrev_info *abbrev; bfd_uint64_t die_ref = attr_ptr->u.val; @@ -2148,6 +2297,7 @@ abort (); info_ptr = unit->sec_info_ptr + die_ref; + info_ptr_end = unit->end_ptr; /* Now find the CU containing this pointer. */ if (info_ptr >= unit->info_ptr_unit && info_ptr < unit->end_ptr) @@ -2179,15 +2329,20 @@ (*_bfd_error_handler) (_("Dwarf Error: Unable to read alt ref %u."), die_ref); bfd_set_error (bfd_error_bad_value); - return name; + return NULL; } + info_ptr_end = unit->stash->alt_dwarf_info_buffer + unit->stash->alt_dwarf_info_size; + /* FIXME: Do we need to locate the correct CU, in a similar fashion to the code in the DW_FORM_ref_addr case above ? */ } else - info_ptr = unit->info_ptr_unit + die_ref; + { + info_ptr = unit->info_ptr_unit + die_ref; + info_ptr_end = unit->end_ptr; + } - abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + abbrev_number = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end); info_ptr += bytes_read; if (abbrev_number) @@ -2204,7 +2359,7 @@ for (i = 0; i < abbrev->num_attrs; ++i) { info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, - info_ptr); + info_ptr, info_ptr_end); if (info_ptr == NULL) break; switch (attr.name) @@ -2213,17 +2368,24 @@ /* Prefer DW_AT_MIPS_linkage_name or DW_AT_linkage_name over DW_AT_name. */ if (name == NULL && is_str_attr (attr.form)) - name = attr.u.str; + { + name = attr.u.str; + if (non_mangled (unit->lang)) + *is_linkage = TRUE; + } break; case DW_AT_specification: - name = find_abstract_instance_name (unit, &attr); + name = find_abstract_instance_name (unit, &attr, is_linkage); break; case DW_AT_linkage_name: case DW_AT_MIPS_linkage_name: /* PR 16949: Corrupt debug info can place non-string forms into these attributes. */ if (is_str_attr (attr.form)) - name = attr.u.str; + { + name = attr.u.str; + *is_linkage = TRUE; + } break; default: break; @@ -2239,6 +2401,7 @@ bfd_uint64_t offset) { bfd_byte *ranges_ptr; + bfd_byte *ranges_end; bfd_vma base_address = unit->base_address; if (! unit->stash->dwarf_ranges_buffer) @@ -2246,16 +2409,24 @@ if (! read_debug_ranges (unit)) return FALSE; } + ranges_ptr = unit->stash->dwarf_ranges_buffer + offset; + if (ranges_ptr < unit->stash->dwarf_ranges_buffer) + return FALSE; + ranges_end = unit->stash->dwarf_ranges_buffer + unit->stash->dwarf_ranges_size; for (;;) { bfd_vma low_pc; bfd_vma high_pc; - low_pc = read_address (unit, ranges_ptr); + /* PR 17512: file: 62cada7d. */ + if (ranges_ptr + 2 * unit->addr_size > ranges_end) + return FALSE; + + low_pc = read_address (unit, ranges_ptr, ranges_end); ranges_ptr += unit->addr_size; - high_pc = read_address (unit, ranges_ptr); + high_pc = read_address (unit, ranges_ptr, ranges_end); ranges_ptr += unit->addr_size; if (low_pc == 0 && high_pc == 0) @@ -2282,6 +2453,7 @@ { bfd *abfd = unit->abfd; bfd_byte *info_ptr = unit->first_child_die_ptr; + bfd_byte *info_ptr_end = unit->stash->info_ptr_end; int nesting_level = 1; struct funcinfo **nested_funcs; int nested_funcs_size; @@ -2306,7 +2478,11 @@ bfd_vma high_pc = 0; bfd_boolean high_pc_relative = FALSE; - abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + /* PR 17512: file: 9f405d9d. */ + if (info_ptr >= info_ptr_end) + goto fail; + + abbrev_number = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, info_ptr_end); info_ptr += bytes_read; if (! abbrev_number) @@ -2370,7 +2546,7 @@ for (i = 0; i < abbrev->num_attrs; ++i) { - info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr); + info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr, info_ptr_end); if (info_ptr == NULL) goto fail; @@ -2389,14 +2565,19 @@ case DW_AT_abstract_origin: case DW_AT_specification: - func->name = find_abstract_instance_name (unit, &attr); + func->name = find_abstract_instance_name (unit, &attr, + &func->is_linkage); break; case DW_AT_name: /* Prefer DW_AT_MIPS_linkage_name or DW_AT_linkage_name over DW_AT_name. */ if (func->name == NULL && is_str_attr (attr.form)) - func->name = attr.u.str; + { + func->name = attr.u.str; + if (non_mangled (unit->lang)) + func->is_linkage = TRUE; + } break; case DW_AT_linkage_name: @@ -2404,7 +2585,10 @@ /* PR 16949: Corrupt debug info can place non-string forms into these attributes. */ if (is_str_attr (attr.form)) - func->name = attr.u.str; + { + func->name = attr.u.str; + func->is_linkage = TRUE; + } break; case DW_AT_low_pc: @@ -2560,15 +2744,15 @@ bfd *abfd = stash->bfd_ptr; bfd_boolean high_pc_relative = FALSE; - version = read_2_bytes (abfd, info_ptr); + version = read_2_bytes (abfd, info_ptr, end_ptr); info_ptr += 2; BFD_ASSERT (offset_size == 4 || offset_size == 8); if (offset_size == 4) - abbrev_offset = read_4_bytes (abfd, info_ptr); + abbrev_offset = read_4_bytes (abfd, info_ptr, end_ptr); else - abbrev_offset = read_8_bytes (abfd, info_ptr); + abbrev_offset = read_8_bytes (abfd, info_ptr, end_ptr); info_ptr += offset_size; - addr_size = read_1_byte (abfd, info_ptr); + addr_size = read_1_byte (abfd, info_ptr, end_ptr); info_ptr += 1; if (version != 2 && version != 3 && version != 4) @@ -2605,7 +2789,7 @@ if (! abbrevs) return 0; - abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + abbrev_number = safe_read_leb128 (abfd, info_ptr, &bytes_read, FALSE, end_ptr); info_ptr += bytes_read; if (! abbrev_number) { @@ -2640,7 +2824,7 @@ for (i = 0; i < abbrev->num_attrs; ++i) { - info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr); + info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr, end_ptr); if (info_ptr == NULL) return NULL; @@ -2679,6 +2863,15 @@ case DW_AT_comp_dir: { char *comp_dir = attr.u.str; + + /* PR 17512: file: 1fe726be. */ + if (! is_str_attr (attr.form)) + { + (*_bfd_error_handler) + (_("Dwarf Error: DW_AT_comp_dir attribute encountered with a non-string form.")); + comp_dir = NULL; + } + if (comp_dir) { /* Irix 6.2 native cc prepends .: to the compilation @@ -2692,6 +2885,10 @@ break; } + case DW_AT_language: + unit->lang = attr.u.val; + break; + default: break; } @@ -2736,7 +2933,7 @@ /* If UNIT contains ADDR, set the output parameters to the values for the line containing ADDR. The output parameters, FILENAME_PTR, - FUNCTIONNAME_PTR, and LINENUMBER_PTR, are pointers to the objects + FUNCTION_PTR, and LINENUMBER_PTR, are pointers to the objects to be filled in. Returns the range of addresses covered by the entry that was used @@ -2746,13 +2943,12 @@ comp_unit_find_nearest_line (struct comp_unit *unit, bfd_vma addr, const char **filename_ptr, - const char **functionname_ptr, + struct funcinfo **function_ptr, unsigned int *linenumber_ptr, unsigned int *discriminator_ptr, struct dwarf2_debug *stash) { bfd_boolean func_p; - struct funcinfo *function; if (unit->error) return FALSE; @@ -2781,11 +2977,10 @@ } } - function = NULL; - func_p = lookup_address_in_function_table (unit, addr, - &function, functionname_ptr); - if (func_p && (function->tag == DW_TAG_inlined_subroutine)) - stash->inliner_chain = function; + *function_ptr = NULL; + func_p = lookup_address_in_function_table (unit, addr, function_ptr); + if (func_p && (*function_ptr)->tag == DW_TAG_inlined_subroutine) + stash->inliner_chain = *function_ptr; return lookup_address_in_line_info_table (unit->line_table, addr, filename_ptr, @@ -3593,6 +3788,57 @@ return TRUE; } +/* Scan the debug information in PINFO looking for a DW_TAG_subprogram + abbrev with a DW_AT_low_pc attached to it. Then lookup that same + symbol in SYMBOLS and return the difference between the low_pc and + the symbol's address. Returns 0 if no suitable symbol could be found. */ + +bfd_signed_vma +_bfd_dwarf2_find_symbol_bias (asymbol ** symbols, void ** pinfo) +{ + struct dwarf2_debug *stash; + struct comp_unit * unit; + + stash = (struct dwarf2_debug *) *pinfo; + + if (stash == NULL) + return 0; + + for (unit = stash->all_comp_units; unit; unit = unit->next_unit) + { + struct funcinfo * func; + + if (unit->function_table == NULL) + { + if (unit->line_table == NULL) + unit->line_table = decode_line_info (unit, stash); + if (unit->line_table != NULL) + scan_unit_for_symbols (unit); + } + + for (func = unit->function_table; func != NULL; func = func->prev_func) + if (func->name && func->arange.low) + { + asymbol ** psym; + + /* FIXME: Do we need to scan the aranges looking for the lowest pc value ? */ + + for (psym = symbols; * psym != NULL; psym++) + { + asymbol * sym = * psym; + + if (sym->flags & BSF_FUNCTION + && sym->section != NULL + && strcmp (sym->name, func->name) == 0) + return ((bfd_signed_vma) func->arange.low) - + ((bfd_signed_vma) (sym->value + sym->section->vma)); + } + } + } + + return 0; +} + /* Find the source code location of SYMBOL. If SYMBOL is NULL then find the nearest source code location corresponding to the address SECTION + OFFSET. @@ -3631,6 +3877,7 @@ /* What address are we looking for? */ bfd_vma addr; struct comp_unit* each; + struct funcinfo *function = NULL; bfd_boolean found = FALSE; bfd_boolean do_line; @@ -3713,7 +3960,7 @@ { bfd_vma min_range = (bfd_vma) -1; const char * local_filename = NULL; - const char * local_functionname = NULL; + struct funcinfo *local_function = NULL; unsigned int local_linenumber = 0; unsigned int local_discriminator = 0; @@ -3725,7 +3972,7 @@ || comp_unit_contains_address (each, addr)) && (range = comp_unit_find_nearest_line (each, addr, & local_filename, - & local_functionname, + & local_function, & local_linenumber, & local_discriminator, stash)) != 0); @@ -3746,8 +3993,8 @@ { if (filename_ptr && local_filename) * filename_ptr = local_filename; - if (functionname_ptr && local_functionname) - * functionname_ptr = local_functionname; + if (local_function) + function = local_function; if (discriminator_ptr && local_discriminator) * discriminator_ptr = local_discriminator; if (local_linenumber) @@ -3778,13 +4025,13 @@ unsigned int offset_size = addr_size; bfd_byte *info_ptr_unit = stash->info_ptr; - length = read_4_bytes (stash->bfd_ptr, stash->info_ptr); + length = read_4_bytes (stash->bfd_ptr, stash->info_ptr, stash->info_ptr_end); /* A 0xffffff length is the DWARF3 way of indicating we use 64-bit offsets, instead of 32-bit offsets. */ if (length == 0xffffffff) { offset_size = 8; - length = read_8_bytes (stash->bfd_ptr, stash->info_ptr + 4); + length = read_8_bytes (stash->bfd_ptr, stash->info_ptr + 4, stash->info_ptr_end); stash->info_ptr += 12; } /* A zero length is the IRIX way of indicating 64-bit offsets, @@ -3793,7 +4040,7 @@ else if (length == 0) { offset_size = 8; - length = read_4_bytes (stash->bfd_ptr, stash->info_ptr + 4); + length = read_4_bytes (stash->bfd_ptr, stash->info_ptr + 4, stash->info_ptr_end); stash->info_ptr += 8; } /* In the absence of the hints above, we assume 32-bit DWARF2 @@ -3815,13 +4062,25 @@ if (length > 0) { + bfd_byte * new_ptr; + each = parse_comp_unit (stash, length, info_ptr_unit, offset_size); if (!each) /* The dwarf information is damaged, don't trust it any more. */ break; - stash->info_ptr += length; + + new_ptr = stash->info_ptr + length; + /* PR 17512: file: 1500698c. */ + if (new_ptr < stash->info_ptr) + { + /* A corrupt length value - do not trust the info any more. */ + found = FALSE; + break; + } + else + stash->info_ptr = new_ptr; if (stash->all_comp_units) stash->all_comp_units->prev_unit = each; @@ -3849,7 +4108,7 @@ || comp_unit_contains_address (each, addr)) && comp_unit_find_nearest_line (each, addr, filename_ptr, - functionname_ptr, + &function, linenumber_ptr, discriminator_ptr, stash) != 0); @@ -3868,6 +4127,19 @@ } done: + if (function) + { + if (!function->is_linkage + && _bfd_elf_find_function (abfd, symbols, section, offset, + *filename_ptr ? NULL : filename_ptr, + functionname_ptr)) + { + function->name = *functionname_ptr; + function->is_linkage = TRUE; + } + else + *functionname_ptr = function->name; + } if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0) unset_sections (stash); @@ -3985,3 +4257,109 @@ if (stash->alt_bfd_ptr) bfd_close (stash->alt_bfd_ptr); } + +/* Find the function to a particular section and offset, + for error reporting. */ + +bfd_boolean +_bfd_elf_find_function (bfd *abfd, + asymbol **symbols, + asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr) +{ + struct elf_find_function_cache + { + asection *last_section; + asymbol *func; + const char *filename; + bfd_size_type func_size; + } *cache; + + if (symbols == NULL) + return FALSE; + + if (bfd_get_flavour (abfd) != bfd_target_elf_flavour) + return FALSE; + + cache = elf_tdata (abfd)->elf_find_function_cache; + if (cache == NULL) + { + cache = bfd_zalloc (abfd, sizeof (*cache)); + elf_tdata (abfd)->elf_find_function_cache = cache; + if (cache == NULL) + return FALSE; + } + if (cache->last_section != section + || cache->func == NULL + || offset < cache->func->value + || offset >= cache->func->value + cache->func_size) + { + asymbol *file; + bfd_vma low_func; + asymbol **p; + /* ??? Given multiple file symbols, it is impossible to reliably + choose the right file name for global symbols. File symbols are + local symbols, and thus all file symbols must sort before any + global symbols. The ELF spec may be interpreted to say that a + file symbol must sort before other local symbols, but currently + ld -r doesn't do this. So, for ld -r output, it is possible to + make a better choice of file name for local symbols by ignoring + file symbols appearing after a given local symbol. */ + enum { nothing_seen, symbol_seen, file_after_symbol_seen } state; + const struct elf_backend_data *bed = get_elf_backend_data (abfd); + + file = NULL; + low_func = 0; + state = nothing_seen; + cache->filename = NULL; + cache->func = NULL; + cache->func_size = 0; + cache->last_section = section; + + for (p = symbols; *p != NULL; p++) + { + asymbol *sym = *p; + bfd_vma code_off; + bfd_size_type size; + + if ((sym->flags & BSF_FILE) != 0) + { + file = sym; + if (state == symbol_seen) + state = file_after_symbol_seen; + continue; + } + + size = bed->maybe_function_sym (sym, section, &code_off); + if (size != 0 + && code_off <= offset + && (code_off > low_func + || (code_off == low_func + && size > cache->func_size))) + { + cache->func = sym; + cache->func_size = size; + cache->filename = NULL; + low_func = code_off; + if (file != NULL + && ((sym->flags & BSF_LOCAL) != 0 + || state != file_after_symbol_seen)) + cache->filename = bfd_asymbol_name (file); + } + if (state == nothing_seen) + state = symbol_seen; + } + } + + if (cache->func == NULL) + return FALSE; + + if (filename_ptr) + *filename_ptr = cache->filename; + if (functionname_ptr) + *functionname_ptr = bfd_asymbol_name (cache->func); + + return TRUE; +} diff -ruN binutils-2.25/bfd/ecoff.c binutils-2.25.1/bfd/ecoff.c --- binutils-2.25/bfd/ecoff.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/ecoff.c 2015-07-21 10:20:58.000000000 +0200 @@ -504,7 +504,6 @@ struct fdr *fdr_ptr; bfd_size_type raw_end; bfd_size_type cb_end; - bfd_size_type amt; file_ptr pos; BFD_ASSERT (debug == &ecoff_data (abfd)->debug_info); @@ -607,14 +606,16 @@ We need to look at the fdr to deal with a lot of information in the symbols, so we swap them here. */ - amt = internal_symhdr->ifdMax; - amt *= sizeof (struct fdr); - debug->fdr = (FDR *) bfd_alloc (abfd, amt); + debug->fdr = (FDR *) bfd_alloc2 (abfd, internal_symhdr->ifdMax, + sizeof (struct fdr)); if (debug->fdr == NULL) return FALSE; external_fdr_size = backend->debug_swap.external_fdr_size; fdr_ptr = debug->fdr; fraw_src = (char *) debug->external_fdr; + /* PR 17512: file: 3372-1243-0.004. */ + if (fraw_src == NULL && internal_symhdr->ifdMax > 0) + return FALSE; fraw_end = fraw_src + internal_symhdr->ifdMax * external_fdr_size; for (; fraw_src < fraw_end; fraw_src += external_fdr_size, fdr_ptr++) (*backend->debug_swap.swap_fdr_in) (abfd, (void *) fraw_src, fdr_ptr); @@ -856,7 +857,6 @@ = backend->debug_swap.swap_ext_in; void (* const swap_sym_in) (bfd *, void *, SYMR *) = backend->debug_swap.swap_sym_in; - bfd_size_type internal_size; ecoff_symbol_type *internal; ecoff_symbol_type *internal_ptr; char *eraw_src; @@ -875,9 +875,8 @@ if (bfd_get_symcount (abfd) == 0) return TRUE; - internal_size = bfd_get_symcount (abfd); - internal_size *= sizeof (ecoff_symbol_type); - internal = (ecoff_symbol_type *) bfd_alloc (abfd, internal_size); + internal = (ecoff_symbol_type *) bfd_alloc2 (abfd, bfd_get_symcount (abfd), + sizeof (ecoff_symbol_type)); if (internal == NULL) return FALSE; @@ -891,16 +890,30 @@ EXTR internal_esym; (*swap_ext_in) (abfd, (void *) eraw_src, &internal_esym); + + /* PR 17512: file: 3372-1000-0.004. */ + if (internal_esym.asym.iss >= ecoff_data (abfd)->debug_info.symbolic_header.issExtMax + || internal_esym.asym.iss < 0) + return FALSE; + internal_ptr->symbol.name = (ecoff_data (abfd)->debug_info.ssext + internal_esym.asym.iss); + if (!ecoff_set_symbol_info (abfd, &internal_esym.asym, &internal_ptr->symbol, 1, internal_esym.weakext)) return FALSE; + /* The alpha uses a negative ifd field for section symbols. */ if (internal_esym.ifd >= 0) - internal_ptr->fdr = (ecoff_data (abfd)->debug_info.fdr - + internal_esym.ifd); + { + /* PR 17512: file: 3372-1983-0.004. */ + if (internal_esym.ifd >= ecoff_data (abfd)->debug_info.symbolic_header.ifdMax) + internal_ptr->fdr = NULL; + else + internal_ptr->fdr = (ecoff_data (abfd)->debug_info.fdr + + internal_esym.ifd); + } else internal_ptr->fdr = NULL; internal_ptr->local = FALSE; @@ -938,6 +951,20 @@ } } + /* PR 17512: file: 3372-3080-0.004. + A discrepancy between ecoff_data (abfd)->debug_info.symbolic_header.isymMax + and ecoff_data (abfd)->debug_info.symbolic_header.ifdMax can mean that + we have fewer symbols than we were expecting. Allow for this by updating + the symbol count and warning the user. */ + if (internal_ptr - internal < (ptrdiff_t) bfd_get_symcount (abfd)) + { + bfd_get_symcount (abfd) = internal_ptr - internal; + (*_bfd_error_handler) + (_("%B: warning: isymMax (%ld) is greater than ifdMax (%d)\n"), + abfd, ecoff_data (abfd)->debug_info.symbolic_header.isymMax, + ecoff_data (abfd)->debug_info.symbolic_header.ifdMax); + } + ecoff_data (abfd)->canonical_symbols = internal; return TRUE; @@ -3976,7 +4003,7 @@ size = bfd_get_reloc_size (rel.howto); buf = (bfd_byte *) bfd_zmalloc (size); - if (buf == NULL) + if (buf == NULL && size != 0) return FALSE; rstat = _bfd_relocate_contents (rel.howto, output_bfd, (bfd_vma) addend, buf); diff -ruN binutils-2.25/bfd/elf-attrs.c binutils-2.25.1/bfd/elf-attrs.c --- binutils-2.25/bfd/elf-attrs.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf-attrs.c 2015-07-21 10:20:58.000000000 +0200 @@ -430,9 +430,13 @@ { bfd_byte *contents; bfd_byte *p; + bfd_byte *p_end; bfd_vma len; const char *std_sec; + /* PR 17512: file: 2844a11d. */ + if (hdr->sh_size == 0) + return; contents = (bfd_byte *) bfd_malloc (hdr->sh_size); if (!contents) return; @@ -443,11 +447,12 @@ return; } p = contents; + p_end = p + hdr->sh_size; std_sec = get_elf_backend_data (abfd)->obj_attrs_vendor; if (*(p++) == 'A') { len = hdr->sh_size - 1; - while (len > 0) + while (len > 0 && p < p_end - 4) { unsigned namelen; bfd_vma section_len; @@ -455,6 +460,8 @@ section_len = bfd_get_32 (abfd, p); p += 4; + if (section_len == 0) + break; if (section_len > len) section_len = len; len -= section_len; @@ -475,7 +482,7 @@ } p += namelen; - while (section_len > 0) + while (section_len > 0 && p < p_end) { int tag; unsigned int n; @@ -483,15 +490,23 @@ bfd_vma subsection_len; bfd_byte *end; - tag = read_unsigned_leb128 (abfd, p, &n); + tag = safe_read_leb128 (abfd, p, &n, FALSE, p_end); p += n; - subsection_len = bfd_get_32 (abfd, p); + if (p < p_end - 4) + subsection_len = bfd_get_32 (abfd, p); + else + subsection_len = 0; p += 4; + if (subsection_len == 0) + break; if (subsection_len > section_len) subsection_len = section_len; section_len -= subsection_len; subsection_len -= n + 4; end = p + subsection_len; + /* PR 17512: file: 0e8c0c90. */ + if (end > p_end) + end = p_end; switch (tag) { case Tag_File: @@ -499,25 +514,25 @@ { int type; - tag = read_unsigned_leb128 (abfd, p, &n); + tag = safe_read_leb128 (abfd, p, &n, FALSE, end); p += n; type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); switch (type & (ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL)) { case ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL: - val = read_unsigned_leb128 (abfd, p, &n); + val = safe_read_leb128 (abfd, p, &n, FALSE, end); p += n; bfd_elf_add_obj_attr_int_string (abfd, vendor, tag, - val, (char *)p); + val, (char *) p); p += strlen ((char *)p) + 1; break; case ATTR_TYPE_FLAG_STR_VAL: bfd_elf_add_obj_attr_string (abfd, vendor, tag, - (char *)p); + (char *) p); p += strlen ((char *)p) + 1; break; case ATTR_TYPE_FLAG_INT_VAL: - val = read_unsigned_leb128 (abfd, p, &n); + val = safe_read_leb128 (abfd, p, &n, FALSE, end); p += n; bfd_elf_add_obj_attr_int (abfd, vendor, tag, val); break; diff -ruN binutils-2.25/bfd/elf-bfd.h binutils-2.25.1/bfd/elf-bfd.h --- binutils-2.25/bfd/elf-bfd.h 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elf-bfd.h 2015-07-21 10:20:58.000000000 +0200 @@ -196,6 +196,9 @@ unsigned int pointer_equality_needed : 1; /* Symbol is a unique global symbol. */ unsigned int unique_global : 1; + /* Symbol is defined by a shared library with non-default visibility + in a read/write section. */ + unsigned int protected_def : 1; /* String table index in .dynstr if this is a dynamic symbol. */ unsigned long dynstr_index; @@ -239,7 +242,8 @@ _bfd_elf_symbol_refs_local_p (H, INFO, 1) /* Common symbols that are turned into definitions don't have the - DEF_REGULAR flag set, so they might appear to be undefined. */ + DEF_REGULAR flag set, so they might appear to be undefined. + Symbols defined in linker scripts also don't have DEF_REGULAR set. */ #define ELF_COMMON_DEF_P(H) \ (!(H)->def_regular \ && !(H)->def_dynamic \ @@ -1109,6 +1113,11 @@ unsigned int (*elf_backend_count_relocs) (struct bfd_link_info *, asection *); + /* Say whether to sort relocs output by ld -r and ld --emit-relocs, + by r_offset. If NULL, default to true. */ + bfd_boolean (*sort_relocs_p) + (asection *); + /* This function, if defined, is called when an NT_PRSTATUS note is found in a core file. */ bfd_boolean (*elf_backend_grok_prstatus) @@ -1904,6 +1913,8 @@ (bfd *, asymbol **, asymbol *, const char **, unsigned int *); extern bfd_boolean _bfd_elf_find_inliner_info (bfd *, const char **, const char **, unsigned int *); +extern bfd_boolean _bfd_elf_find_function + (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **); #define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols #define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol extern int _bfd_elf_sizeof_headers @@ -2017,7 +2028,7 @@ struct elf_link_hash_entry **); extern bfd_boolean _bfd_elf_adjust_dynamic_copy - (struct elf_link_hash_entry *, asection *); + (struct bfd_link_info *, struct elf_link_hash_entry *, asection *); extern bfd_boolean _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean); diff -ruN binutils-2.25/bfd/elf-hppa.h binutils-2.25.1/bfd/elf-hppa.h --- binutils-2.25/bfd/elf-hppa.h 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf-hppa.h 2015-07-21 10:20:58.000000000 +0200 @@ -47,7 +47,7 @@ static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] = { - { R_PARISC_NONE, 0, 0, 0, FALSE, 0, complain_overflow_bitfield, + { R_PARISC_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_PARISC_NONE", FALSE, 0, 0, FALSE }, /* The values in DIR32 are to placate the check in diff -ruN binutils-2.25/bfd/elf-m10200.c binutils-2.25.1/bfd/elf-m10200.c --- binutils-2.25/bfd/elf-m10200.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf-m10200.c 2015-07-21 10:20:58.000000000 +0200 @@ -46,11 +46,11 @@ /* Dummy relocation. Does nothing. */ HOWTO (R_MN10200_NONE, 0, - 2, - 16, + 3, + 0, FALSE, 0, - complain_overflow_bitfield, + complain_overflow_dont, bfd_elf_generic_reloc, "R_MN10200_NONE", FALSE, diff -ruN binutils-2.25/bfd/elf-m10300.c binutils-2.25.1/bfd/elf-m10300.c --- binutils-2.25/bfd/elf-m10300.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf-m10300.c 2015-07-21 10:20:58.000000000 +0200 @@ -142,11 +142,11 @@ /* Dummy relocation. Does nothing. */ HOWTO (R_MN10300_NONE, 0, - 2, - 16, + 3, + 0, FALSE, 0, - complain_overflow_bitfield, + complain_overflow_dont, bfd_elf_generic_reloc, "R_MN10300_NONE", FALSE, @@ -806,7 +806,13 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_MN10300_MAX); + if (r_type >= R_MN10300_MAX) + { + (*_bfd_error_handler) (_("%B: unrecognised MN10300 reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_MN10300_NONE; + } cache_ptr->howto = elf_mn10300_howto_table + r_type; } @@ -5024,7 +5030,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Set the sizes of the dynamic sections. */ diff -ruN binutils-2.25/bfd/elf-s390-common.c binutils-2.25.1/bfd/elf-s390-common.c --- binutils-2.25/bfd/elf-s390-common.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/elf-s390-common.c 2015-07-21 10:20:58.000000000 +0200 @@ -242,3 +242,15 @@ return TRUE; } + +/* Whether to sort relocs output by ld -r or ld --emit-relocs, by + r_offset. Don't do so for code sections. We want to keep ordering + of GDCALL / PLT32DBL for TLS optimizations as is. On the other + hand, elf-eh-frame.c processing requires .eh_frame relocs to be + sorted. */ + +static bfd_boolean +elf_s390_elf_sort_relocs_p (asection *sec) +{ + return (sec->flags & SEC_CODE) == 0; +} diff -ruN binutils-2.25/bfd/elf.c binutils-2.25.1/bfd/elf.c --- binutils-2.25/bfd/elf.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elf.c 2015-07-21 10:20:58.000000000 +0200 @@ -297,13 +297,14 @@ /* Allocate and clear an extra byte at the end, to prevent crashes in case the string table is not terminated. */ if (shstrtabsize + 1 <= 1 - || (shstrtab = (bfd_byte *) bfd_alloc (abfd, shstrtabsize + 1)) == NULL - || bfd_seek (abfd, offset, SEEK_SET) != 0) + || bfd_seek (abfd, offset, SEEK_SET) != 0 + || (shstrtab = (bfd_byte *) bfd_alloc (abfd, shstrtabsize + 1)) == NULL) shstrtab = NULL; else if (bfd_bread (shstrtab, shstrtabsize, abfd) != shstrtabsize) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_file_truncated); + bfd_release (abfd, shstrtab); shstrtab = NULL; /* Once we've failed to read it, make sure we don't keep trying. Otherwise, we'll keep allocating space for @@ -332,9 +333,19 @@ hdr = elf_elfsections (abfd)[shindex]; - if (hdr->contents == NULL - && bfd_elf_get_str_section (abfd, shindex) == NULL) - return NULL; + if (hdr->contents == NULL) + { + if (hdr->sh_type != SHT_STRTAB && hdr->sh_type < SHT_LOOS) + { + /* PR 17512: file: f057ec89. */ + _bfd_error_handler (_("%B: attempt to load strings from a non-string section (number %d)"), + abfd, shindex); + return NULL; + } + + if (bfd_elf_get_str_section (abfd, shindex) == NULL) + return NULL; + } if (strindex >= hdr->sh_size) { @@ -1253,8 +1264,13 @@ swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in; extdyn = dynbuf; + /* PR 17512: file: 6f427532. */ + if (s->size < extdynsize) + goto error_return; extdynend = extdyn + s->size; - for (; extdyn < extdynend; extdyn += extdynsize) + /* PR 17512: file: id:000006,sig:06,src:000000,op:flip4,pos:5664. + Fix range check. */ + for (; extdyn <= (extdynend - extdynsize); extdyn += extdynsize) { Elf_Internal_Dyn dyn; const char *name = ""; @@ -1589,7 +1605,7 @@ if (++ nesting > 3) { /* PR17512: A corrupt ELF binary might contain a recursive group of - sections, each the string indicies pointing to the next in the + sections, each with string indicies pointing to the next in the loop. Detect this here, by refusing to load a section that we are already in the process of loading. We only trigger this test if we have nested at least three sections deep as normal ELF binaries @@ -1956,7 +1972,9 @@ else p_hdr = &esdt->rel.hdr; - BFD_ASSERT (*p_hdr == NULL); + /* PR 17512: file: 0b4f81b7. */ + if (*p_hdr != NULL) + goto fail; amt = sizeof (*hdr2); hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt); if (hdr2 == NULL) @@ -2013,9 +2031,11 @@ if (hdr->contents != NULL) { Elf_Internal_Group *idx = (Elf_Internal_Group *) hdr->contents; - unsigned int n_elt = hdr->sh_size / GRP_ENTRY_SIZE; + unsigned int n_elt = hdr->sh_size / sizeof (* idx); asection *s; + if (n_elt == 0) + goto fail; if (idx->flags & GRP_COMDAT) hdr->bfd_section->flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; @@ -2720,6 +2740,15 @@ this_hdr->sh_offset = 0; this_hdr->sh_size = asect->size; this_hdr->sh_link = 0; + /* PR 17512: file: 0eb809fe, 8b0535ee. */ + if (asect->alignment_power >= (sizeof (bfd_vma) * 8) - 1) + { + (*_bfd_error_handler) + (_("%B: error: Alignment power %d of section `%A' is too big"), + abfd, asect, asect->alignment_power); + arg->failed = TRUE; + return; + } this_hdr->sh_addralign = (bfd_vma) 1 << asect->alignment_power; /* The sh_entsize and sh_info fields may have been set already by copy_private_section_data. */ @@ -3973,6 +4002,11 @@ last_size = 0; phdr_index = 0; maxpagesize = bed->maxpagesize; + /* PR 17512: file: c8455299. + Avoid divide-by-zero errors later on. + FIXME: Should we abort if the maxpagesize is zero ? */ + if (maxpagesize == 0) + maxpagesize = 1; writable = FALSE; dynsec = bfd_get_section_by_name (abfd, ".dynamic"); if (dynsec != NULL @@ -5168,7 +5202,14 @@ && (p->p_type != PT_NOTE || bfd_get_format (abfd) != bfd_core)) { - BFD_ASSERT (!m->includes_filehdr && !m->includes_phdrs); + if (m->includes_filehdr || m->includes_phdrs) + { + /* PR 17512: file: 2195325e. */ + (*_bfd_error_handler) + (_("%B: warning: non-load segment includes file header and/or program header"), + abfd); + return FALSE; + } p->p_filesz = 0; p->p_offset = m->sections[0]->filepos; @@ -6523,7 +6564,15 @@ i++, segment++) if (segment->p_type == PT_LOAD && maxpagesize < segment->p_align) - maxpagesize = segment->p_align; + { + /* PR 17512: file: f17299af. */ + if (segment->p_align > (bfd_vma) 1 << ((sizeof (bfd_vma) * 8) - 2)) + (*_bfd_error_handler) (_("\ +%B: warning: segment alignment of 0x%llx is too large"), + ibfd, (long long) segment->p_align); + else + maxpagesize = segment->p_align; + } if (maxpagesize != get_elf_backend_data (obfd)->maxpagesize) bfd_emul_set_maxpagesize (bfd_get_target (obfd), maxpagesize); @@ -7648,109 +7697,6 @@ return bfd_default_set_arch_mach (abfd, arch, machine); } -/* Find the function to a particular section and offset, - for error reporting. */ - -static bfd_boolean -elf_find_function (bfd *abfd, - asymbol **symbols, - asection *section, - bfd_vma offset, - const char **filename_ptr, - const char **functionname_ptr) -{ - struct elf_find_function_cache - { - asection *last_section; - asymbol *func; - const char *filename; - bfd_size_type func_size; - } *cache; - - if (symbols == NULL) - return FALSE; - - cache = elf_tdata (abfd)->elf_find_function_cache; - if (cache == NULL) - { - cache = bfd_zalloc (abfd, sizeof (*cache)); - elf_tdata (abfd)->elf_find_function_cache = cache; - if (cache == NULL) - return FALSE; - } - if (cache->last_section != section - || cache->func == NULL - || offset < cache->func->value - || offset >= cache->func->value + cache->func_size) - { - asymbol *file; - bfd_vma low_func; - asymbol **p; - /* ??? Given multiple file symbols, it is impossible to reliably - choose the right file name for global symbols. File symbols are - local symbols, and thus all file symbols must sort before any - global symbols. The ELF spec may be interpreted to say that a - file symbol must sort before other local symbols, but currently - ld -r doesn't do this. So, for ld -r output, it is possible to - make a better choice of file name for local symbols by ignoring - file symbols appearing after a given local symbol. */ - enum { nothing_seen, symbol_seen, file_after_symbol_seen } state; - const struct elf_backend_data *bed = get_elf_backend_data (abfd); - - file = NULL; - low_func = 0; - state = nothing_seen; - cache->filename = NULL; - cache->func = NULL; - cache->func_size = 0; - cache->last_section = section; - - for (p = symbols; *p != NULL; p++) - { - asymbol *sym = *p; - bfd_vma code_off; - bfd_size_type size; - - if ((sym->flags & BSF_FILE) != 0) - { - file = sym; - if (state == symbol_seen) - state = file_after_symbol_seen; - continue; - } - - size = bed->maybe_function_sym (sym, section, &code_off); - if (size != 0 - && code_off <= offset - && (code_off > low_func - || (code_off == low_func - && size > cache->func_size))) - { - cache->func = sym; - cache->func_size = size; - cache->filename = NULL; - low_func = code_off; - if (file != NULL - && ((sym->flags & BSF_LOCAL) != 0 - || state != file_after_symbol_seen)) - cache->filename = bfd_asymbol_name (file); - } - if (state == nothing_seen) - state = symbol_seen; - } - } - - if (cache->func == NULL) - return FALSE; - - if (filename_ptr) - *filename_ptr = cache->filename; - if (functionname_ptr) - *functionname_ptr = bfd_asymbol_name (cache->func); - - return TRUE; -} - /* Find the nearest line to a particular section and offset, for error reporting. */ @@ -7770,24 +7716,15 @@ filename_ptr, functionname_ptr, line_ptr, discriminator_ptr, dwarf_debug_sections, 0, - &elf_tdata (abfd)->dwarf2_find_line_info)) + &elf_tdata (abfd)->dwarf2_find_line_info) + || _bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset, + filename_ptr, functionname_ptr, + line_ptr)) { if (!*functionname_ptr) - elf_find_function (abfd, symbols, section, offset, - *filename_ptr ? NULL : filename_ptr, - functionname_ptr); - - return TRUE; - } - - if (_bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset, - filename_ptr, functionname_ptr, line_ptr)) - { - if (!*functionname_ptr) - elf_find_function (abfd, symbols, section, offset, - *filename_ptr ? NULL : filename_ptr, - functionname_ptr); - + _bfd_elf_find_function (abfd, symbols, section, offset, + *filename_ptr ? NULL : filename_ptr, + functionname_ptr); return TRUE; } @@ -7802,8 +7739,8 @@ if (symbols == NULL) return FALSE; - if (! elf_find_function (abfd, symbols, section, offset, - filename_ptr, functionname_ptr)) + if (! _bfd_elf_find_function (abfd, symbols, section, offset, + filename_ptr, functionname_ptr)) return FALSE; *line_ptr = 0; @@ -9822,10 +9759,14 @@ if (bfd_seek (abfd, offset, SEEK_SET) != 0) return FALSE; - buf = (char *) bfd_malloc (size); + buf = (char *) bfd_malloc (size + 1); if (buf == NULL) return FALSE; + /* PR 17512: file: ec08f814 + 0-termintate the buffer so that string searches will not overflow. */ + buf[size] = 0; + if (bfd_bread (buf, size, abfd) != size || !elf_parse_notes (abfd, buf, size, offset)) { diff -ruN binutils-2.25/bfd/elf32-arc.c binutils-2.25.1/bfd/elf32-arc.c --- binutils-2.25/bfd/elf32-arc.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-arc.c 2015-07-21 10:20:58.000000000 +0200 @@ -58,11 +58,11 @@ /* This reloc does nothing. */ HOWTO (R_ARC_NONE, /* Type. */ 0, /* Rightshift. */ - 2, /* Size (0 = byte, 1 = short, 2 = long). */ - 32, /* Bitsize. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ FALSE, /* PC_relative. */ 0, /* Bitpos. */ - complain_overflow_bitfield, /* Complain_on_overflow. */ + complain_overflow_dont, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_ARC_NONE", /* Name. */ TRUE, /* Partial_inplace. */ @@ -172,7 +172,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_ARC_max); + if (r_type >= (unsigned int) R_ARC_max) + { + _bfd_error_handler (_("%B: invalid ARC reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_arc_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-arm.c binutils-2.25.1/bfd/elf32-arm.c --- binutils-2.25/bfd/elf32-arm.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/elf32-arm.c 2015-07-21 10:20:58.000000000 +0200 @@ -79,7 +79,7 @@ /* No relocation. */ HOWTO (R_ARM_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -1606,7 +1606,7 @@ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + NULL, /* special_function */ "R_ARM_TLS_LE32", /* name */ TRUE, /* partial_inplace */ 0xffffffff, /* src_mask */ @@ -13331,7 +13331,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for diff -ruN binutils-2.25/bfd/elf32-avr.c binutils-2.25.1/bfd/elf32-avr.c --- binutils-2.25/bfd/elf32-avr.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-avr.c 2015-07-21 10:20:58.000000000 +0200 @@ -121,11 +121,11 @@ { HOWTO (R_AVR_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_NONE", /* name */ FALSE, /* partial_inplace */ @@ -859,7 +859,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_AVR_max); + if (r_type >= (unsigned int) R_AVR_max) + { + _bfd_error_handler (_("%B: invalid AVR reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_avr_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-bfin.c binutils-2.25.1/bfd/elf32-bfin.c --- binutils-2.25/bfd/elf32-bfin.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-bfin.c 2015-07-21 10:20:58.000000000 +0200 @@ -423,11 +423,11 @@ /* This reloc does nothing. . */ HOWTO (R_BFIN_UNUSED0, /* type. */ 0, /* rightshift. */ - 2, /* size (0 = byte, 1 = short, 2 = long). */ - 32, /* bitsize. */ + 3, /* size (0 = byte, 1 = short, 2 = long). */ + 0, /* bitsize. */ FALSE, /* pc_relative. */ 0, /* bitpos. */ - complain_overflow_bitfield, /* complain_on_overflow. */ + complain_overflow_dont,/* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_BFIN_UNUSED0", /* name. */ FALSE, /* partial_inplace. */ @@ -451,11 +451,11 @@ HOWTO (R_BFIN_UNUSED1, /* type. */ 0, /* rightshift. */ - 2, /* size (0 = byte, 1 = short, 2 = long). */ - 32, /* bitsize. */ + 3, /* size (0 = byte, 1 = short, 2 = long). */ + 0, /* bitsize. */ FALSE, /* pc_relative. */ 0, /* bitpos. */ - complain_overflow_bitfield, /* complain_on_overflow. */ + complain_overflow_dont,/* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_BFIN_UNUSED1", /* name. */ FALSE, /* partial_inplace. */ @@ -581,8 +581,8 @@ HOWTO (R_BFIN_UNUSEDB, /* type. */ 0, /* rightshift. */ - 2, /* size (0 = byte, 1 = short, 2 = long). */ - 32, /* bitsize. */ + 3, /* size (0 = byte, 1 = short, 2 = long). */ + 0, /* bitsize. */ FALSE, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ @@ -595,8 +595,8 @@ HOWTO (R_BFIN_UNUSEDC, /* type. */ 0, /* rightshift. */ - 2, /* size (0 = byte, 1 = short, 2 = long). */ - 32, /* bitsize. */ + 3, /* size (0 = byte, 1 = short, 2 = long). */ + 0, /* bitsize. */ FALSE, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ diff -ruN binutils-2.25/bfd/elf32-cr16.c binutils-2.25.1/bfd/elf32-cr16.c --- binutils-2.25/bfd/elf32-cr16.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-cr16.c 2015-07-21 10:20:58.000000000 +0200 @@ -115,8 +115,8 @@ { HOWTO (R_CR16_NONE, /* type */ 0, /* rightshift */ - 2, /* size */ - 32, /* bitsize */ + 3, /* size */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -673,7 +673,13 @@ { unsigned int r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_CR16_MAX); + if (r_type >= R_CR16_MAX) + { + (*_bfd_error_handler) (_("%B: unrecognised CR16 reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_CR16_NONE; + } cache_ptr->howto = cr16_elf_howto_table + r_type; } @@ -2437,7 +2443,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Set the sizes of the dynamic sections. */ diff -ruN binutils-2.25/bfd/elf32-cr16c.c binutils-2.25.1/bfd/elf32-cr16c.c --- binutils-2.25/bfd/elf32-cr16c.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-cr16c.c 2015-07-21 10:20:58.000000000 +0200 @@ -180,7 +180,11 @@ { unsigned int r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) RINDEX_16C_MAX); + if (r_type >= RINDEX_16C_MAX) + { + _bfd_error_handler (_("%B: invalid CR16C reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-cris.c binutils-2.25.1/bfd/elf32-cris.c --- binutils-2.25/bfd/elf32-cris.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-cris.c 2015-07-21 10:20:58.000000000 +0200 @@ -40,11 +40,11 @@ /* This reloc does nothing. */ HOWTO (R_CRIS_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_NONE", /* name */ FALSE, /* partial_inplace */ @@ -461,7 +461,11 @@ enum elf_cris_reloc_type r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_CRIS_max); + if (r_type >= R_CRIS_max) + { + _bfd_error_handler (_("%B: invalid CRIS reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & cris_elf_howto_table [r_type]; } @@ -3054,7 +3058,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Adjust our "subclass" elements for an indirect symbol. */ diff -ruN binutils-2.25/bfd/elf32-crx.c binutils-2.25.1/bfd/elf32-crx.c --- binutils-2.25/bfd/elf32-crx.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-crx.c 2015-07-21 10:20:58.000000000 +0200 @@ -82,8 +82,8 @@ { HOWTO (R_CRX_NONE, /* type */ 0, /* rightshift */ - 2, /* size */ - 32, /* bitsize */ + 3, /* size */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ @@ -423,7 +423,13 @@ Elf_Internal_Rela *dst) { unsigned int r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_CRX_MAX); + if (r_type >= R_CRX_MAX) + { + (*_bfd_error_handler) (_("%B: unrecognised CRX reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_CRX_NONE; + } cache_ptr->howto = &crx_elf_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-d10v.c binutils-2.25.1/bfd/elf32-d10v.c --- binutils-2.25/bfd/elf32-d10v.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-d10v.c 2015-07-21 10:20:58.000000000 +0200 @@ -33,8 +33,8 @@ /* This reloc does nothing. */ HOWTO (R_D10V_NONE, /* Type. */ 0, /* Rightshift. */ - 2, /* Size (0 = byte, 1 = short, 2 = long). */ - 32, /* Bitsize. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ FALSE, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ @@ -228,7 +228,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_D10V_max); + if (r_type >= (unsigned int) R_D10V_max) + { + _bfd_error_handler (_("%B: invalid D10V reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_d10v_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-d30v.c binutils-2.25.1/bfd/elf32-d30v.c --- binutils-2.25/bfd/elf32-d30v.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-d30v.c 2015-07-21 10:20:58.000000000 +0200 @@ -254,11 +254,11 @@ /* This reloc does nothing. */ HOWTO (R_D30V_NONE, /* Type. */ 0, /* Rightshift. */ - 2, /* Size (0 = byte, 1 = short, 2 = long). */ - 32, /* Bitsize. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ FALSE, /* PC_relative. */ 0, /* Bitpos. */ - complain_overflow_bitfield, /* Complain_on_overflow. */ + complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D30V_NONE", /* Name. */ FALSE, /* Partial_inplace. */ @@ -516,7 +516,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_D30V_max); + if (r_type >= (unsigned int) R_D30V_max) + { + _bfd_error_handler (_("%B: invalid D30V reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_d30v_howto_table[r_type]; } @@ -530,7 +534,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_D30V_max); + if (r_type >= (unsigned int) R_D30V_max) + { + _bfd_error_handler (_("%B: invalid D30V reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_d30v_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-dlx.c binutils-2.25.1/bfd/elf32-dlx.c --- binutils-2.25/bfd/elf32-dlx.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-dlx.c 2015-07-21 10:20:58.000000000 +0200 @@ -237,7 +237,7 @@ /* No relocation. */ HOWTO (R_DLX_NONE, /* Type. */ 0, /* Rightshift. */ - 0, /* size (0 = byte, 1 = short, 2 = long). */ + 3, /* size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ FALSE, /* PC_relative. */ 0, /* Bitpos. */ @@ -546,7 +546,11 @@ case R_DLX_RELOC_16_LO: return & elf_dlx_reloc_16_lo; default: - BFD_ASSERT (r_type < (unsigned int) R_DLX_max); + if (r_type >= (unsigned int) R_DLX_max) + { + _bfd_error_handler (_("Invalid DLX reloc number: %d"), r_type); + r_type = 0; + } return & dlx_elf_howto_table[r_type]; } } diff -ruN binutils-2.25/bfd/elf32-epiphany.c binutils-2.25.1/bfd/elf32-epiphany.c --- binutils-2.25/bfd/elf32-epiphany.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-epiphany.c 2015-07-21 10:20:58.000000000 +0200 @@ -63,7 +63,7 @@ pr) /* pcrel_offset */ /* This reloc does nothing. */ - AHOW (R_EPIPHANY_NONE, 0, 0,32, FALSE, 0, complain_overflow_dont, "R_EPIPHANY_NONE", 0, 0), + AHOW (R_EPIPHANY_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, "R_EPIPHANY_NONE", 0, 0), /* 8 bit absolute (not likely) */ AHOW (R_EPIPHANY_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, "R_EPIPHANY_8", 0x000000ff, 0x000000ff), @@ -370,6 +370,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= (unsigned int) R_EPIPHANY_max) + { + _bfd_error_handler (_("%B: invalid Epiphany reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & epiphany_elf_howto_table [r_type]; } diff -ruN binutils-2.25/bfd/elf32-fr30.c binutils-2.25.1/bfd/elf32-fr30.c --- binutils-2.25/bfd/elf32-fr30.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-fr30.c 2015-07-21 10:20:58.000000000 +0200 @@ -37,11 +37,11 @@ /* This reloc does nothing. */ HOWTO (R_FR30_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_NONE", /* name */ FALSE, /* partial_inplace */ @@ -343,7 +343,7 @@ unsigned int i; for (i = sizeof (fr30_reloc_map) / sizeof (fr30_reloc_map[0]); - --i;) + i--;) if (fr30_reloc_map [i].bfd_reloc_val == code) return & fr30_elf_howto_table [fr30_reloc_map[i].fr30_reloc_val]; @@ -375,7 +375,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_FR30_max); + if (r_type >= (unsigned int) R_FR30_max) + { + _bfd_error_handler (_("%B: invalid FR30 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & fr30_elf_howto_table [r_type]; } diff -ruN binutils-2.25/bfd/elf32-frv.c binutils-2.25.1/bfd/elf32-frv.c --- binutils-2.25/bfd/elf32-frv.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-frv.c 2015-07-21 10:20:58.000000000 +0200 @@ -34,11 +34,11 @@ /* This reloc does nothing. */ HOWTO (R_FRV_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_NONE", /* name */ FALSE, /* partial_inplace */ @@ -2557,6 +2557,11 @@ break; default: + if (r_type >= (unsigned int) R_FRV_max) + { + _bfd_error_handler (_("%B: invalid FRV reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & elf32_frv_howto_table [r_type]; break; } diff -ruN binutils-2.25/bfd/elf32-h8300.c binutils-2.25.1/bfd/elf32-h8300.c --- binutils-2.25/bfd/elf32-h8300.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-h8300.c 2015-07-21 10:20:58.000000000 +0200 @@ -61,7 +61,7 @@ #define R_H8_NONE_X 0 HOWTO (R_H8_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ diff -ruN binutils-2.25/bfd/elf32-hppa.c binutils-2.25.1/bfd/elf32-hppa.c --- binutils-2.25/bfd/elf32-hppa.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-hppa.c 2015-07-21 10:20:58.000000000 +0200 @@ -1915,7 +1915,7 @@ sec = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (eh, sec); + return _bfd_elf_adjust_dynamic_copy (info, eh, sec); } /* Allocate space in the .plt for entries that won't have relocations. diff -ruN binutils-2.25/bfd/elf32-i370.c binutils-2.25.1/bfd/elf32-i370.c --- binutils-2.25/bfd/elf32-i370.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-i370.c 2015-07-21 10:20:58.000000000 +0200 @@ -40,11 +40,11 @@ /* This reloc does nothing. */ HOWTO (R_I370_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_I370_NONE", /* name */ FALSE, /* partial_inplace */ @@ -294,12 +294,21 @@ arelent *cache_ptr, Elf_Internal_Rela *dst) { + unsigned int r_type; + if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table. */ i370_elf_howto_init (); - BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_I370_max); - cache_ptr->howto = i370_elf_howto_table[ELF32_R_TYPE (dst->r_info)]; + r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= R_I370_max) + { + (*_bfd_error_handler) (_("%B: unrecognised I370 reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_I370_NONE; + } + cache_ptr->howto = i370_elf_howto_table[r_type]; } /* Hack alert -- the following several routines look generic to me ... @@ -534,7 +543,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Increment the index of a dynamic symbol by a given amount. Called diff -ruN binutils-2.25/bfd/elf32-i386.c binutils-2.25.1/bfd/elf32-i386.c --- binutils-2.25/bfd/elf32-i386.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elf32-i386.c 2015-07-21 10:20:58.000000000 +0200 @@ -37,7 +37,7 @@ static reloc_howto_type elf_howto_table[]= { - HOWTO(R_386_NONE, 0, 0, 0, FALSE, 0, complain_overflow_bitfield, + HOWTO(R_386_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_386_NONE", TRUE, 0x00000000, 0x00000000, FALSE), HOWTO(R_386_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, @@ -379,7 +379,9 @@ abfd, (int) r_type); indx = R_386_NONE; } - BFD_ASSERT (elf_howto_table [indx].type == r_type); + /* PR 17512: file: 0f67f69d. */ + if (elf_howto_table [indx].type != r_type) + return NULL; return &elf_howto_table[indx]; } @@ -2164,7 +2166,7 @@ s = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for @@ -5015,7 +5017,7 @@ if (plt_sym_val == NULL) goto bad_return; - for (i = 0; i < count; i++, p++) + for (i = 0; i < count; i++) plt_sym_val[i] = -1; plt_offset = bed->plt->plt_entry_size; @@ -5024,6 +5026,10 @@ { long reloc_index; + /* Skip unknown relocation. PR 17512: file: bc9d6cf5. */ + if (p->howto == NULL) + continue; + if (p->howto->type != R_386_JUMP_SLOT && p->howto->type != R_386_IRELATIVE) continue; diff -ruN binutils-2.25/bfd/elf32-i860.c binutils-2.25.1/bfd/elf32-i860.c --- binutils-2.25/bfd/elf32-i860.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-i860.c 2015-07-21 10:20:58.000000000 +0200 @@ -264,11 +264,11 @@ /* This relocation does nothing. */ HOWTO (R_860_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_860_NONE", /* name */ FALSE, /* partial_inplace */ diff -ruN binutils-2.25/bfd/elf32-i960.c binutils-2.25.1/bfd/elf32-i960.c --- binutils-2.25/bfd/elf32-i960.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-i960.c 2015-07-21 10:20:58.000000000 +0200 @@ -83,7 +83,7 @@ static reloc_howto_type elf_howto_table[]= { - HOWTO (R_960_NONE, 0, 0, 0, FALSE, 0, complain_overflow_bitfield, + HOWTO (R_960_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, elf32_i960_relocate, "R_960_NONE", TRUE, 0x00000000, 0x00000000, FALSE), EMPTY_HOWTO (1), @@ -132,7 +132,12 @@ enum elf_i960_reloc_type type; type = (enum elf_i960_reloc_type) ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (type < R_960_max); + /* PR 17521: file: 9609b8d6. */ + if (type >= R_960_max) + { + _bfd_error_handler (_("%B: invalid i960 reloc number: %d"), abfd, type); + type = 0; + } cache_ptr->howto = &elf_howto_table[(int) type]; } diff -ruN binutils-2.25/bfd/elf32-ip2k.c binutils-2.25.1/bfd/elf32-ip2k.c --- binutils-2.25/bfd/elf32-ip2k.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-ip2k.c 2015-07-21 10:20:58.000000000 +0200 @@ -141,7 +141,7 @@ pr) /* pcrel_offset */ /* This reloc does nothing. */ - IP2K_HOWTO (R_IP2K_NONE, 0,2,32, FALSE, 0, "R_IP2K_NONE", 0, 0), + IP2K_HOWTO (R_IP2K_NONE, 0,3,0, FALSE, 0, "R_IP2K_NONE", 0, 0), /* A 16 bit absolute relocation. */ IP2K_HOWTO (R_IP2K_16, 0,1,16, FALSE, 0, "R_IP2K_16", 0, 0xffff), /* A 32 bit absolute relocation. */ @@ -1239,6 +1239,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= (unsigned int) R_IP2K_max) + { + _bfd_error_handler (_("%B: invalid IP2K reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & ip2k_elf_howto_table [r_type]; } diff -ruN binutils-2.25/bfd/elf32-iq2000.c binutils-2.25.1/bfd/elf32-iq2000.c --- binutils-2.25/bfd/elf32-iq2000.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-iq2000.c 2015-07-21 10:20:58.000000000 +0200 @@ -34,11 +34,11 @@ HOWTO (R_IQ2000_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_NONE", /* name */ FALSE, /* partial_inplace */ @@ -435,6 +435,11 @@ break; default: + if (r_type >= (unsigned int) R_IQ2000_max) + { + _bfd_error_handler (_("%B: invalid IQ2000 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & iq2000_elf_howto_table [r_type]; break; } diff -ruN binutils-2.25/bfd/elf32-lm32.c binutils-2.25.1/bfd/elf32-lm32.c --- binutils-2.25/bfd/elf32-lm32.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-lm32.c 2015-07-21 10:20:58.000000000 +0200 @@ -262,11 +262,11 @@ /* This reloc does nothing. */ HOWTO (R_LM32_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield,/* complain_on_overflow */ + complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_NONE", /* name */ FALSE, /* partial_inplace */ @@ -588,7 +588,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_LM32_max); + if (r_type >= (unsigned int) R_LM32_max) + { + _bfd_error_handler (_("%B: invalid LM32 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &lm32_elf_howto_table[r_type]; } @@ -1892,7 +1896,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for diff -ruN binutils-2.25/bfd/elf32-m32c.c binutils-2.25.1/bfd/elf32-m32c.c --- binutils-2.25/bfd/elf32-m32c.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-m32c.c 2015-07-21 10:20:58.000000000 +0200 @@ -40,6 +40,8 @@ #endif static bfd_boolean m32c_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, bfd_boolean *again); +static bfd_reloc_status_type m32c_apply_reloc_24 + (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static reloc_howto_type m32c_elf_howto_table [] = @@ -47,11 +49,11 @@ /* This reloc does nothing. */ HOWTO (R_M32C_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_NONE", /* name */ FALSE, /* partial_inplace */ @@ -83,7 +85,7 @@ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + m32c_apply_reloc_24, /* special_function */ "R_M32C_24", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ @@ -264,7 +266,7 @@ { unsigned int i; - for (i = ARRAY_SIZE (m32c_reloc_map); --i;) + for (i = ARRAY_SIZE (m32c_reloc_map); i--;) if (m32c_reloc_map [i].bfd_reloc_val == code) return & m32c_elf_howto_table [m32c_reloc_map[i].m32c_reloc_val]; @@ -297,12 +299,58 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_M32C_max); + if (r_type >= (unsigned int) R_M32C_max) + { + _bfd_error_handler (_("%B: invalid M32C reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & m32c_elf_howto_table [r_type]; } +/* Apply R_M32C_24 relocations. We have to do this because it's not a + power-of-two size, and the generic code may think it overruns the + section if it's right at the end. + + Must return something other than bfd_reloc_continue to avoid the + above problem. Typical return values include bfd_reloc_ok or + bfd_reloc_overflow. +*/ + +static bfd_reloc_status_type m32c_apply_reloc_24 (bfd *abfd ATTRIBUTE_UNUSED, + arelent *reloc_entry, + asymbol *symbol, + void *vdata_start ATTRIBUTE_UNUSED, + asection *input_section, + bfd *ibfd ATTRIBUTE_UNUSED, + char **error_msg ATTRIBUTE_UNUSED) +{ + bfd_vma relocation; + bfd_reloc_status_type s; + + s = bfd_elf_generic_reloc (abfd, reloc_entry, symbol, + vdata_start, + input_section, ibfd, error_msg); + if (s != bfd_reloc_continue) + return s; + + /* Get symbol value. (Common symbols are special.) */ + if (bfd_is_com_section (symbol->section)) + relocation = 0; + else + relocation = symbol->value; + + relocation += symbol->section->output_offset; + + /* Add in supplied addend. */ + relocation += reloc_entry->addend; + + reloc_entry->addend = relocation; + reloc_entry->address += input_section->output_offset; + return bfd_reloc_ok; +} + /* Relocate an M32C ELF section. There is some attempt to make this function usable for many architectures, both USE_REL and USE_RELA ['twould be nice if such a critter existed], @@ -531,9 +579,32 @@ printf ("\n"); } #endif - r = _bfd_final_link_relocate (howto, input_bfd, input_section, - contents, rel->r_offset, relocation, - rel->r_addend); + switch (ELF32_R_TYPE(rel->r_info)) + { + case R_M32C_24: + /* Like m32c_apply_reloc_24, we must handle this one separately. */ + relocation += rel->r_addend; + + /* Sanity check the address. */ + if (rel->r_offset + 3 + > bfd_get_section_limit_octets (input_bfd, input_section)) + r = bfd_reloc_outofrange; + else + { + bfd_put_8 (input_bfd, relocation & 0xff, contents + rel->r_offset); + bfd_put_8 (input_bfd, (relocation >> 8) & 0xff, contents + rel->r_offset + 1); + bfd_put_8 (input_bfd, (relocation >> 16) & 0xff, contents + rel->r_offset + 2); + r = bfd_reloc_ok; + } + + break; + + default: + r = _bfd_final_link_relocate (howto, input_bfd, input_section, + contents, rel->r_offset, relocation, + rel->r_addend); + break; + } if (r != bfd_reloc_ok) { diff -ruN binutils-2.25/bfd/elf32-m32r.c binutils-2.25.1/bfd/elf32-m32r.c --- binutils-2.25/bfd/elf32-m32r.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-m32r.c 2015-07-21 10:20:58.000000000 +0200 @@ -474,11 +474,11 @@ /* This reloc does nothing. */ HOWTO (R_M32R_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_NONE", /* name */ FALSE, /* partial_inplace */ @@ -1280,7 +1280,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (ELF32_R_TYPE(dst->r_info) <= (unsigned int) R_M32R_GNU_VTENTRY); + if (r_type > (unsigned int) R_M32R_GNU_VTENTRY) + { + _bfd_error_handler (_("%B: invalid M32R reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &m32r_elf_howto_table[r_type]; } @@ -1919,7 +1923,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for @@ -4079,4 +4083,3 @@ #define elf32_bed elf32_m32r_lin_bed #include "elf32-target.h" - diff -ruN binutils-2.25/bfd/elf32-m68hc11.c binutils-2.25.1/bfd/elf32-m68hc11.c --- binutils-2.25/bfd/elf32-m68hc11.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-m68hc11.c 2015-07-21 10:20:58.000000000 +0200 @@ -65,8 +65,8 @@ /* This reloc does nothing. */ HOWTO (R_M68HC11_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ @@ -384,7 +384,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_M68HC11_max); + if (r_type >= (unsigned int) R_M68HC11_max) + { + _bfd_error_handler (_("%B: invalid M68HC11 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_m68hc11_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-m68hc12.c binutils-2.25.1/bfd/elf32-m68hc12.c --- binutils-2.25/bfd/elf32-m68hc12.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-m68hc12.c 2015-07-21 10:20:58.000000000 +0200 @@ -107,8 +107,8 @@ /* This reloc does nothing. */ HOWTO (R_M68HC11_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ @@ -504,7 +504,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_M68HC11_max); + if (r_type >= (unsigned int) R_M68HC11_max) + { + _bfd_error_handler (_("%B: invalid M68HC12 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_m68hc11_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-m68k.c binutils-2.25.1/bfd/elf32-m68k.c --- binutils-2.25/bfd/elf32-m68k.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/elf32-m68k.c 2015-07-21 10:20:58.000000000 +0200 @@ -31,7 +31,7 @@ static reloc_howto_type howto_table[] = { - HOWTO(R_68K_NONE, 0, 0, 0, FALSE,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_NONE", FALSE, 0, 0x00000000,FALSE), + HOWTO(R_68K_NONE, 0, 3, 0, FALSE,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_NONE", FALSE, 0, 0x00000000,FALSE), HOWTO(R_68K_32, 0, 2,32, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_32", FALSE, 0, 0xffffffff,FALSE), HOWTO(R_68K_16, 0, 1,16, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_16", FALSE, 0, 0x0000ffff,FALSE), HOWTO(R_68K_8, 0, 0, 8, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_8", FALSE, 0, 0x000000ff,FALSE), @@ -3237,7 +3237,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Set the sizes of the dynamic sections. */ diff -ruN binutils-2.25/bfd/elf32-mcore.c binutils-2.25.1/bfd/elf32-mcore.c --- binutils-2.25/bfd/elf32-mcore.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-mcore.c 2015-07-21 10:20:58.000000000 +0200 @@ -110,11 +110,11 @@ /* This reloc does nothing. */ HOWTO (R_MCORE_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ NULL, /* special_function */ "R_MCORE_NONE", /* name */ FALSE, /* partial_inplace */ @@ -340,13 +340,22 @@ arelent * cache_ptr, Elf_Internal_Rela * dst) { + unsigned int r_type; + if (! mcore_elf_howto_table [R_MCORE_PCRELIMM8BY4]) /* Initialize howto table if needed. */ mcore_elf_howto_init (); - BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_MCORE_max); + r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= R_MCORE_max) + { + (*_bfd_error_handler) (_("%B: unrecognised MCore reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_MCORE_NONE; + } - cache_ptr->howto = mcore_elf_howto_table [ELF32_R_TYPE (dst->r_info)]; + cache_ptr->howto = mcore_elf_howto_table [r_type]; } /* The RELOCATE_SECTION function is called by the ELF backend linker diff -ruN binutils-2.25/bfd/elf32-mep.c binutils-2.25.1/bfd/elf32-mep.c --- binutils-2.25/bfd/elf32-mep.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-mep.c 2015-07-21 10:20:58.000000000 +0200 @@ -42,7 +42,7 @@ static reloc_howto_type mep_elf_howto_table [] = { /* type, size, bits, leftshift, rightshift, pcrel, OD/OS/OU, mask. */ - MEPREL (R_MEP_NONE, 0, 0, 0, 0, 0, N, 0), + MEPREL (R_MEP_NONE, 3, 0, 0, 0, 0, N, 0), MEPREL (R_RELC, 0, 0, 0, 0, 0, N, 0), /* MEPRELOC:HOWTO */ /* This section generated from bfd/mep-relocs.pl from include/elf/mep.h. */ @@ -400,6 +400,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= R_MEP_max) + { + _bfd_error_handler (_("%B: invalid MEP reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & mep_elf_howto_table [r_type]; } diff -ruN binutils-2.25/bfd/elf32-metag.c binutils-2.25.1/bfd/elf32-metag.c --- binutils-2.25/bfd/elf32-metag.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-metag.c 2015-07-21 10:20:58.000000000 +0200 @@ -142,7 +142,7 @@ /* No relocation. */ HOWTO (R_METAG_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -896,7 +896,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_METAG_MAX); + if (r_type >= (unsigned int) R_METAG_MAX) + { + _bfd_error_handler (_("%B: invalid METAG reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & elf_metag_howto_table [r_type]; } @@ -2587,7 +2591,7 @@ s = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (eh, s); + return _bfd_elf_adjust_dynamic_copy (info, eh, s); } /* Allocate space in .plt, .got and associated reloc sections for diff -ruN binutils-2.25/bfd/elf32-microblaze.c binutils-2.25.1/bfd/elf32-microblaze.c --- binutils-2.25/bfd/elf32-microblaze.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-microblaze.c 2015-07-21 10:20:58.000000000 +0200 @@ -44,11 +44,11 @@ /* This reloc does nothing. */ HOWTO (R_MICROBLAZE_NONE, /* Type. */ 0, /* Rightshift. */ - 2, /* Size (0 = byte, 1 = short, 2 = long). */ - 32, /* Bitsize. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ FALSE, /* PC_relative. */ 0, /* Bitpos. */ - complain_overflow_bitfield, /* Complain on overflow. */ + complain_overflow_dont,/* Complain on overflow. */ NULL, /* Special Function. */ "R_MICROBLAZE_NONE", /* Name. */ FALSE, /* Partial Inplace. */ @@ -179,11 +179,11 @@ /* This reloc does nothing. Used for relaxation. */ HOWTO (R_MICROBLAZE_64_NONE, /* Type. */ 0, /* Rightshift. */ - 2, /* Size (0 = byte, 1 = short, 2 = long). */ - 32, /* Bitsize. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ TRUE, /* PC_relative. */ 0, /* Bitpos. */ - complain_overflow_bitfield, /* Complain on overflow. */ + complain_overflow_dont,/* Complain on overflow. */ NULL, /* Special Function. */ "R_MICROBLAZE_64_NONE",/* Name. */ FALSE, /* Partial Inplace. */ @@ -643,13 +643,22 @@ arelent * cache_ptr, Elf_Internal_Rela * dst) { + unsigned int r_type; + if (!microblaze_elf_howto_table [R_MICROBLAZE_32]) /* Initialize howto table if needed. */ microblaze_elf_howto_init (); - BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_MICROBLAZE_max); + r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= R_MICROBLAZE_max) + { + (*_bfd_error_handler) (_("%B: unrecognised MicroBlaze reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_MICROBLAZE_NONE; + } - cache_ptr->howto = microblaze_elf_howto_table [ELF32_R_TYPE (dst->r_info)]; + cache_ptr->howto = microblaze_elf_howto_table [r_type]; } /* Microblaze ELF local labels start with 'L.' or '$L', not '.L'. */ diff -ruN binutils-2.25/bfd/elf32-mips.c binutils-2.25.1/bfd/elf32-mips.c --- binutils-2.25/bfd/elf32-mips.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-mips.c 2015-07-21 10:20:58.000000000 +0200 @@ -107,7 +107,7 @@ /* No relocation. */ HOWTO (R_MIPS_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -2204,7 +2204,12 @@ return &elf_micromips_howto_table_rel[r_type - R_MICROMIPS_min]; if (r_type >= R_MIPS16_min && r_type < R_MIPS16_max) return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min]; - BFD_ASSERT (r_type < (unsigned int) R_MIPS_max); + if (r_type >= (unsigned int) R_MIPS_max) + { + (*_bfd_error_handler) (_("Unrecognised MIPS reloc number: %d"), r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_MIPS_NONE; + } return &elf_mips_howto_table_rel[r_type]; } } @@ -2473,6 +2478,8 @@ #define elf_backend_write_section _bfd_mips_elf_write_section #define elf_backend_mips_irix_compat elf32_mips_irix_compat #define elf_backend_mips_rtype_to_howto mips_elf32_rtype_to_howto +#define elf_backend_sort_relocs_p _bfd_mips_elf_sort_relocs_p + #define bfd_elf32_bfd_is_local_label_name \ mips_elf_is_local_label_name #define bfd_elf32_bfd_is_target_special_symbol \ diff -ruN binutils-2.25/bfd/elf32-moxie.c binutils-2.25.1/bfd/elf32-moxie.c --- binutils-2.25/bfd/elf32-moxie.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-moxie.c 2015-07-21 10:20:58.000000000 +0200 @@ -34,11 +34,11 @@ /* This reloc does nothing. */ HOWTO (R_MOXIE_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MOXIE_NONE", /* name */ FALSE, /* partial_inplace */ @@ -99,7 +99,7 @@ unsigned int i; for (i = sizeof (moxie_reloc_map) / sizeof (moxie_reloc_map[0]); - --i;) + i--;) if (moxie_reloc_map [i].bfd_reloc_val == code) return & moxie_elf_howto_table [moxie_reloc_map[i].moxie_reloc_val]; @@ -131,7 +131,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_MOXIE_max); + if (r_type >= (unsigned int) R_MOXIE_max) + { + _bfd_error_handler (_("%B: invalid Moxie reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & moxie_elf_howto_table [r_type]; } diff -ruN binutils-2.25/bfd/elf32-msp430.c binutils-2.25.1/bfd/elf32-msp430.c --- binutils-2.25/bfd/elf32-msp430.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-msp430.c 2015-07-21 10:20:58.000000000 +0200 @@ -30,11 +30,11 @@ { HOWTO (R_MSP430_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield,/* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_NONE", /* name */ FALSE, /* partial_inplace */ @@ -197,11 +197,11 @@ { HOWTO (R_MSP430_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield,/* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_NONE", /* name */ FALSE, /* partial_inplace */ @@ -617,12 +617,20 @@ if (uses_msp430x_relocs (abfd)) { - BFD_ASSERT (r_type < (unsigned int) R_MSP430x_max); + if (r_type >= (unsigned int) R_MSP430x_max) + { + _bfd_error_handler (_("%B: invalid MSP430X reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = elf_msp430x_howto_table + r_type; return; } - BFD_ASSERT (r_type < (unsigned int) R_MSP430_max); + if (r_type >= (unsigned int) R_MSP430_max) + { + _bfd_error_handler (_("%B: invalid MSP430 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_msp430_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-mt.c binutils-2.25.1/bfd/elf32-mt.c --- binutils-2.25/bfd/elf32-mt.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-mt.c 2015-07-21 10:20:58.000000000 +0200 @@ -48,8 +48,8 @@ /* This reloc does nothing. */ HOWTO (R_MT_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -236,6 +236,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= (unsigned int) R_MT_max) + { + _bfd_error_handler (_("%B: invalid MT reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & mt_elf_howto_table [r_type]; } diff -ruN binutils-2.25/bfd/elf32-nds32.c binutils-2.25.1/bfd/elf32-nds32.c --- binutils-2.25/bfd/elf32-nds32.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-nds32.c 2015-07-21 10:20:58.000000000 +0200 @@ -321,11 +321,11 @@ /* This reloc does nothing. */ HOWTO (R_NDS32_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_NONE", /* name */ FALSE, /* partial_inplace */ @@ -2965,7 +2965,11 @@ enum elf_nds32_reloc_type r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (ELF32_R_TYPE (dst->r_info) <= R_NDS32_GNU_VTENTRY); + if (r_type > R_NDS32_GNU_VTENTRY) + { + _bfd_error_handler (_("%B: invalid NDS32 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = bfd_elf32_bfd_reloc_type_table_lookup (r_type); } @@ -4182,11 +4186,10 @@ switch (size) { default: - case 0: - case 1: - case 8: abort (); break; + case 0: + return bfd_reloc_ok; case 2: x = bfd_getb16 (location); break; diff -ruN binutils-2.25/bfd/elf32-nios2.c binutils-2.25.1/bfd/elf32-nios2.c --- binutils-2.25/bfd/elf32-nios2.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-nios2.c 2015-07-21 10:20:58.000000000 +0200 @@ -80,7 +80,7 @@ /* No relocation. */ HOWTO (R_NIOS2_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -764,6 +764,7 @@ }; static const struct elf_reloc_map nios2_reloc_map[] = { + {BFD_RELOC_NONE, R_NIOS2_NONE}, {BFD_RELOC_NIOS2_S16, R_NIOS2_S16}, {BFD_RELOC_NIOS2_U16, R_NIOS2_U16}, {BFD_RELOC_16_PCREL, R_NIOS2_PCREL16}, @@ -5307,5 +5308,6 @@ #define TARGET_BIG_NAME "elf32-bignios2" #define elf_backend_got_header_size 12 +#define elf_backend_default_execstack 0 #include "elf32-target.h" diff -ruN binutils-2.25/bfd/elf32-or1k.c binutils-2.25.1/bfd/elf32-or1k.c --- binutils-2.25/bfd/elf32-or1k.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-or1k.c 2015-07-21 10:20:58.000000000 +0200 @@ -60,8 +60,8 @@ /* This reloc does nothing. */ HOWTO (R_OR1K_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -704,7 +704,7 @@ { unsigned int i; - for (i = ARRAY_SIZE (or1k_reloc_map); --i;) + for (i = ARRAY_SIZE (or1k_reloc_map); i--;) if (or1k_reloc_map[i].bfd_reloc_val == code) return & or1k_elf_howto_table[or1k_reloc_map[i].or1k_reloc_val]; @@ -738,7 +738,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_OR1K_max); + if (r_type >= (unsigned int) R_OR1K_max) + { + _bfd_error_handler (_("%B: invalid OR1K reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = & or1k_elf_howto_table[r_type]; } @@ -2187,7 +2191,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for diff -ruN binutils-2.25/bfd/elf32-pj.c binutils-2.25.1/bfd/elf32-pj.c --- binutils-2.25/bfd/elf32-pj.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-pj.c 2015-07-21 10:20:58.000000000 +0200 @@ -113,7 +113,7 @@ /* No relocation. */ HOWTO (R_PJ_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -319,7 +319,13 @@ r = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r < (unsigned int) R_PJ_max); + if (r >= R_PJ_max) + { + (*_bfd_error_handler) (_("%B: unrecognised PicoJava reloc number: %d"), + abfd, r); + bfd_set_error (bfd_error_bad_value); + r = R_PJ_NONE; + } cache_ptr->howto = &pj_elf_howto_table[r]; } diff -ruN binutils-2.25/bfd/elf32-ppc.c binutils-2.25.1/bfd/elf32-ppc.c --- binutils-2.25/bfd/elf32-ppc.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elf32-ppc.c 2015-07-21 10:20:58.000000000 +0200 @@ -187,8 +187,8 @@ /* This reloc does nothing. */ HOWTO (R_PPC_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -2019,19 +2019,28 @@ arelent *cache_ptr, Elf_Internal_Rela *dst) { + unsigned int r_type; + /* Initialize howto table if not already done. */ if (!ppc_elf_howto_table[R_PPC_ADDR32]) ppc_elf_howto_init (); - BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_PPC_max); - cache_ptr->howto = ppc_elf_howto_table[ELF32_R_TYPE (dst->r_info)]; + r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= R_PPC_max) + { + (*_bfd_error_handler) (_("%B: unrecognised PPC reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_PPC_NONE; + } + cache_ptr->howto = ppc_elf_howto_table[r_type]; /* Just because the above assert didn't trigger doesn't mean that ELF32_R_TYPE (dst->r_info) is necessarily a valid relocation. */ if (!cache_ptr->howto) { (*_bfd_error_handler) (_("%B: invalid relocation type %d"), - abfd, ELF32_R_TYPE (dst->r_info)); + abfd, r_type); bfd_set_error (bfd_error_bad_value); cache_ptr->howto = ppc_elf_howto_table[R_PPC_NONE]; @@ -2057,9 +2066,6 @@ return bfd_reloc_ok; } - if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) - return bfd_reloc_outofrange; - if (bfd_is_com_section (symbol->section)) relocation = 0; else @@ -2919,7 +2925,6 @@ } count = relplt->size / sizeof (Elf32_External_Rela); - stub_vma = glink_vma - (bfd_vma) count * 16; /* If the stubs are those for -shared/-pie then we might have multiple stubs for each plt entry. If that is the case then there is no way to associate stubs with their plt entries short @@ -2950,9 +2955,10 @@ if (s == NULL) return -1; + stub_vma = glink_vma; names = (char *) (s + count + 1 + (resolv_vma != 0)); - p = relplt->relocation; - for (i = 0; i < count; i++, p++) + p = relplt->relocation + count - 1; + for (i = 0; i < count; i++) { size_t len; @@ -2963,6 +2969,9 @@ s->flags |= BSF_GLOBAL; s->flags |= BSF_SYNTHETIC; s->section = glink; + stub_vma -= 16; + if (strcmp ((*p->sym_ptr_ptr)->name, "__tls_get_addr_opt") == 0) + stub_vma -= 32; s->value = stub_vma - glink->vma; s->name = names; s->udata.p = NULL; @@ -2979,7 +2988,7 @@ memcpy (names, "@plt", sizeof ("@plt")); names += sizeof ("@plt"); ++s; - stub_vma += 16; + --p; } /* Add a symbol at the start of the glink branch table. */ @@ -5087,6 +5096,9 @@ htab = ppc_elf_hash_table (info); htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", FALSE, FALSE, TRUE); + if (htab->plt_type != PLT_NEW) + htab->params->no_tls_get_addr_opt = TRUE; + if (!htab->params->no_tls_get_addr_opt) { struct elf_link_hash_entry *opt, *tga; @@ -5576,6 +5588,13 @@ if (!h->non_got_ref) return TRUE; + /* If -z nocopyreloc was given, we won't generate them either. */ + if (info->nocopyreloc) + { + h->non_got_ref = 0; + return TRUE; + } + /* If we didn't find any dynamic relocs in read-only sections, then we'll be keeping the dynamic relocs and avoiding the copy reloc. We can't do this if there are any small data relocations. This @@ -5592,6 +5611,16 @@ return TRUE; } + /* Protected variables do not work with .dynbss. The copy in + .dynbss won't be used by the shared library with the protected + definition for the variable. Text relocations are preferable + to an incorrect program. */ + if (h->protected_def) + { + h->non_got_ref = 0; + return TRUE; + } + /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be an entry for this symbol in the .dynsym section. The dynamic @@ -5628,7 +5657,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Generate a symbol to mark plt call stubs. For non-PIC code the sym is @@ -7754,8 +7783,8 @@ + R_PPC_GOT_TPREL16); else { - bfd_put_32 (output_bfd, NOP, contents + rel->r_offset); rel->r_offset -= d_offset; + bfd_put_32 (output_bfd, NOP, contents + rel->r_offset); r_type = R_PPC_NONE; } rel->r_info = ELF32_R_INFO (r_symndx, r_type); @@ -7788,12 +7817,16 @@ && branch_reloc_hash_match (input_bfd, rel + 1, htab->tls_get_addr)) offset = rel[1].r_offset; + /* We read the low GOT_TLS insn because we need to keep + the destination reg. It may be something other than + the usual r3, and moved to r3 before the call by + intervening code. */ + insn1 = bfd_get_32 (output_bfd, + contents + rel->r_offset - d_offset); if ((tls_mask & tls_gd) != 0) { /* IE */ - insn1 = bfd_get_32 (output_bfd, - contents + rel->r_offset - d_offset); - insn1 &= (1 << 26) - 1; + insn1 &= (0x1f << 21) | (0x1f << 16); insn1 |= 32 << 26; /* lwz */ if (offset != (bfd_vma) -1) { @@ -7808,7 +7841,8 @@ else { /* LE */ - insn1 = 0x3c620000; /* addis 3,2,0 */ + insn1 &= 0x1f << 21; + insn1 |= 0x3c020000; /* addis r,2,0 */ if (tls_gd == 0) { /* Was an LD reloc. */ @@ -8210,7 +8244,12 @@ { outrel.r_addend += relocation; if (tls_ty & (TLS_GD | TLS_DTPREL | TLS_TPREL)) - outrel.r_addend -= htab->elf.tls_sec->vma; + { + if (htab->elf.tls_sec == NULL) + outrel.r_addend = 0; + else + outrel.r_addend -= htab->elf.tls_sec->vma; + } } loc = rsec->contents; loc += (rsec->reloc_count++ @@ -8228,9 +8267,14 @@ value = 1; else if (tls_ty != 0) { - value -= htab->elf.tls_sec->vma + DTP_OFFSET; - if (tls_ty == (TLS_TLS | TLS_TPREL)) - value += DTP_OFFSET - TP_OFFSET; + if (htab->elf.tls_sec == NULL) + value = 0; + else + { + value -= htab->elf.tls_sec->vma + DTP_OFFSET; + if (tls_ty == (TLS_TLS | TLS_TPREL)) + value += DTP_OFFSET - TP_OFFSET; + } if (tls_ty == (TLS_TLS | TLS_GD)) { @@ -8316,7 +8360,8 @@ case R_PPC_DTPREL16_LO: case R_PPC_DTPREL16_HI: case R_PPC_DTPREL16_HA: - addend -= htab->elf.tls_sec->vma + DTP_OFFSET; + if (htab->elf.tls_sec != NULL) + addend -= htab->elf.tls_sec->vma + DTP_OFFSET; break; /* Relocations that may need to be propagated if this is a shared @@ -8340,18 +8385,21 @@ bfd_put_32 (output_bfd, insn, p); break; } - addend -= htab->elf.tls_sec->vma + TP_OFFSET; + if (htab->elf.tls_sec != NULL) + addend -= htab->elf.tls_sec->vma + TP_OFFSET; /* The TPREL16 relocs shouldn't really be used in shared libs as they will result in DT_TEXTREL being set, but support them anyway. */ goto dodyn; case R_PPC_TPREL32: - addend -= htab->elf.tls_sec->vma + TP_OFFSET; + if (htab->elf.tls_sec != NULL) + addend -= htab->elf.tls_sec->vma + TP_OFFSET; goto dodyn; case R_PPC_DTPREL32: - addend -= htab->elf.tls_sec->vma + DTP_OFFSET; + if (htab->elf.tls_sec != NULL) + addend -= htab->elf.tls_sec->vma + DTP_OFFSET; goto dodyn; case R_PPC_DTPMOD32: @@ -9199,30 +9247,20 @@ if (r == bfd_reloc_overflow) { overflow: - if (warned) - continue; - if (h != NULL - && h->root.type == bfd_link_hash_undefweak - && howto->pc_relative) - { - /* Assume this is a call protected by other code that - detect the symbol is undefined. If this is the case, - we can safely ignore the overflow. If not, the - program is hosed anyway, and a little warning isn't - going to help. */ - - continue; + /* On code like "if (foo) foo();" don't report overflow + on a branch to zero when foo is undefined. */ + if (!warned + && !(h != NULL + && (h->root.type == bfd_link_hash_undefweak + || h->root.type == bfd_link_hash_undefined) + && is_branch_reloc (r_type))) + { + if (!((*info->callbacks->reloc_overflow) + (info, (h ? &h->root : NULL), sym_name, + howto->name, rel->r_addend, + input_bfd, input_section, rel->r_offset))) + return FALSE; } - - if (! (*info->callbacks->reloc_overflow) (info, - (h ? &h->root : NULL), - sym_name, - howto->name, - rel->r_addend, - input_bfd, - input_section, - rel->r_offset)) - return FALSE; } else { @@ -9390,6 +9428,8 @@ && rel->r_offset >= offset && rel->r_offset < offset + 4) { + asection *sreloc; + /* If the insn we are patching had a reloc, adjust the reloc r_offset so that the reloc applies to the moved location. This matters for -r and --emit-relocs. */ @@ -9402,6 +9442,57 @@ relend[-1] = tmp; } relend[-1].r_offset += patch_off - offset; + + /* Adjust REL16 addends too. */ + switch (ELF32_R_TYPE (relend[-1].r_info)) + { + case R_PPC_REL16: + case R_PPC_REL16_LO: + case R_PPC_REL16_HI: + case R_PPC_REL16_HA: + relend[-1].r_addend += patch_off - offset; + break; + default: + break; + } + + /* If we are building a PIE or shared library with + non-PIC objects, perhaps we had a dynamic reloc too? + If so, the dynamic reloc must move with the insn. */ + sreloc = elf_section_data (input_section)->sreloc; + if (sreloc != NULL) + { + Elf32_External_Rela *slo, *shi, *srelend; + bfd_vma soffset; + + slo = (Elf32_External_Rela *) sreloc->contents; + shi = srelend = slo + sreloc->reloc_count; + soffset = (offset + input_section->output_section->vma + + input_section->output_offset); + while (slo < shi) + { + Elf32_External_Rela *srel = slo + (shi - slo) / 2; + bfd_elf32_swap_reloca_in (output_bfd, (bfd_byte *) srel, + &outrel); + if (outrel.r_offset < soffset) + slo = srel + 1; + else if (outrel.r_offset > soffset + 3) + shi = srel; + else + { + if (srel + 1 != srelend) + { + memmove (srel, srel + 1, + (srelend - (srel + 1)) * sizeof (*srel)); + srel = srelend - 1; + } + outrel.r_offset += patch_off - offset; + bfd_elf32_swap_reloca_out (output_bfd, &outrel, + (bfd_byte *) srel); + break; + } + } + } } else rel = NULL; @@ -10327,11 +10418,12 @@ #define ELF_MACHINE_CODE EM_PPC #ifdef __QNXTARGET__ #define ELF_MAXPAGESIZE 0x1000 +#define ELF_COMMONPAGESIZE 0x1000 #else #define ELF_MAXPAGESIZE 0x10000 +#define ELF_COMMONPAGESIZE 0x10000 #endif #define ELF_MINPAGESIZE 0x1000 -#define ELF_COMMONPAGESIZE 0x1000 #define elf_info_to_howto ppc_elf_info_to_howto #ifdef EM_CYGNUS_POWERPC diff -ruN binutils-2.25/bfd/elf32-rl78.c binutils-2.25.1/bfd/elf32-rl78.c --- binutils-2.25/bfd/elf32-rl78.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-rl78.c 2015-07-21 10:20:58.000000000 +0200 @@ -37,7 +37,7 @@ static reloc_howto_type rl78_elf_howto_table [] = { - RL78REL (NONE, 0, 0, 0, dont, FALSE), + RL78REL (NONE, 3, 0, 0, dont, FALSE), RL78REL (DIR32, 2, 32, 0, signed, FALSE), RL78REL (DIR24S, 2, 24, 0, signed, FALSE), RL78REL (DIR16, 1, 16, 0, dont, FALSE), @@ -246,7 +246,7 @@ if (code == BFD_RELOC_RL78_32_OP) return rl78_elf_howto_table + R_RL78_DIR32; - for (i = ARRAY_SIZE (rl78_reloc_map); --i;) + for (i = ARRAY_SIZE (rl78_reloc_map); i--;) if (rl78_reloc_map [i].bfd_reloc_val == code) return rl78_elf_howto_table + rl78_reloc_map[i].rl78_reloc_val; @@ -276,7 +276,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_RL78_max); + if (r_type >= (unsigned int) R_RL78_max) + { + _bfd_error_handler (_("%B: invalid RL78 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = rl78_elf_howto_table + r_type; } diff -ruN binutils-2.25/bfd/elf32-rx.c binutils-2.25.1/bfd/elf32-rx.c --- binutils-2.25/bfd/elf32-rx.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-rx.c 2015-07-21 10:20:58.000000000 +0200 @@ -49,7 +49,7 @@ static reloc_howto_type rx_elf_howto_table [] = { - RXREL (NONE, 0, 0, 0, dont, FALSE), + RXREL (NONE, 3, 0, 0, dont, FALSE), RXREL (DIR32, 2, 32, 0, signed, FALSE), RXREL (DIR24S, 2, 24, 0, signed, FALSE), RXREL (DIR16, 1, 16, 0, dont, FALSE), @@ -277,7 +277,7 @@ if (code == BFD_RELOC_RX_32_OP) return rx_elf_howto_table + R_RX_DIR32; - for (i = ARRAY_SIZE (rx_reloc_map); --i;) + for (i = ARRAY_SIZE (rx_reloc_map); i--;) if (rx_reloc_map [i].bfd_reloc_val == code) return rx_elf_howto_table + rx_reloc_map[i].rx_reloc_val; @@ -307,7 +307,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_RX_max); + if (r_type >= (unsigned int) R_RX_max) + { + _bfd_error_handler (_("%B: invalid RX reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = rx_elf_howto_table + r_type; } diff -ruN binutils-2.25/bfd/elf32-s390.c binutils-2.25.1/bfd/elf32-s390.c --- binutils-2.25/bfd/elf32-s390.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-s390.c 2015-07-21 10:20:58.000000000 +0200 @@ -39,7 +39,7 @@ { HOWTO (R_390_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = 2 byte, 2 = 4 byte) */ + 3, /* size (0 = byte, 1 = 2 byte, 2 = 4 byte) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -1762,7 +1762,7 @@ s = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for @@ -4028,6 +4028,7 @@ #define elf_backend_grok_prstatus elf_s390_grok_prstatus #define elf_backend_plt_sym_val elf_s390_plt_sym_val #define elf_backend_add_symbol_hook elf_s390_add_symbol_hook +#define elf_backend_sort_relocs_p elf_s390_elf_sort_relocs_p #define bfd_elf32_mkobject elf_s390_mkobject #define elf_backend_object_p elf_s390_object_p diff -ruN binutils-2.25/bfd/elf32-score.c binutils-2.25.1/bfd/elf32-score.c --- binutils-2.25/bfd/elf32-score.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-score.c 2015-07-21 10:20:58.000000000 +0200 @@ -645,7 +645,7 @@ /* No relocation. */ HOWTO (R_SCORE_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ diff -ruN binutils-2.25/bfd/elf32-score7.c binutils-2.25.1/bfd/elf32-score7.c --- binutils-2.25/bfd/elf32-score7.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-score7.c 2015-07-21 10:20:58.000000000 +0200 @@ -546,7 +546,7 @@ /* No relocation. */ HOWTO (R_SCORE_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ diff -ruN binutils-2.25/bfd/elf32-sh-relocs.h binutils-2.25.1/bfd/elf32-sh-relocs.h --- binutils-2.25/bfd/elf32-sh-relocs.h 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-sh-relocs.h 2015-07-21 10:20:58.000000000 +0200 @@ -20,7 +20,7 @@ /* No relocation. */ HOWTO (R_SH_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ diff -ruN binutils-2.25/bfd/elf32-sh.c binutils-2.25.1/bfd/elf32-sh.c --- binutils-2.25/bfd/elf32-sh.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-sh.c 2015-07-21 10:20:58.000000000 +0200 @@ -255,6 +255,11 @@ && bfd_is_und_section (symbol_in->section)) return bfd_reloc_undefined; + /* PR 17512: file: 9891ca98. */ + if (addr * bfd_octets_per_byte (abfd) + bfd_get_reloc_size (reloc_entry->howto) + > bfd_get_section_limit_octets (abfd, input_section)) + return bfd_reloc_outofrange; + if (bfd_is_com_section (symbol_in->section)) sym_value = 0; else @@ -474,13 +479,19 @@ r = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r < (unsigned int) R_SH_max); - BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC || r > R_SH_LAST_INVALID_RELOC); - BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_2 || r > R_SH_LAST_INVALID_RELOC_2); - BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_3 || r > R_SH_LAST_INVALID_RELOC_3); - BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_4 || r > R_SH_LAST_INVALID_RELOC_4); - BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_5 || r > R_SH_LAST_INVALID_RELOC_5); - BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_6 || r > R_SH_LAST_INVALID_RELOC_6); + if (r >= R_SH_max + || (r >= R_SH_FIRST_INVALID_RELOC && r <= R_SH_LAST_INVALID_RELOC) + || (r >= R_SH_FIRST_INVALID_RELOC_2 && r <= R_SH_LAST_INVALID_RELOC_2) + || (r >= R_SH_FIRST_INVALID_RELOC_3 && r <= R_SH_LAST_INVALID_RELOC_3) + || (r >= R_SH_FIRST_INVALID_RELOC_4 && r <= R_SH_LAST_INVALID_RELOC_4) + || (r >= R_SH_FIRST_INVALID_RELOC_5 && r <= R_SH_LAST_INVALID_RELOC_5) + || (r >= R_SH_FIRST_INVALID_RELOC_6 && r <= R_SH_LAST_INVALID_RELOC_6)) + { + (*_bfd_error_handler) (_("%B: unrecognised SH reloc number: %d"), + abfd, r); + bfd_set_error (bfd_error_bad_value); + r = R_SH_NONE; + } cache_ptr->howto = get_howto_table (abfd) + r; } @@ -2919,7 +2930,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for diff -ruN binutils-2.25/bfd/elf32-spu.c binutils-2.25.1/bfd/elf32-spu.c --- binutils-2.25/bfd/elf32-spu.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-spu.c 2015-07-21 10:20:58.000000000 +0200 @@ -37,7 +37,7 @@ array, so it must be declared in the order of that type. */ static reloc_howto_type elf_howto_table[] = { - HOWTO (R_SPU_NONE, 0, 0, 0, FALSE, 0, complain_overflow_dont, + HOWTO (R_SPU_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_NONE", FALSE, 0, 0x00000000, FALSE), HOWTO (R_SPU_ADDR10, 4, 2, 10, FALSE, 14, complain_overflow_bitfield, @@ -105,6 +105,8 @@ switch (code) { default: + return (enum elf_spu_reloc_type) -1; + case BFD_RELOC_NONE: return R_SPU_NONE; case BFD_RELOC_SPU_IMM10W: return R_SPU_ADDR10; @@ -151,7 +153,14 @@ enum elf_spu_reloc_type r_type; r_type = (enum elf_spu_reloc_type) ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < R_SPU_max); + /* PR 17512: file: 90c2a92e. */ + if (r_type >= R_SPU_max) + { + (*_bfd_error_handler) (_("%B: unrecognised SPU reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_SPU_NONE; + } cache_ptr->howto = &elf_howto_table[(int) r_type]; } @@ -161,7 +170,7 @@ { enum elf_spu_reloc_type r_type = spu_elf_bfd_to_reloc_type (code); - if (r_type == R_SPU_NONE) + if (r_type == (enum elf_spu_reloc_type) -1) return NULL; return elf_howto_table + r_type; diff -ruN binutils-2.25/bfd/elf32-tic6x.c binutils-2.25.1/bfd/elf32-tic6x.c --- binutils-2.25/bfd/elf32-tic6x.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-tic6x.c 2015-07-21 10:20:58.000000000 +0200 @@ -152,7 +152,7 @@ { HOWTO (R_C6000_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -820,7 +820,7 @@ { HOWTO (R_C6000_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -2168,7 +2168,7 @@ s = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } static bfd_boolean diff -ruN binutils-2.25/bfd/elf32-tilepro.c binutils-2.25.1/bfd/elf32-tilepro.c --- binutils-2.25/bfd/elf32-tilepro.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-tilepro.c 2015-07-21 10:20:58.000000000 +0200 @@ -34,11 +34,11 @@ /* This reloc does nothing. */ HOWTO (R_TILEPRO_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_NONE", /* name */ FALSE, /* partial_inplace */ @@ -2189,7 +2189,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, htab->sdynbss); + return _bfd_elf_adjust_dynamic_copy (info, h, htab->sdynbss); } /* Allocate space in .plt, .got and associated reloc sections for diff -ruN binutils-2.25/bfd/elf32-v850.c binutils-2.25.1/bfd/elf32-v850.c --- binutils-2.25/bfd/elf32-v850.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-v850.c 2015-07-21 10:20:58.000000000 +0200 @@ -494,7 +494,7 @@ { default: #ifdef DEBUG - fprintf (stderr, "reloc number %d not recognised\n", r_type); + fprintf (stderr, "%B: reloc number %d not recognised\n", abfd, r_type); #endif return bfd_reloc_notsupported; @@ -895,11 +895,11 @@ /* This reloc does nothing. */ HOWTO (R_V850_NONE, /* Type. */ 0, /* Rightshift. */ - 2, /* Size (0 = byte, 1 = short, 2 = long). */ - 32, /* Bitsize. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ FALSE, /* PC_relative. */ 0, /* Bitpos. */ - complain_overflow_bitfield, /* Complain_on_overflow. */ + complain_overflow_dont, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_V850_NONE", /* Name. */ FALSE, /* Partial_inplace. */ @@ -1896,7 +1896,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_V850_max); + if (r_type >= (unsigned int) R_V850_max) + { + _bfd_error_handler (_("%B: invalid V850 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &v850_elf_howto_table[r_type]; } @@ -1910,7 +1914,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_V850_max); + if (r_type >= (unsigned int) R_V850_max) + { + _bfd_error_handler (_("%B: invalid V850 reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &v850_elf_howto_table[r_type]; } @@ -2139,7 +2147,7 @@ default: #ifdef DEBUG - fprintf (stderr, "reloc number %d not recognised\n", r_type); + fprintf (stderr, "%B: reloc number %d not recognised\n", input_bfd, r_type); #endif return bfd_reloc_notsupported; } diff -ruN binutils-2.25/bfd/elf32-vax.c binutils-2.25.1/bfd/elf32-vax.c --- binutils-2.25/bfd/elf32-vax.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-vax.c 2015-07-21 10:20:58.000000000 +0200 @@ -56,7 +56,7 @@ static reloc_howto_type howto_table[] = { HOWTO (R_VAX_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -280,11 +280,19 @@ }; static void -rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, - Elf_Internal_Rela *dst) +rtype_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { - BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_VAX_max); - cache_ptr->howto = &howto_table[ELF32_R_TYPE(dst->r_info)]; + unsigned int r_type; + + r_type = ELF32_R_TYPE (dst->r_info); + if (r_type >= R_VAX_max) + { + (*_bfd_error_handler) (_("%B: unrecognised VAX reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_VAX_NONE; + } + cache_ptr->howto = &howto_table[r_type]; } #define elf_info_to_howto rtype_to_howto @@ -1043,7 +1051,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* This function is called via elf_link_hash_traverse. It resets GOT diff -ruN binutils-2.25/bfd/elf32-xc16x.c binutils-2.25.1/bfd/elf32-xc16x.c --- binutils-2.25/bfd/elf32-xc16x.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-xc16x.c 2015-07-21 10:20:58.000000000 +0200 @@ -32,11 +32,11 @@ /* This reloc does nothing. */ HOWTO (R_XC16X_NONE, /* type */ 0, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_NONE", /* name */ FALSE, /* partial_inplace */ diff -ruN binutils-2.25/bfd/elf32-xgate.c binutils-2.25.1/bfd/elf32-xgate.c --- binutils-2.25/bfd/elf32-xgate.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-xgate.c 2015-07-21 10:20:58.000000000 +0200 @@ -52,8 +52,8 @@ /* This reloc does nothing. */ HOWTO (R_XGATE_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ @@ -422,7 +422,11 @@ unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT(r_type < (unsigned int) R_XGATE_max); + if (r_type >= (unsigned int) R_XGATE_max) + { + _bfd_error_handler (_("%B: invalid XGate reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_xgate_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf32-xstormy16.c binutils-2.25.1/bfd/elf32-xstormy16.c --- binutils-2.25/bfd/elf32-xstormy16.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-xstormy16.c 2015-07-21 10:20:58.000000000 +0200 @@ -73,11 +73,11 @@ /* This reloc does nothing. */ HOWTO (R_XSTORMY16_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_NONE", /* name */ FALSE, /* partial_inplace */ diff -ruN binutils-2.25/bfd/elf32-xtensa.c binutils-2.25.1/bfd/elf32-xtensa.c --- binutils-2.25/bfd/elf32-xtensa.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf32-xtensa.c 2015-07-21 10:20:58.000000000 +0200 @@ -161,7 +161,7 @@ static reloc_howto_type elf_howto_table[] = { - HOWTO (R_XTENSA_NONE, 0, 0, 0, FALSE, 0, complain_overflow_dont, + HOWTO (R_XTENSA_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_NONE", FALSE, 0, 0, FALSE), HOWTO (R_XTENSA_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, @@ -479,7 +479,11 @@ { unsigned int r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_XTENSA_max); + if (r_type >= (unsigned int) R_XTENSA_max) + { + _bfd_error_handler (_("%B: invalid XTENSA reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf64-alpha.c binutils-2.25.1/bfd/elf64-alpha.c --- binutils-2.25/bfd/elf64-alpha.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/elf64-alpha.c 2015-07-21 10:20:58.000000000 +0200 @@ -486,8 +486,8 @@ { HOWTO (R_ALPHA_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 8, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ TRUE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -1105,7 +1105,14 @@ Elf_Internal_Rela *dst) { unsigned r_type = ELF64_R_TYPE(dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_ALPHA_max); + + if (r_type >= R_ALPHA_max) + { + (*_bfd_error_handler) (_("%B: unrecognised Alpha reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_ALPHA_NONE; + } cache_ptr->howto = &elf64_alpha_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf64-mips.c binutils-2.25.1/bfd/elf64-mips.c --- binutils-2.25/bfd/elf64-mips.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf64-mips.c 2015-07-21 10:20:58.000000000 +0200 @@ -145,7 +145,7 @@ /* No relocation. */ HOWTO (R_MIPS_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -908,7 +908,7 @@ /* No relocation. */ HOWTO (R_MIPS_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -4444,6 +4444,7 @@ #define elf_backend_sign_extend_vma TRUE #define elf_backend_write_section _bfd_mips_elf_write_section +#define elf_backend_sort_relocs_p _bfd_mips_elf_sort_relocs_p /* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit MIPS-specific function only applies to IRIX5, which had no 64-bit diff -ruN binutils-2.25/bfd/elf64-mmix.c binutils-2.25.1/bfd/elf64-mmix.c --- binutils-2.25/bfd/elf64-mmix.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf64-mmix.c 2015-07-21 10:20:58.000000000 +0200 @@ -192,11 +192,11 @@ /* This reloc does nothing. */ HOWTO (R_MMIX_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_NONE", /* name */ FALSE, /* partial_inplace */ @@ -1259,7 +1259,11 @@ unsigned int r_type; r_type = ELF64_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_MMIX_max); + if (r_type >= (unsigned int) R_MMIX_max) + { + _bfd_error_handler (_("%B: invalid MMIX reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_mmix_howto_table[r_type]; } diff -ruN binutils-2.25/bfd/elf64-ppc.c binutils-2.25.1/bfd/elf64-ppc.c --- binutils-2.25/bfd/elf64-ppc.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elf64-ppc.c 2015-07-21 10:20:58.000000000 +0200 @@ -64,7 +64,7 @@ #define ELF_TARGET_ID PPC64_ELF_DATA #define ELF_MACHINE_CODE EM_PPC64 #define ELF_MAXPAGESIZE 0x10000 -#define ELF_COMMONPAGESIZE 0x1000 +#define ELF_COMMONPAGESIZE 0x10000 #define elf_info_to_howto ppc64_elf_info_to_howto #define elf_backend_want_got_sym 0 @@ -138,6 +138,8 @@ /* TOC base pointers offset from start of TOC. */ #define TOC_BASE_OFF 0x8000 +/* TOC base alignment. */ +#define TOC_BASE_ALIGN 256 /* Offset of tp and dtp pointers from start of TLS block. */ #define TP_OFFSET 0x7000 @@ -258,8 +260,8 @@ /* This reloc does nothing. */ HOWTO (R_PPC64_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -2954,7 +2956,9 @@ union { - /* An array with one entry for each opd function descriptor. */ + /* An array with one entry for each opd function descriptor, + and some spares since opd entries may be either 16 or 24 bytes. */ +#define OPD_NDX(OFF) ((OFF) >> 4) struct _opd_sec_data { /* Points to the function code section for local opd entries. */ @@ -3287,6 +3291,8 @@ } } + if (size == 0) + goto done; s = *ret = bfd_malloc (size); if (s == NULL) { @@ -3458,6 +3464,8 @@ } } + if (size == 0) + goto free_contents_and_exit; s = *ret = bfd_malloc (size); if (s == NULL) goto free_contents_and_exit; @@ -5005,7 +5013,7 @@ bfd_size_type amt; asection **opd_sym_map; - amt = opd->size * sizeof (*opd_sym_map) / 8; + amt = OPD_NDX (opd->size) * sizeof (*opd_sym_map); opd_sym_map = bfd_zalloc (ibfd, amt); if (opd_sym_map == NULL) return FALSE; @@ -5676,7 +5684,7 @@ s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s != NULL && s != sec) - opd_sym_map[rel->r_offset / 8] = s; + opd_sym_map[OPD_NDX (rel->r_offset)] = s; } } /* Fall through. */ @@ -5941,6 +5949,10 @@ ppc64_elf_tdata (opd_bfd)->opd.contents = contents; } + /* PR 17512: file: 64b9dfbb. */ + if (offset + 7 >= opd_sec->size || offset + 7 < offset) + return (bfd_vma) -1; + val = bfd_get_64 (opd_bfd, contents + offset); if (code_sec != NULL) { @@ -5976,10 +5988,12 @@ relocs = ppc64_elf_tdata (opd_bfd)->opd.relocs; if (relocs == NULL) relocs = _bfd_elf_link_read_relocs (opd_bfd, opd_sec, NULL, NULL, TRUE); + /* PR 17512: file: df8e1fd6. */ + if (relocs == NULL) + return (bfd_vma) -1; /* Go find the opd reloc at the sym address. */ lo = relocs; - BFD_ASSERT (lo != NULL); hi = lo + opd_sec->reloc_count - 1; /* ignore last reloc */ val = (bfd_vma) -1; while (lo < hi) @@ -6230,7 +6244,7 @@ if ((eh->elf.root.type == bfd_link_hash_defined || eh->elf.root.type == bfd_link_hash_defweak) && (eh->elf.ref_dynamic - || (eh->elf.def_regular + || ((eh->elf.def_regular || ELF_COMMON_DEF_P (&eh->elf)) && ELF_ST_VISIBILITY (eh->elf.other) != STV_INTERNAL && ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN && (!info->executable @@ -6343,7 +6357,7 @@ { rsec->gc_mark = 1; - rsec = opd->func_sec[(sym->st_value + rel->r_addend) / 8]; + rsec = opd->func_sec[OPD_NDX (sym->st_value + rel->r_addend)]; } } @@ -7073,6 +7087,13 @@ if (!h->def_dynamic || !h->ref_regular || h->def_regular) return TRUE; + /* If -z nocopyreloc was given, don't generate them either. */ + if (info->nocopyreloc) + { + h->non_got_ref = 0; + return TRUE; + } + /* If we didn't find any dynamic relocs in read-only sections, then we'll be keeping the dynamic relocs and avoiding the copy reloc. */ if (ELIMINATE_COPY_RELOCS && !readonly_dynrelocs (h)) @@ -7081,6 +7102,16 @@ return TRUE; } + /* Protected variables do not work with .dynbss. The copy in + .dynbss won't be used by the shared library with the protected + definition for the variable. Text relocations are preferable + to an incorrect program. */ + if (h->protected_def) + { + h->non_got_ref = 0; + return TRUE; + } + if (h->plt.plist != NULL) { /* We should never get here, but unfortunately there are versions @@ -7119,7 +7150,7 @@ s = htab->dynbss; - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* If given a function descriptor symbol, hide both the function code @@ -7404,7 +7435,7 @@ opd = get_opd_info (sym_sec); if (opd != NULL && opd->adjust != NULL) { - long adjust = opd->adjust[eh->elf.root.u.def.value / 8]; + long adjust = opd->adjust[OPD_NDX (eh->elf.root.u.def.value)]; if (adjust == -1) { /* This entry has been deleted. */ @@ -7611,9 +7642,8 @@ Elf_Internal_Rela *relstart, *rel, *relend; Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Sym *local_syms; - bfd_vma offset; struct _opd_sec_data *opd; - bfd_boolean need_edit, add_aux_fields; + bfd_boolean need_edit, add_aux_fields, broken; bfd_size_type cnt_16b = 0; if (!is_ppc64_elf (ibfd)) @@ -7645,8 +7675,8 @@ /* First run through the relocs to check they are sane, and to determine whether we need to edit this opd section. */ need_edit = FALSE; + broken = FALSE; need_pad = sec; - offset = 0; relend = relstart + sec->reloc_count; for (rel = relstart; rel < relend; ) { @@ -7655,13 +7685,14 @@ asection *sym_sec; struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; + bfd_vma offset; - /* .opd contains a regular array of 16 or 24 byte entries. We're + /* .opd contains an array of 16 or 24 byte entries. We're only interested in the reloc pointing to a function entry point. */ - if (rel->r_offset != offset - || rel + 1 >= relend - || (rel + 1)->r_offset != offset + 8) + offset = rel->r_offset; + if (rel + 1 == relend + || rel[1].r_offset != offset + 8) { /* If someone messes with .opd alignment then after a "ld -r" we might have padding in the middle of .opd. @@ -7671,7 +7702,7 @@ broken_opd: (*_bfd_error_handler) (_("%B: .opd is not a regular array of opd entries"), ibfd); - need_edit = FALSE; + broken = TRUE; break; } @@ -7681,7 +7712,7 @@ (*_bfd_error_handler) (_("%B: unexpected reloc type %u in .opd section"), ibfd, r_type); - need_edit = FALSE; + broken = TRUE; break; } @@ -7702,7 +7733,7 @@ (*_bfd_error_handler) (_("%B: undefined sym `%s' in .opd section"), ibfd, sym_name); - need_edit = FALSE; + broken = TRUE; break; } @@ -7718,39 +7749,33 @@ need_edit = TRUE; rel += 2; - if (rel == relend - || (rel + 1 == relend && rel->r_offset == offset + 16)) + if (rel + 1 == relend + || (rel + 2 < relend + && ELF64_R_TYPE (rel[2].r_info) == R_PPC64_TOC)) + ++rel; + + if (rel == relend) { if (sec->size == offset + 24) { need_pad = NULL; break; } - if (rel == relend && sec->size == offset + 16) + if (sec->size == offset + 16) { cnt_16b++; break; } goto broken_opd; } - - if (rel->r_offset == offset + 24) - offset += 24; - else if (rel->r_offset != offset + 16) - goto broken_opd; else if (rel + 1 < relend && ELF64_R_TYPE (rel[0].r_info) == R_PPC64_ADDR64 && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_TOC) { - offset += 16; - cnt_16b++; - } - else if (rel + 2 < relend - && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_ADDR64 - && ELF64_R_TYPE (rel[2].r_info) == R_PPC64_TOC) - { - offset += 24; - rel += 1; + if (rel[0].r_offset == offset + 16) + cnt_16b++; + else if (rel[0].r_offset != offset + 24) + goto broken_opd; } else goto broken_opd; @@ -7758,18 +7783,16 @@ add_aux_fields = htab->params->non_overlapping_opd && cnt_16b > 0; - if (need_edit || add_aux_fields) + if (!broken && (need_edit || add_aux_fields)) { Elf_Internal_Rela *write_rel; Elf_Internal_Shdr *rel_hdr; bfd_byte *rptr, *wptr; bfd_byte *new_contents; - bfd_boolean skip; - long opd_ent_size; bfd_size_type amt; new_contents = NULL; - amt = sec->size * sizeof (long) / 8; + amt = OPD_NDX (sec->size) * sizeof (long); opd = &ppc64_elf_section_data (sec)->u.opd; opd->adjust = bfd_zalloc (sec->owner, amt); if (opd->adjust == NULL) @@ -7807,123 +7830,134 @@ new_contents = bfd_malloc (sec->size + cnt_16b * 8); if (new_contents == NULL) return FALSE; - need_pad = FALSE; + need_pad = NULL; } wptr = new_contents; rptr = sec->contents; - write_rel = relstart; - skip = FALSE; - offset = 0; - opd_ent_size = 0; - for (rel = relstart; rel < relend; rel++) + for (rel = relstart; rel < relend; ) { unsigned long r_symndx; asection *sym_sec; struct elf_link_hash_entry *h; + struct ppc_link_hash_entry *fdh = NULL; Elf_Internal_Sym *sym; + long opd_ent_size; + Elf_Internal_Rela *next_rel; + bfd_boolean skip; r_symndx = ELF64_R_SYM (rel->r_info); if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms, r_symndx, ibfd)) goto error_ret; - if (rel->r_offset == offset) + next_rel = rel + 2; + if (next_rel + 1 == relend + || (next_rel + 2 < relend + && ELF64_R_TYPE (next_rel[2].r_info) == R_PPC64_TOC)) + ++next_rel; + + /* See if the .opd entry is full 24 byte or + 16 byte (with fd_aux entry overlapped with next + fd_func). */ + opd_ent_size = 24; + if (next_rel == relend) { - struct ppc_link_hash_entry *fdh = NULL; - - /* See if the .opd entry is full 24 byte or - 16 byte (with fd_aux entry overlapped with next - fd_func). */ - opd_ent_size = 24; - if ((rel + 2 == relend && sec->size == offset + 16) - || (rel + 3 < relend - && rel[2].r_offset == offset + 16 - && rel[3].r_offset == offset + 24 - && ELF64_R_TYPE (rel[2].r_info) == R_PPC64_ADDR64 - && ELF64_R_TYPE (rel[3].r_info) == R_PPC64_TOC)) + if (sec->size == rel->r_offset + 16) opd_ent_size = 16; + } + else if (next_rel->r_offset == rel->r_offset + 16) + opd_ent_size = 16; - if (h != NULL - && h->root.root.string[0] == '.') - { - fdh = lookup_fdh ((struct ppc_link_hash_entry *) h, htab); - if (fdh != NULL - && fdh->elf.root.type != bfd_link_hash_defined - && fdh->elf.root.type != bfd_link_hash_defweak) - fdh = NULL; - } + if (h != NULL + && h->root.root.string[0] == '.') + { + fdh = lookup_fdh ((struct ppc_link_hash_entry *) h, htab); + if (fdh != NULL + && fdh->elf.root.type != bfd_link_hash_defined + && fdh->elf.root.type != bfd_link_hash_defweak) + fdh = NULL; + } - skip = (sym_sec->owner != ibfd - || sym_sec->output_section == bfd_abs_section_ptr); - if (skip) + skip = (sym_sec->owner != ibfd + || sym_sec->output_section == bfd_abs_section_ptr); + if (skip) + { + if (fdh != NULL && sym_sec->owner == ibfd) { - if (fdh != NULL && sym_sec->owner == ibfd) - { - /* Arrange for the function descriptor sym - to be dropped. */ - fdh->elf.root.u.def.value = 0; - fdh->elf.root.u.def.section = sym_sec; - } - opd->adjust[rel->r_offset / 8] = -1; + /* Arrange for the function descriptor sym + to be dropped. */ + fdh->elf.root.u.def.value = 0; + fdh->elf.root.u.def.section = sym_sec; } - else - { - /* We'll be keeping this opd entry. */ + opd->adjust[OPD_NDX (rel->r_offset)] = -1; - if (fdh != NULL) - { - /* Redefine the function descriptor symbol to - this location in the opd section. It is - necessary to update the value here rather - than using an array of adjustments as we do - for local symbols, because various places - in the generic ELF code use the value - stored in u.def.value. */ - fdh->elf.root.u.def.value = wptr - new_contents; - fdh->adjust_done = 1; - } + if (NO_OPD_RELOCS || info->relocatable) + rel = next_rel; + else + while (1) + { + if (!dec_dynrel_count (rel->r_info, sec, info, + NULL, h, sym)) + goto error_ret; - /* Local syms are a bit tricky. We could - tweak them as they can be cached, but - we'd need to look through the local syms - for the function descriptor sym which we - don't have at the moment. So keep an - array of adjustments. */ - opd->adjust[rel->r_offset / 8] - = (wptr - new_contents) - (rptr - sec->contents); - - if (wptr != rptr) - memcpy (wptr, rptr, opd_ent_size); - wptr += opd_ent_size; - if (add_aux_fields && opd_ent_size == 16) - { - memset (wptr, '\0', 8); - wptr += 8; - } - } - rptr += opd_ent_size; - offset += opd_ent_size; - } + if (++rel == next_rel) + break; - if (skip) - { - if (!NO_OPD_RELOCS - && !info->relocatable - && !dec_dynrel_count (rel->r_info, sec, info, - NULL, h, sym)) - goto error_ret; + r_symndx = ELF64_R_SYM (rel->r_info); + if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms, + r_symndx, ibfd)) + goto error_ret; + } } else { + /* We'll be keeping this opd entry. */ + long adjust; + + if (fdh != NULL) + { + /* Redefine the function descriptor symbol to + this location in the opd section. It is + necessary to update the value here rather + than using an array of adjustments as we do + for local symbols, because various places + in the generic ELF code use the value + stored in u.def.value. */ + fdh->elf.root.u.def.value = wptr - new_contents; + fdh->adjust_done = 1; + } + + /* Local syms are a bit tricky. We could + tweak them as they can be cached, but + we'd need to look through the local syms + for the function descriptor sym which we + don't have at the moment. So keep an + array of adjustments. */ + adjust = (wptr - new_contents) - (rptr - sec->contents); + opd->adjust[OPD_NDX (rel->r_offset)] = adjust; + + if (wptr != rptr) + memcpy (wptr, rptr, opd_ent_size); + wptr += opd_ent_size; + if (add_aux_fields && opd_ent_size == 16) + { + memset (wptr, '\0', 8); + wptr += 8; + } + /* We need to adjust any reloc offsets to point to the - new opd entries. While we're at it, we may as well - remove redundant relocs. */ - rel->r_offset += opd->adjust[(offset - opd_ent_size) / 8]; - if (write_rel != rel) - memcpy (write_rel, rel, sizeof (*rel)); - ++write_rel; + new opd entries. */ + for ( ; rel != next_rel; ++rel) + { + rel->r_offset += adjust; + if (write_rel != rel) + memcpy (write_rel, rel, sizeof (*rel)); + ++write_rel; + } } + + rptr += opd_ent_size; } sec->size = wptr - new_contents; @@ -10184,7 +10218,10 @@ size += 4; if (htab->params->plt_static_chain) size += 4; - if (htab->params->plt_thread_safe) + if (htab->params->plt_thread_safe + && htab->elf.dynamic_sections_created + && stub_entry->h != NULL + && stub_entry->h->elf.dynindx != -1) size += 8; if (PPC_HA (off + 8 + 8 * htab->params->plt_static_chain) != PPC_HA (off)) size += 4; @@ -10224,16 +10261,18 @@ bfd *obfd = htab->params->stub_bfd; bfd_boolean plt_load_toc = htab->opd_abi; bfd_boolean plt_static_chain = htab->params->plt_static_chain; - bfd_boolean plt_thread_safe = htab->params->plt_thread_safe; + bfd_boolean plt_thread_safe = (htab->params->plt_thread_safe + && htab->elf.dynamic_sections_created + && stub_entry->h != NULL + && stub_entry->h->elf.dynindx != -1); bfd_boolean use_fake_dep = plt_thread_safe; bfd_vma cmp_branch_off = 0; if (!ALWAYS_USE_FAKE_DEP && plt_load_toc && plt_thread_safe - && !(stub_entry->h != NULL - && (stub_entry->h == htab->tls_get_addr_fd - || stub_entry->h == htab->tls_get_addr) + && !((stub_entry->h == htab->tls_get_addr_fd + || stub_entry->h == htab->tls_get_addr) && !htab->params->no_tls_get_addr_opt)) { bfd_vma pltoff = stub_entry->plt_ent->plt.offset & ~1; @@ -10426,8 +10465,8 @@ p = build_plt_stub (htab, stub_entry, p, offset, r); bfd_put_32 (obfd, BCTRL, p - 4); - bfd_put_32 (obfd, LD_R11_0R1 + STK_LINKER (htab), p), p += 4; bfd_put_32 (obfd, LD_R2_0R1 + STK_TOC (htab), p), p += 4; + bfd_put_32 (obfd, LD_R11_0R1 + STK_LINKER (htab), p), p += 4; bfd_put_32 (obfd, MTLR_R11, p), p += 4; bfd_put_32 (obfd, BLR, p), p += 4; @@ -11209,6 +11248,7 @@ addr = (htab->toc_first_sec->output_offset + htab->toc_first_sec->output_section->vma); htab->toc_curr = addr; + htab->toc_curr &= -TOC_BASE_ALIGN; } /* toc_curr is the base address of this toc group. Set elf_gp @@ -11589,7 +11629,7 @@ { long adjust; - adjust = opd->adjust[sym->st_value / 8]; + adjust = opd->adjust[OPD_NDX (sym_value)]; if (adjust == -1) /* Assume deleted functions won't ever be called. */ continue; @@ -12165,7 +12205,7 @@ if (hash == NULL && opd->adjust != NULL) { - long adjust = opd->adjust[sym_value / 8]; + long adjust = opd->adjust[OPD_NDX (sym_value)]; if (adjust == -1) continue; code_value += adjust; @@ -12487,7 +12527,7 @@ ppc64_elf_set_toc (struct bfd_link_info *info, bfd *obfd) { asection *s; - bfd_vma TOCstart; + bfd_vma TOCstart, adjust; /* The TOC consists of sections .got, .toc, .tocbss, .plt in that order. The TOC starts where the first of these sections starts. */ @@ -12535,6 +12575,9 @@ if (s != NULL) TOCstart = s->output_section->vma + s->output_offset; + /* Force alignment. */ + adjust = TOCstart & (TOC_BASE_ALIGN - 1); + TOCstart -= adjust; _bfd_set_gp_value (obfd, TOCstart); if (info != NULL && s != NULL) @@ -12545,7 +12588,7 @@ { if (htab->elf.hgot != NULL) { - htab->elf.hgot->root.u.def.value = TOC_BASE_OFF; + htab->elf.hgot->root.u.def.value = TOC_BASE_OFF - adjust; htab->elf.hgot->root.u.def.section = s; } } @@ -12553,8 +12596,8 @@ { struct bfd_link_hash_entry *bh = NULL; _bfd_generic_link_add_one_symbol (info, obfd, ".TOC.", BSF_GLOBAL, - s, TOC_BASE_OFF, NULL, FALSE, - FALSE, &bh); + s, TOC_BASE_OFF - adjust, + NULL, FALSE, FALSE, &bh); } } return TOCstart; @@ -13077,7 +13120,8 @@ opd = get_opd_info (sec); if (opd != NULL && opd->adjust != NULL) { - long adjust = opd->adjust[(sym->st_value + rel->r_addend) / 8]; + long adjust = opd->adjust[OPD_NDX (sym->st_value + + rel->r_addend)]; if (adjust == -1) relocation = 0; else @@ -13400,12 +13444,16 @@ htab->tls_get_addr, htab->tls_get_addr_fd)) offset = rel[1].r_offset; + /* We read the low GOT_TLS (or TOC16) insn because we + need to keep the destination reg. It may be + something other than the usual r3, and moved to r3 + before the call by intervening code. */ + insn1 = bfd_get_32 (output_bfd, + contents + rel->r_offset - d_offset); if ((tls_mask & tls_gd) != 0) { /* IE */ - insn1 = bfd_get_32 (output_bfd, - contents + rel->r_offset - d_offset); - insn1 &= (1 << 26) - (1 << 2); + insn1 &= (0x1f << 21) | (0x1f << 16); insn1 |= 58 << 26; /* ld */ insn2 = 0x7c636a14; /* add 3,3,13 */ if (offset != (bfd_vma) -1) @@ -13420,7 +13468,8 @@ else { /* LE */ - insn1 = 0x3c6d0000; /* addis 3,13,0 */ + insn1 &= 0x1f << 21; + insn1 |= 0x3c0d0000; /* addis r,13,0 */ insn2 = 0x38630000; /* addi 3,3,0 */ if (tls_gd == 0) { @@ -14099,7 +14148,12 @@ { outrel.r_addend += relocation; if (tls_type & (TLS_GD | TLS_DTPREL | TLS_TPREL)) - outrel.r_addend -= htab->elf.tls_sec->vma; + { + if (htab->elf.tls_sec == NULL) + outrel.r_addend = 0; + else + outrel.r_addend -= htab->elf.tls_sec->vma; + } } loc = relgot->contents; loc += (relgot->reloc_count++ @@ -14116,9 +14170,14 @@ relocation = 1; else if (tls_type != 0) { - relocation -= htab->elf.tls_sec->vma + DTP_OFFSET; - if (tls_type == (TLS_TLS | TLS_TPREL)) - relocation += DTP_OFFSET - TP_OFFSET; + if (htab->elf.tls_sec == NULL) + relocation = 0; + else + { + relocation -= htab->elf.tls_sec->vma + DTP_OFFSET; + if (tls_type == (TLS_TLS | TLS_TPREL)) + relocation += DTP_OFFSET - TP_OFFSET; + } if (tls_type == (TLS_TLS | TLS_GD)) { @@ -14251,7 +14310,8 @@ bfd_put_32 (output_bfd, insn, p); break; } - addend -= htab->elf.tls_sec->vma + TP_OFFSET; + if (htab->elf.tls_sec != NULL) + addend -= htab->elf.tls_sec->vma + TP_OFFSET; if (info->shared) /* The TPREL16 relocs shouldn't really be used in shared libs as they will result in DT_TEXTREL being set, but @@ -14271,7 +14331,8 @@ case R_PPC64_DTPREL16_HIGHERA: case R_PPC64_DTPREL16_HIGHEST: case R_PPC64_DTPREL16_HIGHESTA: - addend -= htab->elf.tls_sec->vma + DTP_OFFSET; + if (htab->elf.tls_sec != NULL) + addend -= htab->elf.tls_sec->vma + DTP_OFFSET; break; case R_PPC64_ADDR64_LOCAL: @@ -14286,11 +14347,13 @@ goto dodyn; case R_PPC64_TPREL64: - addend -= htab->elf.tls_sec->vma + TP_OFFSET; + if (htab->elf.tls_sec != NULL) + addend -= htab->elf.tls_sec->vma + TP_OFFSET; goto dodyn; case R_PPC64_DTPREL64: - addend -= htab->elf.tls_sec->vma + DTP_OFFSET; + if (htab->elf.tls_sec != NULL) + addend -= htab->elf.tls_sec->vma + DTP_OFFSET; /* Fall thru */ /* Relocations that may need to be propagated if this is a @@ -14767,26 +14830,21 @@ if (r == bfd_reloc_overflow) { - if (warned) - continue; - if (h != NULL - && h->elf.root.type == bfd_link_hash_undefweak - && howto->pc_relative) - { - /* Assume this is a call protected by other code that - detects the symbol is undefined. If this is the case, - we can safely ignore the overflow. If not, the - program is hosed anyway, and a little warning isn't - going to help. */ - - continue; + /* On code like "if (foo) foo();" don't report overflow + on a branch to zero when foo is undefined. */ + if (!warned + && (reloc_dest == DEST_STUB + || !(h != NULL + && (h->elf.root.type == bfd_link_hash_undefweak + || h->elf.root.type == bfd_link_hash_undefined) + && is_branch_reloc (r_type)))) + { + if (!((*info->callbacks->reloc_overflow) + (info, &h->elf.root, sym_name, + reloc_name, orig_rel.r_addend, + input_bfd, input_section, rel->r_offset))) + return FALSE; } - - if (!((*info->callbacks->reloc_overflow) - (info, &h->elf.root, sym_name, - reloc_name, orig_rel.r_addend, - input_bfd, input_section, rel->r_offset))) - return FALSE; } else { @@ -14844,7 +14902,7 @@ if (!info->relocatable) value -= input_sec->output_section->vma; - adjust = opd->adjust[value / 8]; + adjust = opd->adjust[OPD_NDX (value)]; if (adjust == -1) return 2; @@ -15258,4 +15316,3 @@ #define elf64_bed elf64_powerpc_fbsd_bed #include "elf64-target.h" - diff -ruN binutils-2.25/bfd/elf64-s390.c binutils-2.25.1/bfd/elf64-s390.c --- binutils-2.25/bfd/elf64-s390.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf64-s390.c 2015-07-21 10:20:58.000000000 +0200 @@ -42,7 +42,7 @@ { HOWTO (R_390_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = 2 byte, 2 = 4 byte) */ + 3, /* size (0 = byte, 1 = 2 byte, 2 = 4 byte) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -1707,7 +1707,7 @@ s = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for @@ -3840,6 +3840,7 @@ #define elf_backend_init_index_section _bfd_elf_init_1_index_section #define elf_backend_plt_sym_val elf_s390_plt_sym_val #define elf_backend_add_symbol_hook elf_s390_add_symbol_hook +#define elf_backend_sort_relocs_p elf_s390_elf_sort_relocs_p #define bfd_elf64_mkobject elf_s390_mkobject #define elf_backend_object_p elf_s390_object_p diff -ruN binutils-2.25/bfd/elf64-sh64.c binutils-2.25.1/bfd/elf64-sh64.c --- binutils-2.25/bfd/elf64-sh64.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elf64-sh64.c 2015-07-21 10:20:58.000000000 +0200 @@ -105,7 +105,7 @@ /* No relocation. */ HOWTO (R_SH_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -2259,31 +2259,10 @@ static bfd_boolean sh_elf64_copy_private_data_internal (bfd *ibfd, bfd *obfd) { - Elf_Internal_Shdr **o_shdrp; - asection *isec; - asection *osec; - if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) return TRUE; - o_shdrp = elf_elfsections (obfd); - for (osec = obfd->sections; osec; osec = osec->next) - { - int oIndex = ((struct bfd_elf_section_data *) elf_section_data (osec))->this_idx; - for (isec = ibfd->sections; isec; isec = isec->next) - { - if (strcmp (osec->name, isec->name) == 0) - { - /* Note that we're not disallowing mixing data and code. */ - if ((elf_section_data (isec)->this_hdr.sh_flags - & SHF_SH5_ISA32) != 0) - o_shdrp[oIndex]->sh_flags |= SHF_SH5_ISA32; - break; - } - } - } - /* Copy object attributes. */ _bfd_elf_copy_private_bfd_data (ibfd, obfd); @@ -3381,7 +3360,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* This function is called via sh_elf_link_hash_traverse if we are diff -ruN binutils-2.25/bfd/elf64-sparc.c binutils-2.25.1/bfd/elf64-sparc.c --- binutils-2.25/bfd/elf64-sparc.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/elf64-sparc.c 2015-07-21 10:20:58.000000000 +0200 @@ -97,7 +97,9 @@ else relent->address = rela.r_offset - asect->vma; - if (ELF64_R_SYM (rela.r_info) == STN_UNDEF) + if (ELF64_R_SYM (rela.r_info) == STN_UNDEF + /* PR 17512: file: 996185f8. */ + || ELF64_R_SYM (rela.r_info) > bfd_get_symcount (abfd)) relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; else { diff -ruN binutils-2.25/bfd/elf64-x86-64.c binutils-2.25.1/bfd/elf64-x86-64.c --- binutils-2.25/bfd/elf64-x86-64.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elf64-x86-64.c 2015-07-21 10:20:58.000000000 +0200 @@ -54,7 +54,7 @@ special_function, name, partial_inplace, src_mask, dst_mask, pcrel_offset. */ static reloc_howto_type x86_64_elf_howto_table[] = { - HOWTO(R_X86_64_NONE, 0, 0, 0, FALSE, 0, complain_overflow_dont, + HOWTO(R_X86_64_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_X86_64_NONE", FALSE, 0x00000000, 0x00000000, FALSE), HOWTO(R_X86_64_64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, @@ -302,7 +302,7 @@ return elf_x86_64_rtype_to_howto (abfd, x86_64_reloc_map[i].elf_reloc_val); } - return 0; + return NULL; } static reloc_howto_type * @@ -2431,7 +2431,7 @@ s = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for @@ -2677,13 +2677,23 @@ && ! bfd_elf_link_record_dynamic_symbol (info, h)) return FALSE; } - /* For PIE, discard space for relocs against symbols which - turn out to need copy relocs. */ + /* For PIE, discard space for pc-relative relocs against + symbols which turn out to need copy relocs. */ else if (info->executable && (h->needs_copy || eh->needs_copy) && h->def_dynamic && !h->def_regular) - eh->dyn_relocs = NULL; + { + struct elf_dyn_relocs **pp; + + for (pp = &eh->dyn_relocs; (p = *pp) != NULL; ) + { + if (p->pc_count != 0) + *pp = p->next; + else + pp = &p->next; + } + } } } else if (ELIMINATE_COPY_RELOCS) @@ -5400,7 +5410,7 @@ if (plt_sym_val == NULL) goto bad_return; - for (i = 0; i < count; i++, p++) + for (i = 0; i < count; i++) plt_sym_val[i] = -1; plt_offset = bed->plt_entry_size; @@ -5409,6 +5419,10 @@ { long reloc_index; + /* Skip unknown relocation. */ + if (p->howto == NULL) + continue; + if (p->howto->type != R_X86_64_JUMP_SLOT && p->howto->type != R_X86_64_IRELATIVE) continue; diff -ruN binutils-2.25/bfd/elfcode.h binutils-2.25.1/bfd/elfcode.h --- binutils-2.25/bfd/elfcode.h 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elfcode.h 2015-07-21 10:20:58.000000000 +0200 @@ -1501,7 +1501,9 @@ rel_hdr2 = d->rela.hdr; reloc_count2 = rel_hdr2 ? NUM_SHDR_ENTRIES (rel_hdr2) : 0; - BFD_ASSERT (asect->reloc_count == reloc_count + reloc_count2); + /* PR 17512: file: 0b4f81b7. */ + if (asect->reloc_count != reloc_count + reloc_count2) + return FALSE; BFD_ASSERT ((rel_hdr && asect->rel_filepos == rel_hdr->sh_offset) || (rel_hdr2 && asect->rel_filepos == rel_hdr2->sh_offset)); diff -ruN binutils-2.25/bfd/elflink.c binutils-2.25.1/bfd/elflink.c --- binutils-2.25/bfd/elflink.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elflink.c 2015-07-21 10:20:58.000000000 +0200 @@ -20,6 +20,7 @@ #include "sysdep.h" #include "bfd.h" +#include "bfd_stdint.h" #include "bfdlink.h" #include "libbfd.h" #define ARCH_SIZE 0 @@ -84,6 +85,7 @@ h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; h->non_elf = 0; + h->root.linker_def = 1; h->type = STT_OBJECT; if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL) h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN; @@ -760,6 +762,7 @@ asection *p) { struct elf_link_hash_table *htab; + asection *ip; switch (elf_section_data (p)->this_hdr.sh_type) { @@ -775,18 +778,9 @@ if (htab->text_index_section != NULL) return p != htab->text_index_section && p != htab->data_index_section; - if (strcmp (p->name, ".got") == 0 - || strcmp (p->name, ".got.plt") == 0 - || strcmp (p->name, ".plt") == 0) - { - asection *ip; - - if (htab->dynobj != NULL + return (htab->dynobj != NULL && (ip = bfd_get_linker_section (htab->dynobj, p->name)) != NULL - && ip->output_section == p) - return TRUE; - } - return FALSE; + && ip->output_section == p); /* There shouldn't be section relative relocations against any other section. */ @@ -851,7 +845,7 @@ static void elf_merge_st_other (bfd *abfd, struct elf_link_hash_entry *h, - const Elf_Internal_Sym *isym, + const Elf_Internal_Sym *isym, asection *sec, bfd_boolean definition, bfd_boolean dynamic) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -872,6 +866,10 @@ if (symvis - 1 < hvis - 1) h->other = symvis | (h->other & ~ELF_ST_VISIBILITY (-1)); } + else if (definition + && ELF_ST_VISIBILITY (isym->st_other) != STV_DEFAULT + && (sec->flags & SEC_READONLY) == 0) + h->protected_def = 1; } /* This function is called when we want to merge a new symbol with an @@ -1422,7 +1420,7 @@ /* Merge st_other. If the symbol already has a dynamic index, but visibility says it should not be visible, turn it into a local symbol. */ - elf_merge_st_other (abfd, h, sym, newdef, newdyn); + elf_merge_st_other (abfd, h, sym, sec, newdef, newdyn); if (h->dynindx != -1) switch (ELF_ST_VISIBILITY (h->other)) { @@ -2636,7 +2634,8 @@ DYNBSS. */ bfd_boolean -_bfd_elf_adjust_dynamic_copy (struct elf_link_hash_entry *h, +_bfd_elf_adjust_dynamic_copy (struct bfd_link_info *info, + struct elf_link_hash_entry *h, asection *dynbss) { unsigned int power_of_two; @@ -2675,6 +2674,11 @@ /* Increment the size of DYNBSS to make room for the symbol. */ dynbss->size += h->size; + if (h->protected_def) + info->callbacks->einfo + (_("%P: copy reloc against protected `%T' is dangerous\n"), + h->root.root.string); + return TRUE; } @@ -4351,7 +4355,7 @@ } /* Merge st_other field. */ - elf_merge_st_other (abfd, h, isym, definition, dynamic); + elf_merge_st_other (abfd, h, isym, sec, definition, dynamic); /* We don't want to make debug symbol dynamic. */ if (definition && (sec->flags & SEC_DEBUGGING) && !info->relocatable) @@ -7957,6 +7961,138 @@ return r; } +/* qsort comparison functions sorting external relocs by r_offset. */ + +static int +cmp_ext32l_r_offset (const void *p, const void *q) +{ + union aligned32 + { + uint32_t v; + unsigned char c[4]; + }; + const union aligned32 *a + = (const union aligned32 *) ((const Elf32_External_Rel *) p)->r_offset; + const union aligned32 *b + = (const union aligned32 *) ((const Elf32_External_Rel *) q)->r_offset; + + uint32_t aval = ( (uint32_t) a->c[0] + | (uint32_t) a->c[1] << 8 + | (uint32_t) a->c[2] << 16 + | (uint32_t) a->c[3] << 24); + uint32_t bval = ( (uint32_t) b->c[0] + | (uint32_t) b->c[1] << 8 + | (uint32_t) b->c[2] << 16 + | (uint32_t) b->c[3] << 24); + if (aval < bval) + return -1; + else if (aval > bval) + return 1; + return 0; +} + +static int +cmp_ext32b_r_offset (const void *p, const void *q) +{ + union aligned32 + { + uint32_t v; + unsigned char c[4]; + }; + const union aligned32 *a + = (const union aligned32 *) ((const Elf32_External_Rel *) p)->r_offset; + const union aligned32 *b + = (const union aligned32 *) ((const Elf32_External_Rel *) q)->r_offset; + + uint32_t aval = ( (uint32_t) a->c[0] << 24 + | (uint32_t) a->c[1] << 16 + | (uint32_t) a->c[2] << 8 + | (uint32_t) a->c[3]); + uint32_t bval = ( (uint32_t) b->c[0] << 24 + | (uint32_t) b->c[1] << 16 + | (uint32_t) b->c[2] << 8 + | (uint32_t) b->c[3]); + if (aval < bval) + return -1; + else if (aval > bval) + return 1; + return 0; +} + +#ifdef BFD_HOST_64_BIT +static int +cmp_ext64l_r_offset (const void *p, const void *q) +{ + union aligned64 + { + uint64_t v; + unsigned char c[8]; + }; + const union aligned64 *a + = (const union aligned64 *) ((const Elf64_External_Rel *) p)->r_offset; + const union aligned64 *b + = (const union aligned64 *) ((const Elf64_External_Rel *) q)->r_offset; + + uint64_t aval = ( (uint64_t) a->c[0] + | (uint64_t) a->c[1] << 8 + | (uint64_t) a->c[2] << 16 + | (uint64_t) a->c[3] << 24 + | (uint64_t) a->c[4] << 32 + | (uint64_t) a->c[5] << 40 + | (uint64_t) a->c[6] << 48 + | (uint64_t) a->c[7] << 56); + uint64_t bval = ( (uint64_t) b->c[0] + | (uint64_t) b->c[1] << 8 + | (uint64_t) b->c[2] << 16 + | (uint64_t) b->c[3] << 24 + | (uint64_t) b->c[4] << 32 + | (uint64_t) b->c[5] << 40 + | (uint64_t) b->c[6] << 48 + | (uint64_t) b->c[7] << 56); + if (aval < bval) + return -1; + else if (aval > bval) + return 1; + return 0; +} + +static int +cmp_ext64b_r_offset (const void *p, const void *q) +{ + union aligned64 + { + uint64_t v; + unsigned char c[8]; + }; + const union aligned64 *a + = (const union aligned64 *) ((const Elf64_External_Rel *) p)->r_offset; + const union aligned64 *b + = (const union aligned64 *) ((const Elf64_External_Rel *) q)->r_offset; + + uint64_t aval = ( (uint64_t) a->c[0] << 56 + | (uint64_t) a->c[1] << 48 + | (uint64_t) a->c[2] << 40 + | (uint64_t) a->c[3] << 32 + | (uint64_t) a->c[4] << 24 + | (uint64_t) a->c[5] << 16 + | (uint64_t) a->c[6] << 8 + | (uint64_t) a->c[7]); + uint64_t bval = ( (uint64_t) b->c[0] << 56 + | (uint64_t) b->c[1] << 48 + | (uint64_t) b->c[2] << 40 + | (uint64_t) b->c[3] << 32 + | (uint64_t) b->c[4] << 24 + | (uint64_t) b->c[5] << 16 + | (uint64_t) b->c[6] << 8 + | (uint64_t) b->c[7]); + if (aval < bval) + return -1; + else if (aval > bval) + return 1; + return 0; +} +#endif + /* When performing a relocatable link, the input relocations are preserved. But, if they reference global symbols, the indices referenced must be updated. Update all the relocations found in @@ -7964,7 +8100,8 @@ static void elf_link_adjust_relocs (bfd *abfd, - struct bfd_elf_section_reloc_data *reldata) + struct bfd_elf_section_reloc_data *reldata, + bfd_boolean sort) { unsigned int i; const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -8020,6 +8157,35 @@ | (irela[j].r_info & r_type_mask)); (*swap_out) (abfd, irela, erela); } + + if (sort) + { + int (*compare) (const void *, const void *); + + if (bed->s->arch_size == 32) + { + if (abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE) + compare = cmp_ext32l_r_offset; + else if (abfd->xvec->header_byteorder == BFD_ENDIAN_BIG) + compare = cmp_ext32b_r_offset; + else + abort (); + } + else + { +#ifdef BFD_HOST_64_BIT + if (abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE) + compare = cmp_ext64l_r_offset; + else if (abfd->xvec->header_byteorder == BFD_ENDIAN_BIG) + compare = cmp_ext64b_r_offset; + else +#endif + abort (); + } + qsort (reldata->hdr->contents, count, reldata->hdr->sh_entsize, compare); + free (reldata->hashes); + reldata->hashes = NULL; + } } struct elf_link_sort_rela @@ -8392,6 +8558,8 @@ struct elf_link_hash_entry *); const struct elf_backend_data *bed; + BFD_ASSERT (elf_onesymtab (flinfo->output_bfd)); + bed = get_elf_backend_data (flinfo->output_bfd); output_symbol_hook = bed->elf_backend_link_output_symbol_hook; if (output_symbol_hook != NULL) @@ -8872,12 +9040,6 @@ asection *tls_sec = elf_hash_table (flinfo->info)->tls_sec; if (tls_sec != NULL) sym.st_value -= tls_sec->vma; - else - { - /* The TLS section may have been garbage collected. */ - BFD_ASSERT (flinfo->info->gc_sections - && !input_sec->gc_mark); - } } } } @@ -10159,7 +10321,7 @@ size = (bfd_size_type) bfd_get_reloc_size (howto); buf = (bfd_byte *) bfd_zmalloc (size); - if (buf == NULL) + if (buf == NULL && size != 0) return FALSE; rstat = _bfd_relocate_contents (howto, output_bfd, addend, buf); switch (rstat) @@ -10433,12 +10595,10 @@ bfd_size_type max_internal_reloc_count; bfd_size_type max_sym_count; bfd_size_type max_sym_shndx_count; - file_ptr off; Elf_Internal_Sym elfsym; unsigned int i; Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Shdr *symtab_shndx_hdr; - Elf_Internal_Shdr *symstrtab_hdr; const struct elf_backend_data *bed = get_elf_backend_data (abfd); struct elf_outext_info eoinfo; bfd_boolean merged; @@ -10669,7 +10829,7 @@ /* Figure out the file positions for everything but the symbol table and the relocs. We set symcount to force assign_section_numbers to create a symbol table. */ - bfd_get_symcount (abfd) = info->strip == strip_all ? 0 : 1; + bfd_get_symcount (abfd) = info->strip != strip_all || emit_relocs; BFD_ASSERT (! abfd->output_has_begun); if (! _bfd_elf_compute_section_file_positions (abfd, info)) goto error_return; @@ -10710,13 +10870,6 @@ /* sh_offset is set just below. */ symtab_hdr->sh_addralign = (bfd_vma) 1 << bed->s->log_file_align; - off = elf_next_file_pos (abfd); - off = _bfd_elf_assign_file_position_for_section (symtab_hdr, off, TRUE); - - /* Note that at this point elf_next_file_pos (abfd) is - incorrect. We do not yet know the size of the .symtab section. - We correct next_file_pos below, after we do know the size. */ - /* Allocate a buffer to hold swapped out symbols. This is to avoid continuously seeking to the right position in the file. */ if (! info->keep_memory || max_sym_count < 20) @@ -10739,11 +10892,18 @@ goto error_return; } - /* Start writing out the symbol table. The first symbol is always a - dummy symbol. */ - if (info->strip != strip_all - || emit_relocs) + if (info->strip != strip_all || emit_relocs) { + file_ptr off = elf_next_file_pos (abfd); + + _bfd_elf_assign_file_position_for_section (symtab_hdr, off, TRUE); + + /* Note that at this point elf_next_file_pos (abfd) is + incorrect. We do not yet know the size of the .symtab section. + We correct next_file_pos below, after we do know the size. */ + + /* Start writing out the symbol table. The first symbol is always a + dummy symbol. */ elfsym.st_value = 0; elfsym.st_size = 0; elfsym.st_info = 0; @@ -10753,16 +10913,13 @@ if (elf_link_output_sym (&flinfo, NULL, &elfsym, bfd_und_section_ptr, NULL) != 1) goto error_return; - } - /* Output a symbol for each section. We output these even if we are - discarding local symbols, since they are used for relocs. These - symbols have no names. We store the index of each one in the - index field of the section, so that we can find it again when - outputting relocs. */ - if (info->strip != strip_all - || emit_relocs) - { + /* Output a symbol for each section. We output these even if we are + discarding local symbols, since they are used for relocs. These + symbols have no names. We store the index of each one in the + index field of the section, so that we can find it again when + outputting relocs. */ + elfsym.st_size = 0; elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION); elfsym.st_other = 0; @@ -10993,7 +11150,8 @@ /* If backend needs to output some local symbols not present in the hash table, do it now. */ - if (bed->elf_backend_output_arch_local_syms) + if (bed->elf_backend_output_arch_local_syms + && (info->strip != strip_all || emit_relocs)) { typedef int (*out_sym_func) (void *, const char *, Elf_Internal_Sym *, asection *, @@ -11103,7 +11261,8 @@ /* If backend needs to output some symbols not present in the hash table, do it now. */ - if (bed->elf_backend_output_arch_syms) + if (bed->elf_backend_output_arch_syms + && (info->strip != strip_all || emit_relocs)) { typedef int (*out_sym_func) (void *, const char *, Elf_Internal_Sym *, asection *, @@ -11119,45 +11278,46 @@ return FALSE; /* Now we know the size of the symtab section. */ - off += symtab_hdr->sh_size; - - symtab_shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; - if (symtab_shndx_hdr->sh_name != 0) + if (bfd_get_symcount (abfd) > 0) { - symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX; - symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx); - symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx); - amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx); - symtab_shndx_hdr->sh_size = amt; - - off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr, - off, TRUE); + /* Finish up and write out the symbol string table (.strtab) + section. */ + Elf_Internal_Shdr *symstrtab_hdr; + file_ptr off = symtab_hdr->sh_offset + symtab_hdr->sh_size; + + symtab_shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; + if (symtab_shndx_hdr->sh_name != 0) + { + symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX; + symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx); + symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx); + amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx); + symtab_shndx_hdr->sh_size = amt; - if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0 - || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt)) - return FALSE; - } + off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr, + off, TRUE); + if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0 + || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt)) + return FALSE; + } - /* Finish up and write out the symbol string table (.strtab) - section. */ - symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr; - /* sh_name was set in prep_headers. */ - symstrtab_hdr->sh_type = SHT_STRTAB; - symstrtab_hdr->sh_flags = 0; - symstrtab_hdr->sh_addr = 0; - symstrtab_hdr->sh_size = _bfd_stringtab_size (flinfo.symstrtab); - symstrtab_hdr->sh_entsize = 0; - symstrtab_hdr->sh_link = 0; - symstrtab_hdr->sh_info = 0; - /* sh_offset is set just below. */ - symstrtab_hdr->sh_addralign = 1; + symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr; + /* sh_name was set in prep_headers. */ + symstrtab_hdr->sh_type = SHT_STRTAB; + symstrtab_hdr->sh_flags = 0; + symstrtab_hdr->sh_addr = 0; + symstrtab_hdr->sh_size = _bfd_stringtab_size (flinfo.symstrtab); + symstrtab_hdr->sh_entsize = 0; + symstrtab_hdr->sh_link = 0; + symstrtab_hdr->sh_info = 0; + /* sh_offset is set just below. */ + symstrtab_hdr->sh_addralign = 1; - off = _bfd_elf_assign_file_position_for_section (symstrtab_hdr, off, TRUE); - elf_next_file_pos (abfd) = off; + off = _bfd_elf_assign_file_position_for_section (symstrtab_hdr, + off, TRUE); + elf_next_file_pos (abfd) = off; - if (bfd_get_symcount (abfd) > 0) - { if (bfd_seek (abfd, symstrtab_hdr->sh_offset, SEEK_SET) != 0 || ! _bfd_stringtab_emit (abfd, flinfo.symstrtab)) return FALSE; @@ -11167,13 +11327,15 @@ for (o = abfd->sections; o != NULL; o = o->next) { struct bfd_elf_section_data *esdo = elf_section_data (o); + bfd_boolean sort; if ((o->flags & SEC_RELOC) == 0) continue; + sort = bed->sort_relocs_p == NULL || (*bed->sort_relocs_p) (o); if (esdo->rel.hdr != NULL) - elf_link_adjust_relocs (abfd, &esdo->rel); + elf_link_adjust_relocs (abfd, &esdo->rel, sort); if (esdo->rela.hdr != NULL) - elf_link_adjust_relocs (abfd, &esdo->rela); + elf_link_adjust_relocs (abfd, &esdo->rela, sort); /* Set the reloc_count field to 0 to prevent write_relocs from trying to swap the relocs out itself. */ @@ -11420,6 +11582,8 @@ { /* The contents of the .dynstr section are actually in a stringtab. */ + file_ptr off; + off = elf_section_data (o->output_section)->this_hdr.sh_offset; if (bfd_seek (abfd, off, SEEK_SET) != 0 || ! _bfd_elf_strtab_emit (abfd, @@ -11896,7 +12060,7 @@ if (!h->mark && (((h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) - && !(h->def_regular + && !((h->def_regular || ELF_COMMON_DEF_P (h)) && h->root.u.def.section->gc_mark)) || h->root.type == bfd_link_hash_undefined || h->root.type == bfd_link_hash_undefweak)) @@ -12119,7 +12283,7 @@ if ((h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) && (h->ref_dynamic - || (h->def_regular + || ((h->def_regular || ELF_COMMON_DEF_P (h)) && ELF_ST_VISIBILITY (h->other) != STV_INTERNAL && ELF_ST_VISIBILITY (h->other) != STV_HIDDEN && (!info->executable @@ -13038,7 +13202,7 @@ ehdest->target_internal = ehsrc->target_internal; isym.st_other = ehsrc->other; - elf_merge_st_other (abfd, ehdest, &isym, TRUE, FALSE); + elf_merge_st_other (abfd, ehdest, &isym, NULL, TRUE, FALSE); } /* Append a RELA relocation REL to section S in BFD. */ diff -ruN binutils-2.25/bfd/elfn32-mips.c binutils-2.25.1/bfd/elfn32-mips.c --- binutils-2.25/bfd/elfn32-mips.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elfn32-mips.c 2015-07-21 10:20:58.000000000 +0200 @@ -108,7 +108,7 @@ /* No relocation. */ HOWTO (R_MIPS_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -3403,7 +3403,12 @@ else return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min]; } - BFD_ASSERT (r_type < (unsigned int) R_MIPS_max); + if (r_type >= R_MIPS_max) + { + (*_bfd_error_handler) (_("unrecognised MIPS reloc number: %d"), r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_MIPS_NONE; + } if (rela_p) return &elf_mips_howto_table_rela[r_type]; else diff -ruN binutils-2.25/bfd/elfnn-aarch64.c binutils-2.25.1/bfd/elfnn-aarch64.c --- binutils-2.25/bfd/elfnn-aarch64.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elfnn-aarch64.c 2015-07-21 10:20:58.000000000 +0200 @@ -296,7 +296,7 @@ #if ARCH_SIZE == 64 HOWTO (R_AARCH64_NULL, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -310,7 +310,7 @@ #else HOWTO (R_AARCH64_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -1377,7 +1377,7 @@ static reloc_howto_type elfNN_aarch64_howto_none = HOWTO (R_AARCH64_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ @@ -1431,6 +1431,14 @@ if (r_type == R_AARCH64_NONE || r_type == R_AARCH64_NULL) return BFD_RELOC_AARCH64_NONE; + /* PR 17512: file: b371e70a. */ + if (r_type >= R_AARCH64_end) + { + _bfd_error_handler (_("Invalid AArch64 reloc number: %d"), r_type); + bfd_set_error (bfd_error_bad_value); + return BFD_RELOC_AARCH64_NONE; + } + return BFD_RELOC_AARCH64_RELOC_START + offsets[r_type]; } @@ -2444,24 +2452,17 @@ of range. */ BFD_FAIL (); - _bfd_final_link_relocate - (elfNN_aarch64_howto_from_type (AARCH64_R (ADD_ABS_LO12_NC)), - stub_bfd, - stub_sec, - stub_sec->contents, - stub_entry->stub_offset + 4, - sym_value, - 0); + if (aarch64_relocate (AARCH64_R (ADD_ABS_LO12_NC), stub_bfd, stub_sec, + stub_entry->stub_offset + 4, sym_value)) + BFD_FAIL (); break; case aarch64_stub_long_branch: /* We want the value relative to the address 12 bytes back from the value itself. */ - _bfd_final_link_relocate (elfNN_aarch64_howto_from_type - (AARCH64_R (PRELNN)), stub_bfd, stub_sec, - stub_sec->contents, - stub_entry->stub_offset + 16, - sym_value + 12, 0); + if (aarch64_relocate (AARCH64_R (PRELNN), stub_bfd, stub_sec, + stub_entry->stub_offset + 16, sym_value + 12)) + BFD_FAIL (); break; case aarch64_stub_erratum_835769_veneer: @@ -4072,10 +4073,11 @@ bfd_reloc_code_real_type new_bfd_r_type; unsigned long r_symndx; bfd_byte *hit_data = contents + rel->r_offset; - bfd_vma place; + bfd_vma place, off; bfd_signed_vma signed_addend; struct elf_aarch64_link_hash_table *globals; bfd_boolean weak_undef_p; + asection *base_got; globals = elf_aarch64_hash_table (info); @@ -4115,8 +4117,6 @@ { asection *plt; const char *name; - asection *base_got; - bfd_vma off; if ((input_section->flags & SEC_ALLOC) == 0 || h->plt.offset == (bfd_vma) -1) @@ -4329,7 +4329,7 @@ memset (&outrel, 0, sizeof outrel); else if (h != NULL && h->dynindx != -1 - && (!info->shared || !info->symbolic || !h->def_regular)) + && (!info->shared || !SYMBOLIC_BIND (info, h) || !h->def_regular)) outrel.r_info = ELFNN_R_INFO (h->dynindx, r_type); else { @@ -4426,16 +4426,36 @@ signed_addend, weak_undef_p); break; + case BFD_RELOC_AARCH64_ADR_LO21_PCREL: + case BFD_RELOC_AARCH64_ADR_HI21_PCREL: + case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: + case BFD_RELOC_AARCH64_LD_LO19_PCREL: + case BFD_RELOC_AARCH64_16_PCREL: + case BFD_RELOC_AARCH64_32_PCREL: + case BFD_RELOC_AARCH64_64_PCREL: + if (info->shared + && (input_section->flags & SEC_ALLOC) != 0 + && (input_section->flags & SEC_READONLY) != 0 + && h != NULL + && !h->def_regular) + { + int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START; + + (*_bfd_error_handler) + (_("%B: relocation %s against external symbol `%s' can not be used" + " when making a shared object; recompile with -fPIC"), + input_bfd, elfNN_aarch64_howto_table[howto_index].name, + h->root.root.string); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + case BFD_RELOC_AARCH64_16: #if ARCH_SIZE == 64 case BFD_RELOC_AARCH64_32: #endif case BFD_RELOC_AARCH64_ADD_LO12: - case BFD_RELOC_AARCH64_ADR_LO21_PCREL: - case BFD_RELOC_AARCH64_ADR_HI21_PCREL: - case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: case BFD_RELOC_AARCH64_BRANCH19: - case BFD_RELOC_AARCH64_LD_LO19_PCREL: case BFD_RELOC_AARCH64_LDST8_LO12: case BFD_RELOC_AARCH64_LDST16_LO12: case BFD_RELOC_AARCH64_LDST32_LO12: @@ -4451,9 +4471,6 @@ case BFD_RELOC_AARCH64_MOVW_G2: case BFD_RELOC_AARCH64_MOVW_G2_NC: case BFD_RELOC_AARCH64_MOVW_G3: - case BFD_RELOC_AARCH64_16_PCREL: - case BFD_RELOC_AARCH64_32_PCREL: - case BFD_RELOC_AARCH64_64_PCREL: case BFD_RELOC_AARCH64_TSTBR14: value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value, signed_addend, weak_undef_p); @@ -4474,6 +4491,58 @@ value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value, 0, weak_undef_p); } + else + { + struct elf_aarch64_local_symbol *locals + = elf_aarch64_locals (input_bfd); + + if (locals == NULL) + { + int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START; + (*_bfd_error_handler) + (_("%B: Local symbol descriptor table be NULL when applying " + "relocation %s against local symbol"), + input_bfd, elfNN_aarch64_howto_table[howto_index].name); + abort (); + } + + off = symbol_got_offset (input_bfd, h, r_symndx); + base_got = globals->root.sgot; + bfd_vma got_entry_addr = (base_got->output_section->vma + + base_got->output_offset + off); + + if (!symbol_got_offset_mark_p (input_bfd, h, r_symndx)) + { + bfd_put_64 (output_bfd, value, base_got->contents + off); + + if (info->shared) + { + asection *s; + Elf_Internal_Rela outrel; + + /* For local symbol, we have done absolute relocation in static + linking stageh. While for share library, we need to update + the content of GOT entry according to the share objects + loading base address. So we need to generate a + R_AARCH64_RELATIVE reloc for dynamic linker. */ + s = globals->root.srelgot; + if (s == NULL) + abort (); + + outrel.r_offset = got_entry_addr; + outrel.r_info = ELFNN_R_INFO (0, AARCH64_R (RELATIVE)); + outrel.r_addend = value; + elf_append_rela (output_bfd, s, &outrel); + } + + symbol_got_offset_mark (input_bfd, h, r_symndx); + } + + /* Update the relocation value to GOT entry addr as we have transformed + the direct data access into indirect data access through GOT. */ + value = got_entry_addr; + } + break; case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: @@ -5542,7 +5611,7 @@ s = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } @@ -6914,6 +6983,32 @@ return elfNN_aarch64_allocate_ifunc_dynrelocs (h, inf); } +/* Find any dynamic relocs that apply to read-only sections. */ + +static bfd_boolean +aarch64_readonly_dynrelocs (struct elf_link_hash_entry * h, void * inf) +{ + struct elf_aarch64_link_hash_entry * eh; + struct elf_dyn_relocs * p; + + eh = (struct elf_aarch64_link_hash_entry *) h; + for (p = eh->dyn_relocs; p != NULL; p = p->next) + { + asection *s = p->sec; + + if (s != NULL && (s->flags & SEC_READONLY) != 0) + { + struct bfd_link_info *info = (struct bfd_link_info *) inf; + + info->flags |= DF_TEXTREL; + + /* Not an error, just cut short the traversal. */ + return FALSE; + } + } + return TRUE; +} + /* This is the most important function of all . Innocuosly named though ! */ static bfd_boolean @@ -7008,7 +7103,8 @@ htab->root.sgot->size += GOT_ENTRY_SIZE * 2; } - if (got_type & GOT_TLS_IE) + if (got_type & GOT_TLS_IE + || got_type & GOT_NORMAL) { locals[i].got_offset = htab->root.sgot->size; htab->root.sgot->size += GOT_ENTRY_SIZE; @@ -7018,10 +7114,6 @@ { } - if (got_type == GOT_NORMAL) - { - } - if (info->shared) { if (got_type & GOT_TLSDESC_GD) @@ -7034,7 +7126,8 @@ if (got_type & GOT_TLS_GD) htab->root.srelgot->size += RELOC_SIZE (htab) * 2; - if (got_type & GOT_TLS_IE) + if (got_type & GOT_TLS_IE + || got_type & GOT_NORMAL) htab->root.srelgot->size += RELOC_SIZE (htab); } } @@ -7203,6 +7296,10 @@ /* If any dynamic relocs apply to a read-only section, then we need a DT_TEXTREL entry. */ + if ((info->flags & DF_TEXTREL) == 0) + elf_link_hash_traverse (& htab->root, aarch64_readonly_dynrelocs, + info); + if ((info->flags & DF_TEXTREL) != 0) { if (!add_dynamic_entry (DT_TEXTREL, 0)) diff -ruN binutils-2.25/bfd/elfxx-aarch64.c binutils-2.25.1/bfd/elfxx-aarch64.c --- binutils-2.25/bfd/elfxx-aarch64.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/elfxx-aarch64.c 2015-07-21 10:20:58.000000000 +0200 @@ -187,6 +187,8 @@ size = bfd_get_reloc_size (howto); switch (size) { + case 0: + return status; case 2: contents = bfd_get_16 (abfd, address); break; diff -ruN binutils-2.25/bfd/elfxx-ia64.c binutils-2.25.1/bfd/elfxx-ia64.c --- binutils-2.25/bfd/elfxx-ia64.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elfxx-ia64.c 2015-07-21 10:20:58.000000000 +0200 @@ -91,7 +91,7 @@ TYPE field. */ static reloc_howto_type ia64_howto_table[] = { - IA64_HOWTO (R_IA64_NONE, "NONE", 0, FALSE, TRUE), + IA64_HOWTO (R_IA64_NONE, "NONE", 3, FALSE, TRUE), IA64_HOWTO (R_IA64_IMM14, "IMM14", 0, FALSE, TRUE), IA64_HOWTO (R_IA64_IMM22, "IMM22", 0, FALSE, TRUE), diff -ruN binutils-2.25/bfd/elfxx-mips.c binutils-2.25.1/bfd/elfxx-mips.c --- binutils-2.25/bfd/elfxx-mips.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/elfxx-mips.c 2015-07-21 10:20:58.000000000 +0200 @@ -6194,11 +6194,13 @@ const Elf_Internal_Rela *relocation, bfd *input_bfd, bfd_byte *contents) { - bfd_vma x; + bfd_vma x = 0; bfd_byte *location = contents + relocation->r_offset; + unsigned int size = bfd_get_reloc_size (howto); /* Obtain the bytes. */ - x = bfd_get ((8 * bfd_get_reloc_size (howto)), input_bfd, location); + if (size != 0) + x = bfd_get (8 * size, input_bfd, location); return x; } @@ -6223,6 +6225,7 @@ bfd_vma x; bfd_byte *location; int r_type = ELF_R_TYPE (input_bfd, relocation->r_info); + unsigned int size; /* Figure out where the relocation is occurring. */ location = contents + relocation->r_offset; @@ -6316,7 +6319,9 @@ } /* Put the value into the output. */ - bfd_put (8 * bfd_get_reloc_size (howto), input_bfd, x, location); + size = bfd_get_reloc_size (howto); + if (size != 0) + bfd_put (8 * size, input_bfd, x, location); _bfd_mips_elf_reloc_shuffle (input_bfd, r_type, !info->relocatable, location); @@ -9221,7 +9226,7 @@ dynamic will now refer to the local copy instead. */ hmips->possibly_dynamic_relocs = 0; - return _bfd_elf_adjust_dynamic_copy (h, htab->sdynbss); + return _bfd_elf_adjust_dynamic_copy (info, h, htab->sdynbss); } /* This function is called after all the input files have been read, @@ -11912,6 +11917,18 @@ } +/* Whether to sort relocs output by ld -r or ld --emit-relocs, by r_offset. + Don't do so for code sections. We want to keep ordering of HI16/LO16 + as is. On the other hand, elf-eh-frame.c processing requires .eh_frame + relocs to be sorted. */ + +bfd_boolean +_bfd_mips_elf_sort_relocs_p (asection *sec) +{ + return (sec->flags & SEC_CODE) == 0; +} + + /* The final processing done just before writing out a MIPS ELF object file. This gets the MIPS architecture right based on the machine number. This is used by both the 32-bit and the 64-bit ABI. */ diff -ruN binutils-2.25/bfd/elfxx-mips.h binutils-2.25.1/bfd/elfxx-mips.h --- binutils-2.25/bfd/elfxx-mips.h 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/elfxx-mips.h 2015-07-21 10:20:58.000000000 +0200 @@ -67,6 +67,8 @@ Elf_Internal_Sym *); extern bfd_boolean _bfd_mips_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *); +extern bfd_boolean _bfd_mips_elf_sort_relocs_p + (asection *); extern void _bfd_mips_elf_final_write_processing (bfd *, bfd_boolean); extern int _bfd_mips_elf_additional_program_headers diff -ruN binutils-2.25/bfd/elfxx-sparc.c binutils-2.25.1/bfd/elfxx-sparc.c --- binutils-2.25/bfd/elfxx-sparc.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elfxx-sparc.c 2015-07-21 10:20:58.000000000 +0200 @@ -209,7 +209,7 @@ static reloc_howto_type _bfd_sparc_elf_howto_table[] = { - HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE), + HOWTO(R_SPARC_NONE, 0,3, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE), HOWTO(R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_8", FALSE,0,0x000000ff,TRUE), HOWTO(R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_16", FALSE,0,0x0000ffff,TRUE), HOWTO(R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_32", FALSE,0,0xffffffff,TRUE), @@ -2211,7 +2211,7 @@ s = htab->sdynbss; - return _bfd_elf_adjust_dynamic_copy (h, s); + return _bfd_elf_adjust_dynamic_copy (info, h, s); } /* Allocate space in .plt, .got and associated reloc sections for diff -ruN binutils-2.25/bfd/elfxx-target.h binutils-2.25.1/bfd/elfxx-target.h --- binutils-2.25/bfd/elfxx-target.h 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/elfxx-target.h 2015-07-21 10:20:58.000000000 +0200 @@ -531,6 +531,9 @@ #ifndef elf_backend_count_relocs #define elf_backend_count_relocs NULL #endif +#ifndef elf_backend_sort_relocs_p +#define elf_backend_sort_relocs_p NULL +#endif #ifndef elf_backend_grok_prstatus #define elf_backend_grok_prstatus NULL #endif @@ -733,6 +736,7 @@ elf_backend_ignore_undef_symbol, elf_backend_emit_relocs, elf_backend_count_relocs, + elf_backend_sort_relocs_p, elf_backend_grok_prstatus, elf_backend_grok_psinfo, elf_backend_write_core_note, diff -ruN binutils-2.25/bfd/elfxx-tilegx.c binutils-2.25.1/bfd/elfxx-tilegx.c --- binutils-2.25/bfd/elfxx-tilegx.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/elfxx-tilegx.c 2015-07-21 10:20:58.000000000 +0200 @@ -72,11 +72,11 @@ /* This reloc does nothing. */ HOWTO (R_TILEGX_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_NONE", /* name */ FALSE, /* partial_inplace */ @@ -2456,7 +2456,7 @@ h->needs_copy = 1; } - return _bfd_elf_adjust_dynamic_copy (h, htab->sdynbss); + return _bfd_elf_adjust_dynamic_copy (info, h, htab->sdynbss); } /* Allocate space in .plt, .got and associated reloc sections for diff -ruN binutils-2.25/bfd/format.c binutils-2.25.1/bfd/format.c --- binutils-2.25/bfd/format.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/format.c 2015-07-21 10:20:58.000000000 +0200 @@ -402,7 +402,7 @@ /* We still have more than one equally good match, and at least some of the targets support match priority. Choose the first of the best matches. */ - if (match_count > 1 && best_count != match_count) + if (matching_vector && match_count > 1 && best_count != match_count) { int i; diff -ruN binutils-2.25/bfd/ieee.c binutils-2.25.1/bfd/ieee.c --- binutils-2.25/bfd/ieee.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/ieee.c 2015-07-21 10:20:58.000000000 +0200 @@ -170,9 +170,16 @@ standard requires. */ #define this_byte(ieee) *((ieee)->input_p) -#define next_byte(ieee) ((ieee)->input_p++) #define this_byte_and_next(ieee) (*((ieee)->input_p++)) +static bfd_boolean +next_byte (common_header_type * ieee) +{ + ieee->input_p++; + + return ieee->input_p < ieee->last_byte; +} + static unsigned short read_2bytes (common_header_type *ieee) { @@ -348,15 +355,15 @@ if (value >= 0 && value <= 127) { *value_ptr = value; - next_byte (ieee); - return TRUE; + return next_byte (ieee); } else if (value >= 0x80 && value <= 0x88) { unsigned int count = value & 0xf; result = 0; - next_byte (ieee); + if (! next_byte (ieee)) + return FALSE; while (count) { result = (result << 8) | this_byte_and_next (ieee); @@ -496,7 +503,7 @@ static ieee_symbol_index_type NOSYMBOL = {0, 0}; -static void +static bfd_boolean parse_expression (ieee_data_type *ieee, bfd_vma *value, ieee_symbol_index_type *symbol, @@ -529,68 +536,83 @@ { int section_n; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; *pcrel = TRUE; section_n = must_parse_int (&(ieee->h)); (void) section_n; PUSH (NOSYMBOL, bfd_abs_section_ptr, 0); break; } + case ieee_variable_L_enum: /* L variable address of section N. */ - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; PUSH (NOSYMBOL, ieee->section_table[must_parse_int (&(ieee->h))], 0); break; + case ieee_variable_R_enum: /* R variable, logical address of section module. */ /* FIXME, this should be different to L. */ - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; PUSH (NOSYMBOL, ieee->section_table[must_parse_int (&(ieee->h))], 0); break; + case ieee_variable_S_enum: /* S variable, size in MAUS of section module. */ - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; PUSH (NOSYMBOL, 0, ieee->section_table[must_parse_int (&(ieee->h))]->size); break; + case ieee_variable_I_enum: /* Push the address of variable n. */ { ieee_symbol_index_type sy; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; sy.index = (int) must_parse_int (&(ieee->h)); sy.letter = 'I'; PUSH (sy, bfd_abs_section_ptr, 0); } break; + case ieee_variable_X_enum: /* Push the address of external variable n. */ { ieee_symbol_index_type sy; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; + sy.index = (int) (must_parse_int (&(ieee->h))); sy.letter = 'X'; PUSH (sy, bfd_und_section_ptr, 0); } break; + case ieee_function_minus_enum: { bfd_vma value1, value2; asection *section1, *section_dummy; ieee_symbol_index_type sy; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; POP (sy, section1, value1); POP (sy, section_dummy, value2); PUSH (sy, section1 ? section1 : section_dummy, value2 - value1); } break; + case ieee_function_plus_enum: { bfd_vma value1, value2; @@ -599,7 +621,8 @@ ieee_symbol_index_type sy1; ieee_symbol_index_type sy2; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; POP (sy1, section1, value1); POP (sy2, section2, value2); @@ -608,6 +631,7 @@ value1 + value2); } break; + default: { bfd_vma va; @@ -644,17 +668,9 @@ POP (*symbol, dummy, *value); if (section) *section = dummy; -} - -#define ieee_seek(ieee, offset) \ - do \ - { \ - ieee->h.input_p = ieee->h.first_byte + offset; \ - ieee->h.last_byte = (ieee->h.first_byte \ - + ieee_part_after (ieee, offset)); \ - } \ - while (0) + return TRUE; +} #define ieee_pos(ieee) \ (ieee->h.input_p - ieee->h.first_byte) @@ -676,6 +692,22 @@ return after; } +static bfd_boolean +ieee_seek (ieee_data_type * ieee, file_ptr offset) +{ + /* PR 17512: file: 017-1157-0.004. */ + if (offset < 0 || (bfd_size_type) offset >= ieee->h.total_amt) + { + ieee->h.input_p = ieee->h.first_byte + ieee->h.total_amt; + ieee->h.last_byte = ieee->h.input_p; + return FALSE; + } + + ieee->h.input_p = ieee->h.first_byte + offset; + ieee->h.last_byte = (ieee->h.first_byte + ieee_part_after (ieee, offset)); + return TRUE; +} + static unsigned int last_index; static char last_type; /* Is the index for an X or a D. */ @@ -730,14 +762,16 @@ last_index = 0xffffff; ieee->symbol_table_full = TRUE; - ieee_seek (ieee, offset); + if (! ieee_seek (ieee, offset)) + return FALSE; while (loop) { switch (this_byte (&(ieee->h))) { case ieee_nn_record: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; symbol = get_symbol (abfd, ieee, symbol, &symbol_count, & prev_symbols_ptr, @@ -750,8 +784,10 @@ symbol->symbol.udata.p = NULL; symbol->symbol.flags = BSF_NO_FLAGS; break; + case ieee_external_symbol_enum: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; symbol = get_symbol (abfd, ieee, symbol, &symbol_count, &prev_symbols_ptr, @@ -842,6 +878,7 @@ } } break; + case ieee_value_record_enum >> 8: { unsigned int symbol_name_index; @@ -849,17 +886,20 @@ bfd_boolean pcrel_ignore; unsigned int extra; - next_byte (&(ieee->h)); - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; + if (! next_byte (&(ieee->h))) + return FALSE; symbol_name_index = must_parse_int (&(ieee->h)); (void) symbol_name_index; - parse_expression (ieee, - &symbol->symbol.value, - &symbol_ignore, - &pcrel_ignore, - &extra, - &symbol->symbol.section); + if (! parse_expression (ieee, + &symbol->symbol.value, + &symbol_ignore, + &pcrel_ignore, + &extra, + &symbol->symbol.section)) + return FALSE; /* Fully linked IEEE-695 files tend to give every symbol an absolute value. Try to convert that back into a @@ -892,7 +932,9 @@ bfd_vma size; bfd_vma value; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; + /* Throw away the external reference index. */ (void) must_parse_int (&(ieee->h)); /* Fetch the default size if not resolved. */ @@ -907,7 +949,8 @@ break; case ieee_external_reference_enum: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; symbol = get_symbol (abfd, ieee, symbol, &symbol_count, &prev_reference_ptr, @@ -1092,7 +1135,7 @@ return ieee->section_table[sindex]; } -static void +static bfd_boolean ieee_slurp_sections (bfd *abfd) { ieee_data_type *ieee = IEEE_DATA (abfd); @@ -1103,7 +1146,9 @@ { bfd_byte section_type[3]; - ieee_seek (ieee, offset); + if (! ieee_seek (ieee, offset)) + return FALSE; + while (TRUE) { switch (this_byte (&(ieee->h))) @@ -1113,7 +1158,8 @@ asection *section; unsigned int section_index; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section_index = must_parse_int (&(ieee->h)); section = get_section_entry (abfd, ieee, section_index); @@ -1132,22 +1178,26 @@ { /* AS Absolute section attributes. */ case 0xD3: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section_type[2] = this_byte (&(ieee->h)); switch (section_type[2]) { case 0xD0: /* Normal code. */ - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section->flags |= SEC_CODE; break; case 0xC4: /* Normal data. */ - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section->flags |= SEC_DATA; break; case 0xD2: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; /* Normal rom data. */ section->flags |= SEC_ROM | SEC_DATA; break; @@ -1164,15 +1214,18 @@ switch (section_type[1]) { case 0xD0: /* Normal code (CP). */ - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section->flags |= SEC_CODE; break; case 0xC4: /* Normal data (CD). */ - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section->flags |= SEC_DATA; break; case 0xD2: /* Normal rom data (CR). */ - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section->flags |= SEC_ROM | SEC_DATA; break; default: @@ -1201,7 +1254,8 @@ bfd_vma value; asection *section; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section_index = must_parse_int (&ieee->h); section = get_section_entry (abfd, ieee, section_index); if (section_index > ieee->section_count) @@ -1251,15 +1305,17 @@ (void) must_parse_int (&(ieee->h)); break; default: - return; + return TRUE; } } break; default: - return; + return TRUE; } } } + + return TRUE; } /* Make a section for the debugging information, if any. We don't try @@ -1323,7 +1379,8 @@ if (this_byte (&(ieee->h)) != Module_Beginning) goto got_wrong_format_error; - next_byte (&(ieee->h)); + (void) next_byte (&(ieee->h)); + library = read_id (&(ieee->h)); if (strcmp (library, "LIBRARY") != 0) goto got_wrong_format_error; @@ -1334,7 +1391,7 @@ ieee->element_count = 0; ieee->element_index = 0; - next_byte (&(ieee->h)); /* Drop the ad part. */ + (void) next_byte (&(ieee->h)); /* Drop the ad part. */ must_parse_int (&(ieee->h)); /* And the two dummy numbers. */ must_parse_int (&(ieee->h)); @@ -1407,8 +1464,9 @@ ieee->h.first_byte = buffer; ieee->h.input_p = buffer; - next_byte (&(ieee->h)); /* Drop F8. */ - next_byte (&(ieee->h)); /* Drop 14. */ + (void) next_byte (&(ieee->h)); /* Drop F8. */ + if (! next_byte (&(ieee->h))) /* Drop 14. */ + goto error_return; must_parse_int (&(ieee->h)); /* Drop size of block. */ if (must_parse_int (&(ieee->h)) != 0) @@ -1467,7 +1525,8 @@ unsigned int number_of_maus; unsigned int i; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; number_of_maus = must_parse_int (&(ieee->h)); for (i = 0; i < number_of_maus; i++) @@ -1482,7 +1541,8 @@ { bfd_boolean loop = TRUE; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; while (loop) { switch (this_byte (&(ieee->h))) @@ -1505,13 +1565,16 @@ *(current_map->reloc_tail_ptr) = r; current_map->reloc_tail_ptr = &r->next; r->next = (ieee_reloc_type *) NULL; - next_byte (&(ieee->h)); -/* abort();*/ + if (! next_byte (&(ieee->h))) + return FALSE; + r->relent.sym_ptr_ptr = 0; - parse_expression (ieee, - &r->relent.addend, - &r->symbol, - &pcrel, &extra, §ion); + if (! parse_expression (ieee, + &r->relent.addend, + &r->symbol, + &pcrel, &extra, §ion)) + return FALSE; + r->relent.address = current_map->pc; s->flags |= SEC_RELOC; s->owner->flags |= HAS_RELOC; @@ -1521,7 +1584,8 @@ if (this_byte (&(ieee->h)) == (int) ieee_comma) { - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; /* Fetch number of bytes to pad. */ extra = must_parse_int (&(ieee->h)); }; @@ -1529,13 +1593,16 @@ switch (this_byte (&(ieee->h))) { case ieee_function_signed_close_b_enum: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; break; case ieee_function_unsigned_close_b_enum: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; break; case ieee_function_either_close_b_enum: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; break; default: break; @@ -1634,7 +1701,8 @@ for (i = 0; i < this_size; i++) { location_ptr[current_map->pc++] = this_byte (&(ieee->h)); - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; } } else @@ -1667,7 +1735,9 @@ if (ieee->read_data) return TRUE; ieee->read_data = TRUE; - ieee_seek (ieee, ieee->w.r.data_part); + + if (! ieee_seek (ieee, ieee->w.r.data_part)) + return FALSE; /* Allocate enough space for all the section contents. */ for (s = abfd->sections; s != (asection *) NULL; s = s->next) @@ -1693,7 +1763,8 @@ return TRUE; case ieee_set_current_section_enum: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; section_number = must_parse_int (&(ieee->h)); s = ieee->section_table[section_number]; s->flags |= SEC_LOAD | SEC_HAS_CONTENTS; @@ -1706,7 +1777,8 @@ break; case ieee_e2_first_byte_enum: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; switch (this_byte (&(ieee->h))) { case ieee_set_current_pc_enum & 0xff: @@ -1716,21 +1788,28 @@ unsigned int extra; bfd_boolean pcrel; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; must_parse_int (&(ieee->h)); /* Throw away section #. */ - parse_expression (ieee, &value, - &symbol, - &pcrel, &extra, - 0); + if (! parse_expression (ieee, &value, + &symbol, + &pcrel, &extra, + 0)) + return FALSE; + current_map->pc = value; BFD_ASSERT ((unsigned) (value - s->vma) <= s->size); } break; case ieee_value_starting_address_enum & 0xff: - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; if (this_byte (&(ieee->h)) == ieee_function_either_open_b_enum) - next_byte (&(ieee->h)); + { + if (! next_byte (&(ieee->h))) + return FALSE; + } abfd->start_address = must_parse_int (&(ieee->h)); /* We've got to the end of the data now - */ return TRUE; @@ -1748,7 +1827,8 @@ unsigned int iterations; unsigned char *start; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; iterations = must_parse_int (&(ieee->h)); start = ieee->h.input_p; if (start[0] == (int) ieee_load_constant_bytes_enum @@ -1759,9 +1839,10 @@ location_ptr[current_map->pc++] = start[2]; iterations--; } - next_byte (&(ieee->h)); - next_byte (&(ieee->h)); - next_byte (&(ieee->h)); + (void) next_byte (&(ieee->h)); + (void) next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + return FALSE; } else { @@ -1806,6 +1887,7 @@ goto got_wrong_format; ieee->h.input_p = buffer; + ieee->h.total_amt = sizeof (buffer); if (this_byte_and_next (&(ieee->h)) != Module_Beginning) goto got_wrong_format; @@ -1901,7 +1983,8 @@ if (this_byte (&(ieee->h)) != (int) ieee_address_descriptor_enum) goto fail; - next_byte (&(ieee->h)); + if (! next_byte (&(ieee->h))) + goto fail; if (! parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau)) goto fail; @@ -1912,7 +1995,10 @@ /* If there is a byte order info, take it. */ if (this_byte (&(ieee->h)) == (int) ieee_variable_L_enum || this_byte (&(ieee->h)) == (int) ieee_variable_M_enum) - next_byte (&(ieee->h)); + { + if (! next_byte (&(ieee->h))) + goto fail; + } for (part = 0; part < N_W_VARIABLES; part++) { @@ -1943,12 +2029,17 @@ goto fail; if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) goto fail; + /* FIXME: Check return value. I'm not sure whether it needs to read the entire buffer or not. */ - bfd_bread ((void *) (IEEE_DATA (abfd)->h.first_byte), - (bfd_size_type) ieee->w.r.me_record + 1, abfd); + amt = bfd_bread ((void *) (IEEE_DATA (abfd)->h.first_byte), + (bfd_size_type) ieee->w.r.me_record + 1, abfd); + if (amt <= 0) + goto fail; - ieee_slurp_sections (abfd); + IEEE_DATA (abfd)->h.total_amt = amt; + if (ieee_slurp_sections (abfd)) + goto fail; if (! ieee_slurp_debug (abfd)) goto fail; @@ -3737,6 +3828,8 @@ #define ieee_update_armap_timestamp bfd_true #define ieee_get_elt_at_index _bfd_generic_get_elt_at_index +#define ieee_get_symbol_version_string \ + _bfd_nosymbols_get_symbol_version_string #define ieee_bfd_is_target_special_symbol \ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) #define ieee_bfd_is_local_label_name bfd_generic_is_local_label_name diff -ruN binutils-2.25/bfd/libbfd-in.h binutils-2.25.1/bfd/libbfd-in.h --- binutils-2.25/bfd/libbfd-in.h 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/libbfd-in.h 2015-07-21 10:20:58.000000000 +0200 @@ -837,3 +837,5 @@ extern bfd_vma read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *); extern bfd_signed_vma read_signed_leb128 (bfd *, bfd_byte *, unsigned int *); +extern bfd_vma safe_read_leb128 (bfd *, bfd_byte *, unsigned int *, + bfd_boolean, const bfd_byte * const); diff -ruN binutils-2.25/bfd/libbfd.c binutils-2.25.1/bfd/libbfd.c --- binutils-2.25/bfd/libbfd.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/libbfd.c 2015-07-21 10:20:58.000000000 +0200 @@ -171,15 +171,18 @@ bfd_malloc (bfd_size_type size) { void *ptr; + size_t sz = (size_t) size; - if (size != (size_t) size) + if (size != sz + /* This is to pacify memory checkers like valgrind. */ + || ((signed long) sz) < 0) { bfd_set_error (bfd_error_no_memory); return NULL; } - ptr = malloc ((size_t) size); - if (ptr == NULL && (size_t) size != 0) + ptr = malloc (sz); + if (ptr == NULL && sz != 0) bfd_set_error (bfd_error_no_memory); return ptr; @@ -190,8 +193,6 @@ void * bfd_malloc2 (bfd_size_type nmemb, bfd_size_type size) { - void *ptr; - if ((nmemb | size) >= HALF_BFD_SIZE_TYPE && size != 0 && nmemb > ~(bfd_size_type) 0 / size) @@ -200,19 +201,7 @@ return NULL; } - size *= nmemb; - - if (size != (size_t) size) - { - bfd_set_error (bfd_error_no_memory); - return NULL; - } - - ptr = malloc ((size_t) size); - if (ptr == NULL && (size_t) size != 0) - bfd_set_error (bfd_error_no_memory); - - return ptr; + return bfd_malloc (size * nmemb); } /* Reallocate memory using realloc. */ @@ -221,19 +210,22 @@ bfd_realloc (void *ptr, bfd_size_type size) { void *ret; + size_t sz = (size_t) size; + + if (ptr == NULL) + return bfd_malloc (size); - if (size != (size_t) size) + if (size != sz + /* This is to pacify memory checkers like valgrind. */ + || ((signed long) sz) < 0) { bfd_set_error (bfd_error_no_memory); return NULL; } - if (ptr == NULL) - ret = malloc ((size_t) size); - else - ret = realloc (ptr, (size_t) size); + ret = realloc (ptr, sz); - if (ret == NULL && (size_t) size != 0) + if (ret == NULL && sz != 0) bfd_set_error (bfd_error_no_memory); return ret; @@ -244,8 +236,6 @@ void * bfd_realloc2 (void *ptr, bfd_size_type nmemb, bfd_size_type size) { - void *ret; - if ((nmemb | size) >= HALF_BFD_SIZE_TYPE && size != 0 && nmemb > ~(bfd_size_type) 0 / size) @@ -254,23 +244,7 @@ return NULL; } - size *= nmemb; - - if (size != (size_t) size) - { - bfd_set_error (bfd_error_no_memory); - return NULL; - } - - if (ptr == NULL) - ret = malloc ((size_t) size); - else - ret = realloc (ptr, (size_t) size); - - if (ret == NULL && (size_t) size != 0) - bfd_set_error (bfd_error_no_memory); - - return ret; + return bfd_realloc (ptr, size * nmemb); } /* Reallocate memory using realloc. @@ -279,24 +253,10 @@ void * bfd_realloc_or_free (void *ptr, bfd_size_type size) { - size_t amount = (size_t) size; - void *ret; + void *ret = bfd_realloc (ptr, size); - if (size != amount) - ret = NULL; - else if (ptr == NULL) - ret = malloc (amount); - else - ret = realloc (ptr, amount); - - if (ret == NULL) - { - if (amount > 0) - bfd_set_error (bfd_error_no_memory); - - if (ptr != NULL) - free (ptr); - } + if (ret == NULL && ptr != NULL) + free (ptr); return ret; } @@ -306,23 +266,10 @@ void * bfd_zmalloc (bfd_size_type size) { - void *ptr; - - if (size != (size_t) size) - { - bfd_set_error (bfd_error_no_memory); - return NULL; - } + void *ptr = bfd_malloc (size); - ptr = malloc ((size_t) size); - - if ((size_t) size != 0) - { - if (ptr == NULL) - bfd_set_error (bfd_error_no_memory); - else - memset (ptr, 0, (size_t) size); - } + if (ptr != NULL && size > 0) + memset (ptr, 0, (size_t) size); return ptr; } @@ -333,32 +280,14 @@ void * bfd_zmalloc2 (bfd_size_type nmemb, bfd_size_type size) { - void *ptr; + void *ptr = bfd_malloc2 (nmemb, size); - if ((nmemb | size) >= HALF_BFD_SIZE_TYPE - && size != 0 - && nmemb > ~(bfd_size_type) 0 / size) + if (ptr != NULL) { - bfd_set_error (bfd_error_no_memory); - return NULL; - } - - size *= nmemb; - - if (size != (size_t) size) - { - bfd_set_error (bfd_error_no_memory); - return NULL; - } - - ptr = malloc ((size_t) size); + size_t sz = nmemb * size; - if ((size_t) size != 0) - { - if (ptr == NULL) - bfd_set_error (bfd_error_no_memory); - else - memset (ptr, 0, (size_t) size); + if (sz > 0) + memset (ptr, 0, sz); } return ptr; @@ -1074,6 +1003,45 @@ return result; } +/* Read in a LEB128 encoded value from ABFD starting at DATA. + If SIGN is true, return a signed LEB128 value. + If LENGTH_RETURN is not NULL, return in it the number of bytes read. + No bytes will be read at address END or beyond. */ + +bfd_vma +safe_read_leb128 (bfd *abfd ATTRIBUTE_UNUSED, + bfd_byte *data, + unsigned int *length_return, + bfd_boolean sign, + const bfd_byte * const end) +{ + bfd_vma result = 0; + unsigned int num_read = 0; + unsigned int shift = 0; + unsigned char byte = 0; + + while (data < end) + { + byte = bfd_get_8 (abfd, data); + data++; + num_read++; + + result |= ((bfd_vma) (byte & 0x7f)) << shift; + + shift += 7; + if ((byte & 0x80) == 0) + break; + } + + if (length_return != NULL) + *length_return = num_read; + + if (sign && (shift < 8 * sizeof (result)) && (byte & 0x40)) + result |= (bfd_vma) -1 << shift; + + return result; +} + /* Helper function for reading sleb128 encoded data. */ bfd_signed_vma diff -ruN binutils-2.25/bfd/libbfd.h binutils-2.25.1/bfd/libbfd.h --- binutils-2.25/bfd/libbfd.h 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/libbfd.h 2015-07-21 10:20:58.000000000 +0200 @@ -842,6 +842,8 @@ extern bfd_vma read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *); extern bfd_signed_vma read_signed_leb128 (bfd *, bfd_byte *, unsigned int *); +extern bfd_vma safe_read_leb128 (bfd *, bfd_byte *, unsigned int *, + bfd_boolean, const bfd_byte * const); /* Extracted from init.c. */ /* Extracted from libbfd.c. */ bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int); diff -ruN binutils-2.25/bfd/libieee.h binutils-2.25.1/bfd/libieee.h --- binutils-2.25/bfd/libieee.h 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/libieee.h 2015-07-21 10:20:58.000000000 +0200 @@ -66,6 +66,7 @@ unsigned char *input_p; unsigned char *first_byte; unsigned char *last_byte; + bfd_size_type total_amt; bfd *abfd; } common_header_type ; diff -ruN binutils-2.25/bfd/linker.c binutils-2.25.1/bfd/linker.c --- binutils-2.25/bfd/linker.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/linker.c 2015-07-21 10:20:58.000000000 +0200 @@ -1560,6 +1560,7 @@ h->type = bfd_link_hash_defined; h->u.def.section = section; h->u.def.value = value; + h->linker_def = 0; /* If we have been asked to, we act like collect2 and identify all functions that might be global @@ -1659,6 +1660,7 @@ } else h->u.c.p->section = section; + h->linker_def = 0; break; case REF: @@ -2432,7 +2434,7 @@ size = bfd_get_reloc_size (r->howto); buf = (bfd_byte *) bfd_zmalloc (size); - if (buf == NULL) + if (buf == NULL && size != 0) return FALSE; rstat = _bfd_relocate_contents (r->howto, abfd, (bfd_vma) link_order->u.reloc.p->addend, diff -ruN binutils-2.25/bfd/mach-o.c binutils-2.25.1/bfd/mach-o.c --- binutils-2.25/bfd/mach-o.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/mach-o.c 2015-07-21 10:20:58.000000000 +0200 @@ -690,6 +690,20 @@ ody->export_size = idy->export_size; ody->export_content = idy->export_content; } + /* PR 17512: file: 730e492d. */ + else + { + ody->rebase_size = + ody->bind_size = + ody->weak_bind_size = + ody->lazy_bind_size = + ody->export_size = 0; + ody->rebase_content = + ody->bind_content = + ody->weak_bind_content = + ody->lazy_bind_content = + ody->export_content = NULL; + } } break; @@ -790,18 +804,19 @@ bfd_mach_o_dysymtab_command *dysymtab = mdata->dysymtab; bfd_mach_o_symtab_command *symtab = mdata->symtab; asymbol *s; + char * s_start; + char * s_end; unsigned long count, i, j, n; size_t size; char *names; char *nul_name; + const char stub [] = "$stub"; *ret = NULL; /* Stop now if no symbols or no indirect symbols. */ - if (dysymtab == NULL || symtab == NULL || symtab->symbols == NULL) - return 0; - - if (dysymtab->nindirectsyms == 0) + if (dysymtab == NULL || dysymtab->nindirectsyms == 0 + || symtab == NULL || symtab->symbols == NULL) return 0; /* We need to allocate a bfd symbol for every indirect symbol and to @@ -811,19 +826,23 @@ for (j = 0; j < count; j++) { + const char * strng; unsigned int isym = dysymtab->indirect_syms[j]; /* Some indirect symbols are anonymous. */ - if (isym < symtab->nsyms && symtab->symbols[isym].symbol.name) - size += strlen (symtab->symbols[isym].symbol.name) + sizeof ("$stub"); + if (isym < symtab->nsyms && (strng = symtab->symbols[isym].symbol.name)) + /* PR 17512: file: f5b8eeba. */ + size += strnlen (strng, symtab->strsize - (strng - symtab->strtab)) + sizeof (stub); } - s = *ret = (asymbol *) bfd_malloc (size); + s_start = bfd_malloc (size); + s = *ret = (asymbol *) s_start; if (s == NULL) return -1; names = (char *) (s + count); nul_name = names; *names++ = 0; + s_end = s_start + size; n = 0; for (i = 0; i < mdata->nsects; i++) @@ -843,10 +862,19 @@ last = first + bfd_mach_o_section_get_nbr_indirect (abfd, sec); addr = sec->addr; entry_size = bfd_mach_o_section_get_entry_size (abfd, sec); + + /* PR 17512: file: 08e15eec. */ + if (first >= count || last >= count || first > last) + goto fail; + for (j = first; j < last; j++) { unsigned int isym = dysymtab->indirect_syms[j]; + /* PR 17512: file: 04d64d9b. */ + if (((char *) s) + sizeof (* s) > s_end) + goto fail; + s->flags = BSF_GLOBAL | BSF_SYNTHETIC; s->section = sec->bfdsection; s->value = addr - sec->addr; @@ -860,10 +888,16 @@ s->name = names; len = strlen (sym); + /* PR 17512: file: 47dfd4d2. */ + if (names + len >= s_end) + goto fail; memcpy (names, sym, len); names += len; - memcpy (names, "$stub", sizeof ("$stub")); - names += sizeof ("$stub"); + /* PR 17512: file: 18f340a4. */ + if (names + sizeof (stub) >= s_end) + goto fail; + memcpy (names, stub, sizeof (stub)); + names += sizeof (stub); } else s->name = nul_name; @@ -879,6 +913,11 @@ } return n; + + fail: + free (s_start); + * ret = NULL; + return -1; } void @@ -1349,8 +1388,14 @@ if (reloc.r_extern) { - /* An external symbol number. */ - sym = syms + num; + /* PR 17512: file: 8396-1185-0.004. */ + if (num >= (unsigned) bfd_mach_o_count_symbols (abfd)) + sym = bfd_und_section_ptr->symbol_ptr_ptr; + else if (syms == NULL) + sym = bfd_und_section_ptr->symbol_ptr_ptr; + else + /* An external symbol number. */ + sym = syms + num; } else if (num == 0x00ffffff || num == 0) { @@ -1363,9 +1408,11 @@ } else { + /* PR 17512: file: 006-2964-0.004. */ + if (num > mdata->nsects) + return -1; + /* A section number. */ - BFD_ASSERT (num <= mdata->nsects); - sym = mdata->sections[num - 1]->bfdsection->symbol_ptr_ptr; /* For a symbol defined in section S, the addend (stored in the binary) contains the address of the section. To comply with @@ -1394,6 +1441,7 @@ if (!(*bed->_bfd_mach_o_swap_reloc_in)(res, &reloc)) return -1; + return 0; } @@ -1408,6 +1456,11 @@ /* Allocate and read relocs. */ native_size = count * BFD_MACH_O_RELENT_SIZE; + + /* PR 17512: file: 09477b57. */ + if (native_size < count) + return -1; + native_relocs = (struct mach_o_reloc_info_external *) bfd_malloc (native_size); if (native_relocs == NULL) @@ -1447,6 +1500,8 @@ if (asect->relocation == NULL) { + if (asect->reloc_count * sizeof (arelent) < asect->reloc_count) + return -1; res = bfd_malloc (asect->reloc_count * sizeof (arelent)); if (res == NULL) return -1; @@ -1500,6 +1555,10 @@ if (mdata->dyn_reloc_cache == NULL) { + if ((dysymtab->nextrel + dysymtab->nlocrel) * sizeof (arelent) + < (dysymtab->nextrel + dysymtab->nlocrel)) + return -1; + res = bfd_malloc ((dysymtab->nextrel + dysymtab->nlocrel) * sizeof (arelent)); if (res == NULL) @@ -1814,11 +1873,10 @@ mdata->filelen += sym->strsize; if (bfd_seek (abfd, sym->stroff, SEEK_SET) != 0) - return FALSE; + goto err; if (_bfd_stringtab_emit (abfd, strtab) != TRUE) goto err; - _bfd_stringtab_free (strtab); /* Pad string table. */ padlen = bfd_mach_o_pad4 (abfd, sym->strsize); @@ -1831,6 +1889,7 @@ err: _bfd_stringtab_free (strtab); + sym->strsize = 0; return FALSE; } @@ -1948,6 +2007,8 @@ cmd->indirectsymoff = mdata->filelen; mdata->filelen += cmd->nindirectsyms * 4; + if (cmd->nindirectsyms * 4 < cmd->nindirectsyms) + return FALSE; cmd->indirect_syms = bfd_zalloc (abfd, cmd->nindirectsyms * 4); if (cmd->indirect_syms == NULL) return FALSE; @@ -2334,17 +2395,20 @@ && (mdata->nsects == 0 || mdata->sections != NULL)) return TRUE; + /* We need to check that this can be done... */ + if (nsect > 255) + { + (*_bfd_error_handler) (_("mach-o: there are too many sections (%u)" + " maximum is 255,\n"), nsect); + return FALSE; + } + mdata->nsects = nsect; - mdata->sections = bfd_alloc (abfd, - mdata->nsects * sizeof (bfd_mach_o_section *)); + mdata->sections = bfd_alloc2 (abfd, + mdata->nsects, sizeof (bfd_mach_o_section *)); if (mdata->sections == NULL) return FALSE; - /* We need to check that this can be done... */ - if (nsect > 255) - (*_bfd_error_handler) (_("mach-o: there are too many sections (%d)" - " maximum is 255,\n"), nsect); - /* Create Mach-O sections. Section type, attribute and align should have been set when the section was created - either read in or specified. */ @@ -2726,7 +2790,14 @@ bfd_mach_o_append_section_to_segment (seg, s); - BFD_ASSERT (s->addr >= vma); + if (s->addr < vma) + { + (*_bfd_error_handler) + (_("section address (%lx) below start of segment (%lx)"), + (unsigned long) s->addr, (unsigned long) vma); + return FALSE; + } + vma = s->addr + s->size; } @@ -2801,7 +2872,7 @@ /* Layout the commands: set commands size and offset, set ncmds and sizeofcmds fields in header. */ -static void +static bfd_boolean bfd_mach_o_layout_commands (bfd_mach_o_data_struct *mdata) { unsigned wide = mach_o_wide_p (&mdata->header); @@ -2809,6 +2880,7 @@ ufile_ptr offset; bfd_mach_o_load_command *cmd; unsigned int align; + bfd_boolean ret = TRUE; hdrlen = wide ? BFD_MACH_O_HEADER_64_SIZE : BFD_MACH_O_HEADER_SIZE; align = wide ? 8 - 1 : 4 - 1; @@ -2864,6 +2936,7 @@ (*_bfd_error_handler) (_("unable to layout unknown load command 0x%lx"), (unsigned long) cmd->type); + ret = FALSE; break; } @@ -2872,6 +2945,8 @@ } mdata->header.sizeofcmds = offset - hdrlen; mdata->filelen = offset; + + return ret; } /* Subroutine of bfd_mach_o_build_commands: set type, name and nsects of a @@ -3006,8 +3081,7 @@ if (nbr_commands == 0) { /* Layout commands (well none...) and set headers command fields. */ - bfd_mach_o_layout_commands (mdata); - return TRUE; + return bfd_mach_o_layout_commands (mdata); } /* Create commands for segments (and symtabs), prepend them. */ @@ -3090,7 +3164,8 @@ } /* Layout commands. */ - bfd_mach_o_layout_commands (mdata); + if (! bfd_mach_o_layout_commands (mdata)) + return FALSE; /* So, now we have sized the commands and the filelen set to that. Now we can build the segment command and set the section file offsets. */ @@ -3394,6 +3469,13 @@ section->size = bfd_h_get_32 (abfd, raw.size); section->offset = bfd_h_get_32 (abfd, raw.offset); section->align = bfd_h_get_32 (abfd, raw.align); + /* PR 17512: file: 0017eb76. */ + if (section->align > 64) + { + (*_bfd_error_handler) (_("bfd_mach_o_read_section_32: overlarge alignment value: 0x%x, using 32 instead"), + section->align); + section->align = 32; + } section->reloff = bfd_h_get_32 (abfd, raw.reloff); section->nreloc = bfd_h_get_32 (abfd, raw.nreloc); section->flags = bfd_h_get_32 (abfd, raw.flags); @@ -3433,6 +3515,12 @@ section->size = bfd_h_get_64 (abfd, raw.size); section->offset = bfd_h_get_32 (abfd, raw.offset); section->align = bfd_h_get_32 (abfd, raw.align); + if (section->align > 64) + { + (*_bfd_error_handler) (_("bfd_mach_o_read_section_64: overlarge alignment value: 0x%x, using 32 instead"), + section->align); + section->align = 32; + } section->reloff = bfd_h_get_32 (abfd, raw.reloff); section->nreloc = bfd_h_get_32 (abfd, raw.nreloc); section->flags = bfd_h_get_32 (abfd, raw.flags); @@ -3637,16 +3725,21 @@ } else { - sym->strtab = bfd_alloc (abfd, sym->strsize); + sym->strtab = bfd_alloc (abfd, sym->strsize + 1); if (sym->strtab == NULL) return FALSE; if (bfd_seek (abfd, sym->stroff, SEEK_SET) != 0 || bfd_bread (sym->strtab, sym->strsize, abfd) != sym->strsize) { + /* PR 17512: file: 10888-1609-0.004. */ + bfd_release (abfd, sym->strtab); + sym->strtab = NULL; bfd_set_error (bfd_error_file_truncated); return FALSE; } + /* Zero terminate the string table. */ + sym->strtab[sym->strsize] = 0; } return TRUE; @@ -3660,29 +3753,31 @@ unsigned long i; if (sym == NULL || sym->symbols) - { - /* Return now if there are no symbols or if already loaded. */ - return TRUE; - } - - sym->symbols = bfd_alloc (abfd, sym->nsyms * sizeof (bfd_mach_o_asymbol)); + /* Return now if there are no symbols or if already loaded. */ + return TRUE; + sym->symbols = bfd_alloc2 (abfd, sym->nsyms, sizeof (bfd_mach_o_asymbol)); if (sym->symbols == NULL) { (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols")); + sym->nsyms = 0; return FALSE; } if (!bfd_mach_o_read_symtab_strtab (abfd)) - return FALSE; + goto fail; for (i = 0; i < sym->nsyms; i++) - { - if (!bfd_mach_o_read_symtab_symbol (abfd, sym, &sym->symbols[i], i)) - return FALSE; - } + if (!bfd_mach_o_read_symtab_symbol (abfd, sym, &sym->symbols[i], i)) + goto fail; return TRUE; + + fail: + bfd_release (abfd, sym->symbols); + sym->symbols = NULL; + sym->nsyms = 0; + return FALSE; } static const char * @@ -3915,8 +4010,8 @@ } /* Allocate threads. */ - cmd->flavours = bfd_alloc - (abfd, nflavours * sizeof (bfd_mach_o_thread_flavour)); + cmd->flavours = bfd_alloc2 + (abfd, nflavours, sizeof (bfd_mach_o_thread_flavour)); if (cmd->flavours == NULL) return FALSE; cmd->nflavours = nflavours; @@ -4039,7 +4134,7 @@ unsigned int module_len = wide ? 56 : 52; cmd->dylib_module = - bfd_alloc (abfd, cmd->nmodtab * sizeof (bfd_mach_o_dylib_module)); + bfd_alloc2 (abfd, cmd->nmodtab, sizeof (bfd_mach_o_dylib_module)); if (cmd->dylib_module == NULL) return FALSE; @@ -4085,10 +4180,10 @@ if (cmd->ntoc != 0) { - unsigned int i; + unsigned long i; - cmd->dylib_toc = bfd_alloc - (abfd, cmd->ntoc * sizeof (bfd_mach_o_dylib_table_of_content)); + cmd->dylib_toc = bfd_alloc2 + (abfd, cmd->ntoc, sizeof (bfd_mach_o_dylib_table_of_content)); if (cmd->dylib_toc == NULL) return FALSE; @@ -4112,8 +4207,8 @@ { unsigned int i; - cmd->indirect_syms = bfd_alloc - (abfd, cmd->nindirectsyms * sizeof (unsigned int)); + cmd->indirect_syms = bfd_alloc2 + (abfd, cmd->nindirectsyms, sizeof (unsigned int)); if (cmd->indirect_syms == NULL) return FALSE; @@ -4137,8 +4232,8 @@ unsigned long v; unsigned int i; - cmd->ext_refs = bfd_alloc - (abfd, cmd->nextrefsyms * sizeof (bfd_mach_o_dylib_reference)); + cmd->ext_refs = bfd_alloc2 + (abfd, cmd->nextrefsyms, sizeof (bfd_mach_o_dylib_reference)); if (cmd->ext_refs == NULL) return FALSE; @@ -4638,9 +4733,10 @@ return FALSE; break; default: + command->len = 0; (*_bfd_error_handler)(_("%B: unknown load command 0x%lx"), - abfd, (unsigned long) command->type); - break; + abfd, (unsigned long) command->type); + return FALSE; } return TRUE; @@ -4668,8 +4764,8 @@ } /* Allocate sections array. */ - mdata->sections = bfd_alloc (abfd, - mdata->nsects * sizeof (bfd_mach_o_section *)); + mdata->sections = bfd_alloc2 (abfd, + mdata->nsects, sizeof (bfd_mach_o_section *)); /* Fill the array. */ csect = 0; @@ -4841,7 +4937,8 @@ mdata->first_command = NULL; mdata->last_command = NULL; - cmd = bfd_alloc (abfd, header->ncmds * sizeof (bfd_mach_o_load_command)); + + cmd = bfd_alloc2 (abfd, header->ncmds, sizeof (bfd_mach_o_load_command)); if (cmd == NULL) return FALSE; @@ -5077,7 +5174,7 @@ goto error; adata->archentries = - bfd_alloc (abfd, adata->nfat_arch * sizeof (mach_o_fat_archentry)); + bfd_alloc2 (abfd, adata->nfat_arch, sizeof (mach_o_fat_archentry)); if (adata->archentries == NULL) goto error; @@ -5094,6 +5191,7 @@ } abfd->tdata.mach_o_fat_data = adata; + return abfd->xvec; error: diff -ruN binutils-2.25/bfd/nlm32-sparc.c binutils-2.25.1/bfd/nlm32-sparc.c --- binutils-2.25/bfd/nlm32-sparc.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/nlm32-sparc.c 2015-07-21 10:20:58.000000000 +0200 @@ -49,7 +49,7 @@ static reloc_howto_type nlm32_sparc_howto_table[] = { - HOWTO (R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, 0,"R_SPARC_NONE", FALSE,0,0x00000000,TRUE), + HOWTO (R_SPARC_NONE, 0,3, 0,FALSE,0,complain_overflow_dont, 0,"R_SPARC_NONE", FALSE,0,0x00000000,TRUE), HOWTO (R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_8", FALSE,0,0x000000ff,TRUE), HOWTO (R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_16", FALSE,0,0x0000ffff,TRUE), HOWTO (R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,0,"R_SPARC_32", FALSE,0,0xffffffff,TRUE), diff -ruN binutils-2.25/bfd/opncls.c binutils-2.25.1/bfd/opncls.c --- binutils-2.25/bfd/opncls.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/opncls.c 2015-07-21 10:20:58.000000000 +0200 @@ -940,15 +940,19 @@ unsigned long ul_size = (unsigned long) size; if (size != ul_size - /* A small negative size can result in objalloc_alloc allocating just - 1 byte of memory, but the caller will be expecting more. So catch - this case here. */ - || (size != 0 && (((ul_size + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1)) == 0))) + /* Note - although objalloc_alloc takes an unsigned long as its + argument, internally the size is treated as a signed long. This can + lead to problems where, for example, a request to allocate -1 bytes + can result in just 1 byte being allocated, rather than + ((unsigned long) -1) bytes. Also memory checkers will often + complain about attempts to allocate a negative amount of memory. + So to stop these problems we fail if the size is negative. */ + || ((signed long) ul_size) < 0) { bfd_set_error (bfd_error_no_memory); return NULL; } - + ret = objalloc_alloc ((struct objalloc *) abfd->memory, ul_size); if (ret == NULL) bfd_set_error (bfd_error_no_memory); diff -ruN binutils-2.25/bfd/pdp11.c binutils-2.25.1/bfd/pdp11.c --- binutils-2.25/bfd/pdp11.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/pdp11.c 2015-07-21 10:20:58.000000000 +0200 @@ -1172,6 +1172,14 @@ if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) return FALSE; + + /* If necessary, pad the section to its aligned size. */ + if ((section == obj_datasec (abfd) + || section == obj_textsec (abfd)) + && count < section->size + && (bfd_seek (abfd, section->filepos + offset + section->size - 1, SEEK_SET) != 0 + || bfd_bwrite ("", 1, abfd) != 1)) + return FALSE; } return TRUE; @@ -1189,6 +1197,14 @@ count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE; + /* PR 17512: file: 011f5a08. */ + if (count == 0) + { + obj_aout_external_syms (abfd) = NULL; + obj_aout_external_sym_count (abfd) = count; + return TRUE; + } + #ifdef USE_MMAP if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd), exec_hdr (abfd)->a_syms, @@ -3152,7 +3168,7 @@ size = bfd_get_reloc_size (howto); buf = bfd_zmalloc (size); - if (buf == NULL) + if (buf == NULL && size != 0) return FALSE; r = MY_relocate_contents (howto, flaginfo->output_bfd, pr->addend, buf); diff -ruN binutils-2.25/bfd/pe-mips.c binutils-2.25.1/bfd/pe-mips.c --- binutils-2.25/bfd/pe-mips.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/pe-mips.c 2015-07-21 10:20:58.000000000 +0200 @@ -349,8 +349,11 @@ /* Customize coffcode.h. */ #define MIPS 1 -#define RTYPE2HOWTO(cache_ptr, dst) \ - (cache_ptr)->howto = howto_table + (dst)->r_type; +#define RTYPE2HOWTO(cache_ptr, dst) \ + ((cache_ptr)->howto = \ + ((dst)->r_type < NUM_HOWTOS \ + ? howto_table + (dst)->r_type \ + : NULL)) /* Compute the addend of a reloc. If the reloc is to a common symbol, the object file contains the value of the common symbol. By the diff -ruN binutils-2.25/bfd/peXXigen.c binutils-2.25.1/bfd/peXXigen.c --- binutils-2.25/bfd/peXXigen.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/peXXigen.c 2015-07-21 10:20:58.000000000 +0200 @@ -526,6 +526,8 @@ (*_bfd_error_handler) (_("%B: aout header specifies an invalid number of data-directory entries: %d"), abfd, a->NumberOfRvaAndSizes); + bfd_set_error (bfd_error_bad_value); + /* Paranoia: If the number is corrupt, then assume that the actual entries themselves might be corrupt as well. */ a->NumberOfRvaAndSizes = 0; @@ -1149,7 +1151,7 @@ /* Ensure null termination of filename. */ buffer[256] = '\0'; - cvinfo->CVSignature = H_GET_32(abfd, buffer); + cvinfo->CVSignature = H_GET_32 (abfd, buffer); cvinfo->Age = 0; if ((cvinfo->CVSignature == CVINFO_PDB70_CVSIGNATURE) @@ -1755,6 +1757,8 @@ /* PR 17512: Handle corrupt PE binaries. */ if (edt.eat_addr + (edt.num_functions * 4) - adj >= datasize + /* PR 17512: file: 092b1829 */ + || (edt.num_functions * 4) < edt.num_functions /* PR 17512 file: 140-165018-0.004. */ || data + edt.eat_addr - adj < data) fprintf (file, _("\tInvalid Export Address Table rva (0x%lx) or entry count (0x%lx)\n"), @@ -1799,6 +1803,8 @@ /* PR 17512: Handle corrupt PE binaries. */ if (edt.npt_addr + (edt.num_names * 4) - adj >= datasize + /* PR 17512: file: bb68816e. */ + || edt.num_names * 4 < edt.num_names || (data + edt.npt_addr - adj) < data) fprintf (file, _("\tInvalid Name Pointer Table rva (0x%lx) or entry count (0x%lx)\n"), (long) edt.npt_addr, @@ -1890,6 +1896,14 @@ if (datasize == 0) return TRUE; + /* PR 17512: file: 002-193900-0.004. */ + if (datasize < stop) + { + fprintf (file, _("Virtual size of .pdata section (%ld) larger than real size (%ld)\n"), + (long) stop, (long) datasize); + return FALSE; + } + if (! bfd_malloc_and_get_section (abfd, section, &data)) { if (data != NULL) @@ -1999,7 +2013,11 @@ if (storage < 0) return NULL; if (storage) - sy = (asymbol **) bfd_malloc (storage); + { + sy = (asymbol **) bfd_malloc (storage); + if (sy == NULL) + return NULL; + } psc->symcount = bfd_canonicalize_symtab (abfd, sy); if (psc->symcount < 0) @@ -2198,7 +2216,7 @@ { int j; bfd_vma virtual_address; - long number, size; + unsigned long number, size; bfd_byte *chunk_end; /* The .reloc section is a sequence of blocks, with a header consisting @@ -2213,7 +2231,7 @@ fprintf (file, _("\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"), - (unsigned long) virtual_address, size, (unsigned long) size, number); + (unsigned long) virtual_address, size, size, number); chunk_end = p + size; if (chunk_end > end) @@ -2284,6 +2302,7 @@ bfd_vma rva_bias) { unsigned long entry, addr, size; + bfd_byte * leaf; if (data + 8 >= regions->section_end) return regions->section_end + 1; @@ -2364,18 +2383,21 @@ regions, rva_bias); } - if (regions->section_start + entry + 16 >= regions->section_end) + leaf = regions->section_start + entry; + + if (leaf + 16 >= regions->section_end + /* PR 17512: file: 055dff7e. */ + || leaf < regions->section_start) return regions->section_end + 1; fprintf (file, _("%03x %*.s Leaf: Addr: %#08lx, Size: %#08lx, Codepage: %d\n"), - (int) (entry), - indent, " ", - addr = (long) bfd_get_32 (abfd, regions->section_start + entry), - size = (long) bfd_get_32 (abfd, regions->section_start + entry + 4), - (int) bfd_get_32 (abfd, regions->section_start + entry + 8)); + (int) (entry), indent, " ", + addr = (long) bfd_get_32 (abfd, leaf), + size = (long) bfd_get_32 (abfd, leaf + 4), + (int) bfd_get_32 (abfd, leaf + 8)); /* Check that the reserved entry is 0. */ - if (bfd_get_32 (abfd, regions->section_start + entry + 12) != 0 + if (bfd_get_32 (abfd, leaf + 12) != 0 /* And that the data address/size is valid too. */ || (regions->section_start + (addr - rva_bias) + size > regions->section_end)) return regions->section_end + 1; @@ -2526,7 +2548,7 @@ /* If the extra data is all zeros then do not complain. This is just padding so that the section meets the page size requirements. */ - while (data ++ < regions.section_end) + while (++ data < regions.section_end) if (*data != 0) break; if (data < regions.section_end) @@ -2652,7 +2674,10 @@ if (idd.Type == PE_IMAGE_DEBUG_TYPE_CODEVIEW) { char signature[CV_INFO_SIGNATURE_LENGTH * 2 + 1]; - char buffer[256 + 1]; + /* PR 17512: file: 065-29434-0.001:0.1 + We need to use a 32-bit aligned buffer + to safely read in a codeview record. */ + char buffer[256 + 1] ATTRIBUTE_ALIGNED_ALIGNOF (CODEVIEW_INFO); CODEVIEW_INFO *cvinfo = (CODEVIEW_INFO *) buffer; /* The debug entry doesn't have to have to be in a section, @@ -2922,6 +2947,16 @@ struct external_IMAGE_DEBUG_DIRECTORY *dd = (struct external_IMAGE_DEBUG_DIRECTORY *)(data + (addr - section->vma)); + /* PR 17512: file: 0f15796a. */ + if (ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size + (addr - section->vma) + > bfd_get_section_size (section)) + { + _bfd_error_handler (_("%B: Data Directory size (%lx) exceeds space left in section (%lx)"), + obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size, + bfd_get_section_size (section) - (addr - section->vma)); + return FALSE; + } + for (i = 0; i < ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size / sizeof (struct external_IMAGE_DEBUG_DIRECTORY); i++) { @@ -2945,8 +2980,16 @@ } if (!bfd_set_section_contents (obfd, section, data, 0, section->size)) - _bfd_error_handler (_("Failed to update file offsets in debug directory")); + { + _bfd_error_handler (_("Failed to update file offsets in debug directory")); + return FALSE; + } } + else if (section) + { + _bfd_error_handler (_("%B: Failed to read debug data section"), obfd); + return FALSE; + } } return TRUE; @@ -3228,9 +3271,14 @@ if (entry->value.leaf == NULL) return dataend; - addr = bfd_get_32 (abfd, datastart + val); - size = entry->value.leaf->size = bfd_get_32 (abfd, datastart + val + 4); - entry->value.leaf->codepage = bfd_get_32 (abfd, datastart + val + 8); + data = datastart + val; + if (data < datastart || data >= dataend) + return dataend; + + addr = bfd_get_32 (abfd, data); + size = entry->value.leaf->size = bfd_get_32 (abfd, data + 4); + entry->value.leaf->codepage = bfd_get_32 (abfd, data + 8); + /* FIXME: We assume that the reserved field (data + 12) is OK. */ entry->value.leaf->data = bfd_malloc (size); if (entry->value.leaf->data == NULL) @@ -3560,6 +3608,7 @@ #elif defined HAVE_WCHAR_H { unsigned int i; + res = 0; for (i = min (alen, blen); i--; astring += 2, bstring += 2) { @@ -4457,6 +4506,8 @@ } free (tmp_data); } + else + result = FALSE; } } #endif diff -ruN binutils-2.25/bfd/pei-x86_64.c binutils-2.25.1/bfd/pei-x86_64.c --- binutils-2.25/bfd/pei-x86_64.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/pei-x86_64.c 2015-07-21 10:20:58.000000000 +0200 @@ -276,8 +276,9 @@ fprintf (file, ", unknown(%u))", info); break; default: - /* Already caught by the previous scan. */ - abort (); + /* PR 17512: file: 2245-7442-0.004. */ + fprintf (file, _("Unknown: %x"), PEX64_UNWCODE_CODE (dta[1])); + break; } if (unexpected) fprintf (file, " [Unexpected!]"); @@ -317,17 +318,31 @@ bfd_vma vaddr; bfd_vma end_addr; bfd_vma addr = rf->rva_UnwindData; + bfd_size_type sec_size = xdata_section->rawsize > 0 ? xdata_section->rawsize : xdata_section->size; struct pex64_unwind_info ui; vaddr = xdata_section->vma - pe_data (abfd)->pe_opthdr.ImageBase; addr -= vaddr; + /* PR 17512: file: 2245-7442-0.004. */ + if (addr >= sec_size) + { + fprintf (file, _("warning: xdata section corrupt\n")); + return; + } + if (endx) - end_addr = endx[0] - vaddr; + { + end_addr = endx[0] - vaddr; + /* PR 17512: file: 2245-7442-0.004. */ + if (end_addr > sec_size) + { + fprintf (file, _("warning: xdata section corrupt")); + end_addr = sec_size; + } + } else - end_addr = (xdata_section->rawsize != 0 ? - xdata_section->rawsize : xdata_section->size); - + end_addr = sec_size; pex64_get_unwind_info (abfd, &ui, &xdata[addr]); @@ -380,7 +395,11 @@ ui.FrameRegister == 0 ? "none" : pex_regs[(unsigned int) ui.FrameRegister]); - pex64_xdata_print_uwd_codes (file, abfd, &ui, rf); + /* PR 17512: file: 2245-7442-0.004. */ + if (ui.CountOfCodes * 2 + ui.rawUnwindCodes > xdata + xdata_section->size) + fprintf (file, _("Too many unwind codes (%ld)\n"), (long) ui.CountOfCodes); + else + pex64_xdata_print_uwd_codes (file, abfd, &ui, rf); switch (ui.Flags) { @@ -439,23 +458,24 @@ /* Display unwind tables for x86-64. */ static bfd_boolean -pex64_bfd_print_pdata (bfd *abfd, void *vfile) +pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section) { FILE *file = (FILE *) vfile; bfd_byte *pdata = NULL; bfd_byte *xdata = NULL; - asection *pdata_section = bfd_get_section_by_name (abfd, ".pdata"); - asection *xdata_section; + asection *xdata_section = NULL; bfd_vma xdata_base; bfd_size_type i; + bfd_size_type datasize; bfd_size_type stop; - bfd_vma prev_beginaddress = 0; - bfd_vma prev_unwinddata_rva = 0; + bfd_vma prev_beginaddress = (bfd_vma) -1; + bfd_vma prev_unwinddata_rva = (bfd_vma) -1; bfd_vma imagebase; int onaline = PDATA_ROW_SIZE; int seen_error = 0; bfd_vma *xdata_arr = NULL; int xdata_arr_cnt; + bfd_boolean virt_size_is_zero = FALSE; /* Sanity checks. */ if (pdata_section == NULL @@ -466,12 +486,38 @@ stop = pei_section_data (abfd, pdata_section)->virt_size; if ((stop % onaline) != 0) fprintf (file, - _("warning: .pdata section size (%ld) is not a multiple of %d\n"), - (long) stop, onaline); + _("Warning: %s section size (%ld) is not a multiple of %d\n"), + pdata_section->name, (long) stop, onaline); + + datasize = pdata_section->size; + if (datasize == 0) + { + if (stop) + fprintf (file, _("Warning: %s section size is zero\n"), + pdata_section->name); + return TRUE; + } + + /* virt_size might be zero for objects. */ + if (stop == 0 && strcmp (abfd->xvec->name, "pe-x86-64") == 0) + { + stop = (datasize / onaline) * onaline; + virt_size_is_zero = TRUE; + } + else if (datasize < stop) + { + fprintf (file, + _("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n"), + pdata_section->name, (unsigned long) datasize, + (unsigned long) stop); + /* Be sure not to read passed datasize. */ + stop = datasize / onaline; + } /* Display functions table. */ fprintf (file, - _("\nThe Function Table (interpreted .pdata section contents)\n")); + _("\nThe Function Table (interpreted %s section contents)\n"), + pdata_section->name); fprintf (file, _("vma:\t\t\tBeginAddress\t EndAddress\t UnwindData\n")); @@ -482,7 +528,10 @@ xdata_arr = (bfd_vma *) xmalloc (sizeof (bfd_vma) * ((stop / onaline) + 1)); xdata_arr_cnt = 0; - imagebase = pe_data (abfd)->pe_opthdr.ImageBase; + if (strcmp (abfd->xvec->name, "pei-x86-64") == 0) + imagebase = pe_data (abfd)->pe_opthdr.ImageBase; + else + imagebase = 0; for (i = 0; i < stop; i += onaline) { @@ -490,6 +539,7 @@ if (i + PDATA_ROW_SIZE > stop) break; + pex64_get_runtime_function (abfd, &rf, &pdata[i]); if (rf.rva_BeginAddress == 0 && rf.rva_EndAddress == 0 @@ -528,8 +578,9 @@ seen_error = 1; fprintf (file, " has negative unwind address\n"); } - if (rf.rva_UnwindData && !PEX64_IS_RUNTIME_FUNCTION_CHAINED (&rf)) - xdata_arr[xdata_arr_cnt++] = rf.rva_UnwindData; + else if ((rf.rva_UnwindData && !PEX64_IS_RUNTIME_FUNCTION_CHAINED (&rf)) + || virt_size_is_zero) + xdata_arr[xdata_arr_cnt++] = rf.rva_UnwindData; } if (seen_error) @@ -545,20 +596,42 @@ /* Find the section containing the unwind data (.xdata). */ xdata_base = xdata_arr[0]; - xdata_section = pex64_get_section_by_rva (abfd, xdata_base, ".rdata"); + /* For sections with long names, first look for the same + section name, replacing .pdata by .xdata prefix. */ + if (strcmp (pdata_section->name, ".pdata") != 0) + { + size_t len = strlen (pdata_section->name); + char *xdata_name = alloca (len + 1); - if (!xdata_section) - xdata_section = pex64_get_section_by_rva (abfd, xdata_base, ".data"); + xdata_name = memcpy (xdata_name, pdata_section->name, len + 1); + /* Transform .pdata prefix into .xdata prefix. */ + if (len > 1) + xdata_name [1] = 'x'; + xdata_section = pex64_get_section_by_rva (abfd, xdata_base, + xdata_name); + } + /* Second, try the .xdata section itself. */ if (!xdata_section) xdata_section = pex64_get_section_by_rva (abfd, xdata_base, ".xdata"); - if (!xdata_section) + /* Otherwise, if xdata_base is non zero, search also inside + other standard sections. */ + if (!xdata_section && xdata_base) + xdata_section = pex64_get_section_by_rva (abfd, xdata_base, ".rdata"); + if (!xdata_section && xdata_base) + xdata_section = pex64_get_section_by_rva (abfd, xdata_base, ".data"); + if (!xdata_section && xdata_base) xdata_section = pex64_get_section_by_rva (abfd, xdata_base, ".pdata"); - if (!xdata_section) + if (!xdata_section && xdata_base) xdata_section = pex64_get_section_by_rva (abfd, xdata_base, ".text"); + /* Transfer xdata section into xdata array. */ if (!xdata_section || !bfd_malloc_and_get_section (abfd, xdata_section, &xdata)) goto done; + /* Avoid "also used "... ouput for single unwind info + in object file. */ + prev_unwinddata_rva = (bfd_vma) -1; + /* Do dump of pdata related xdata. */ for (i = 0; i < stop; i += onaline) { @@ -566,6 +639,7 @@ if (i + PDATA_ROW_SIZE > stop) break; + pex64_get_runtime_function (abfd, &rf, &pdata[i]); if (rf.rva_BeginAddress == 0 && rf.rva_EndAddress == 0 @@ -573,7 +647,7 @@ /* We are probably into the padding of the section now. */ break; if (i == 0) - fprintf (file, "\nDump of .xdata\n"); + fprintf (file, _("\nDump of %s\n"), xdata_section->name); fputc (' ', file); fprintf_vma (file, rf.rva_UnwindData + imagebase); @@ -596,7 +670,7 @@ fprintf_vma (file, rf.rva_EndAddress + imagebase); fputc ('\n', file); - if (rf.rva_UnwindData != 0) + if (rf.rva_UnwindData != 0 || virt_size_is_zero) { if (PEX64_IS_RUNTIME_FUNCTION_CHAINED (&rf)) { @@ -635,6 +709,7 @@ identical pointers in the array; advance past all of them. */ while (p[0] <= rf.rva_UnwindData) ++p; + if (p[0] == ~((bfd_vma) 0)) p = NULL; @@ -651,6 +726,37 @@ return TRUE; } +/* Static counter of number of found pdata sections. */ +static bfd_boolean pdata_count; + +/* Functionn prototype. */ +bfd_boolean pex64_bfd_print_pdata (bfd *, void *); + +/* Helper function for bfd_map_over_section. */ +static void +pex64_print_all_pdata_sections (bfd *abfd, asection *pdata, void *obj) +{ + if (CONST_STRNEQ (pdata->name, ".pdata")) + { + if (pex64_bfd_print_pdata_section (abfd, obj, pdata)) + pdata_count++; + } +} + +bfd_boolean +pex64_bfd_print_pdata (bfd *abfd, void *vfile) +{ + asection *pdata_section = bfd_get_section_by_name (abfd, ".pdata"); + + if (pdata_section) + return pex64_bfd_print_pdata_section (abfd, vfile, pdata_section); + + pdata_count = 0; + bfd_map_over_sections (abfd, pex64_print_all_pdata_sections, vfile); + return (pdata_count > 0); +} + #define bfd_pe_print_pdata pex64_bfd_print_pdata +#define bfd_coff_std_swap_table bfd_coff_pei_swap_table #include "coff-x86_64.c" diff -ruN binutils-2.25/bfd/peicode.h binutils-2.25.1/bfd/peicode.h --- binutils-2.25/bfd/peicode.h 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/peicode.h 2015-07-21 10:20:58.000000000 +0200 @@ -1343,7 +1343,10 @@ != (bfd_size_type) opt_hdr_size) return NULL; + bfd_set_error (bfd_error_no_error); bfd_coff_swap_aouthdr_in (abfd, opthdr, & internal_a); + if (bfd_get_error () != bfd_error_no_error) + return NULL; } return coff_real_object_p (abfd, internal_f.f_nscns, &internal_f, diff -ruN binutils-2.25/bfd/reloc.c binutils-2.25.1/bfd/reloc.c --- binutils-2.25/bfd/reloc.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/reloc.c 2015-07-21 10:20:58.000000000 +0200 @@ -437,6 +437,7 @@ case 3: return 0; case 4: return 8; case 8: return 16; + case -1: return 2; case -2: return 4; default: abort (); } @@ -578,7 +579,7 @@ { bfd_vma relocation; bfd_reloc_status_type flag = bfd_reloc_ok; - bfd_size_type octets = reloc_entry->address * bfd_octets_per_byte (abfd); + bfd_size_type octets; bfd_vma output_base = 0; reloc_howto_type *howto = reloc_entry->howto; asection *reloc_target_output_section; @@ -592,6 +593,10 @@ return bfd_reloc_ok; } + /* PR 17512: file: 0f67f69d. */ + if (howto == NULL) + return bfd_reloc_undefined; + /* If we are not producing relocatable output, return an error if the symbol is not defined. An undefined weak symbol is considered to have a value of zero (SVR4 ABI, p. 4-27). */ @@ -613,8 +618,12 @@ return cont; } - /* Is the address of the relocation really within the section? */ - if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) + /* Is the address of the relocation really within the section? + Include the size of the reloc in the test for out of range addresses. + PR 17512: file: c146ab8b, 46dff27f, 38e53ebf. */ + octets = reloc_entry->address * bfd_octets_per_byte (abfd); + if (octets + bfd_get_reloc_size (howto) + > bfd_get_section_limit_octets (abfd, input_section)) return bfd_reloc_outofrange; /* Work out which section the relocation is targeted at and the @@ -964,7 +973,7 @@ { bfd_vma relocation; bfd_reloc_status_type flag = bfd_reloc_ok; - bfd_size_type octets = reloc_entry->address * bfd_octets_per_byte (abfd); + bfd_size_type octets; bfd_vma output_base = 0; reloc_howto_type *howto = reloc_entry->howto; asection *reloc_target_output_section; @@ -997,7 +1006,9 @@ } /* Is the address of the relocation really within the section? */ - if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) + octets = reloc_entry->address * bfd_octets_per_byte (abfd); + if (octets + bfd_get_reloc_size (howto) + > bfd_get_section_limit_octets (abfd, input_section)) return bfd_reloc_outofrange; /* Work out which section the relocation is targeted at and the @@ -1332,9 +1343,11 @@ bfd_vma addend) { bfd_vma relocation; + bfd_size_type octets = address * bfd_octets_per_byte (input_bfd); /* Sanity check the address. */ - if (address > bfd_get_section_limit (input_bfd, input_section)) + if (octets + bfd_get_reloc_size (howto) + > bfd_get_section_limit_octets (input_bfd, input_section)) return bfd_reloc_outofrange; /* This function assumes that we are dealing with a basic relocation @@ -1389,8 +1402,9 @@ switch (size) { default: - case 0: abort (); + case 0: + return bfd_reloc_ok; case 1: x = bfd_get_8 (input_bfd, location); break; @@ -1557,8 +1571,9 @@ switch (size) { default: - case 0: abort (); + case 0: + return; case 1: x = bfd_get_8 (input_bfd, location); break; @@ -7655,11 +7670,23 @@ abfd, input_section, * parent); goto error_return; + case bfd_reloc_notsupported: + /* PR ld/17512 + This error can result when processing a corrupt binary. + Do not abort. Issue an error message instead. */ + link_info->callbacks->einfo + (_("%X%P: %B(%A): relocation \"%R\" is not supported\n"), + abfd, input_section, * parent); + goto error_return; + default: - abort (); + /* PR 17512; file: 90c2a92e. + Report unexpected results, without aborting. */ + link_info->callbacks->einfo + (_("%X%P: %B(%A): relocation \"%R\" returns an unrecognized value %x\n"), + abfd, input_section, * parent, r); break; } - } } } diff -ruN binutils-2.25/bfd/syms.c binutils-2.25.1/bfd/syms.c --- binutils-2.25/bfd/syms.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/bfd/syms.c 2015-07-21 10:20:58.000000000 +0200 @@ -1191,6 +1191,8 @@ { nul_fun = stab; nul_str = str; + if (file_name >= (char *) info->strs + strsize || file_name < (char *) str) + file_name = NULL; if (stab + STABSIZE + TYPEOFF < info->stabs + stabsize && *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO) { @@ -1200,6 +1202,8 @@ directory_name = file_name; file_name = ((char *) str + bfd_get_32 (abfd, stab + STRDXOFF)); + if (file_name >= (char *) info->strs + strsize || file_name < (char *) str) + file_name = NULL; } } break; @@ -1207,6 +1211,10 @@ case N_SOL: /* The name of an include file. */ file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); + /* PR 17512: file: 0c680a1f. */ + /* PR 17512: file: 5da8aec4. */ + if (file_name >= (char *) info->strs + strsize || file_name < (char *) str) + file_name = NULL; break; case N_FUN: @@ -1214,6 +1222,8 @@ function_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); if (function_name == (char *) str) continue; + if (function_name >= (char *) info->strs + strsize) + function_name = NULL; nul_fun = NULL; info->indextable[i].val = bfd_get_32 (abfd, stab + VALOFF); @@ -1321,6 +1331,8 @@ if (val <= offset) { file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); + if (file_name >= (char *) info->strs + strsize || file_name < (char *) str) + file_name = NULL; *pline = 0; } break; diff -ruN binutils-2.25/bfd/tekhex.c binutils-2.25.1/bfd/tekhex.c --- binutils-2.25/bfd/tekhex.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/tekhex.c 2015-07-21 10:20:58.000000000 +0200 @@ -267,7 +267,7 @@ #define enda(x) (x->vma + x->size) static bfd_boolean -getvalue (char **srcp, bfd_vma *valuep) +getvalue (char **srcp, bfd_vma *valuep, char * endp) { char *src = *srcp; bfd_vma value = 0; @@ -279,7 +279,7 @@ len = hex_value (*src++); if (len == 0) len = 16; - while (len--) + while (len-- && src < endp) { if (!ISHEX (*src)) return FALSE; @@ -288,11 +288,11 @@ *srcp = src; *valuep = value; - return TRUE; + return len == -1U; } static bfd_boolean -getsym (char *dstp, char **srcp, unsigned int *lenp) +getsym (char *dstp, char **srcp, unsigned int *lenp, char * endp) { char *src = *srcp; unsigned int i; @@ -304,12 +304,12 @@ len = hex_value (*src++); if (len == 0) len = 16; - for (i = 0; i < len; i++) + for (i = 0; i < len && src < endp; i++) dstp[i] = src[i]; dstp[i] = 0; *srcp = src + i; *lenp = len; - return TRUE; + return i == len; } static struct data_struct * @@ -354,7 +354,7 @@ how big the data is. */ static bfd_boolean -first_phase (bfd *abfd, int type, char *src) +first_phase (bfd *abfd, int type, char *src, char * src_end) { asection *section, *alt_section; unsigned int len; @@ -368,21 +368,21 @@ { bfd_vma addr; - if (!getvalue (&src, &addr)) + if (!getvalue (&src, &addr, src_end)) return FALSE; - while (*src) + while (*src && src < src_end - 1) { insert_byte (abfd, HEX (src), addr); src += 2; addr++; } + return TRUE; } - return TRUE; case '3': /* Symbol record, read the segment. */ - if (!getsym (sym, &src, &len)) + if (!getsym (sym, &src, &len, src_end)) return FALSE; section = bfd_get_section_by_name (abfd, sym); if (section == NULL) @@ -397,17 +397,23 @@ return FALSE; } alt_section = NULL; - while (*src) + while (src < src_end && *src) { switch (*src) { case '1': /* Section range. */ src++; - if (!getvalue (&src, §ion->vma)) + if (!getvalue (&src, §ion->vma, src_end)) return FALSE; - if (!getvalue (&src, &val)) + if (!getvalue (&src, &val, src_end)) return FALSE; + if (val < section->vma) + val = section->vma; section->size = val - section->vma; + /* PR 17512: file: objdump-s-endless-loop.tekhex. + Check for overlarge section sizes. */ + if (section->size & 0x80000000) + return FALSE; section->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC; break; case '0': @@ -432,7 +438,7 @@ abfd->flags |= HAS_SYMS; new_symbol->prev = abfd->tdata.tekhex_data->symbols; abfd->tdata.tekhex_data->symbols = new_symbol; - if (!getsym (sym, &src, &len)) + if (!getsym (sym, &src, &len, src_end)) return FALSE; new_symbol->symbol.name = (const char *) bfd_alloc (abfd, (bfd_size_type) len + 1); @@ -480,7 +486,7 @@ new_symbol->symbol.section = alt_section; } } - if (!getvalue (&src, &val)) + if (!getvalue (&src, &val, src_end)) return FALSE; new_symbol->symbol.value = val - section->vma; break; @@ -498,7 +504,7 @@ record. */ static bfd_boolean -pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *)) +pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *, char *)) { unsigned int chars_on_line; bfd_boolean is_eof = FALSE; @@ -539,8 +545,7 @@ /* Put a null at the end. */ src[chars_on_line] = 0; - - if (!func (abfd, type, src)) + if (!func (abfd, type, src, src + chars_on_line)) return FALSE; } @@ -957,6 +962,7 @@ #define tekhex_find_nearest_line _bfd_nosymbols_find_nearest_line #define tekhex_find_line _bfd_nosymbols_find_line #define tekhex_find_inliner_info _bfd_nosymbols_find_inliner_info +#define tekhex_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string #define tekhex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol #define tekhex_read_minisymbols _bfd_generic_read_minisymbols #define tekhex_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol diff -ruN binutils-2.25/bfd/versados.c binutils-2.25.1/bfd/versados.c --- binutils-2.25/bfd/versados.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/versados.c 2015-07-21 10:20:58.000000000 +0200 @@ -57,6 +57,7 @@ { asection *section; /* Ptr to bfd version. */ unsigned char *contents; /* Used to build image. */ + bfd_size_type content_size; /* The size of the contents buffer. */ int pc; int relocs; /* Reloc count, valid end of pass 1. */ int donerel; /* Have relocs been translated. */ @@ -85,8 +86,8 @@ tdata_type; #define VDATA(abfd) (abfd->tdata.versados_data) -#define EDATA(abfd, n) (abfd->tdata.versados_data->e[n]) -#define RDATA(abfd, n) (abfd->tdata.versados_data->rest[n]) +#define EDATA(abfd, n) (abfd->tdata.versados_data->e[(n) < 16 ? (n) : 0]) +#define RDATA(abfd, n) (abfd->tdata.versados_data->rest[(n) < 240 ? (n) : 0]) struct ext_otr { @@ -181,14 +182,22 @@ return n; } -static int +static bfd_boolean get_record (bfd *abfd, union ext_any *ptr) { if (bfd_bread (&ptr->size, (bfd_size_type) 1, abfd) != 1 || (bfd_bread ((char *) ptr + 1, (bfd_size_type) ptr->size, abfd) != ptr->size)) - return 0; - return 1; + return FALSE; + + { + bfd_size_type amt = ptr->size + 1; + + if (amt < sizeof (* ptr)) + memset ((char *) ptr + amt, 0, sizeof (* ptr) - amt); + } + + return TRUE; } static int @@ -364,11 +373,19 @@ | (otr->map[2] << 8) | (otr->map[3] << 0); - struct esdid *esdid = &EDATA (abfd, otr->esdid - 1); - unsigned char *contents = esdid->contents; - int need_contents = 0; - unsigned int dst_idx = esdid->pc; - + struct esdid *esdid; + unsigned char *contents; + bfd_boolean need_contents = FALSE; + unsigned int dst_idx; + + /* PR 17512: file: ac7da425. */ + if (otr->esdid == 0) + return; + + esdid = &EDATA (abfd, otr->esdid - 1); + contents = esdid->contents; + dst_idx = esdid->pc; + for (shift = ((unsigned long) 1 << 31); shift && srcp < endp; shift >>= 1) { if (bits & shift) @@ -390,8 +407,8 @@ int val = get_offset (offsetlen, srcp + esdids); if (pass == 1) - need_contents = 1; - else + need_contents = TRUE; + else if (contents && dst_idx < esdid->content_size - sizeinwords * 2) for (j = 0; j < sizeinwords * 2; j++) { contents[dst_idx + (sizeinwords * 2) - j - 1] = val; @@ -413,10 +430,13 @@ } else { - arelent *n = - EDATA (abfd, otr->esdid - 1).section->relocation + rn; - n->address = dst_idx; + arelent *n; + /* PR 17512: file: 54f733e0. */ + if (EDATA (abfd, otr->esdid - 1).section == NULL) + continue; + n = EDATA (abfd, otr->esdid - 1).section->relocation + rn; + n->address = dst_idx; n->sym_ptr_ptr = (asymbol **) (size_t) id; n->addend = 0; n->howto = versados_howto_table + ((j & 1) * 2) + (sizeinwords - 1); @@ -429,31 +449,42 @@ } else { - need_contents = 1; - if (dst_idx < esdid->section->size) + need_contents = TRUE; + + if (esdid->section && contents && dst_idx < esdid->content_size - 1) if (pass == 2) { /* Absolute code, comes in 16 bit lumps. */ contents[dst_idx] = srcp[0]; contents[dst_idx + 1] = srcp[1]; } + dst_idx += 2; srcp += 2; } } + EDATA (abfd, otr->esdid - 1).pc = dst_idx; if (!contents && need_contents) { - bfd_size_type size = esdid->section->size; - esdid->contents = bfd_alloc (abfd, size); + if (esdid->section) + { + bfd_size_type size; + + size = esdid->section->size; + esdid->contents = bfd_alloc (abfd, size); + esdid->content_size = size; + } + else + esdid->contents = NULL; } } static bfd_boolean versados_scan (bfd *abfd) { - int loop = 1; + bfd_boolean loop = TRUE; int i; int j; int nsecs = 0; @@ -471,13 +502,13 @@ union ext_any any; if (!get_record (abfd, &any)) - return TRUE; + return FALSE; switch (any.header.type) { case VHEADER: break; case VEND: - loop = 0; + loop = FALSE; break; case VESTDEF: process_esd (abfd, &any.esd, 1); @@ -504,7 +535,6 @@ { amt = (bfd_size_type) esdid->relocs * sizeof (arelent); esdid->section->relocation = bfd_alloc (abfd, amt); - esdid->pc = 0; if (esdid->contents) @@ -563,7 +593,7 @@ VDATA (abfd)->ref_idx = 0; - return 1; + return TRUE; } /* Check whether an existing file is a versados file. */ @@ -585,6 +615,13 @@ return NULL; } + /* PR 17512: file: 726-2128-0.004. */ + if (len < 13) + { + bfd_set_error (bfd_error_wrong_format); + return NULL; + } + if (bfd_bread (&ext.type, (bfd_size_type) len, abfd) != len) { if (bfd_get_error () != bfd_error_system_call) @@ -652,12 +689,20 @@ file_ptr offset, bfd_size_type count) { + struct esdid *esdid; + if (!versados_pass_2 (abfd)) return FALSE; - memcpy (location, - EDATA (abfd, section->target_index).contents + offset, - (size_t) count); + esdid = &EDATA (abfd, section->target_index); + + if (esdid->contents == NULL + || offset < 0 + || (bfd_size_type) offset > esdid->content_size + || offset + count > esdid->content_size) + return FALSE; + + memcpy (location, esdid->contents + offset, (size_t) count); return TRUE; } @@ -758,6 +803,7 @@ versados_pass_2 (abfd); src = section->relocation; + if (!EDATA (abfd, section->target_index).donerel) { EDATA (abfd, section->target_index).donerel = 1; @@ -773,8 +819,15 @@ /* Section relative thing. */ struct esdid *e = &EDATA (abfd, esdid - 1); - src[count].sym_ptr_ptr = e->section->symbol_ptr_ptr; + /* PR 17512: file:cd92277c. */ + if (e->section) + src[count].sym_ptr_ptr = e->section->symbol_ptr_ptr; + else + src[count].sym_ptr_ptr = bfd_und_section_ptr->symbol_ptr_ptr; } + /* PR 17512: file:3757-2936-0.004. */ + else if ((unsigned) (esdid - ES_BASE) >= bfd_get_symcount (abfd)) + src[count].sym_ptr_ptr = bfd_und_section_ptr->symbol_ptr_ptr; else src[count].sym_ptr_ptr = symbols + esdid - ES_BASE; } @@ -796,6 +849,7 @@ #define versados_find_nearest_line _bfd_nosymbols_find_nearest_line #define versados_find_line _bfd_nosymbols_find_line #define versados_find_inliner_info _bfd_nosymbols_find_inliner_info +#define versados_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string #define versados_make_empty_symbol _bfd_generic_make_empty_symbol #define versados_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol #define versados_read_minisymbols _bfd_generic_read_minisymbols diff -ruN binutils-2.25/bfd/version.h binutils-2.25.1/bfd/version.h --- binutils-2.25/bfd/version.h 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/version.h 2015-07-21 10:20:58.000000000 +0200 @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20141223 +#define BFD_VERSION_DATE 20150721 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff -ruN binutils-2.25/bfd/version.m4 binutils-2.25.1/bfd/version.m4 --- binutils-2.25/bfd/version.m4 2014-12-23 15:22:02.000000000 +0100 +++ binutils-2.25.1/bfd/version.m4 2015-07-21 15:42:54.000000000 +0200 @@ -1 +1 @@ -m4_define([BFD_VERSION], [2.25]) +m4_define([BFD_VERSION], [2.25.1]) diff -ruN binutils-2.25/bfd/vms-alpha.c binutils-2.25.1/bfd/vms-alpha.c --- binutils-2.25/bfd/vms-alpha.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/bfd/vms-alpha.c 2015-07-21 10:20:58.000000000 +0200 @@ -364,18 +364,18 @@ ((struct vms_section_data_struct *)sec->used_by_bfd) /* To be called from the debugger. */ -struct vms_private_data_struct *bfd_vms_get_data (bfd *abfd); +struct vms_private_data_struct *bfd_vms_get_data (bfd *); -static int vms_get_remaining_object_record (bfd *abfd, int read_so_far); -static bfd_boolean _bfd_vms_slurp_object_records (bfd * abfd); +static int vms_get_remaining_object_record (bfd *, unsigned int); +static bfd_boolean _bfd_vms_slurp_object_records (bfd *); static void alpha_vms_add_fixup_lp (struct bfd_link_info *, bfd *, bfd *); static void alpha_vms_add_fixup_ca (struct bfd_link_info *, bfd *, bfd *); static void alpha_vms_add_fixup_qr (struct bfd_link_info *, bfd *, bfd *, bfd_vma); static void alpha_vms_add_fixup_lr (struct bfd_link_info *, unsigned int, bfd_vma); -static void alpha_vms_add_lw_reloc (struct bfd_link_info *info); -static void alpha_vms_add_qw_reloc (struct bfd_link_info *info); +static void alpha_vms_add_lw_reloc (struct bfd_link_info *); +static void alpha_vms_add_qw_reloc (struct bfd_link_info *); struct vector_type { @@ -521,6 +521,9 @@ asection *section; flagword bfd_flags; + /* PR 17512: file: 3d9e9fe9. */ + if (offset >= PRIV (recrd.rec_size)) + return FALSE; eisd = (struct vms_eisd *)(PRIV (recrd.rec) + offset); rec_size = bfd_getl32 (eisd->eisdsize); @@ -788,7 +791,7 @@ Return the size of the record or 0 on failure. */ static int -vms_get_remaining_object_record (bfd *abfd, int read_so_far) +vms_get_remaining_object_record (bfd *abfd, unsigned int read_so_far) { unsigned int to_read; @@ -824,6 +827,9 @@ return 0; PRIV (recrd.buf_size) = to_read; } + /* PR 17512: file: 025-1974-0.004. */ + else if (to_read <= read_so_far) + return 0; /* Read the remaining record. */ to_read -= read_so_far; @@ -854,9 +860,12 @@ { unsigned char *ptr; unsigned char *vms_rec; + unsigned char *end; int subtype; vms_rec = PRIV (recrd.rec); + /* PR 17512: file: 62736583. */ + end = PRIV (recrd.buf) + PRIV (recrd.buf_size); vms_debug2 ((2, "HDR/EMH\n")); @@ -868,28 +877,42 @@ { case EMH__C_MHD: /* Module header. */ + if (vms_rec + 21 >= end) + goto fail; PRIV (hdr_data).hdr_b_strlvl = vms_rec[6]; PRIV (hdr_data).hdr_l_arch1 = bfd_getl32 (vms_rec + 8); PRIV (hdr_data).hdr_l_arch2 = bfd_getl32 (vms_rec + 12); PRIV (hdr_data).hdr_l_recsiz = bfd_getl32 (vms_rec + 16); + if ((vms_rec + 20 + vms_rec[20] + 1) >= end) + goto fail; PRIV (hdr_data).hdr_t_name = _bfd_vms_save_counted_string (vms_rec + 20); ptr = vms_rec + 20 + vms_rec[20] + 1; + if ((ptr + *ptr + 1) >= end) + goto fail; PRIV (hdr_data).hdr_t_version =_bfd_vms_save_counted_string (ptr); ptr += *ptr + 1; + if (ptr + 17 >= end) + goto fail; PRIV (hdr_data).hdr_t_date = _bfd_vms_save_sized_string (ptr, 17); break; case EMH__C_LNM: + if (vms_rec + PRIV (recrd.rec_size - 6) > end) + goto fail; PRIV (hdr_data).hdr_c_lnm = _bfd_vms_save_sized_string (vms_rec, PRIV (recrd.rec_size - 6)); break; case EMH__C_SRC: + if (vms_rec + PRIV (recrd.rec_size - 6) > end) + goto fail; PRIV (hdr_data).hdr_c_src = _bfd_vms_save_sized_string (vms_rec, PRIV (recrd.rec_size - 6)); break; case EMH__C_TTL: + if (vms_rec + PRIV (recrd.rec_size - 6) > end) + goto fail; PRIV (hdr_data).hdr_c_ttl = _bfd_vms_save_sized_string (vms_rec, PRIV (recrd.rec_size - 6)); break; @@ -900,6 +923,7 @@ break; default: + fail: bfd_set_error (bfd_error_wrong_format); return FALSE; } @@ -2524,6 +2548,9 @@ /* Reset the record pointer. */ PRIV (recrd.rec) = buf; + /* PR 17512: file: 7d7c57c2. */ + if (PRIV (recrd.rec_size) < sizeof (struct vms_eihd)) + goto error_ret; vms_debug2 ((2, "file type is image\n")); if (_bfd_vms_slurp_eihd (abfd, &eisd_offset, &eihs_offset) != TRUE) @@ -9188,6 +9215,9 @@ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) #define alpha_vms_print_symbol vms_print_symbol #define alpha_vms_get_symbol_info vms_get_symbol_info +#define alpha_vms_get_symbol_version_string \ + _bfd_nosymbols_get_symbol_version_string + #define alpha_vms_read_minisymbols _bfd_generic_read_minisymbols #define alpha_vms_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol #define alpha_vms_get_lineno _bfd_nosymbols_get_lineno diff -ruN binutils-2.25/bfd/xcofflink.c binutils-2.25.1/bfd/xcofflink.c --- binutils-2.25/bfd/xcofflink.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/bfd/xcofflink.c 2015-07-21 10:20:58.000000000 +0200 @@ -5738,7 +5738,7 @@ size = bfd_get_reloc_size (howto); buf = bfd_zmalloc (size); - if (buf == NULL) + if (buf == NULL && size != 0) return FALSE; rstat = _bfd_relocate_contents (howto, output_bfd, addend, buf); diff -ruN binutils-2.25/binutils/ChangeLog binutils-2.25.1/binutils/ChangeLog --- binutils-2.25/binutils/ChangeLog 2014-12-23 15:22:06.000000000 +0100 +++ binutils-2.25.1/binutils/ChangeLog 2015-07-21 15:42:56.000000000 +0200 @@ -1,3 +1,545 @@ +2015-07-21 Tristan Gingold + + * configure: Regenerate. + +2015-07-16 Alan Modra + + PR binutils/18672 + * readelf.c (get_32bit_dynamic_section): Correct buffer limit test. + (get_64bit_dynamic_section): Likewise. + +2015-03-25 Nick Clifton + + * coffgrok.c: Remove redundant prototypes. + +2015-03-24 Nick Clifton + + Apply from master: + 2015-02-26 Nick Clifton + + PR binutils/17512 + * coffgrok.c (do_type): Check for an out of range tag index. + Check for integer overflow computing array dimension. + (do_define): Likewise. + + 2015-02-26 Nick Clifton + + PR binutils/17512 + * resrc.c (write_rc_messagetable): Tighten check for invalid + message lengths. + + 2015-02-13 Nick Clifton + + * coffgrok.c (do_define): Add check for type size overflow. + * srconv.c (walk_tree_sfile): Check that enough sections are + available before parsing. + (prescan): Likewise. + + 2015-02-03 Nick Clifton + + PR binutils/17512 + * objdump.c (display_any_bfd): Fail if archives nest too deeply. + + 2015-01-27 Nick Clifton + + PR binutils/17512 + * dlltool.c (identify_search_archive): If the last archive was the + same as the current archive, terminate the loop. + + * addr2line.c (slurp_symtab): If the symcount is zero, free the + symbol table pointer. + + * rcparse.y: Add checks to avoid integer divide by zero. + * rescoff.c (read_coff_rsrc): Add check on the size of the + resource section. + (read_coff_res_dir): Add check on the nesting level. + Check for resource names overrunning the buffer. + * resrc.c (write_rc_messagetable): Update formatting. + Add check of 'elen' being zero. + + 2015-01-23 Nick Clifton + + * nlmconv.c (powerpc_mangle_relocs): Fix build errors introduced + by recent delta, when compiling on for a 32-bit host. + + 2015-01-21 Nick Clifton + + PR binutils/17512 + * addr2line.c (main): Call bfd_set_error_program_name. + * ar.c (main): Likewise. + * coffdump.c (main): Likewise. + * cxxfilt.c (main): Likewise. + * dlltool.c (main): Likewise. + * nlmconv.c (main): Likewise. + * nm.c (main): Likewise. + * objdump.c (main): Likewise. + * size.c (main): Likewise. + * srconv.c (main): Likewise. + * strings.c (main): Likewise. + * sysdump.c (main): Likewise. + * windmc.c (main): Likewise. + * windres.c (main): Likewise. + * objcopy.c (main): Likewise. + (copy_relocations_in_section): Check for relocs without associated + symbol pointers. + + 2015-01-21 Nick Clifton + + PR binutils/17512 + * coffgrok.c (do_type): Check that computed ref exists. + (doit): Add range checks when computing section for scope. + + 2015-01-08 Nick Clifton + + PR binutils/17512 + * ojcopy.c (copy_object): Free the symbol table if no symbols + could be loaded. + (copy_file): Use bfd_close_all_done to close files that could not + be copied. + + * sysdump.c (getINT): Fail if reading off the end of the buffer. + Replace call to abort with a call to fatal. + (getCHARS): Prevetn reading off the end of the buffer. + + * nlmconv.c (i386_mangle_relocs): Skip relocs without an + associated symbol. + (powerpc_mangle_relocs): Skip unrecognised relocs. Check address + range before applying a reloc. + + 2015-01-07 Nick Clifton + + PR binutils/17512 + * dlltool.c (scan_obj_file): Break loop if the last archive + displayed matches the current archive. + + * objdump.c (display_any_bfd): Add a depth limit to nested archive + display in order to avoid infinite loops. + * srconv.c: Replace calls to abort with calls to fatal with an + error message. + + 2015-01-06 Nick Clifton + + PR binutils/17512 + * coffdump.c (dump_coff_section): Check for a symbol being + available before printing its name. + (main): Check the return value from coff_grok. + * coffgrok.c: Reformat and tidy. + Add range checks to most functions. + (coff_grok): Return NULL if the input bfd is not in a COFF + format. + * coffgrok.h: Reformat and tidy. + (struct coff_section): Change the nrelocs field to unsigned. + * srconv.c (main): Check the return value from coff_grok. + + 2015-01-05 Nick Clifton + + PR binutils/17512 + * nm.c (print_symbol): Add 'is_synthetic' parameter. Use it to + help initialize the info.elfinfo field. + (print_size_symbols): Add 'synth_count' parameter. Use it to set + the is_synthetic parameter when calling print_symbol. + (print_symbols): Likewise. + (display_rel_file): Pass synth_count to printing function. + (display_archive): Break loop if the last archive displayed + matches the current archive. + * size.c (display_archive): Likewise. + +2015-03-24 Nick Clifton + + Apply from master: + 2015-02-26 Nick Clifton + + PR binutils/17512 + * dwarf.c (display_debug_loc): Pacify the undefined behaviour + sanitizer by simplifying address difference calculation. + (struct Frame_Chunk): Change type of cfa_offset to dwarf_vma in + order to avoid arithmetic overflows. + (frame_display_row): Cast cfa_offset before printing it. + (display_debug_frames): Likewise. + Check for an unexpected segment size. + Chnage type of 'l' local to dwarf_vma and cast it back to an int + when printing. + (process_cu_tu_index): Tighten check for an invalid ncols value. + * readelf.c (process_corefile_note_segment): Check for + inote.descdata extending beyond the end of the section. + (process_v850_notes): Likewise. + + 2015-02-13 Nick Clifton + + PR binutils/17512 + * dwarf.c (read_leb128): Fix test for shift becoming too large. + + PR binutils/17531 + * dwarf.c (display_debug_aranges): Add check for an excessive + ar_length value. + (process_cu_tu_index): Check for a row * columns sum being too + large. + + 2015-02-13 Alan Modra + + * dwarf.c: Formatting, whitespace. + (process_debug_info): Style fix. + + 2015-02-11 Nick Clifton + + PR binutils/17531 + * dwarf.c (display_debug_pubnames_worker): Work around compiler + bug checking address ranges. + (display_debug_frames): Likewise. + (display_gdb_index): Likewise. + (process_cu_tu_index): Add range check on the ncols value. + + 2015-02-10 Nick Clifton + + PR binutils/17512 + * dwarf.c (eh_addr_size): Use an unsigned type. + (size_of_encoded_value): Return an unsigned type. + (read_leb128): Break if the shift becomes too big. + (process_extended_line_op): Do not read the address if the length + is too long. + (read_cie): Warn and fail if the pointer size or segment size are + too big. + * dwarf.h (DWARF2_External_LineInfo): Delete unused and incorrect + structure definition. + (DWARF2_External_PubNames): Likewise. + (DWARF2_External_CompUnit): Likewise. + (DWARF2_External_ARange): Likewise. + (DWARF2_Internal_LineInfo): Use dwarf_vma type for + li_prologue_length. + (eh_addr_size): Update prototype. + + PR binutils/17531 + * dwarf.c (process_debug_info): Zero the debug information array + since correct initialisation cannot be relied upon. + (process_cu_tu_index): Improve range checks. + + PR binutils/17531 + * dwarf.c (display_debug_pubnames_worker): Use dwarf_vma type for + offset. + + 2015-02-06 Nick Clifton + + PR binutils/17512 + * dwarf.c (display_debug_frames): Fix range checks to work on + 32-bit binaries complied on a 64-bit host. + + PR binutils/17531 + * dwarf.c (xcmalloc): Fail if the arguments are too big. + (xcrealloc): Likewise. + (xcalloc2): Likewise. + * readelf.c (process_mips_specific): Fail if an option has an + invalid size. + + 2015-02-05 Alan Modra + + PR binutils/17926 + * dwarf.c (dwarf_select_sections_by_letters): Don't refer to optarg. + + 2015-02-04 Nick Clifton + + PR binutils/17531 + * dwarf.c (read_and_display_attr_value): Test for a block length + being so long that it wraps around to before the start of the block. + (process_debug_info): Test for section_begin wrapping around to + before the start of the section. + (display_gdb_index): Test for num_cus being so large that the end + address wraps around to before the start of the section. + (process_cu_tu_index): Test for j being so large that the section + index pool wraps around to before the start of the section. + + 2015-02-03 Nick Clifton + + PR binutils/17531 + * dwarf.c (process_debug_info): Add range check. + (display_debug_pubnames_worker): Likewise. + (display_gdb_index): Fix range check. + (process_cu_tu_index): Add range check. + * readelf.c (get_data): Change parameter types from size_t to + bfd_size_type. Add checks for loss of accuracy when casting from + bfd_size_type to size_t. + (get_dynamic_data): Likewise. + (process_section_groups): Limit number of error messages. + + 2015-01-12 H.J. Lu + + * dwarf.c (process_debug_info): Properly check abbrev size. + + 2015-01-12 Nick Clifton + + PR binutils/17531 + * dwarf.c (process_debug_info): Check for abbrev_base being larger + than the section size. + (process_cu_tu_index): Use xcalloc2 to allocate the CU and TU + arrays. + (xcalloc2): New function. Like xcalloc, but checks for overflow. + (display_debug_addr): Use xcalloc to allocate the debug_addr_info + array. Check for an address_base that is too large. + + * dwarf.h (xcalloc2): Prototype. + + 2015-01-05 Nick Clifton + + PR binutils/17531 + * dwarf.c (alloc_num_debug_info_entries): New variable. + (process_debug_info): Set it. Use it to avoid displaying + attributes for which there is no info. + (display_debug_abbrev): Check that the debug_info_entry index is + valid before using it. + (display_loc_list_dwo): Likewise. + (process_cu_tu_index): Add range check for an overlarge dw_sect + value. + (free_debug_memory): Reset alloc_num_debug_info_entries. + + 2014-12-22 Nick Clifton + + PR binutils/17531 + * dwarf.c (decode_location_expression): Check for an out of range + value for a DW_OP_GNU_entry_value expression. + (display_debug_lines_raw): Check for a partial + .debug_line. section being encountered without a prior, full + .debug.line section. + (display_debug_lines_decoded): Likewise. Also check for + li_line_range being zero. + (display_debug_pubnames_worker): Check for an invalid pn_length + field. + (read_cie): Add range checks. + + 2014-12-11 Nick Clifton + + PR binutils/17512 + * dwarf.c (display_gdb_index): Add more range checks. + + 2014-12-08 Nick Clifton + + PR binutils/17531 + * dwarf.c (display_debug_frames): Check for a negative + augmentation data length. + (display_gdb_index): Check for invalid offsets. + + 2014-12-01 H.J. Lu + + * dwarf.c (process_cu_tu_index): Properly check for an out of + range row index. + + 2014-12-01 Nick Clifton + + PR binutils/17512 + * dwarf.h (struct dwarf_section): Add user_data field. + * dwarf.c (frame_need_space): Check for an over large register + number. + (display_debug_frames): Check the return value from + frame_need_space. Check for a CFA expression that is so long the + start address wraps around. + (debug_displays): Initialise the user_data field. + * objdump.c (load_specific_debug_section): Save the BFD section + pointer in the user_data field of the dwarf_section structure. + (free_debug_section): Update BFD section data when freeing section + contents. + * readelf.c (load_specific_debug_section): Initialise the + user_data field. + + 2014-12-01 Nick Clifton + + PR binutils/17531 + * dwarf.c (process_cu_tu_index): Check for an out of range row + index. + * elfcomm.c (adjust_relative_path): Change name_len parameter to + an unsigned long. Check for path length overflow. + (process_archive_index_and_symbols): Check for invalid header + size. + (setup_archive): Add checks for invalid archives. + (get_archive_member_name): Add range checks. + * elfcomm.h (adjust_relative_path): Update prototyoe. + * readelf.c (process_archive): Add range checks. + + 2014-11-26 Nick Clifton + + PR binutils/17512 + * dwarf.c (display_block): Do nothing if the block starts after + the end of the buffer. + (read_and_display_attr_value): Add range checks. + (struct Frame_Chunk): Make the ncols and ra fields unsigned. + (frame_need_space): Test for an ncols of zero. + (read_cie): Fail if the augmentation data extends off the end of + the buffer. + (display_debug_frames): Add checks for read_cie failing. Add + range checks. + + 2014-11-21 Nick Clifton + + PR binutils/17512 + * dwarf.c (get_encoded_value): Check for an encoded size of 0. + (display_debug_lines_raw): Check for an invalid line range value. + (display_debug_frames): Check for corrupt augmentation data. + + 2014-11-19 Jan-Benedict Glaw + + * dwarf.c (process_extended_line_op): Fix signedness warning. + + 2014-11-18 Nick Clifton + + PR binutils/17512 + * dwarf.c (get_encoded_value): Warn and return if the encoded + value is more than 64-bits long. + (SAFE_BYTE_GET): Do not attempt to read more than 64-bits. + (process_extended_line_op): Add more range checks. + (decode_location_expression): Use the return value from + display_block. Add more range checks. + (read_debug_line_header): Add range check. + (display_debug_lines_raw): Add range checks. + (display_debug_frames): Silently skip multiple zero terminators. + Add range checks. + (process_cu_tu_index): Check for non-existant or empty sections. + Use SAFE_BYTE_GET instead of byte_get. + +2015-03-24 Nick Clifton + + Apply from master: + 2015-02-26 Nick Clifton + + PR binutils/17512 + * readelf.c (process_corefile_note_segment): Check for + inote.descdata extending beyond the end of the section. + (process_v850_notes): Likewise. + + 2015-02-24 Mike Frysinger + + PR binutils/17531 + * readelf.c (process_symbol_table): Declare chained. Increment it + in every loop. Abort when chained is larger than nchains. Move + error check outside of chain loop. + + 2015-02-10 Nick Clifton + + PR binutils/17531 + * readelf.c (dump_relocations): Handle printing offsets which are + MIN_INT. + (process_corefile_note_segment): Add range check of the namesz + field. + + 2015-02-06 Nick Clifton + + * readelf.c (process_mips_specific): Fail if an option has an + invalid size. + + 2015-02-03 Nick Clifton + + PR binutils/17531 + * readelf.c (get_data): Change parameter types from size_t to + bfd_size_type. Add checks for loss of accuracy when casting from + bfd_size_type to size_t. + (get_dynamic_data): Likewise. + (process_section_groups): Limit number of error messages. + + 2015-01-05 Nick Clifton + + * readelf.c (slurp_ia64_unwind_table): Warn if the reloc could not + be indentified. + (dynamic_section_mips_val): Warn if the timestamp is invalid. + (print_mips_got_entry): Add a data_end parameter. Warn if a read + would go beyond the end of the data, and return an error value. + (process_mips_specific): Do not read options from beyond the end + of the section. + Correct code to display optional data at the end of an option. + Warn if there are too many GOT symbols. + Update calls to print_mips_got_entry, and handle error returns. + + 2014-12-08 Nick Clifton + + PR binutils/17531 + * readelf.c (dump_ia64_unwind): Add range checks. + (slurp_ia64_unwind_table): Change to a boolean function. Add + range checks. + (process_version_sections): Add range checks. + (get_symbol_version_string): Add check for missing section + headers. + + 2014-12-03 Nick Clifton + + PR binutils/17531 + * readelf.c (get_machine_flags): Replace call to abort with a + warning message and a return value. + (get_elf_section_flags): Likewise. + (get_symbol_visibility): Likewise. + (get_ia64_symbol_other): Likewise. + (get_ia64_symbol_other): Likewise. + (is_32bit_abs_reloc): Likewise. + (apply_relocations): Likewise. + (display_arm_attribute): Likewise. + + 2014-12-01 Nick Clifton + + PR binutils/17512 + * readelf.c (load_specific_debug_section): Initialise the + user_data field. + + 2014-12-01 Nick Clifton + + PR binutils/17531 + * readelf.c (process_archive): Add range checks. + + 2014-11-28 Alan Modra + + * readelf.c (get_32bit_elf_symbols): Cast bfd_size_type values to + unsigned long for %lx. + (get_64bit_elf_symbols, process_section_groups): Likewise. + + 2014-11-27 Espen Grindhaug + Nick Clifton + + PR binutils/17531 + * readelf.c (get_data): Move excessive length check to earlier on + in the function and allow for wraparound in the arithmetic. + (get_32bit_elf_symbols): Terminate early if the section size is + zero. Check for an invalid sh_entsize. Check for an index + section with an invalid size. + (get_64bit_elf_symbols): Likewise. + (process_section_groups): Check for an invalid sh_entsize. + + 2014-11-21 Nick Clifton + + PR binutils/17531 + * readelf.c (process_version_sections): Prevent an infinite loop + processing corrupt version need data. + (process_corefile_note_segment): Handle corrupt notes. + + 2014-11-18 Nick Clifton + + PR binutils/17531 + * readelf.c (get_unwind_section_word): Skip reloc processing if + there are no relocs associated with the section. + (decode_tic6x_unwind_bytecode): Warn and return if the stack + pointer adjustment falls off the end of the buffer. + +2015-02-11 Alan Modra + + Apply from master. + 2015-01-12 Alan Modra + * prdbg.c (print_debugging_info): Don't use void* for function + pointer param. + * budbg.h (print_debugging_info): Update prototype. + + 2014-12-18 Mark Wielaard + * dwarf.c (read_and_display_attr_value): Change display name of + DW_LANG_C11 from (ANSI C11) to (C11). + + 2014-12-11 Alan Modra + * configure.ac: Check for long long and sizes of long long and long. + * elfcomm.h (HOST_WIDEST_INT): Test HAVE_LONG_LONG in place of + __STDC_VERSION__ and __GNUC__. + * strings.c (print_strings): Likewise. + * dwarf.c (DWARF_VMA_FMT, DWARF_VMA_FMT_LONG): Likewise. + * configure: Regenerate. + * config.in: Regenerate. + + 2014-11-24 Mark Wielaard + * dwarf.c (read_and_display_attr_value): Handle DW_LANG_C11, + DW_LANG_C_plus_plus_11 and DW_LANG_C_plus_plus_14. + +2014-12-23 Tristan Gingold + + * configure: Regenerate. + 2014-12-23 Tristan Gingold * configure: Regenerate. diff -ruN binutils-2.25/binutils/addr2line.c binutils-2.25.1/binutils/addr2line.c --- binutils-2.25/binutils/addr2line.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/addr2line.c 2015-07-21 10:20:58.000000000 +0200 @@ -140,6 +140,14 @@ syms = xmalloc (storage); symcount = bfd_canonicalize_dynamic_symtab (abfd, syms); } + + /* PR 17512: file: 2a1d3b5b. + Do not pretend that we have some symbols when we don't. */ + if (symcount <= 0) + { + free (syms); + syms = NULL; + } } /* These global variables are used to pass information between @@ -423,6 +431,7 @@ program_name = *argv; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&argc, &argv); diff -ruN binutils-2.25/binutils/ar.c binutils-2.25.1/binutils/ar.c --- binutils-2.25/binutils/ar.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/binutils/ar.c 2015-07-21 10:20:58.000000000 +0200 @@ -691,6 +691,7 @@ program_name = argv[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); #if BFD_SUPPORTS_PLUGINS bfd_plugin_set_program_name (program_name); #endif diff -ruN binutils-2.25/binutils/budbg.h binutils-2.25.1/binutils/budbg.h --- binutils-2.25/binutils/budbg.h 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/budbg.h 2015-07-21 10:20:58.000000000 +0200 @@ -29,7 +29,8 @@ /* Routine used to print generic debugging information. */ extern bfd_boolean print_debugging_info - (FILE *, void *, bfd *, asymbol **, void *, bfd_boolean); + (FILE *, void *, bfd *, asymbol **, + char * (*) (struct bfd *, const char *, int), bfd_boolean); /* Routines used to read and write stabs information. */ diff -ruN binutils-2.25/binutils/coffdump.c binutils-2.25.1/binutils/coffdump.c --- binutils-2.25/binutils/coffdump.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/coffdump.c 2015-07-21 10:20:58.000000000 +0200 @@ -417,21 +417,23 @@ static void dump_coff_section (struct coff_section *ptr) { - int i; + unsigned int i; tab (1); - printf (_("section %s %d %d address %x size %x number %d nrelocs %d"), + printf (_("section %s %d %d address %x size %x number %d nrelocs %u"), ptr->name, ptr->code, ptr->data, ptr->address,ptr->size, ptr->number, ptr->nrelocs); nl (); for (i = 0; i < ptr->nrelocs; i++) { + struct coff_reloc * r = ptr->relocs + i; tab (0); printf ("(%x %s %x)", - ptr->relocs[i].offset, - ptr->relocs[i].symbol->name, - ptr->relocs[i].addend); + r->offset, + /* PR 17512: file: 0a38fb7c. */ + r->symbol == NULL ? _("") : r->symbol->name, + r->addend); nl (); } @@ -498,6 +500,7 @@ program_name = av[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&ac, &av); @@ -549,9 +552,11 @@ } tree = coff_grok (abfd); - - coff_dump (tree); - printf ("\n"); + if (tree) + { + coff_dump (tree); + printf ("\n"); + } return 0; } diff -ruN binutils-2.25/binutils/coffgrok.c binutils-2.25.1/binutils/coffgrok.c --- binutils-2.25/binutils/coffgrok.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/coffgrok.c 2015-07-21 10:20:58.000000000 +0200 @@ -28,7 +28,6 @@ #include "sysdep.h" #include "bfd.h" #include "libiberty.h" - #include "coff/internal.h" #include "../bfd/libcoff.h" #include "bucomm.h" @@ -54,7 +53,7 @@ #define N(x) ((x)->_n._n_nptr[1]) static struct coff_ptr_struct *rawsyms; -static int rawcount; +static unsigned int rawcount; static bfd *abfd; #define PTR_SIZE 4 @@ -66,19 +65,6 @@ #define INDEXOF(p) ((struct coff_ptr_struct *)(p)-(rawsyms)) -static struct coff_scope *empty_scope (void); -static struct coff_symbol *empty_symbol (void); -static void push_scope (int); -static void pop_scope (void); -static void do_sections_p1 (struct coff_ofile *); -static void do_sections_p2 (struct coff_ofile *); -static struct coff_where *do_where (int); -static struct coff_line *do_lines (int, char *); -static struct coff_type *do_type (int); -static struct coff_visible *do_visible (int); -static int do_define (int, struct coff_scope *); -static struct coff_ofile *doit (void); - static struct coff_scope * empty_scope (void) { @@ -122,6 +108,9 @@ static void pop_scope (void) { + /* PR 17512: file: 809933ac. */ + if (top_scope == NULL) + fatal (_("Out of context scope change encountered")); top_scope = top_scope->parent; } @@ -138,10 +127,14 @@ for (idx = 0, section = abfd->sections; section; section = section->next, idx++) { long relsize; - int i = section->target_index; + unsigned int i = section->target_index; arelent **relpp; long relcount; + /* PR 17512: file: 2d6effca. */ + if (i > abfd->section_count) + fatal (_("Invalid section target index: %u"), i); + relsize = bfd_get_reloc_upper_bound (abfd, section); if (relsize < 0) bfd_fatal (bfd_get_filename (abfd)); @@ -182,26 +175,51 @@ { unsigned int j; + /* PR 17512: file: 7c1a36e8. + A corrupt COFF binary might have a reloc count but no relocs. + Handle this here. */ + if (section->relocation == NULL) + continue; + for (j = 0; j < section->reloc_count; j++) { - int idx; + unsigned int idx; int i = section->target_index; - struct coff_reloc *r = head->sections[i].relocs + j; + struct coff_reloc *r; arelent *sr = section->relocation + j; + + if (i > head->nsections) + fatal (_("Invalid section target index: %d"), i); + /* PR 17512: file: db850ff4. */ + if (j >= head->sections[i].nrelocs) + fatal (_("Target section has insufficient relocs")); + r = head->sections[i].relocs + j; r->offset = sr->address; r->addend = sr->addend; idx = ((coff_symbol_type *) (sr->sym_ptr_ptr[0]))->native - rawsyms; + if (idx >= rawcount) + { + if (rawcount == 0) + fatal (_("Symbol index %u encountered when there are no symbols"), idx); + non_fatal (_("Invalid symbol index %u encountered"), idx); + idx = 0; + } r->symbol = tindex[idx]; } } } static struct coff_where * -do_where (int i) +do_where (unsigned int i) { - struct internal_syment *sym = &rawsyms[i].u.syment; + struct internal_syment *sym; struct coff_where *where = (struct coff_where *) (xmalloc (sizeof (struct coff_where))); + + if (i >= rawcount) + fatal ("Invalid symbol index: %d\n", i); + + sym = &rawsyms[i].u.syment; where->offset = sym->n_value; if (sym->n_scnum == -1) @@ -231,7 +249,16 @@ case C_EXTDEF: case C_LABEL: where->where = coff_where_memory; - where->section = &ofile->sections[sym->n_scnum]; + /* PR 17512: file: 07a37c40. */ + /* PR 17512: file: 0c2eb101. */ + if (sym->n_scnum >= ofile->nsections || sym->n_scnum < 0) + { + non_fatal (_("Invalid section number (%d) encountered"), + sym->n_scnum); + where->section = ofile->sections; + } + else + where->section = &ofile->sections[sym->n_scnum]; break; case C_REG: case C_REGPARM: @@ -248,47 +275,61 @@ where->where = coff_where_typedef; break; default: - abort (); + fatal (_("Unrecognized symbol class: %d"), sym->n_sclass); break; } return where; } -static -struct coff_line * +static struct coff_line * do_lines (int i, char *name ATTRIBUTE_UNUSED) { struct coff_line *res = (struct coff_line *) xcalloc (sizeof (struct coff_line), 1); asection *s; unsigned int l; - /* Find out if this function has any line numbers in the table */ + /* Find out if this function has any line numbers in the table. */ for (s = abfd->sections; s; s = s->next) { + /* PR 17512: file: 07a37c40. + A corrupt COFF binary can have a linenumber count in the header + but no line number table. This should be reported elsewhere, but + do not rely upon this. */ + if (s->lineno == NULL) + continue; + for (l = 0; l < s->lineno_count; l++) { if (s->lineno[l].line_number == 0) { if (rawsyms + i == ((coff_symbol_type *) (&(s->lineno[l].u.sym[0])))->native) { - /* These lines are for this function - so count them and stick them on */ + /* These lines are for this function - so count them and stick them on. */ int c = 0; /* Find the linenumber of the top of the function, since coff linenumbers are relative to the start of the function. */ int start_line = rawsyms[i + 3].u.auxent.x_sym.x_misc.x_lnsz.x_lnno; l++; - for (c = 0; s->lineno[l + c + 1].line_number; c++) + for (c = 0; + /* PR 17512: file: c2825452. */ + l + c + 1 < s->lineno_count + && s->lineno[l + c + 1].line_number; + c++) ; - /* Add two extra records, one for the prologue and one for the epilogue */ + /* Add two extra records, one for the prologue and one for the epilogue. */ c += 1; res->nlines = c; res->lines = (int *) (xcalloc (sizeof (int), c)); res->addresses = (int *) (xcalloc (sizeof (int), c)); res->lines[0] = start_line; res->addresses[0] = rawsyms[i].u.syment.n_value - s->vma; - for (c = 0; s->lineno[l + c + 1].line_number; c++) + for (c = 0; + /* PR 17512: file: c2825452. */ + l + c + 1 < s->lineno_count + && s->lineno[l + c + 1].line_number; + c++) { res->lines[c + 1] = s->lineno[l + c].line_number + start_line - 1; res->addresses[c + 1] = s->lineno[l + c].u.offset; @@ -301,18 +342,30 @@ return res; } -static -struct coff_type * -do_type (int i) +static struct coff_type * +do_type (unsigned int i) { - struct internal_syment *sym = &rawsyms[i].u.syment; - union internal_auxent *aux = &rawsyms[i + 1].u.auxent; - struct coff_type *res = - (struct coff_type *) xmalloc (sizeof (struct coff_type)); - int type = sym->n_type; + struct internal_syment *sym; + union internal_auxent *aux; + struct coff_type *res = (struct coff_type *) xmalloc (sizeof (struct coff_type)); + int type; int which_dt = 0; int dimind = 0; + if (i >= rawcount) + fatal (_("Type entry %u does not have enough symbolic information"), i); + + if (!rawsyms[i].is_sym) + fatal (_("Type entry %u does not refer to a symbol"), i); + sym = &rawsyms[i].u.syment; + + if (sym->n_numaux == 0 || i >= rawcount -1 || rawsyms[i + 1].is_sym) + aux = NULL; + else + aux = &rawsyms[i + 1].u.auxent; + + type = sym->n_type; + res->type = coff_basic_type; res->u.basic = type & 0xf; @@ -322,28 +375,33 @@ case T_VOID: if (sym->n_numaux && sym->n_sclass == C_STAT) { - /* This is probably a section definition */ + /* This is probably a section definition. */ res->type = coff_secdef_type; + if (aux == NULL) + fatal (_("Section definition needs a section length")); res->size = aux->x_scn.x_scnlen; + + /* PR 17512: file: 081c955d. + Fill in the asecdef structure as well. */ + res->u.asecdef.address = 0; + res->u.asecdef.size = 0; } else { if (type == 0) { - /* Don't know what this is, let's make it a simple int */ + /* Don't know what this is, let's make it a simple int. */ res->size = INT_SIZE; res->u.basic = T_UINT; } else { - /* Else it could be a function or pointer to void */ + /* Else it could be a function or pointer to void. */ res->size = 0; } } break; - - break; case T_UCHAR: case T_CHAR: res->size = 1; @@ -370,17 +428,39 @@ case T_UNION: if (sym->n_numaux) { + if (aux == NULL) + fatal (_("Aggregate definition needs auxillary information")); + if (aux->x_sym.x_tagndx.p) { - /* Referring to a struct defined elsewhere */ + unsigned int idx; + + /* PR 17512: file: e72f3988. */ + if (aux->x_sym.x_tagndx.l < 0 || aux->x_sym.x_tagndx.p < rawsyms) + { + non_fatal (_("Invalid tag index %#lx encountered"), aux->x_sym.x_tagndx.l); + idx = 0; + } + else + idx = INDEXOF (aux->x_sym.x_tagndx.p); + + if (idx >= rawcount) + { + if (rawcount == 0) + fatal (_("Symbol index %u encountered when there are no symbols"), idx); + non_fatal (_("Invalid symbol index %u encountered"), idx); + idx = 0; + } + + /* Referring to a struct defined elsewhere. */ res->type = coff_structref_type; - res->u.astructref.ref = tindex[INDEXOF (aux->x_sym.x_tagndx.p)]; + res->u.astructref.ref = tindex[idx]; res->size = res->u.astructref.ref ? res->u.astructref.ref->type->size : 0; } else { - /* A definition of a struct */ + /* A definition of a struct. */ last_struct = res; res->type = coff_structdef_type; res->u.astructdef.elements = empty_scope (); @@ -391,23 +471,34 @@ } else { - /* No auxents - it's anonymous */ + /* No auxents - it's anonymous. */ res->type = coff_structref_type; res->u.astructref.ref = 0; res->size = 0; } break; case T_ENUM: + if (aux == NULL) + fatal (_("Enum definition needs auxillary information")); if (aux->x_sym.x_tagndx.p) { - /* Referring to a enum defined elsewhere */ + unsigned int idx = INDEXOF (aux->x_sym.x_tagndx.p); + + /* PR 17512: file: 1ef037c7. */ + if (idx >= rawcount) + fatal (_("Invalid enum symbol index %u encountered"), idx); + /* Referring to a enum defined elsewhere. */ res->type = coff_enumref_type; - res->u.aenumref.ref = tindex[INDEXOF (aux->x_sym.x_tagndx.p)]; - res->size = res->u.aenumref.ref->type->size; + res->u.aenumref.ref = tindex[idx]; + /* PR 17512: file: b85b67e8. */ + if (res->u.aenumref.ref) + res->size = res->u.aenumref.ref->type->size; + else + res->size = 0; } else { - /* A definition of an enum */ + /* A definition of an enum. */ last_enum = res; res->type = coff_enumdef_type; res->u.aenumdef.elements = empty_scope (); @@ -428,12 +519,27 @@ { struct coff_type *ptr = ((struct coff_type *) xmalloc (sizeof (struct coff_type))); - int els = (dimind < DIMNUM - ? aux->x_sym.x_fcnary.x_ary.x_dimen[dimind] - : 0); + int els; + + if (aux == NULL) + fatal (_("Array definition needs auxillary information")); + els = (dimind < DIMNUM + ? aux->x_sym.x_fcnary.x_ary.x_dimen[dimind] + : 0); + ++dimind; ptr->type = coff_array_type; - ptr->size = els * res->size; + /* PR 17512: file: ae1971e2. + Check for integer overflow. */ + { + long long a, z; + a = els; + z = res->size; + a *= z; + ptr->size = (int) a; + if (ptr->size != a) + non_fatal (_("Out of range sum for els (%#x) * size (%#x)"), els, res->size); + } ptr->u.array.dim = els; ptr->u.array.array_of = res; res = ptr; @@ -443,6 +549,7 @@ { struct coff_type *ptr = (struct coff_type *) xmalloc (sizeof (struct coff_type)); + ptr->size = PTR_SIZE; ptr->type = coff_pointer_type; ptr->u.pointer.points_to = res; @@ -453,11 +560,12 @@ { struct coff_type *ptr = (struct coff_type *) xmalloc (sizeof (struct coff_type)); + ptr->size = 0; ptr->type = coff_function_type; ptr->u.function.function_returns = res; ptr->u.function.parameters = empty_scope (); - ptr->u.function.lines = do_lines (i, sym->_n._n_nptr[1]); + ptr->u.function.lines = do_lines (i, N(sym)); ptr->u.function.code = 0; last_function_type = ptr; res = ptr; @@ -475,6 +583,7 @@ struct coff_visible *visible = (struct coff_visible *) (xmalloc (sizeof (struct coff_visible))); enum coff_vis_type t; + switch (sym->n_sclass) { case C_MOS: @@ -485,11 +594,9 @@ case C_MOE: t = coff_vis_member_of_enum; break; - case C_REGPARM: t = coff_vis_regparam; break; - case C_REG: t = coff_vis_register; break; @@ -504,8 +611,6 @@ t = coff_vis_autoparam; break; case C_AUTO: - - t = coff_vis_auto; break; case C_LABEL: @@ -524,27 +629,32 @@ t = coff_vis_ext_def; break; default: - abort (); + fatal (_("Unrecognised symbol class: %d"), sym->n_sclass); break; - } visible->type = t; return visible; } +/* Define a symbol and attach to block B. */ + static int -do_define (int i, struct coff_scope *b) +do_define (unsigned int i, struct coff_scope *b) { static int symbol_index; - struct internal_syment *sym = &rawsyms[i].u.syment; - - /* Define a symbol and attach to block b */ + struct internal_syment *sym; struct coff_symbol *s = empty_symbol (); + if (b == NULL) + fatal (_("ICE: do_define called without a block")); + if (i >= rawcount) + fatal (_("Out of range symbol index: %u"), i); + + sym = &rawsyms[i].u.syment; s->number = ++symbol_index; - s->name = sym->_n._n_nptr[1]; + s->name = N(sym); s->sfile = cur_sfile; - /* Glue onto the ofile list */ + /* Glue onto the ofile list. */ if (lofile >= 0) { if (ofile->symbol_list_tail) @@ -552,7 +662,7 @@ else ofile->symbol_list_head = s; ofile->symbol_list_tail = s; - /* And the block list */ + /* And the block list. */ } if (b->vars_tail) b->vars_tail->next = s; @@ -567,21 +677,42 @@ tindex[i] = s; - /* We remember the lowest address in each section for each source file */ - + /* We remember the lowest address in each section for each source file. */ if (s->where->where == coff_where_memory && s->type->type == coff_secdef_type) { - struct coff_isection *is = cur_sfile->section + s->where->section->number; + struct coff_isection *is; - if (!is->init) + /* PR 17512: file: 4676c97f. */ + if (cur_sfile == NULL) + non_fatal (_("Section referenced before any file is defined")); + else { - is->low = s->where->offset; - is->high = s->where->offset + s->type->size; - is->init = 1; - is->parent = s->where->section; - } + is = cur_sfile->section + s->where->section->number; + + if (!is->init) + { + is->low = s->where->offset; + /* PR 17512: file: 37e7a80d. + Check for integer overflow computing low + size. */ + { + long long a, z; + a = s->where->offset; + z = s->type->size; + a += z; + is->high = (int) a; + if (a != is->high) + non_fatal (_("Out of range sum for offset (%#x) + size (%#x)"), + is->low, s->type->size); + } + /* PR 17512: file: 37e7a80d. */ + if (is->high < s->where->offset) + fatal (_("Out of range type size: %u"), s->type->size); + is->init = 1; + is->parent = s->where->section; + } + } } if (s->type->type == coff_function_type) @@ -590,15 +721,14 @@ return i + sym->n_numaux + 1; } - -static -struct coff_ofile * +static struct coff_ofile * doit (void) { - int i; - int infile = 0; + unsigned int i; + bfd_boolean infile = FALSE; struct coff_ofile *head = (struct coff_ofile *) xmalloc (sizeof (struct coff_ofile)); + ofile = head; head->source_head = 0; head->source_tail = 0; @@ -611,23 +741,25 @@ for (i = 0; i < rawcount;) { struct internal_syment *sym = &rawsyms[i].u.syment; + switch (sym->n_sclass) { case C_FILE: { - /* new source file announced */ + /* New source file announced. */ struct coff_sfile *n = (struct coff_sfile *) xmalloc (sizeof (struct coff_sfile)); + n->section = (struct coff_isection *) xcalloc (sizeof (struct coff_isection), abfd->section_count + 1); cur_sfile = n; - n->name = sym->_n._n_nptr[1]; + n->name = N(sym); n->next = 0; if (infile) - { - pop_scope (); - } - infile = 1; + pop_scope (); + else + infile = TRUE; + push_scope (1); file_scope = n->scope = top_scope; @@ -642,20 +774,29 @@ break; case C_FCN: { - char *name = sym->_n._n_nptr[1]; + char *name = N(sym); + if (name[1] == 'b') { - /* Function start */ + /* Function start. */ push_scope (0); - last_function_type->u.function.code = top_scope; - top_scope->sec = ofile->sections + sym->n_scnum; + /* PR 17512: file: 0ef7fbaf. */ + if (last_function_type) + last_function_type->u.function.code = top_scope; + /* PR 17512: file: 22908266. */ + if (sym->n_scnum < ofile->nsections && sym->n_scnum >= 0) + top_scope->sec = ofile->sections + sym->n_scnum; + else + top_scope->sec = NULL; top_scope->offset = sym->n_value; } else { + /* PR 17512: file: e92e42e1. */ + if (top_scope == NULL) + fatal (_("Function start encountered without a top level scope.")); top_scope->size = sym->n_value - top_scope->offset + 1; pop_scope (); - } i += sym->n_numaux + 1; } @@ -663,17 +804,23 @@ case C_BLOCK: { - char *name = sym->_n._n_nptr[1]; + char *name = N(sym); + if (name[1] == 'b') { - /* Block start */ + /* Block start. */ push_scope (1); - top_scope->sec = ofile->sections + sym->n_scnum; + /* PR 17512: file: af7e8e83. */ + if (sym->n_scnum < ofile->nsections && sym->n_scnum >= 0) + top_scope->sec = ofile->sections + sym->n_scnum; + else + top_scope->sec = NULL; top_scope->offset = sym->n_value; - } else { + if (top_scope == NULL) + fatal (_("Block start encountered without a scope for it.")); top_scope->size = sym->n_value - top_scope->offset + 1; pop_scope (); } @@ -682,37 +829,50 @@ break; case C_REGPARM: case C_ARG: + if (last_function_symbol == NULL) + fatal (_("Function arguments encountered without a function definition")); i = do_define (i, last_function_symbol->type->u.function.parameters); break; case C_MOS: case C_MOU: case C_FIELD: + /* PR 17512: file: 43ab21f4. */ + if (last_struct == NULL) + fatal (_("Structure element encountered without a structure definition")); i = do_define (i, last_struct->u.astructdef.elements); break; case C_MOE: + if (last_enum == NULL) + fatal (_("Enum element encountered without an enum definition")); i = do_define (i, last_enum->u.aenumdef.elements); break; case C_STRTAG: case C_ENTAG: case C_UNTAG: - /* Various definition */ + /* Various definition. */ + if (top_scope == NULL) + fatal (_("Aggregate defintion encountered without a scope")); i = do_define (i, top_scope); break; case C_EXT: case C_LABEL: + if (file_scope == NULL) + fatal (_("Label defintion encountered without a file scope")); i = do_define (i, file_scope); break; case C_STAT: case C_TPDEF: case C_AUTO: case C_REG: + if (top_scope == NULL) + fatal (_("Variable defintion encountered without a scope")); i = do_define (i, top_scope); break; - default: - abort (); case C_EOS: i += sym->n_numaux + 1; break; + default: + fatal (_("Unrecognised symbol class: %d"), sym->n_sclass); } } do_sections_p2 (head); @@ -725,6 +885,13 @@ long storage; struct coff_ofile *p; abfd = inabfd; + + if (! bfd_family_coff (abfd)) + { + non_fatal (_("%s: is not a COFF format file"), bfd_get_filename (abfd)); + return NULL; + } + storage = bfd_get_symtab_upper_bound (abfd); if (storage < 0) diff -ruN binutils-2.25/binutils/coffgrok.h binutils-2.25.1/binutils/coffgrok.h --- binutils-2.25/binutils/coffgrok.h 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/coffgrok.h 2015-07-21 10:20:58.000000000 +0200 @@ -19,22 +19,22 @@ MA 02110-1301, USA. */ #define T_NULL 0 -#define T_VOID 1 /* function argument (only used by compiler) */ -#define T_CHAR 2 /* character */ -#define T_SHORT 3 /* short integer */ -#define T_INT 4 /* integer */ -#define T_LONG 5 /* long integer */ -#define T_FLOAT 6 /* floating point */ -#define T_DOUBLE 7 /* double word */ -#define T_STRUCT 8 /* structure */ -#define T_UNION 9 /* union */ -#define T_ENUM 10 /* enumeration */ -#define T_MOE 11 /* member of enumeration*/ -#define T_UCHAR 12 /* unsigned character */ -#define T_USHORT 13 /* unsigned short */ -#define T_UINT 14 /* unsigned integer */ -#define T_ULONG 15 /* unsigned long */ -#define T_LNGDBL 16 /* long double */ +#define T_VOID 1 /* Function argument (only used by compiler). */ +#define T_CHAR 2 /* Character */ +#define T_SHORT 3 /* Short integer */ +#define T_INT 4 /* Integer */ +#define T_LONG 5 /* Long integer */ +#define T_FLOAT 6 /* Floating point */ +#define T_DOUBLE 7 /* Double word */ +#define T_STRUCT 8 /* Structure */ +#define T_UNION 9 /* Union */ +#define T_ENUM 10 /* Enumeration */ +#define T_MOE 11 /* Member of enumeration*/ +#define T_UCHAR 12 /* Unsigned character */ +#define T_USHORT 13 /* Unsigned short */ +#define T_UINT 14 /* Unsigned integer */ +#define T_ULONG 15 /* Unsigned long */ +#define T_LNGDBL 16 /* Long double */ struct coff_reloc @@ -51,7 +51,7 @@ int data; int address; int number; /* 0..n, .text = 0 */ - int nrelocs; + unsigned int nrelocs; int size; struct coff_reloc *relocs; struct bfd_section *bfd_section; @@ -68,7 +68,8 @@ struct coff_symbol *symbol_list_tail; }; -struct coff_isection { +struct coff_isection +{ int low; int high; int init; @@ -82,145 +83,139 @@ struct coff_sfile *next; /* Vector which maps where in each output section - the input file has it's data */ + the input file has it's data. */ struct coff_isection *section; - }; - - struct coff_type +struct coff_type { int size; enum { coff_pointer_type, coff_function_type, coff_array_type, coff_structdef_type, coff_basic_type, coff_structref_type, coff_enumref_type, coff_enumdef_type, coff_secdef_type - } type; + } type; + union { struct - { + { int address; int size; } asecdef; struct - { - int isstruct; - struct coff_scope *elements; - int idx; - } - astructdef; - struct - { - struct coff_symbol *ref; - } astructref; - - struct - { - struct coff_scope *elements; - int idx; - } aenumdef; - struct - { - struct coff_symbol *ref; - } aenumref; - - struct - { - struct coff_type *points_to; - } pointer; - struct - { - int dim; - struct coff_type *array_of; - } array; - - struct - { - struct coff_type *function_returns; - struct coff_scope *parameters; - struct coff_scope *code; - struct coff_line *lines; - } function; + { + int isstruct; + struct coff_scope *elements; + int idx; + } astructdef; + + struct + { + struct coff_symbol *ref; + } astructref; + + struct + { + struct coff_scope *elements; + int idx; + } aenumdef; + + struct + { + struct coff_symbol *ref; + } aenumref; + + struct + { + struct coff_type *points_to; + } pointer; + + struct + { + int dim; + struct coff_type *array_of; + } array; + + struct + { + struct coff_type * function_returns; + struct coff_scope * parameters; + struct coff_scope * code; + struct coff_line * lines; + } function; + int basic; /* One of T_VOID.. T_UINT */ - } u; + } u; }; +struct coff_line +{ + int nlines; + int * lines; + int * addresses; +}; + +struct coff_scope +{ + struct coff_section * sec; /* Which section. */ + int offset; /* Where. */ + int size; /* How big. */ + struct coff_scope * parent; /* One up. */ + struct coff_scope * next; /* Next along. */ + int nvars; + struct coff_symbol * vars_head; /* Symbols. */ + struct coff_symbol * vars_tail; + struct coff_scope * list_head; /* Children. */ + struct coff_scope * list_tail; +}; + +struct coff_visible +{ + enum coff_vis_type + { + coff_vis_ext_def, + coff_vis_ext_ref, + coff_vis_int_def, + coff_vis_common, + coff_vis_auto, + coff_vis_register, + coff_vis_tag, + coff_vis_member_of_struct, + coff_vis_member_of_enum, + coff_vis_autoparam, + coff_vis_regparam, + } type; +}; - struct coff_line - { - int nlines; - int *lines; - int *addresses; - }; - - - struct coff_scope - { - struct coff_section *sec; /* What section */ - int offset; /* where */ - int size; /* How big */ - struct coff_scope *parent; /* one up */ - - struct coff_scope *next; /*next along */ - - int nvars; - - struct coff_symbol *vars_head; /* symbols */ - struct coff_symbol *vars_tail; - - struct coff_scope *list_head; /* children */ - struct coff_scope *list_tail; - - }; - - - struct coff_visible - { - enum coff_vis_type - { - coff_vis_ext_def, - coff_vis_ext_ref, - coff_vis_int_def, - coff_vis_common, - coff_vis_auto, - coff_vis_register, - coff_vis_tag, - coff_vis_member_of_struct, - coff_vis_member_of_enum, - coff_vis_autoparam, - coff_vis_regparam, - } type; - }; - - struct coff_where - { - enum - { - coff_where_stack, coff_where_memory, coff_where_register, coff_where_unknown, - coff_where_strtag, coff_where_member_of_struct, - coff_where_member_of_enum, coff_where_entag, coff_where_typedef - - } where; - int offset; - int bitoffset; - int bitsize; - struct coff_section *section; - }; - - struct coff_symbol - { - char *name; - int tag; - struct coff_type *type; - struct coff_where *where; - struct coff_visible *visible; - struct coff_symbol *next; - struct coff_symbol *next_in_ofile_list; /* For the ofile list */ - int number; - int er_number; - struct coff_sfile *sfile; - }; +struct coff_where +{ + enum + { + coff_where_stack, coff_where_memory, coff_where_register, coff_where_unknown, + coff_where_strtag, coff_where_member_of_struct, + coff_where_member_of_enum, coff_where_entag, coff_where_typedef + } where; + + int offset; + int bitoffset; + int bitsize; + struct coff_section *section; +}; + +struct coff_symbol +{ + char * name; + int tag; + struct coff_type * type; + struct coff_where * where; + struct coff_visible * visible; + struct coff_symbol * next; + struct coff_symbol * next_in_ofile_list; /* For the ofile list. */ + int number; + int er_number; + struct coff_sfile * sfile; +}; -struct coff_ofile *coff_grok (bfd *); +struct coff_ofile * coff_grok (bfd *); diff -ruN binutils-2.25/binutils/config.in binutils-2.25.1/binutils/config.in --- binutils-2.25/binutils/config.in 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/binutils/config.in 2015-07-21 10:20:58.000000000 +0200 @@ -108,6 +108,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H +/* Define to 1 if the system has the type `long long'. */ +#undef HAVE_LONG_LONG + /* Define if mbstate_t exists in wchar.h. */ #undef HAVE_MBSTATE_T @@ -208,6 +211,12 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `long long', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG + /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. diff -ruN binutils-2.25/binutils/configure binutils-2.25.1/binutils/configure --- binutils-2.25/binutils/configure 2014-12-23 15:22:06.000000000 +0100 +++ binutils-2.25.1/binutils/configure 2015-07-21 15:42:56.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for binutils 2.25. +# Generated by GNU Autoconf 2.64 for binutils 2.25.1. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -556,8 +556,8 @@ # Identity of this package. PACKAGE_NAME='binutils' PACKAGE_TARNAME='binutils' -PACKAGE_VERSION='2.25' -PACKAGE_STRING='binutils 2.25' +PACKAGE_VERSION='2.25.1' +PACKAGE_STRING='binutils 2.25.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1333,7 +1333,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures binutils 2.25 to adapt to many kinds of systems. +\`configure' configures binutils 2.25.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1404,7 +1404,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of binutils 2.25:";; + short | recursive ) echo "Configuration of binutils 2.25.1:";; esac cat <<\_ACEOF @@ -1525,7 +1525,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -binutils configure 2.25 +binutils configure 2.25.1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -1887,6 +1887,238 @@ } # ac_fn_c_check_func +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type + # ac_fn_c_check_decl LINENO SYMBOL VAR # ------------------------------------ # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. @@ -1935,7 +2167,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by binutils $as_me 2.25, which was +It was created by binutils $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -3743,7 +3975,7 @@ # Define the identity of the package. PACKAGE='binutils' - VERSION='2.25' + VERSION='2.25.1' cat >>confdefs.h <<_ACEOF @@ -10987,7 +11219,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10990 "configure" +#line 11222 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11093,7 +11325,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11096 "configure" +#line 11328 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12567,6 +12799,84 @@ esac +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" +if test "x$ac_cv_type_long_long" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if test "${ac_cv_sizeof_long_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + +fi + + for ac_header in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h wchar.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -14850,7 +15160,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by binutils $as_me 2.25, which was +This file was extended by binutils $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14914,7 +15224,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -binutils config.status 2.25 +binutils config.status 2.25.1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -ruN binutils-2.25/binutils/configure.ac binutils-2.25.1/binutils/configure.ac --- binutils-2.25/binutils/configure.ac 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/binutils/configure.ac 2015-07-21 10:20:58.000000000 +0200 @@ -124,6 +124,9 @@ esac AC_SUBST(DEMANGLER_NAME) +AC_CHECK_SIZEOF([long]) +AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)]) + AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h wchar.h) AC_HEADER_SYS_WAIT ACX_HEADER_STRING diff -ruN binutils-2.25/binutils/cxxfilt.c binutils-2.25.1/binutils/cxxfilt.c --- binutils-2.25/binutils/cxxfilt.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/cxxfilt.c 2015-07-21 10:20:58.000000000 +0200 @@ -176,6 +176,7 @@ program_name = argv[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&argc, &argv); diff -ruN binutils-2.25/binutils/dlltool.c binutils-2.25.1/binutils/dlltool.c --- binutils-2.25/binutils/dlltool.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/dlltool.c 2015-07-21 10:20:58.000000000 +0200 @@ -1699,6 +1699,9 @@ scan_open_obj_file (arfile); next = bfd_openr_next_archived_file (f, arfile); bfd_close (arfile); + /* PR 17512: file: 58715298. */ + if (next == arfile) + break; arfile = next; } @@ -1991,6 +1994,31 @@ run (as_name, cmd); } +static const char * temp_file_to_remove[5]; +#define TEMP_EXPORT_FILE 0 +#define TEMP_HEAD_FILE 1 +#define TEMP_TAIL_FILE 2 +#define TEMP_HEAD_O_FILE 3 +#define TEMP_TAIL_O_FILE 4 + +static void +unlink_temp_files (void) +{ + unsigned i; + + if (dontdeltemps > 0) + return; + + for (i = 0; i < ARRAY_SIZE (temp_file_to_remove); i++) + { + if (temp_file_to_remove[i]) + { + unlink (temp_file_to_remove[i]); + temp_file_to_remove[i] = NULL; + } + } +} + static void gen_exp_file (void) { @@ -2007,6 +2035,8 @@ /* xgettext:c-format */ fatal (_("Unable to open temporary assembler file: %s"), TMP_ASM); + temp_file_to_remove[TEMP_EXPORT_FILE] = TMP_ASM; + /* xgettext:c-format */ inform (_("Opened temporary file: %s"), TMP_ASM); @@ -2143,7 +2173,6 @@ } } - /* Add to the output file a way of getting to the exported names without using the import library. */ if (add_indirect) @@ -2231,7 +2260,10 @@ assemble_file (TMP_ASM, exp_name); if (dontdeltemps == 0) - unlink (TMP_ASM); + { + temp_file_to_remove[TEMP_EXPORT_FILE] = NULL; + unlink (TMP_ASM); + } inform (_("Generated exports file")); } @@ -2936,6 +2968,8 @@ return NULL; } + temp_file_to_remove[TEMP_HEAD_FILE] = TMP_HEAD_S; + fprintf (f, "%s IMAGE_IMPORT_DESCRIPTOR\n", ASM_C); fprintf (f, "\t.section\t.idata$2\n"); @@ -2997,6 +3031,7 @@ fatal (_("failed to open temporary head file: %s: %s"), TMP_HEAD_O, bfd_get_errmsg ()); + temp_file_to_remove[TEMP_HEAD_O_FILE] = TMP_HEAD_O; return abfd; } @@ -3012,6 +3047,8 @@ return NULL; } + temp_file_to_remove[TEMP_HEAD_FILE] = TMP_HEAD_S; + /* Output the __tailMerge__xxx function */ fprintf (f, "%s Import trampoline\n", ASM_C); fprintf (f, "\t.section\t.text\n"); @@ -3080,6 +3117,7 @@ fatal (_("failed to open temporary head file: %s: %s"), TMP_HEAD_O, bfd_get_errmsg ()); + temp_file_to_remove[TEMP_HEAD_O_FILE] = TMP_HEAD_O; return abfd; } @@ -3095,6 +3133,8 @@ return NULL; } + temp_file_to_remove[TEMP_TAIL_FILE] = TMP_TAIL_S; + if (!no_idata4) { fprintf (f, "\t.section\t.idata$4\n"); @@ -3151,6 +3191,7 @@ fatal (_("failed to open temporary tail file: %s: %s"), TMP_TAIL_O, bfd_get_errmsg ()); + temp_file_to_remove[TEMP_TAIL_O_FILE] = TMP_TAIL_O; return abfd; } @@ -3176,6 +3217,8 @@ /* xgettext:c-format */ inform (_("Creating library file: %s"), imp_name); + xatexit (unlink_temp_files); + bfd_set_format (outarch, bfd_archive); outarch->has_armap = 1; outarch->is_thin_archive = 0; @@ -3245,13 +3288,7 @@ } /* Delete all the temp files. */ - if (dontdeltemps == 0) - { - unlink (TMP_HEAD_O); - unlink (TMP_HEAD_S); - unlink (TMP_TAIL_O); - unlink (TMP_TAIL_S); - } + unlink_temp_files (); if (dontdeltemps < 2) { @@ -3586,7 +3623,15 @@ } if (last_arfile != NULL) - bfd_close (last_arfile); + { + bfd_close (last_arfile); + /* PR 17512: file: 8b2168d4. */ + if (last_arfile == arfile) + { + last_arfile = NULL; + break; + } + } last_arfile = arfile; } @@ -4041,6 +4086,7 @@ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + bfd_set_error_program_name (program_name); expandargv (&ac, &av); while ((c = getopt_long (ac, av, diff -ruN binutils-2.25/binutils/dwarf.c binutils-2.25.1/binutils/dwarf.c --- binutils-2.25/binutils/dwarf.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/binutils/dwarf.c 2015-07-21 10:20:58.000000000 +0200 @@ -38,12 +38,13 @@ static int warned_about_missing_comp_units = FALSE; static unsigned int num_debug_info_entries = 0; +static unsigned int alloc_num_debug_info_entries = 0; static debug_info *debug_information = NULL; /* Special value for num_debug_info_entries to indicate that the .debug_info section could not be loaded/parsed. */ #define DEBUG_INFO_UNAVAILABLE (unsigned int) -1 -int eh_addr_size; +unsigned int eh_addr_size; int do_debug_info; int do_debug_abbrevs; @@ -104,7 +105,7 @@ #define FLAG_DEBUG_LINES_RAW 1 #define FLAG_DEBUG_LINES_DECODED 2 -static int +static unsigned int size_of_encoded_value (int encoding) { switch (encoding & 0x7) @@ -124,7 +125,7 @@ unsigned char * end) { unsigned char * data = * pdata; - int size = size_of_encoded_value (encoding); + unsigned int size = size_of_encoded_value (encoding); dwarf_vma val; if (data + size >= end) @@ -134,6 +135,22 @@ return 0; } + /* PR 17512: file: 002-829853-0.004. */ + if (size > 8) + { + warn (_("Encoded size of %d is too large to read\n"), size); + * pdata = end; + return 0; + } + + /* PR 17512: file: 1085-5603-0.004. */ + if (size == 0) + { + warn (_("Encoded size of 0 is too small to read\n")); + * pdata = end; + return 0; + } + if (encoding & DW_EH_PE_signed) val = byte_get_signed (data, size); else @@ -146,17 +163,17 @@ return val; } -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) -#ifndef __MINGW32__ -#define DWARF_VMA_FMT "ll" -#define DWARF_VMA_FMT_LONG "%16.16llx" +#if defined HAVE_LONG_LONG && SIZEOF_LONG_LONG > SIZEOF_LONG +# ifndef __MINGW32__ +# define DWARF_VMA_FMT "ll" +# define DWARF_VMA_FMT_LONG "%16.16llx" +# else +# define DWARF_VMA_FMT "I64" +# define DWARF_VMA_FMT_LONG "%016I64x" +# endif #else -#define DWARF_VMA_FMT "I64" -#define DWARF_VMA_FMT_LONG "%016I64x" -#endif -#else -#define DWARF_VMA_FMT "l" -#define DWARF_VMA_FMT_LONG "%16.16lx" +# define DWARF_VMA_FMT "l" +# define DWARF_VMA_FMT_LONG "%16.16lx" #endif /* Convert a dwarf vma value into a string. Returns a pointer to a static @@ -264,6 +281,11 @@ shift += 7; if ((byte & 0x80) == 0) break; + + /* PR 17512: file: 0ca183b8. + FIXME: Should we signal this error somehow ? */ + if (shift >= sizeof (result) * 8) + break; } if (length_return != NULL) @@ -304,10 +326,10 @@ else \ amount = 0; \ } \ - if (amount) \ - VAL = byte_get ((PTR), amount); \ - else \ + if (amount == 0 || amount > 8) \ VAL = 0; \ + else \ + VAL = byte_get ((PTR), amount); \ } \ while (0) @@ -408,7 +430,7 @@ len = read_uleb128 (data, & bytes_read, end); data += bytes_read; - if (len == 0 || data == end) + if (len == 0 || data == end || len > (uintptr_t) (end - data)) { warn (_("Badly formed extended line op encountered!\n")); return bytes_read; @@ -427,7 +449,15 @@ break; case DW_LNE_set_address: - SAFE_BYTE_GET (adr, data, len - bytes_read - 1, end); + /* PR 17512: file: 002-100480-0.004. */ + if (len - bytes_read - 1 > 8) + { + warn (_("Length (%d) of DW_LNE_set_address op is too long\n"), + len - bytes_read - 1); + adr = 0; + } + else + SAFE_BYTE_GET (adr, data, len - bytes_read - 1, end); printf (_("set Address to 0x%s\n"), dwarf_vmatoa ("x", adr)); state_machine_regs.address = adr; state_machine_regs.op_index = 0; @@ -449,7 +479,7 @@ printf ("%s\n\n", name); if (((unsigned int) (data - orig_data) != len) || data == end) - warn (_("DW_LNE_define_file: Bad opcode length\n")); + warn (_("DW_LNE_define_file: Bad opcode length\n")); break; case DW_LNE_set_discriminator: @@ -490,68 +520,68 @@ break; case DW_LNE_HP_source_file_correlation: { - unsigned char *edata = data + len - bytes_read - 1; + unsigned char *edata = data + len - bytes_read - 1; - printf ("DW_LNE_HP_source_file_correlation\n"); + printf ("DW_LNE_HP_source_file_correlation\n"); - while (data < edata) - { - unsigned int opc; - - opc = read_uleb128 (data, & bytes_read, edata); - data += bytes_read; - - switch (opc) - { - case DW_LNE_HP_SFC_formfeed: - printf (" DW_LNE_HP_SFC_formfeed\n"); - break; - case DW_LNE_HP_SFC_set_listing_line: - printf (" DW_LNE_HP_SFC_set_listing_line (%s)\n", - dwarf_vmatoa ("u", - read_uleb128 (data, & bytes_read, edata))); - data += bytes_read; - break; - case DW_LNE_HP_SFC_associate: - printf (" DW_LNE_HP_SFC_associate "); - printf ("(%s", - dwarf_vmatoa ("u", - read_uleb128 (data, & bytes_read, edata))); - data += bytes_read; - printf (",%s", - dwarf_vmatoa ("u", - read_uleb128 (data, & bytes_read, edata))); - data += bytes_read; - printf (",%s)\n", - dwarf_vmatoa ("u", - read_uleb128 (data, & bytes_read, edata))); - data += bytes_read; - break; - default: - printf (_(" UNKNOWN DW_LNE_HP_SFC opcode (%u)\n"), opc); - data = edata; - break; - } - } + while (data < edata) + { + unsigned int opc; + + opc = read_uleb128 (data, & bytes_read, edata); + data += bytes_read; + + switch (opc) + { + case DW_LNE_HP_SFC_formfeed: + printf (" DW_LNE_HP_SFC_formfeed\n"); + break; + case DW_LNE_HP_SFC_set_listing_line: + printf (" DW_LNE_HP_SFC_set_listing_line (%s)\n", + dwarf_vmatoa ("u", + read_uleb128 (data, & bytes_read, edata))); + data += bytes_read; + break; + case DW_LNE_HP_SFC_associate: + printf (" DW_LNE_HP_SFC_associate "); + printf ("(%s", + dwarf_vmatoa ("u", + read_uleb128 (data, & bytes_read, edata))); + data += bytes_read; + printf (",%s", + dwarf_vmatoa ("u", + read_uleb128 (data, & bytes_read, edata))); + data += bytes_read; + printf (",%s)\n", + dwarf_vmatoa ("u", + read_uleb128 (data, & bytes_read, edata))); + data += bytes_read; + break; + default: + printf (_(" UNKNOWN DW_LNE_HP_SFC opcode (%u)\n"), opc); + data = edata; + break; + } + } } break; default: { - unsigned int rlen = len - bytes_read - 1; + unsigned int rlen = len - bytes_read - 1; - if (op_code >= DW_LNE_lo_user - /* The test against DW_LNW_hi_user is redundant due to - the limited range of the unsigned char data type used - for op_code. */ - /*&& op_code <= DW_LNE_hi_user*/) - printf (_("user defined: ")); - else - printf (_("UNKNOWN: ")); - printf (_("length %d ["), rlen); - for (; rlen; rlen--) - printf (" %02x", *data++); - printf ("]\n"); + if (op_code >= DW_LNE_lo_user + /* The test against DW_LNW_hi_user is redundant due to + the limited range of the unsigned char data type used + for op_code. */ + /*&& op_code <= DW_LNE_hi_user*/) + printf (_("user defined: ")); + else + printf (_("UNKNOWN: ")); + printf (_("length %d ["), rlen); + for (; rlen; rlen--) + printf (" %02x", *data++); + printf ("]\n"); } break; } @@ -628,7 +658,7 @@ if (offset + bytes > section->size) { warn (_("Offset into section %s too big: %s\n"), - section->name, dwarf_vmatoa ("x", offset)); + section->name, dwarf_vmatoa ("x", offset)); return ""; } @@ -841,6 +871,8 @@ dwarf_vma maxlen; printf (_(" %s byte block: "), dwarf_vmatoa ("u", length)); + if (data > end) + return (unsigned char *) end; maxlen = (dwarf_vma) (end - data); length = length > maxlen ? maxlen : length; @@ -1231,8 +1263,7 @@ printf ("DW_OP_implicit_value"); uvalue = read_uleb128 (data, &bytes_read, end); data += bytes_read; - display_block (data, uvalue, end); - data += uvalue; + data = display_block (data, uvalue, end); break; /* GNU extensions. */ @@ -1245,10 +1276,11 @@ break; case DW_OP_GNU_encoded_addr: { - int encoding; + int encoding = 0; dwarf_vma addr; - encoding = *data++; + if (data < end) + encoding = *data++; addr = get_encoded_value (&data, encoding, section, end); printf ("DW_OP_GNU_encoded_addr: fmt:%02x addr:", encoding); @@ -1281,6 +1313,9 @@ case DW_OP_GNU_entry_value: uvalue = read_uleb128 (data, &bytes_read, end); data += bytes_read; + /* PR 17531: file: 0cc9cd00. */ + if (uvalue > (dwarf_vma) (end - data)) + uvalue = end - data; printf ("DW_OP_GNU_entry_value: ("); if (decode_location_expression (data, pointer_size, offset_size, dwarf_version, uvalue, @@ -1288,6 +1323,8 @@ need_frame_base = 1; putchar (')'); data += uvalue; + if (data > end) + data = end; break; case DW_OP_GNU_const_type: uvalue = read_uleb128 (data, &bytes_read, end); @@ -1295,8 +1332,7 @@ printf ("DW_OP_GNU_const_type: <0x%s> ", dwarf_vmatoa ("x", cu_offset + uvalue)); SAFE_BYTE_GET_AND_INC (uvalue, data, 1, end); - display_block (data, uvalue, end); - data += uvalue; + data = display_block (data, uvalue, end); break; case DW_OP_GNU_regval_type: uvalue = read_uleb128 (data, &bytes_read, end); @@ -1331,16 +1367,16 @@ printf ("DW_OP_GNU_parameter_ref: <0x%s>", dwarf_vmatoa ("x", cu_offset + uvalue)); break; - case DW_OP_GNU_addr_index: - uvalue = read_uleb128 (data, &bytes_read, end); - data += bytes_read; - printf ("DW_OP_GNU_addr_index <0x%s>", dwarf_vmatoa ("x", uvalue)); - break; - case DW_OP_GNU_const_index: - uvalue = read_uleb128 (data, &bytes_read, end); - data += bytes_read; - printf ("DW_OP_GNU_const_index <0x%s>", dwarf_vmatoa ("x", uvalue)); - break; + case DW_OP_GNU_addr_index: + uvalue = read_uleb128 (data, &bytes_read, end); + data += bytes_read; + printf ("DW_OP_GNU_addr_index <0x%s>", dwarf_vmatoa ("x", uvalue)); + break; + case DW_OP_GNU_const_index: + uvalue = read_uleb128 (data, &bytes_read, end); + data += bytes_read; + printf ("DW_OP_GNU_const_index <0x%s>", dwarf_vmatoa ("x", uvalue)); + break; /* HP extensions. */ case DW_OP_HP_is_value: @@ -1633,8 +1669,18 @@ case DW_FORM_exprloc: uvalue = read_uleb128 (data, & bytes_read, end); block_start = data + bytes_read; + if (block_start >= end) + { + warn (_("Block ends prematurely\n")); + uvalue = 0; + block_start = end; + } + /* FIXME: Testing "(block_start + uvalue) < block_start" miscompiles with + gcc 4.8.3 running on an x86_64 host in 32-bit mode. So we pre-compute + block_start + uvalue here. */ + data = block_start + uvalue; /* PR 17512: file: 008-103549-0.001:0.1. */ - if (block_start + uvalue > end) + if (block_start + uvalue > end || data < block_start) { warn (_("Corrupt attribute block length: %lx\n"), (long) uvalue); uvalue = end - block_start; @@ -1648,7 +1694,14 @@ case DW_FORM_block1: SAFE_BYTE_GET (uvalue, data, 1, end); block_start = data + 1; - if (block_start + uvalue > end) + if (block_start >= end) + { + warn (_("Block ends prematurely\n")); + uvalue = 0; + block_start = end; + } + data = block_start + uvalue; + if (block_start + uvalue > end || data < block_start) { warn (_("Corrupt attribute block length: %lx\n"), (long) uvalue); uvalue = end - block_start; @@ -1662,7 +1715,14 @@ case DW_FORM_block2: SAFE_BYTE_GET (uvalue, data, 2, end); block_start = data + 2; - if (block_start + uvalue > end) + if (block_start >= end) + { + warn (_("Block ends prematurely\n")); + uvalue = 0; + block_start = end; + } + data = block_start + uvalue; + if (block_start + uvalue > end || data < block_start) { warn (_("Corrupt attribute block length: %lx\n"), (long) uvalue); uvalue = end - block_start; @@ -1676,7 +1736,17 @@ case DW_FORM_block4: SAFE_BYTE_GET (uvalue, data, 4, end); block_start = data + 4; - if (block_start + uvalue > end) + /* PR 17512: file: 3371-3907-0.004. */ + if (block_start >= end) + { + warn (_("Block ends prematurely\n")); + uvalue = 0; + block_start = end; + } + data = block_start + uvalue; + if (block_start + uvalue > end + /* PR 17531: file: 5b5f0592. */ + || data < block_start) { warn (_("Corrupt attribute block length: %lx\n"), (long) uvalue); uvalue = end - block_start; @@ -1696,14 +1766,14 @@ case DW_FORM_GNU_str_index: if (!do_loc) - { - const char *suffix = strrchr (section->name, '.'); - int dwo = (suffix && strcmp (suffix, ".dwo") == 0) ? 1 : 0; - - printf (_(" (indexed string: 0x%s): %s"), - dwarf_vmatoa ("x", uvalue), - fetch_indexed_string (uvalue, this_set, offset_size, dwo)); - } + { + const char *suffix = strrchr (section->name, '.'); + int dwo = (suffix && strcmp (suffix, ".dwo") == 0) ? 1 : 0; + + printf (_(" (indexed string: 0x%s): %s"), + dwarf_vmatoa ("x", uvalue), + fetch_indexed_string (uvalue, this_set, offset_size, dwo)); + } break; case DW_FORM_GNU_strp_alt: @@ -1731,9 +1801,9 @@ case DW_FORM_GNU_addr_index: if (!do_loc) - printf (_(" (addr_index: 0x%s): %s"), - dwarf_vmatoa ("x", uvalue), - fetch_indexed_value (uvalue * pointer_size, pointer_size)); + printf (_(" (addr_index: 0x%s): %s"), + dwarf_vmatoa ("x", uvalue), + fetch_indexed_value (uvalue * pointer_size, pointer_size)); break; default: @@ -1761,7 +1831,7 @@ case DW_AT_GNU_call_site_data_value: case DW_AT_GNU_call_site_target: case DW_AT_GNU_call_site_target_clobbered: - if ((dwarf_version < 4 + if ((dwarf_version < 4 && (form == DW_FORM_data4 || form == DW_FORM_data8)) || form == DW_FORM_sec_offset) { @@ -1773,15 +1843,15 @@ { lmax += 1024; debug_info_p->loc_offsets = (dwarf_vma *) - xcrealloc (debug_info_p->loc_offsets, - lmax, sizeof (*debug_info_p->loc_offsets)); + xcrealloc (debug_info_p->loc_offsets, + lmax, sizeof (*debug_info_p->loc_offsets)); debug_info_p->have_frame_base = (int *) - xcrealloc (debug_info_p->have_frame_base, - lmax, sizeof (*debug_info_p->have_frame_base)); + xcrealloc (debug_info_p->have_frame_base, + lmax, sizeof (*debug_info_p->have_frame_base)); debug_info_p->max_loc_offsets = lmax; } if (this_set != NULL) - uvalue += this_set->section_offsets [DW_SECT_LOC]; + uvalue += this_set->section_offsets [DW_SECT_LOC]; debug_info_p->loc_offsets [num] = uvalue; debug_info_p->have_frame_base [num] = have_frame_base; debug_info_p->num_loc_offsets++; @@ -1794,15 +1864,15 @@ break; case DW_AT_GNU_addr_base: - debug_info_p->addr_base = uvalue; + debug_info_p->addr_base = uvalue; break; case DW_AT_GNU_ranges_base: - debug_info_p->ranges_base = uvalue; + debug_info_p->ranges_base = uvalue; break; case DW_AT_ranges: - if ((dwarf_version < 4 + if ((dwarf_version < 4 && (form == DW_FORM_data4 || form == DW_FORM_data8)) || form == DW_FORM_sec_offset) { @@ -1814,8 +1884,8 @@ { lmax += 1024; debug_info_p->range_lists = (dwarf_vma *) - xcrealloc (debug_info_p->range_lists, - lmax, sizeof (*debug_info_p->range_lists)); + xcrealloc (debug_info_p->range_lists, + lmax, sizeof (*debug_info_p->range_lists)); debug_info_p->max_range_lists = lmax; } debug_info_p->range_lists [num] = uvalue; @@ -1887,6 +1957,9 @@ case DW_LANG_Python: printf ("(Python)"); break; /* DWARF 5 values. */ case DW_LANG_Go: printf ("(Go)"); break; + case DW_LANG_C_plus_plus_11: printf ("(C++11)"); break; + case DW_LANG_C11: printf ("(C11)"); break; + case DW_LANG_C_plus_plus_14: printf ("(C++14)"); break; /* MIPS extension. */ case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break; /* UPC extension. */ @@ -2030,7 +2103,7 @@ case DW_AT_GNU_call_site_target: case DW_AT_GNU_call_site_target_clobbered: if ((dwarf_version < 4 - && (form == DW_FORM_data4 || form == DW_FORM_data8)) + && (form == DW_FORM_data4 || form == DW_FORM_data8)) || form == DW_FORM_sec_offset) printf (_(" (location list)")); /* Fall through. */ @@ -2061,7 +2134,7 @@ { if (form == DW_FORM_ref_sig8 || form == DW_FORM_GNU_ref_alt) - break; + break; if (form == DW_FORM_ref1 || form == DW_FORM_ref2 @@ -2070,7 +2143,7 @@ uvalue += cu_offset; if (uvalue >= section->size) - warn (_("Offset %s used as value for DW_AT_import attribute of DIE at offset %lx is too big.\n"), + warn (_("Offset %s used as value for DW_AT_import attribute of DIE at offset 0x%lx is too big.\n"), dwarf_vmatoa ("x", uvalue), (unsigned long) (orig_data - section->start)); else @@ -2163,7 +2236,7 @@ static int process_debug_info (struct dwarf_section *section, void *file, - enum dwarf_section_display_enum abbrev_sec, + enum dwarf_section_display_enum abbrev_sec, int do_loc, int do_types) { @@ -2204,8 +2277,8 @@ /* Negative values are illegal, they may even cause infinite looping. This can happen if we can't accurately apply - relocations to an object file. */ - if ((signed long) length <= 0) + relocations to an object file, or if the file is corrupt. */ + if ((signed long) length <= 0 || section_begin < start) { warn (_("Corrupt unit length (0x%s) found in section %s\n"), dwarf_vmatoa ("x", length), section->name); @@ -2221,13 +2294,22 @@ /* Then allocate an array to hold the information. */ debug_information = (debug_info *) cmalloc (num_units, - sizeof (* debug_information)); + sizeof (* debug_information)); if (debug_information == NULL) { error (_("Not enough memory for a debug info array of %u entries\n"), num_units); + alloc_num_debug_info_entries = num_debug_info_entries = 0; return 0; } + /* PR 17531: file: 92ca3797. + We cannot rely upon the debug_information array being initialised + before it is used. A corrupt file could easily contain references + to a unit for which information has not been made available. So + we ensure that the array is zeroed here. */ + memset (debug_information, 0, num_units * sizeof (*debug_information)); + + alloc_num_debug_info_entries = num_units; } if (!do_loc) @@ -2311,11 +2393,11 @@ } if (do_types) - { + { SAFE_BYTE_GET64 (hdrptr, &signature_high, &signature_low, end); hdrptr += 8; SAFE_BYTE_GET_AND_INC (type_offset, hdrptr, offset_size, end); - } + } if ((do_loc || do_debug_loc || do_debug_ranges) && num_debug_info_entries == 0 @@ -2384,14 +2466,22 @@ > section->size) { warn (_("Debug info is corrupted, length of CU at %s" - " extends beyond end of section (length = %s)\n"), + " extends beyond end of section (length = %s)\n"), dwarf_vmatoa ("x", cu_offset), dwarf_vmatoa ("x", compunit.cu_length)); + num_units = unit; break; } tags = hdrptr; start += compunit.cu_length + initial_length_size; + if (start > end) + { + warn (_("Debug info is corrupt. CU at %s extends beyond end of section"), + dwarf_vmatoa ("x", cu_offset)); + start = end; + } + if (compunit.cu_version != 2 && compunit.cu_version != 3 && compunit.cu_version != 4) @@ -2409,6 +2499,12 @@ warn (_("Debug info is corrupted, abbrev offset (%lx) is larger than abbrev section size (%lx)\n"), (unsigned long) compunit.cu_abbrev_offset, (unsigned long) abbrev_size); + /* PR 17531: file:4bcd9ce9. */ + else if ((abbrev_base + abbrev_size) + > debug_displays [abbrev_sec].section.size) + warn (_("Debug info is corrupted, abbrev size (%lx) is larger than abbrev section size (%lx)\n"), + (unsigned long) abbrev_base + abbrev_size, + (unsigned long) debug_displays [abbrev_sec].section.size); else process_abbrev_section (((unsigned char *) debug_displays [abbrev_sec].section.start @@ -2508,7 +2604,7 @@ printf ("\n"); fflush (stdout); } - warn (_("DIE at offset %lx refers to abbreviation number %lu which does not exist\n"), + warn (_("DIE at offset 0x%lx refers to abbreviation number %lu which does not exist\n"), die_offset, abbrev_number); return 0; } @@ -2542,9 +2638,10 @@ /* Show the offset from where the tag was extracted. */ printf (" <%lx>", (unsigned long)(tags - section_begin)); - arg = debug_information; - if (debug_information) - arg += unit; + if (debug_information && unit < alloc_num_debug_info_entries) + arg = debug_information + unit; + else + arg = NULL; tags = read_and_display_attr (attr->attribute, attr->form, @@ -2560,9 +2657,9 @@ this_set); } - if (entry->children) - ++level; - } + if (entry->children) + ++level; + } } /* Set num_debug_info_entries here so that it can be used to check if @@ -2570,7 +2667,12 @@ if ((do_loc || do_debug_loc || do_debug_ranges) && num_debug_info_entries == 0 && ! do_types) - num_debug_info_entries = num_units; + { + if (num_units > alloc_num_debug_info_entries) + num_debug_info_entries = alloc_num_debug_info_entries; + else + num_debug_info_entries = num_units; + } if (!do_loc) printf ("\n"); @@ -2607,9 +2709,10 @@ if (load_debug_section (info, file) && process_debug_info (&debug_displays [info].section, file, abbrev, 1, 0)) return num_debug_info_entries; - else if (load_debug_section (info_dwo, file) - && process_debug_info (&debug_displays [info_dwo].section, file, - abbrev_dwo, 1, 0)) + + if (load_debug_section (info_dwo, file) + && process_debug_info (&debug_displays [info_dwo].section, file, + abbrev_dwo, 1, 0)) return num_debug_info_entries; num_debug_info_entries = DEBUG_INFO_UNAVAILABLE; @@ -2634,7 +2737,7 @@ /* Extract information from the Line Number Program Header. (section 6.2.4 in the Dwarf3 doc). */ - hdrptr = data; + hdrptr = data; /* Get and check the length of the block. */ SAFE_BYTE_GET_AND_INC (linfo->li_length, hdrptr, 4, end); @@ -2703,18 +2806,27 @@ SAFE_BYTE_GET_AND_INC (linfo->li_opcode_base, hdrptr, 1, end); * end_of_sequence = data + linfo->li_length + initial_length_size; + /* PR 17512: file:002-117414-0.004. */ + if (* end_of_sequence > end) + { + warn (_("Line length %s extends beyond end of section\n"), + dwarf_vmatoa ("u", linfo->li_length)); + * end_of_sequence = end; + return NULL; + } + return hdrptr; } static int display_debug_lines_raw (struct dwarf_section *section, unsigned char *data, - unsigned char *end) + unsigned char *end) { unsigned char *start = section->start; printf (_("Raw dump of debug contents of section %s:\n\n"), - section->name); + section->name); while (data < end) { @@ -2743,6 +2855,12 @@ end_of_sequence = end; standard_opcodes = NULL; linfo = saved_linfo; + /* PR 17531: file: 0522b371. */ + if (linfo.li_line_range == 0) + { + warn (_("Partial .debug_line. section encountered without a prior full .debug_line section\n")); + return 0; + } reset_state_machine (linfo.li_default_is_stmt); } else @@ -2756,7 +2874,7 @@ printf (_(" Offset: 0x%lx\n"), (long)(data - start)); printf (_(" Length: %ld\n"), (long) linfo.li_length); printf (_(" DWARF Version: %d\n"), linfo.li_version); - printf (_(" Prologue Length: %d\n"), linfo.li_prologue_length); + printf (_(" Prologue Length: %d\n"), (int) linfo.li_prologue_length); printf (_(" Minimum Instruction Length: %d\n"), linfo.li_min_insn_length); if (linfo.li_version >= 4) printf (_(" Maximum Ops per Instruction: %d\n"), linfo.li_max_ops_per_insn); @@ -2765,11 +2883,25 @@ printf (_(" Line Range: %d\n"), linfo.li_line_range); printf (_(" Opcode Base: %d\n"), linfo.li_opcode_base); + /* PR 17512: file: 1665-6428-0.004. */ + if (linfo.li_line_range == 0) + { + warn (_("Line range of 0 is invalid, using 1 instead\n")); + linfo.li_line_range = 1; + } + reset_state_machine (linfo.li_default_is_stmt); /* Display the contents of the Opcodes table. */ standard_opcodes = hdrptr; + /* PR 17512: file: 002-417945-0.004. */ + if (standard_opcodes + linfo.li_opcode_base >= end) + { + warn (_("Line Base extends beyond end of section\n")); + return 0; + } + printf (_("\n Opcodes:\n")); for (i = 1; i < linfo.li_opcode_base; i++) @@ -2785,12 +2917,16 @@ printf (_("\n The Directory Table (offset 0x%lx):\n"), (long)(data - start)); - while (*data != 0) + while (data < end && *data != 0) { - printf (" %d\t%s\n", ++last_dir_entry, data); + printf (" %d\t%.*s\n", ++last_dir_entry, (int) (end - data), data); data += strnlen ((char *) data, end - data) + 1; } + + /* PR 17512: file: 002-132094-0.004. */ + if (data >= end - 1) + break; } /* Skip the NUL at the end of the table. */ @@ -2805,7 +2941,7 @@ (long)(data - start)); printf (_(" Entry\tDir\tTime\tSize\tName\n")); - while (*data != 0) + while (data < end && *data != 0) { unsigned char *name; unsigned int bytes_read; @@ -2823,7 +2959,7 @@ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); data += bytes_read; - printf ("%s\n", name); + printf ("%.*s\n", (int)(end - name), name); if (data == end) { @@ -3053,7 +3189,7 @@ static DWARF2_Internal_LineInfo saved_linfo; printf (_("Decoded dump of debug contents of section %s:\n\n"), - section->name); + section->name); while (data < end) { @@ -3071,21 +3207,33 @@ /* Note: the following does not apply to .debug_line.dwo sections. These are full debug_line sections. */ && strcmp (section->name, ".debug_line.dwo") != 0) - { + { /* See comment in display_debug_lines_raw(). */ end_of_sequence = end; standard_opcodes = NULL; linfo = saved_linfo; + /* PR 17531: file: 0522b371. */ + if (linfo.li_line_range == 0) + { + warn (_("Partial .debug_line. section encountered without a prior full .debug_line section\n")); + return 0; + } reset_state_machine (linfo.li_default_is_stmt); - } + } else - { + { unsigned char *hdrptr; if ((hdrptr = read_debug_line_header (section, data, end, & linfo, & end_of_sequence)) == NULL) return 0; + /* PR 17531: file: 0522b371. */ + if (linfo.li_line_range == 0) + { + warn (_("Line range of 0 is invalid, using 1 instead\n")); + linfo.li_line_range = 1; + } reset_state_machine (linfo.li_default_is_stmt); /* Save a pointer to the contents of the Opcodes table. */ @@ -3194,16 +3342,16 @@ /* This loop iterates through the Dwarf Line Number Program. */ while (data < end_of_sequence) - { + { unsigned char op_code; - int adv; - unsigned long int uladv; - unsigned int bytes_read; - int is_special_opcode = 0; + int adv; + unsigned long int uladv; + unsigned int bytes_read; + int is_special_opcode = 0; - op_code = *data++; + op_code = *data++; - if (op_code >= linfo.li_opcode_base) + if (op_code >= linfo.li_opcode_base) { op_code -= linfo.li_opcode_base; uladv = (op_code / linfo.li_line_range); @@ -3223,11 +3371,11 @@ % linfo.li_max_ops_per_insn; } - adv = (op_code % linfo.li_line_range) + linfo.li_line_base; - state_machine_regs.line += adv; - is_special_opcode = 1; - } - else switch (op_code) + adv = (op_code % linfo.li_line_range) + linfo.li_line_base; + state_machine_regs.line += adv; + is_special_opcode = 1; + } + else switch (op_code) { case DW_LNS_extended_op: { @@ -3417,15 +3565,15 @@ break; } - /* Only Special opcodes, DW_LNS_copy and DW_LNE_end_sequence adds a row - to the DWARF address/line matrix. */ - if ((is_special_opcode) || (op_code == DW_LNE_end_sequence) + /* Only Special opcodes, DW_LNS_copy and DW_LNE_end_sequence adds a row + to the DWARF address/line matrix. */ + if ((is_special_opcode) || (op_code == DW_LNE_end_sequence) || (op_code == DW_LNS_copy)) - { - const unsigned int MAX_FILENAME_LENGTH = 35; - char *fileName; - char *newFileName = NULL; - size_t fileNameLength; + { + const unsigned int MAX_FILENAME_LENGTH = 35; + char *fileName; + char *newFileName = NULL; + size_t fileNameLength; if (file_table) fileName = (char *) file_table[state_machine_regs.file - 1].name; @@ -3434,22 +3582,22 @@ fileNameLength = strlen (fileName); - if ((fileNameLength > MAX_FILENAME_LENGTH) && (!do_wide)) - { - newFileName = (char *) xmalloc (MAX_FILENAME_LENGTH + 1); - /* Truncate file name */ - strncpy (newFileName, - fileName + fileNameLength - MAX_FILENAME_LENGTH, - MAX_FILENAME_LENGTH + 1); - } - else - { - newFileName = (char *) xmalloc (fileNameLength + 1); - strncpy (newFileName, fileName, fileNameLength + 1); - } + if ((fileNameLength > MAX_FILENAME_LENGTH) && (!do_wide)) + { + newFileName = (char *) xmalloc (MAX_FILENAME_LENGTH + 1); + /* Truncate file name */ + strncpy (newFileName, + fileName + fileNameLength - MAX_FILENAME_LENGTH, + MAX_FILENAME_LENGTH + 1); + } + else + { + newFileName = (char *) xmalloc (fileNameLength + 1); + strncpy (newFileName, fileName, fileNameLength + 1); + } - if (!do_wide || (fileNameLength <= MAX_FILENAME_LENGTH)) - { + if (!do_wide || (fileNameLength <= MAX_FILENAME_LENGTH)) + { if (linfo.li_max_ops_per_insn == 1) printf ("%-35s %11d %#18" DWARF_VMA_FMT "x\n", newFileName, state_machine_regs.line, @@ -3459,9 +3607,9 @@ newFileName, state_machine_regs.line, state_machine_regs.address, state_machine_regs.op_index); - } - else - { + } + else + { if (linfo.li_max_ops_per_insn == 1) printf ("%s %11d %#18" DWARF_VMA_FMT "x\n", newFileName, state_machine_regs.line, @@ -3471,14 +3619,14 @@ newFileName, state_machine_regs.line, state_machine_regs.address, state_machine_regs.op_index); - } + } - if (op_code == DW_LNE_end_sequence) + if (op_code == DW_LNE_end_sequence) printf ("\n"); - free (newFileName); - } - } + free (newFileName); + } + } if (file_table) { @@ -3575,7 +3723,8 @@ while (start < end) { unsigned char *data; - unsigned long offset; + unsigned char *adr; + dwarf_vma offset; unsigned int offset_size, initial_length_size; data = start; @@ -3604,7 +3753,26 @@ SAFE_BYTE_GET_AND_INC (names.pn_size, data, offset_size, end); - start += names.pn_length + initial_length_size; + adr = start + names.pn_length + initial_length_size; + /* PR 17531: file: 7615b6b2. */ + if ((dwarf_signed_vma) names.pn_length < 0 + /* PR 17531: file: a5dbeaa7. */ + || adr < start) + { + warn (_("Negative length for public name: 0x%lx\n"), (long) names.pn_length); + start = end; + } + else + start = adr; + + printf (_(" Length: %ld\n"), + (long) names.pn_length); + printf (_(" Version: %d\n"), + names.pn_version); + printf (_(" Offset into .debug_info section: 0x%lx\n"), + (unsigned long) names.pn_offset); + printf (_(" Size of area in .debug_info section: %ld\n"), + (long) names.pn_size); if (names.pn_version != 2 && names.pn_version != 3) { @@ -3619,15 +3787,6 @@ continue; } - printf (_(" Length: %ld\n"), - (long) names.pn_length); - printf (_(" Version: %d\n"), - names.pn_version); - printf (_(" Offset into .debug_info section: 0x%lx\n"), - (unsigned long) names.pn_offset); - printf (_(" Size of area in .debug_info section: %ld\n"), - (long) names.pn_size); - if (is_gnu) printf (_("\n Offset Kind Name\n")); else @@ -3645,7 +3804,7 @@ if (data >= end) break; maxprint = (end - data) - 1; - + if (is_gnu) { unsigned int kind_data; @@ -3665,11 +3824,12 @@ kind_name = get_gdb_index_symbol_kind_name (kind); is_static = GDB_INDEX_SYMBOL_STATIC_VALUE (kind_data); printf (" %-6lx %s,%-10s %.*s\n", - offset, is_static ? _("s") : _("g"), + (unsigned long) offset, is_static ? _("s") : _("g"), kind_name, (int) maxprint, data); } else - printf (" %-6lx\t%.*s\n", offset, (int) maxprint, data); + printf (" %-6lx\t%.*s\n", + (unsigned long) offset, (int) maxprint, data); data += strnlen ((char *) data, maxprint) + 1; if (data >= end) @@ -4109,7 +4269,7 @@ } printf ("\n"); - } + } return 1; } @@ -4164,24 +4324,36 @@ static void display_loc_list (struct dwarf_section *section, - unsigned char **start_ptr, - int debug_info_entry, - unsigned long offset, - unsigned long base_address, - int has_frame_base) + unsigned char **start_ptr, + unsigned int debug_info_entry, + unsigned long offset, + unsigned long base_address, + int has_frame_base) { unsigned char *start = *start_ptr; unsigned char *section_end = section->start + section->size; - unsigned long cu_offset = debug_information [debug_info_entry].cu_offset; - unsigned int pointer_size = debug_information [debug_info_entry].pointer_size; - unsigned int offset_size = debug_information [debug_info_entry].offset_size; - int dwarf_version = debug_information [debug_info_entry].dwarf_version; + unsigned long cu_offset; + unsigned int pointer_size; + unsigned int offset_size; + int dwarf_version; dwarf_vma begin; dwarf_vma end; unsigned short length; int need_frame_base; + if (debug_info_entry >= num_debug_info_entries) + { + warn (_("No debug information available for loc lists of entry: %u\n"), + debug_info_entry); + return; + } + + cu_offset = debug_information [debug_info_entry].cu_offset; + pointer_size = debug_information [debug_info_entry].pointer_size; + offset_size = debug_information [debug_info_entry].offset_size; + dwarf_version = debug_information [debug_info_entry].dwarf_version; + if (pointer_size < 2 || pointer_size > 8) { warn (_("Invalid pointer size (%d) in debug info for entry %d\n"), @@ -4192,72 +4364,72 @@ while (1) { if (start + 2 * pointer_size > section_end) - { - warn (_("Location list starting at offset 0x%lx is not terminated.\n"), - offset); - break; - } + { + warn (_("Location list starting at offset 0x%lx is not terminated.\n"), + offset); + break; + } printf (" %8.8lx ", offset + (start - *start_ptr)); /* Note: we use sign extension here in order to be sure that we can detect - the -1 escape value. Sign extension into the top 32 bits of a 32-bit - address will not affect the values that we display since we always show - hex values, and always the bottom 32-bits. */ + the -1 escape value. Sign extension into the top 32 bits of a 32-bit + address will not affect the values that we display since we always show + hex values, and always the bottom 32-bits. */ SAFE_BYTE_GET_AND_INC (begin, start, pointer_size, section_end); SAFE_BYTE_GET_AND_INC (end, start, pointer_size, section_end); if (begin == 0 && end == 0) - { - printf (_("\n")); - break; - } + { + printf (_("\n")); + break; + } /* Check base address specifiers. */ if (begin == (dwarf_vma) -1 && end != (dwarf_vma) -1) - { - base_address = end; - print_dwarf_vma (begin, pointer_size); - print_dwarf_vma (end, pointer_size); - printf (_("(base address)\n")); - continue; - } + { + base_address = end; + print_dwarf_vma (begin, pointer_size); + print_dwarf_vma (end, pointer_size); + printf (_("(base address)\n")); + continue; + } if (start + 2 > section_end) - { - warn (_("Location list starting at offset 0x%lx is not terminated.\n"), - offset); - break; - } + { + warn (_("Location list starting at offset 0x%lx is not terminated.\n"), + offset); + break; + } SAFE_BYTE_GET_AND_INC (length, start, 2, section_end); if (start + length > section_end) - { - warn (_("Location list starting at offset 0x%lx is not terminated.\n"), - offset); - break; - } + { + warn (_("Location list starting at offset 0x%lx is not terminated.\n"), + offset); + break; + } print_dwarf_vma (begin + base_address, pointer_size); print_dwarf_vma (end + base_address, pointer_size); putchar ('('); need_frame_base = decode_location_expression (start, - pointer_size, - offset_size, - dwarf_version, - length, - cu_offset, section); + pointer_size, + offset_size, + dwarf_version, + length, + cu_offset, section); putchar (')'); if (need_frame_base && !has_frame_base) - printf (_(" [without DW_AT_frame_base]")); + printf (_(" [without DW_AT_frame_base]")); if (begin == end) - fputs (_(" (start == end)"), stdout); + fputs (_(" (start == end)"), stdout); else if (begin > end) - fputs (_(" (start > end)"), stdout); + fputs (_(" (start > end)"), stdout); putchar ('\n'); @@ -4284,23 +4456,35 @@ static void display_loc_list_dwo (struct dwarf_section *section, - unsigned char **start_ptr, - int debug_info_entry, - unsigned long offset, - int has_frame_base) + unsigned char **start_ptr, + unsigned int debug_info_entry, + unsigned long offset, + int has_frame_base) { unsigned char *start = *start_ptr; unsigned char *section_end = section->start + section->size; - unsigned long cu_offset = debug_information [debug_info_entry].cu_offset; - unsigned int pointer_size = debug_information [debug_info_entry].pointer_size; - unsigned int offset_size = debug_information [debug_info_entry].offset_size; - int dwarf_version = debug_information [debug_info_entry].dwarf_version; + unsigned long cu_offset; + unsigned int pointer_size; + unsigned int offset_size; + int dwarf_version; int entry_type; unsigned short length; int need_frame_base; unsigned int idx; unsigned int bytes_read; + if (debug_info_entry >= num_debug_info_entries) + { + warn (_("No debug information for loc lists of entry: %u\n"), + debug_info_entry); + return; + } + + cu_offset = debug_information [debug_info_entry].cu_offset; + pointer_size = debug_information [debug_info_entry].pointer_size; + offset_size = debug_information [debug_info_entry].offset_size; + dwarf_version = debug_information [debug_info_entry].dwarf_version; + if (pointer_size < 2 || pointer_size > 8) { warn (_("Invalid pointer size (%d) in debug info for entry %d\n"), @@ -4313,79 +4497,79 @@ printf (" %8.8lx ", offset + (start - *start_ptr)); if (start >= section_end) - { - warn (_("Location list starting at offset 0x%lx is not terminated.\n"), - offset); - break; - } + { + warn (_("Location list starting at offset 0x%lx is not terminated.\n"), + offset); + break; + } SAFE_BYTE_GET_AND_INC (entry_type, start, 1, section_end); switch (entry_type) - { - case 0: /* A terminating entry. */ - *start_ptr = start; - printf (_("\n")); - return; - case 1: /* A base-address entry. */ - idx = read_uleb128 (start, &bytes_read, section_end); - start += bytes_read; - print_addr_index (idx, 8); - printf (" "); - printf (_("(base address selection entry)\n")); - continue; - case 2: /* A start/end entry. */ - idx = read_uleb128 (start, &bytes_read, section_end); - start += bytes_read; - print_addr_index (idx, 8); - idx = read_uleb128 (start, &bytes_read, section_end); - start += bytes_read; - print_addr_index (idx, 8); - break; - case 3: /* A start/length entry. */ - idx = read_uleb128 (start, &bytes_read, section_end); - start += bytes_read; - print_addr_index (idx, 8); - SAFE_BYTE_GET_AND_INC (idx, start, 4, section_end); - printf ("%08x ", idx); - break; - case 4: /* An offset pair entry. */ - SAFE_BYTE_GET_AND_INC (idx, start, 4, section_end); - printf ("%08x ", idx); - SAFE_BYTE_GET_AND_INC (idx, start, 4, section_end); - printf ("%08x ", idx); - break; - default: - warn (_("Unknown location list entry type 0x%x.\n"), entry_type); - *start_ptr = start; - return; - } + { + case 0: /* A terminating entry. */ + *start_ptr = start; + printf (_("\n")); + return; + case 1: /* A base-address entry. */ + idx = read_uleb128 (start, &bytes_read, section_end); + start += bytes_read; + print_addr_index (idx, 8); + printf (" "); + printf (_("(base address selection entry)\n")); + continue; + case 2: /* A start/end entry. */ + idx = read_uleb128 (start, &bytes_read, section_end); + start += bytes_read; + print_addr_index (idx, 8); + idx = read_uleb128 (start, &bytes_read, section_end); + start += bytes_read; + print_addr_index (idx, 8); + break; + case 3: /* A start/length entry. */ + idx = read_uleb128 (start, &bytes_read, section_end); + start += bytes_read; + print_addr_index (idx, 8); + SAFE_BYTE_GET_AND_INC (idx, start, 4, section_end); + printf ("%08x ", idx); + break; + case 4: /* An offset pair entry. */ + SAFE_BYTE_GET_AND_INC (idx, start, 4, section_end); + printf ("%08x ", idx); + SAFE_BYTE_GET_AND_INC (idx, start, 4, section_end); + printf ("%08x ", idx); + break; + default: + warn (_("Unknown location list entry type 0x%x.\n"), entry_type); + *start_ptr = start; + return; + } if (start + 2 > section_end) - { - warn (_("Location list starting at offset 0x%lx is not terminated.\n"), - offset); - break; - } + { + warn (_("Location list starting at offset 0x%lx is not terminated.\n"), + offset); + break; + } SAFE_BYTE_GET_AND_INC (length, start, 2, section_end); if (start + length > section_end) - { - warn (_("Location list starting at offset 0x%lx is not terminated.\n"), - offset); - break; - } + { + warn (_("Location list starting at offset 0x%lx is not terminated.\n"), + offset); + break; + } putchar ('('); need_frame_base = decode_location_expression (start, - pointer_size, - offset_size, - dwarf_version, - length, - cu_offset, section); + pointer_size, + offset_size, + dwarf_version, + length, + cu_offset, section); putchar (')'); if (need_frame_base && !has_frame_base) - printf (_(" [without DW_AT_frame_base]")); + printf (_(" [without DW_AT_frame_base]")); putchar ('\n'); @@ -4533,11 +4717,11 @@ if (start < next) warn (_("There is a hole [0x%lx - 0x%lx] in .debug_loc section.\n"), (unsigned long) (start - section_begin), - (unsigned long) (next - section_begin)); + (unsigned long) offset); else if (start > next) warn (_("There is an overlap [0x%lx - 0x%lx] in .debug_loc section.\n"), (unsigned long) (start - section_begin), - (unsigned long) (next - section_begin)); + (unsigned long) offset); } start = next; @@ -4548,11 +4732,11 @@ continue; } - if (is_dwo) - display_loc_list_dwo (section, &start, i, offset, has_frame_base); - else - display_loc_list (section, &start, i, offset, base_address, - has_frame_base); + if (is_dwo) + display_loc_list_dwo (section, &start, i, offset, has_frame_base); + else + display_loc_list (section, &start, i, offset, base_address, + has_frame_base); } } @@ -4737,7 +4921,13 @@ if (excess) addr_ranges += (2 * address_size) - excess; - start += arange.ar_length + initial_length_size; + hdrptr = start + arange.ar_length + initial_length_size; + if (hdrptr < start || hdrptr > end) + { + error (_("Excessive header length: %lx\n"), (long) arange.ar_length); + break; + } + start = hdrptr; while (addr_ranges + 2 * address_size <= start) { @@ -4768,7 +4958,7 @@ /* Display the debug_addr section. */ static int display_debug_addr (struct dwarf_section *section, - void *file) + void *file) { debug_info **debug_addr_info; unsigned char *entry; @@ -4791,42 +4981,51 @@ printf (_("Contents of the %s section:\n\n"), section->name); - debug_addr_info = (debug_info **) xmalloc ((num_debug_info_entries + 1) - * sizeof (debug_info *)); + /* PR 17531: file: cf38d01b. + We use xcalloc because a corrupt file may not have initialised all of the + fields in the debug_info structure, which means that the sort below might + try to move uninitialised data. */ + debug_addr_info = (debug_info **) xcalloc ((num_debug_info_entries + 1), + sizeof (debug_info *)); count = 0; for (i = 0; i < num_debug_info_entries; i++) - { - if (debug_information [i].addr_base != DEBUG_INFO_UNAVAILABLE) - debug_addr_info [count++] = &debug_information [i]; - } + if (debug_information [i].addr_base != DEBUG_INFO_UNAVAILABLE) + { + /* PR 17531: file: cf38d01b. */ + if (debug_information[i].addr_base >= section->size) + warn (_("Corrupt address base (%lx) found in debug section %u\n"), + (unsigned long) debug_information[i].addr_base, i); + else + debug_addr_info [count++] = debug_information + i; + } /* Add a sentinel to make iteration convenient. */ debug_addr_info [count] = (debug_info *) xmalloc (sizeof (debug_info)); debug_addr_info [count]->addr_base = section->size; - qsort (debug_addr_info, count, sizeof (debug_info *), comp_addr_base); + for (i = 0; i < count; i++) { unsigned int idx; unsigned int address_size = debug_addr_info [i]->pointer_size; printf (_(" For compilation unit at offset 0x%s:\n"), - dwarf_vmatoa ("x", debug_addr_info [i]->cu_offset)); + dwarf_vmatoa ("x", debug_addr_info [i]->cu_offset)); printf (_("\tIndex\tAddress\n")); entry = section->start + debug_addr_info [i]->addr_base; end = section->start + debug_addr_info [i + 1]->addr_base; idx = 0; while (entry < end) - { - dwarf_vma base = byte_get (entry, address_size); - printf (_("\t%d:\t"), idx); - print_dwarf_vma (base, address_size); - printf ("\n"); - entry += address_size; - idx++; - } + { + dwarf_vma base = byte_get (entry, address_size); + printf (_("\t%d:\t"), idx); + print_dwarf_vma (base, address_size); + printf ("\n"); + entry += address_size; + idx++; + } } printf ("\n"); @@ -4837,7 +5036,7 @@ /* Display the .debug_str_offsets and .debug_str_offsets.dwo sections. */ static int display_debug_str_offsets (struct dwarf_section *section, - void *file ATTRIBUTE_UNUSED) + void *file ATTRIBUTE_UNUSED) { if (section->size == 0) { @@ -4906,7 +5105,7 @@ if (num_range_list == 0) { /* This can happen when the file was compiled with -gsplit-debug - which removes references to range lists from the primary .o file. */ + which removes references to range lists from the primary .o file. */ printf (_("No range lists in .debug_info section.\n")); return 1; } @@ -4959,7 +5158,7 @@ pointer_size, offset); continue; } - + if (dwarf_check != 0 && i > 0) { if (start < next) @@ -5033,7 +5232,7 @@ { struct Frame_Chunk *next; unsigned char *chunk_start; - int ncols; + unsigned int ncols; /* DW_CFA_{undefined,same_value,offset,register,unreferenced} */ short int *col_type; int *col_offset; @@ -5043,8 +5242,8 @@ dwarf_vma pc_begin; dwarf_vma pc_range; int cfa_reg; - int cfa_offset; - int ra; + dwarf_vma cfa_offset; + unsigned int ra; unsigned char fde_encoding; unsigned char cfa_exp; unsigned char ptr_size; @@ -5059,13 +5258,13 @@ in the frame info. */ #define DW_CFA_unreferenced (-1) -/* Return 0 if not more space is needed, 1 if more space is needed, +/* Return 0 if no more space is needed, 1 if more space is needed, -1 for invalid reg. */ static int frame_need_space (Frame_Chunk *fc, unsigned int reg) { - int prev = fc->ncols; + unsigned int prev = fc->ncols; if (reg < (unsigned int) fc->ncols) return 0; @@ -5075,10 +5274,25 @@ return -1; fc->ncols = reg + 1; + /* PR 17512: file: 10450-2643-0.004. + If reg == -1 then this can happen... */ + if (fc->ncols == 0) + return -1; + + /* PR 17512: file: 2844a11d. */ + if (fc->ncols > 1024) + { + error (_("Unfeasibly large register number: %u\n"), reg); + fc->ncols = 0; + /* FIXME: 1024 is an arbitrary limit. Increase it if + we ever encounter a valid binary that exceeds it. */ + return -1; + } + fc->col_type = (short int *) xcrealloc (fc->col_type, fc->ncols, - sizeof (short int)); + sizeof (short int)); fc->col_offset = (int *) xcrealloc (fc->col_offset, fc->ncols, sizeof (int)); - /* PR 17512: file:002-10025-0.005. */ + /* PR 17512: file:002-10025-0.005. */ if (fc->col_type == NULL || fc->col_offset == NULL) { error (_("Out of memory allocating %u columns in dwarf frame arrays\n"), @@ -5168,16 +5382,16 @@ static const char *const dwarf_regnames_aarch64[] = { - "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", - "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", + "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", + "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "x29", "x30", "sp", NULL, "elr", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", - "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", + "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", + "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", }; @@ -5233,9 +5447,9 @@ } static void -frame_display_row (Frame_Chunk *fc, int *need_col_headers, int *max_regs) +frame_display_row (Frame_Chunk *fc, int *need_col_headers, unsigned int *max_regs) { - int r; + unsigned int r; char tmp[100]; if (*max_regs < fc->ncols) @@ -5265,7 +5479,7 @@ if (fc->cfa_exp) strcpy (tmp, "exp"); else - sprintf (tmp, "%s%+d", regname (fc->cfa_reg, 1), fc->cfa_offset); + sprintf (tmp, "%s%+d", regname (fc->cfa_reg, 1), (int) fc->cfa_offset); printf ("%-8s ", tmp); for (r = 0; r < fc->ncols; r++) @@ -5351,7 +5565,20 @@ if (version >= 4) { GET (fc->ptr_size, 1); + if (fc->ptr_size < 1 || fc->ptr_size > 8) + { + warn (_("Invalid pointer size (%d) in CIE data\n"), fc->ptr_size); + return end; + } + GET (fc->segment_size, 1); + /* PR 17512: file: e99d2804. */ + if (fc->segment_size > 8 || fc->segment_size + fc->ptr_size > 8) + { + warn (_("Invalid segment size (%d) in CIE data\n"), fc->segment_size); + return end; + } + eh_addr_size = fc->ptr_size; } else @@ -5375,15 +5602,32 @@ augmentation_data_len = LEB (); augmentation_data = start; start += augmentation_data_len; + /* PR 17512: file: 11042-2589-0.004. */ + if (start > end) + { + warn (_("Augmentation data too long: 0x%lx\n"), augmentation_data_len); + return end; + } } if (augmentation_data_len) { - unsigned char *p, *q; + unsigned char *p; + unsigned char *q; + unsigned char *qend; + p = (unsigned char *) fc->augmentation + 1; q = augmentation_data; + qend = q + augmentation_data_len; - while (1) + /* PR 17531: file: 015adfaa. */ + if (qend < q) + { + warn (_("Negative augmentation data length: 0x%lx"), augmentation_data_len); + augmentation_data_len = 0; + } + + while (p < end && q < augmentation_data + augmentation_data_len) { if (*p == 'L') q++; @@ -5397,6 +5641,8 @@ break; p++; } + /* Note - it is OK if this loop terminates with q < qend. + Padding may have been inserted to align the end of the CIE. */ } *p_cie = fc; @@ -5422,9 +5668,9 @@ Frame_Chunk *rs; int is_eh = strcmp (section->name, ".eh_frame") == 0; unsigned int length_return; - int max_regs = 0; + unsigned int max_regs = 0; const char *bad_reg = _("bad register: "); - int saved_eh_addr_size = eh_addr_size; + unsigned int saved_eh_addr_size = eh_addr_size; printf (_("Contents of the %s section:\n"), section->name); @@ -5451,6 +5697,12 @@ { printf ("\n%08lx ZERO terminator\n\n", (unsigned long)(saved_start - section_start)); + /* Skip any zero terminators that directly follow. + A corrupt section size could have loaded a whole + slew of zero filled memory bytes. eg + PR 17512: file: 070-19381-0.004. */ + while (start < end && * start == 0) + ++ start; continue; } @@ -5481,21 +5733,23 @@ || (offset_size == 8 && cie_id == DW64_CIE_ID))) { int version; - int mreg; + unsigned int mreg; start = read_cie (start, end, &cie, &version, &augmentation_data_len, &augmentation_data); /* PR 17512: file: 027-135133-0.005. */ if (cie == NULL) break; + fc = cie; fc->next = chunks; chunks = fc; fc->chunk_start = saved_start; - mreg = max_regs - 1; + mreg = max_regs > 0 ? max_regs - 1 : 0; if (mreg < fc->ra) mreg = fc->ra; - frame_need_space (fc, mreg); + if (frame_need_space (fc, mreg) < 0) + break; if (fc->fde_encoding) encoded_ptr_size = size_of_encoded_value (fc->fde_encoding); @@ -5525,8 +5779,11 @@ if (augmentation_data_len) { unsigned long i; + printf (" Augmentation data: "); for (i = 0; i < augmentation_data_len; ++i) + /* FIXME: If do_wide is FALSE, then we should + add carriage returns at 80 columns... */ printf (" %02x", augmentation_data[i]); putchar ('\n'); } @@ -5582,17 +5839,27 @@ || (off_size == 8 && c_id == DW64_CIE_ID))) { int version; - int mreg; + unsigned int mreg; read_cie (cie_scan, end, &cie, &version, &augmentation_data_len, &augmentation_data); + /* PR 17512: file: 3450-2098-0.004. */ + if (cie == NULL) + { + warn (_("Failed to read CIE information\n")); + break; + } cie->next = forward_refs; forward_refs = cie; cie->chunk_start = look_for; - mreg = max_regs - 1; + mreg = max_regs > 0 ? max_regs - 1 : 0; if (mreg < cie->ra) mreg = cie->ra; - frame_need_space (cie, mreg); + if (frame_need_space (cie, mreg) < 0) + { + warn (_("Invalid max register\n")); + break; + } if (cie->fde_encoding) encoded_ptr_size = size_of_encoded_value (cie->fde_encoding); @@ -5612,7 +5879,11 @@ fc->ncols = 0; fc->col_type = (short int *) xmalloc (sizeof (short int)); fc->col_offset = (int *) xmalloc (sizeof (int)); - frame_need_space (fc, max_regs - 1); + if (frame_need_space (fc, max_regs > 0 ? max_regs - 1 : 0) < 0) + { + warn (_("Invalid max register\n")); + break; + } cie = fc; fc->augmentation = ""; fc->fde_encoding = 0; @@ -5635,7 +5906,11 @@ fc->cfa_reg = cie->cfa_reg; fc->cfa_offset = cie->cfa_offset; fc->ra = cie->ra; - frame_need_space (fc, max_regs - 1); + if (frame_need_space (fc, max_regs > 0 ? max_regs - 1: 0) < 0) + { + warn (_("Invalid max register\n")); + break; + } fc->fde_encoding = cie->fde_encoding; } @@ -5644,7 +5919,15 @@ segment_selector = 0; if (fc->segment_size) - SAFE_BYTE_GET_AND_INC (segment_selector, start, fc->segment_size, end); + { + if (fc->segment_size > sizeof (segment_selector)) + { + /* PR 17512: file: 9e196b3e. */ + warn (_("Probably corrupt segment size: %d - using 4 instead\n"), fc->segment_size); + fc->segment_size = 4; + } + SAFE_BYTE_GET_AND_INC (segment_selector, start, fc->segment_size, end); + } fc->pc_begin = get_encoded_value (&start, fc->fde_encoding, section, end); @@ -5659,6 +5942,15 @@ augmentation_data_len = LEB (); augmentation_data = start; start += augmentation_data_len; + /* PR 17512: file: 722-8446-0.004. */ + if (start >= end || ((signed long) augmentation_data_len) < 0) + { + warn (_("Corrupt augmentation data length: %lx\n"), + augmentation_data_len); + start = end; + augmentation_data = NULL; + augmentation_data_len = 0; + } } printf ("\n%08lx %s %s FDE cie=%08lx pc=", @@ -5703,6 +5995,7 @@ { unsigned int reg, op, opa; unsigned long temp; + unsigned char * new_start; op = *start++; opa = op & 0x3f; @@ -5744,7 +6037,6 @@ break; case DW_CFA_restore_extended: reg = LEB (); - frame_need_space (fc, reg); if (frame_need_space (fc, reg) >= 0) fc->col_type[reg] = DW_CFA_undefined; break; @@ -5774,26 +6066,28 @@ break; case DW_CFA_def_cfa_expression: temp = LEB (); - if (start + temp < start) + new_start = start + temp; + if (new_start < start) { warn (_("Corrupt CFA_def expression value: %lu\n"), temp); start = block_end; } else - start += temp; + start = new_start; break; case DW_CFA_expression: case DW_CFA_val_expression: reg = LEB (); temp = LEB (); - if (start + temp < start) + new_start = start + temp; + if (new_start < start) { - /* PR 17512: file:306-192417-0.005. */ + /* PR 17512: file:306-192417-0.005. */ warn (_("Corrupt CFA expression value: %lu\n"), temp); start = block_end; } else - start += temp; + start = new_start; if (frame_need_space (fc, reg) >= 0) fc->col_type[reg] = DW_CFA_undefined; break; @@ -5832,9 +6126,10 @@ while (start < block_end) { + unsigned char * tmp; unsigned op, opa; unsigned long ul, reg, roffs; - long l; + dwarf_vma l; dwarf_vma ofs; dwarf_vma vma; const char *reg_prefix = ""; @@ -5854,7 +6149,7 @@ else printf (" DW_CFA_advance_loc: %d to %s\n", opa * fc->code_factor, - dwarf_vmatoa_1 (NULL, + dwarf_vmatoa_1 (NULL, fc->pc_begin + opa * fc->code_factor, fc->ptr_size)); fc->pc_begin += opa * fc->code_factor; @@ -5893,7 +6188,7 @@ break; case DW_CFA_set_loc: - vma = get_encoded_value (&start, fc->fde_encoding, section, end); + vma = get_encoded_value (&start, fc->fde_encoding, section, block_end); if (do_debug_frames_interp) frame_display_row (fc, &need_col_headers, &max_regs); else @@ -5916,7 +6211,7 @@ break; case DW_CFA_advance_loc2: - SAFE_BYTE_GET_AND_INC (ofs, start, 2, end); + SAFE_BYTE_GET_AND_INC (ofs, start, 2, block_end); if (do_debug_frames_interp) frame_display_row (fc, &need_col_headers, &max_regs); else @@ -5929,7 +6224,7 @@ break; case DW_CFA_advance_loc4: - SAFE_BYTE_GET_AND_INC (ofs, start, 4, end); + SAFE_BYTE_GET_AND_INC (ofs, start, 4, block_end); if (do_debug_frames_interp) frame_display_row (fc, &need_col_headers, &max_regs); else @@ -6038,13 +6333,13 @@ if (! do_debug_frames_interp) printf (" DW_CFA_remember_state\n"); rs = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk)); - rs->cfa_offset = fc->cfa_offset; + rs->cfa_offset = fc->cfa_offset; rs->cfa_reg = fc->cfa_reg; rs->ra = fc->ra; rs->cfa_exp = fc->cfa_exp; rs->ncols = fc->ncols; rs->col_type = (short int *) xcmalloc (rs->ncols, - sizeof (* rs->col_type)); + sizeof (* rs->col_type)); rs->col_offset = (int *) xcmalloc (rs->ncols, sizeof (* rs->col_offset)); memcpy (rs->col_type, fc->col_type, rs->ncols * sizeof (* fc->col_type)); memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (* fc->col_offset)); @@ -6061,9 +6356,14 @@ remembered_state = rs->next; fc->cfa_offset = rs->cfa_offset; fc->cfa_reg = rs->cfa_reg; - fc->ra = rs->ra; - fc->cfa_exp = rs->cfa_exp; - frame_need_space (fc, rs->ncols - 1); + fc->ra = rs->ra; + fc->cfa_exp = rs->cfa_exp; + if (frame_need_space (fc, rs->ncols - 1) < 0) + { + warn (_("Invalid column number in saved frame state\n")); + fc->ncols = 0; + break; + } memcpy (fc->col_type, rs->col_type, rs->ncols * sizeof (* rs->col_type)); memcpy (fc->col_offset, rs->col_offset, rs->ncols * sizeof (* rs->col_offset)); @@ -6081,7 +6381,7 @@ fc->cfa_exp = 0; if (! do_debug_frames_interp) printf (" DW_CFA_def_cfa: %s ofs %d\n", - regname (fc->cfa_reg, 0), fc->cfa_offset); + regname (fc->cfa_reg, 0), (int) fc->cfa_offset); break; case DW_CFA_def_cfa_register: @@ -6095,7 +6395,7 @@ case DW_CFA_def_cfa_offset: fc->cfa_offset = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset); + printf (" DW_CFA_def_cfa_offset: %d\n", (int) fc->cfa_offset); break; case DW_CFA_nop: @@ -6105,6 +6405,11 @@ case DW_CFA_def_cfa_expression: ul = LEB (); + if (start >= block_end || start + ul > block_end || start + ul < start) + { + printf (_(" DW_CFA_def_cfa_expression: \n"), ul); + break; + } if (! do_debug_frames_interp) { printf (" DW_CFA_def_cfa_expression ("); @@ -6121,6 +6426,14 @@ ul = LEB (); if (reg >= (unsigned int) fc->ncols) reg_prefix = bad_reg; + /* PR 17512: file: 069-133014-0.006. */ + /* PR 17512: file: 98c02eb4. */ + tmp = start + ul; + if (start >= block_end || tmp > block_end || tmp < start) + { + printf (_(" DW_CFA_expression: \n"), ul); + break; + } if (! do_debug_frames_interp || *reg_prefix != '\0') { printf (" DW_CFA_expression: %s%s (", @@ -6131,7 +6444,7 @@ } if (*reg_prefix == '\0') fc->col_type[reg] = DW_CFA_expression; - start += ul; + start = tmp; break; case DW_CFA_val_expression: @@ -6139,6 +6452,12 @@ ul = LEB (); if (reg >= (unsigned int) fc->ncols) reg_prefix = bad_reg; + tmp = start + ul; + if (start >= block_end || tmp > block_end || tmp < start) + { + printf (" DW_CFA_val_expression: \n", ul); + break; + } if (! do_debug_frames_interp || *reg_prefix != '\0') { printf (" DW_CFA_val_expression: %s%s (", @@ -6149,7 +6468,7 @@ } if (*reg_prefix == '\0') fc->col_type[reg] = DW_CFA_val_expression; - start += ul; + start = tmp; break; case DW_CFA_offset_extended_sf: @@ -6160,7 +6479,7 @@ if (! do_debug_frames_interp || *reg_prefix != '\0') printf (" DW_CFA_offset_extended_sf: %s%s at cfa%+ld\n", reg_prefix, regname (reg, 0), - l * fc->data_factor); + (long)(l * fc->data_factor)); if (*reg_prefix == '\0') { fc->col_type[reg] = DW_CFA_offset; @@ -6176,7 +6495,7 @@ if (! do_debug_frames_interp || *reg_prefix != '\0') printf (" DW_CFA_val_offset_sf: %s%s at cfa%+ld\n", reg_prefix, regname (reg, 0), - l * fc->data_factor); + (long)(l * fc->data_factor)); if (*reg_prefix == '\0') { fc->col_type[reg] = DW_CFA_val_offset; @@ -6191,18 +6510,18 @@ fc->cfa_exp = 0; if (! do_debug_frames_interp) printf (" DW_CFA_def_cfa_sf: %s ofs %d\n", - regname (fc->cfa_reg, 0), fc->cfa_offset); + regname (fc->cfa_reg, 0), (int) fc->cfa_offset); break; case DW_CFA_def_cfa_offset_sf: fc->cfa_offset = SLEB (); - fc->cfa_offset = fc->cfa_offset * fc->data_factor; + fc->cfa_offset *= fc->data_factor; if (! do_debug_frames_interp) - printf (" DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset); + printf (" DW_CFA_def_cfa_offset_sf: %d\n", (int) fc->cfa_offset); break; case DW_CFA_MIPS_advance_loc8: - SAFE_BYTE_GET_AND_INC (ofs, start, 8, end); + SAFE_BYTE_GET_AND_INC (ofs, start, 8, block_end); if (do_debug_frames_interp) frame_display_row (fc, &need_col_headers, &max_regs); else @@ -6233,7 +6552,7 @@ if (! do_debug_frames_interp || *reg_prefix != '\0') printf (" DW_CFA_GNU_negative_offset_extended: %s%s at cfa%+ld\n", reg_prefix, regname (reg, 0), - l * fc->data_factor); + (long)(l * fc->data_factor)); if (*reg_prefix == '\0') { fc->col_type[reg] = DW_CFA_offset; @@ -6329,9 +6648,42 @@ return 0; } + /* PR 17531: file: 418d0a8a. */ + if (tu_list_offset < cu_list_offset) + { + warn (_("TU offset (%x) is less than CU offset (%x)\n"), + tu_list_offset, cu_list_offset); + return 0; + } + cu_list_elements = (tu_list_offset - cu_list_offset) / 8; + + if (address_table_offset < tu_list_offset) + { + warn (_("Address table offset (%x) is less than TU offset (%x)\n"), + address_table_offset, tu_list_offset); + return 0; + } + tu_list_elements = (address_table_offset - tu_list_offset) / 8; + + /* PR 17531: file: 18a47d3d. */ + if (symbol_table_offset < address_table_offset) + { + warn (_("Symbol table offset (%xl) is less then Address table offset (%x)\n"), + symbol_table_offset, address_table_offset); + return 0; + } + address_table_size = symbol_table_offset - address_table_offset; + + if (constant_pool_offset < symbol_table_offset) + { + warn (_("Constant pool offset (%x) is less than symbol table offset (%x)\n"), + constant_pool_offset, symbol_table_offset); + return 0; + } + symbol_table_slots = (constant_pool_offset - symbol_table_offset) / 8; cu_list = start + cu_list_offset; @@ -6340,6 +6692,12 @@ symbol_table = start + symbol_table_offset; constant_pool = start + constant_pool_offset; + if (address_table + address_table_size * (2 + 8 + 4) > section->start + section->size) + { + warn (_("Address table extends beyond end of section.\n")); + return 0; + } + printf (_("\nCU table:\n")); for (i = 0; i < cu_list_elements; i += 2) { @@ -6366,7 +6724,8 @@ } printf (_("\nAddress table:\n")); - for (i = 0; i < address_table_size; i += 2 * 8 + 4) + for (i = 0; i < address_table_size && i <= address_table_size - (2 * 8 + 4); + i += 2 * 8 + 4) { uint64_t low = byte_get_little_endian (address_table + i, 8); uint64_t high = byte_get_little_endian (address_table + i + 8, 8); @@ -6388,11 +6747,46 @@ || cu_vector_offset != 0) { unsigned int j; + unsigned char * adr; + + adr = constant_pool + name_offset; + /* PR 17531: file: 5b7b07ad. */ + if (adr < constant_pool || adr >= section->start + section->size) + { + printf (_("[%3u] "), i, name_offset); + warn (_("Corrupt name offset of 0x%x found for symbol table slot %d\n"), + name_offset, i); + } + else + printf ("[%3u] %.*s:", i, + (int) (section->size - (constant_pool_offset + name_offset)), + constant_pool + name_offset); + + adr = constant_pool + cu_vector_offset; + if (adr < constant_pool || adr >= section->start + section->size - 3) + { + printf (_("\n"), cu_vector_offset); + warn (_("Corrupt CU vector offset of 0x%x found for symbol table slot %d\n"), + cu_vector_offset, i); + continue; + } + + num_cus = byte_get_little_endian (adr, 4); + + adr = constant_pool + cu_vector_offset + 4 + num_cus * 4; + if (num_cus * 4 < num_cus + || adr >= section->start + section->size + || adr < constant_pool) + { + printf ("\n", num_cus); + warn (_("Invalid number of CUs (0x%x) for symbol table slot %d\n"), + num_cus, i); + continue; + } - printf ("[%3u] %s:", i, constant_pool + name_offset); - num_cus = byte_get_little_endian (constant_pool + cu_vector_offset, 4); if (num_cus > 1) printf ("\n"); + for (j = 0; j < num_cus; ++j) { int is_static; @@ -6491,7 +6885,7 @@ case DW_SECT_MACRO: return "macro"; default: - break; + break; } snprintf (buf, sizeof (buf), "%d", dw_sect); @@ -6520,15 +6914,38 @@ dwarf_vma signature_low; char buf[64]; - version = byte_get (phdr, 4); + /* PR 17512: file: 002-168123-0.004. */ + if (phdr == NULL) + { + warn (_("Section %s is empty\n"), section->name); + return 0; + } + /* PR 17512: file: 002-376-0.004. */ + if (section->size < 24) + { + warn (_("Section %s is too small to contain a CU/TU header\n"), + section->name); + return 0; + } + + SAFE_BYTE_GET (version, phdr, 4, limit); if (version >= 2) - ncols = byte_get (phdr + 4, 4); - nused = byte_get (phdr + 8, 4); - nslots = byte_get (phdr + 12, 4); + SAFE_BYTE_GET (ncols, phdr + 4, 4, limit); + SAFE_BYTE_GET (nused, phdr + 8, 4, limit); + SAFE_BYTE_GET (nslots, phdr + 12, 4, limit); + phash = phdr + 16; pindex = phash + nslots * 8; ppool = pindex + nslots * 4; + /* PR 17531: file: 45d69832. */ + if (pindex < phash || ppool < phdr || (pindex == phash && nslots != 0)) + { + warn (_("Section %s is too small for %d slots\n"), + section->name, nslots); + return 0; + } + if (do_display) { printf (_("Contents of the %s section:\n\n"), section->name); @@ -6539,7 +6956,7 @@ printf (_(" Number of slots: %d\n\n"), nslots); } - if (ppool > limit) + if (ppool > limit || ppool < phdr) { warn (_("Section %s too small for %d hash table entries\n"), section->name, nslots); @@ -6555,11 +6972,18 @@ unsigned char *shndx_list; unsigned int shndx; - byte_get_64 (phash, &signature_high, &signature_low); + SAFE_BYTE_GET64 (phash, &signature_high, &signature_low, limit); if (signature_high != 0 || signature_low != 0) { - j = byte_get (pindex, 4); + SAFE_BYTE_GET (j, pindex, 4, limit); shndx_list = ppool + j * 4; + /* PR 17531: file: 705e010d. */ + if (shndx_list < ppool) + { + warn (_("Section index pool located before start of section\n")); + return 0; + } + if (do_display) printf (_(" [%3d] Signature: 0x%s Sections: "), i, dwarf_vmatoa64 (signature_high, signature_low, @@ -6572,7 +6996,7 @@ section->name); return 0; } - shndx = byte_get (shndx_list, 4); + SAFE_BYTE_GET (shndx, shndx_list, 4, limit); if (shndx == 0) break; if (do_display) @@ -6606,6 +7030,14 @@ is_tu_index = strcmp (section->name, ".debug_tu_index") == 0; + /* PR 17531: file: 0dd159bf. + Check for wraparound with an overlarge ncols value. */ + if (poffsets < ppool || (unsigned int) ((poffsets - ppool) / 4) != ncols) + { + warn (_("Overlarge number of columns: %x\n"), ncols); + return 0; + } + if (pend > limit) { warn (_("Section %s too small for offset and size tables\n"), @@ -6624,49 +7056,75 @@ if (is_tu_index) { tu_count = nused; - tu_sets = xcmalloc (nused, sizeof (struct cu_tu_set)); + tu_sets = xcalloc2 (nused, sizeof (struct cu_tu_set)); this_set = tu_sets; } else { cu_count = nused; - cu_sets = xcmalloc (nused, sizeof (struct cu_tu_set)); + cu_sets = xcalloc2 (nused, sizeof (struct cu_tu_set)); this_set = cu_sets; } } + if (do_display) { for (j = 0; j < ncols; j++) { - dw_sect = byte_get (ppool + j * 4, 4); + SAFE_BYTE_GET (dw_sect, ppool + j * 4, 4, limit); printf (" %8s", get_DW_SECT_short_name (dw_sect)); } printf ("\n"); } + for (i = 0; i < nslots; i++) { - byte_get_64 (ph, &signature_high, &signature_low); - row = byte_get (pi, 4); + SAFE_BYTE_GET64 (ph, &signature_high, &signature_low, limit); + + SAFE_BYTE_GET (row, pi, 4, limit); if (row != 0) { + /* PR 17531: file: a05f6ab3. */ + if (row > nused) + { + warn (_("Row index (%u) is larger than number of used entries (%u)\n"), + row, nused); + return 0; + } + if (!do_display) memcpy (&this_set[row - 1].signature, ph, sizeof (uint64_t)); + prow = poffsets + (row - 1) * ncols * 4; + /* PR 17531: file: b8ce60a8. */ + if (prow < poffsets || prow > limit) + { + warn (_("Row index (%u) * num columns (%u) > space remaining in section\n"), + row, ncols); + return 0; + } + if (do_display) printf (_(" [%3d] 0x%s"), i, dwarf_vmatoa64 (signature_high, signature_low, buf, sizeof (buf))); for (j = 0; j < ncols; j++) { - val = byte_get (prow + j * 4, 4); + SAFE_BYTE_GET (val, prow + j * 4, 4, limit); if (do_display) printf (" %8d", val); else { - dw_sect = byte_get (ppool + j * 4, 4); - this_set [row - 1].section_offsets [dw_sect] = val; + SAFE_BYTE_GET (dw_sect, ppool + j * 4, 4, limit); + + /* PR 17531: file: 10796eb3. */ + if (dw_sect >= DW_SECT_MAX) + warn (_("Overlarge Dwarf section index detected: %u\n"), dw_sect); + else + this_set [row - 1].section_offsets [dw_sect] = val; } } + if (do_display) printf ("\n"); } @@ -6677,51 +7135,62 @@ ph = phash; pi = pindex; if (do_display) - { + { printf ("\n"); printf (_(" Size table\n")); printf (" slot %-16s ", is_tu_index ? _("signature") : _("dwo_id")); - } + } + for (j = 0; j < ncols; j++) { - val = byte_get (ppool + j * 4, 4); + SAFE_BYTE_GET (val, ppool + j * 4, 4, limit); if (do_display) printf (" %8s", get_DW_SECT_short_name (val)); } + if (do_display) printf ("\n"); + for (i = 0; i < nslots; i++) { - byte_get_64 (ph, &signature_high, &signature_low); - row = byte_get (pi, 4); + SAFE_BYTE_GET64 (ph, &signature_high, &signature_low, limit); + + SAFE_BYTE_GET (row, pi, 4, limit); if (row != 0) { prow = psizes + (row - 1) * ncols * 4; + if (do_display) printf (_(" [%3d] 0x%s"), i, dwarf_vmatoa64 (signature_high, signature_low, buf, sizeof (buf))); + for (j = 0; j < ncols; j++) { - val = byte_get (prow + j * 4, 4); + SAFE_BYTE_GET (val, prow + j * 4, 4, limit); if (do_display) printf (" %8d", val); else { - dw_sect = byte_get (ppool + j * 4, 4); + SAFE_BYTE_GET (dw_sect, ppool + j * 4, 4, limit); + if (dw_sect >= DW_SECT_MAX) + warn (_("Overlarge Dwarf section index detected: %u\n"), dw_sect); + else this_set [row - 1].section_sizes [dw_sect] = val; } } + if (do_display) printf ("\n"); } + ph += 8; pi += 4; } } else if (do_display) - printf (_(" Unsupported version\n")); + printf (_(" Unsupported version (%d)\n"), version); if (do_display) printf ("\n"); @@ -6792,34 +7261,69 @@ return 1; } +/* Like malloc, but takes two parameters like calloc. + Verifies that the first parameter is not too large. + Note: does *not* initialise the allocated memory to zero. */ void * cmalloc (size_t nmemb, size_t size) { /* Check for overflow. */ if (nmemb >= ~(size_t) 0 / size) return NULL; - else - return malloc (nmemb * size); + + return xmalloc (nmemb * size); } +/* Like xmalloc, but takes two parameters like calloc. + Verifies that the first parameter is not too large. + Note: does *not* initialise the allocated memory to zero. */ void * xcmalloc (size_t nmemb, size_t size) { /* Check for overflow. */ if (nmemb >= ~(size_t) 0 / size) - return NULL; - else - return xmalloc (nmemb * size); + { + fprintf (stderr, + _("Attempt to allocate an array with an excessive number of elements: 0x%lx\n"), + (long) nmemb); + xexit (1); + } + + return xmalloc (nmemb * size); } +/* Like xrealloc, but takes three parameters. + Verifies that the second parameter is not too large. + Note: does *not* initialise any new memory to zero. */ void * xcrealloc (void *ptr, size_t nmemb, size_t size) { /* Check for overflow. */ if (nmemb >= ~(size_t) 0 / size) - return NULL; - else - return xrealloc (ptr, nmemb * size); + { + fprintf (stderr, + _("Attempt to re-allocate an array with an excessive number of elements: 0x%lx\n"), + (long) nmemb); + xexit (1); + } + + return xrealloc (ptr, nmemb * size); +} + +/* Like xcalloc, but verifies that the first parameter is not too large. */ +void * +xcalloc2 (size_t nmemb, size_t size) +{ + /* Check for overflow. */ + if (nmemb >= ~(size_t) 0 / size) + { + fprintf (stderr, + _("Attempt to allocate a zero'ed array with an excessive number of elements: 0x%lx\n"), + (long) nmemb); + xexit (1); + } + + return xcalloc (nmemb, size); } void @@ -6847,10 +7351,9 @@ free (debug_information [i].range_lists); } } - free (debug_information); debug_information = NULL; - num_debug_info_entries = 0; + alloc_num_debug_info_entries = num_debug_info_entries = 0; } } @@ -6994,7 +7497,7 @@ break; default: - warn (_("Unrecognized debug option '%s'\n"), optarg); + warn (_("Unrecognized debug option '%s'\n"), letters); break; } } @@ -7023,76 +7526,76 @@ struct dwarf_section_display debug_displays[] = { - { { ".debug_abbrev", ".zdebug_abbrev", NULL, NULL, 0, 0, 0 }, + { { ".debug_abbrev", ".zdebug_abbrev", NULL, NULL, 0, 0, 0, NULL }, display_debug_abbrev, &do_debug_abbrevs, 0 }, - { { ".debug_aranges", ".zdebug_aranges", NULL, NULL, 0, 0, 0 }, + { { ".debug_aranges", ".zdebug_aranges", NULL, NULL, 0, 0, 0, NULL }, display_debug_aranges, &do_debug_aranges, 1 }, - { { ".debug_frame", ".zdebug_frame", NULL, NULL, 0, 0, 0 }, + { { ".debug_frame", ".zdebug_frame", NULL, NULL, 0, 0, 0, NULL }, display_debug_frames, &do_debug_frames, 1 }, - { { ".debug_info", ".zdebug_info", NULL, NULL, 0, 0, abbrev }, + { { ".debug_info", ".zdebug_info", NULL, NULL, 0, 0, abbrev, NULL }, display_debug_info, &do_debug_info, 1 }, - { { ".debug_line", ".zdebug_line", NULL, NULL, 0, 0, 0 }, + { { ".debug_line", ".zdebug_line", NULL, NULL, 0, 0, 0, NULL }, display_debug_lines, &do_debug_lines, 1 }, - { { ".debug_pubnames", ".zdebug_pubnames", NULL, NULL, 0, 0, 0 }, + { { ".debug_pubnames", ".zdebug_pubnames", NULL, NULL, 0, 0, 0, NULL }, display_debug_pubnames, &do_debug_pubnames, 0 }, - { { ".debug_gnu_pubnames", ".zdebug_gnu_pubnames", NULL, NULL, 0, 0, 0 }, + { { ".debug_gnu_pubnames", ".zdebug_gnu_pubnames", NULL, NULL, 0, 0, 0, NULL }, display_debug_gnu_pubnames, &do_debug_pubnames, 0 }, - { { ".eh_frame", "", NULL, NULL, 0, 0, 0 }, + { { ".eh_frame", "", NULL, NULL, 0, 0, 0, NULL }, display_debug_frames, &do_debug_frames, 1 }, - { { ".debug_macinfo", ".zdebug_macinfo", NULL, NULL, 0, 0, 0 }, + { { ".debug_macinfo", ".zdebug_macinfo", NULL, NULL, 0, 0, 0, NULL }, display_debug_macinfo, &do_debug_macinfo, 0 }, - { { ".debug_macro", ".zdebug_macro", NULL, NULL, 0, 0, 0 }, + { { ".debug_macro", ".zdebug_macro", NULL, NULL, 0, 0, 0, NULL }, display_debug_macro, &do_debug_macinfo, 1 }, - { { ".debug_str", ".zdebug_str", NULL, NULL, 0, 0, 0 }, + { { ".debug_str", ".zdebug_str", NULL, NULL, 0, 0, 0, NULL }, display_debug_str, &do_debug_str, 0 }, - { { ".debug_loc", ".zdebug_loc", NULL, NULL, 0, 0, 0 }, + { { ".debug_loc", ".zdebug_loc", NULL, NULL, 0, 0, 0, NULL }, display_debug_loc, &do_debug_loc, 1 }, - { { ".debug_pubtypes", ".zdebug_pubtypes", NULL, NULL, 0, 0, 0 }, + { { ".debug_pubtypes", ".zdebug_pubtypes", NULL, NULL, 0, 0, 0, NULL }, display_debug_pubnames, &do_debug_pubtypes, 0 }, - { { ".debug_gnu_pubtypes", ".zdebug_gnu_pubtypes", NULL, NULL, 0, 0, 0 }, + { { ".debug_gnu_pubtypes", ".zdebug_gnu_pubtypes", NULL, NULL, 0, 0, 0, NULL }, display_debug_gnu_pubnames, &do_debug_pubtypes, 0 }, - { { ".debug_ranges", ".zdebug_ranges", NULL, NULL, 0, 0, 0 }, + { { ".debug_ranges", ".zdebug_ranges", NULL, NULL, 0, 0, 0, NULL }, display_debug_ranges, &do_debug_ranges, 1 }, - { { ".debug_static_func", ".zdebug_static_func", NULL, NULL, 0, 0, 0 }, + { { ".debug_static_func", ".zdebug_static_func", NULL, NULL, 0, 0, 0, NULL }, display_debug_not_supported, NULL, 0 }, - { { ".debug_static_vars", ".zdebug_static_vars", NULL, NULL, 0, 0, 0 }, + { { ".debug_static_vars", ".zdebug_static_vars", NULL, NULL, 0, 0, 0, NULL }, display_debug_not_supported, NULL, 0 }, - { { ".debug_types", ".zdebug_types", NULL, NULL, 0, 0, abbrev }, + { { ".debug_types", ".zdebug_types", NULL, NULL, 0, 0, abbrev, NULL }, display_debug_types, &do_debug_info, 1 }, - { { ".debug_weaknames", ".zdebug_weaknames", NULL, NULL, 0, 0, 0 }, + { { ".debug_weaknames", ".zdebug_weaknames", NULL, NULL, 0, 0, 0, NULL }, display_debug_not_supported, NULL, 0 }, - { { ".gdb_index", "", NULL, NULL, 0, 0, 0 }, + { { ".gdb_index", "", NULL, NULL, 0, 0, 0, NULL }, display_gdb_index, &do_gdb_index, 0 }, - { { ".trace_info", "", NULL, NULL, 0, 0, trace_abbrev }, + { { ".trace_info", "", NULL, NULL, 0, 0, trace_abbrev, NULL }, display_trace_info, &do_trace_info, 1 }, - { { ".trace_abbrev", "", NULL, NULL, 0, 0, 0 }, + { { ".trace_abbrev", "", NULL, NULL, 0, 0, 0, NULL }, display_debug_abbrev, &do_trace_abbrevs, 0 }, - { { ".trace_aranges", "", NULL, NULL, 0, 0, 0 }, + { { ".trace_aranges", "", NULL, NULL, 0, 0, 0, NULL }, display_debug_aranges, &do_trace_aranges, 0 }, - { { ".debug_info.dwo", ".zdebug_info.dwo", NULL, NULL, 0, 0, abbrev_dwo }, + { { ".debug_info.dwo", ".zdebug_info.dwo", NULL, NULL, 0, 0, abbrev_dwo, NULL }, display_debug_info, &do_debug_info, 1 }, - { { ".debug_abbrev.dwo", ".zdebug_abbrev.dwo", NULL, NULL, 0, 0, 0 }, + { { ".debug_abbrev.dwo", ".zdebug_abbrev.dwo", NULL, NULL, 0, 0, 0, NULL }, display_debug_abbrev, &do_debug_abbrevs, 0 }, - { { ".debug_types.dwo", ".zdebug_types.dwo", NULL, NULL, 0, 0, abbrev_dwo }, + { { ".debug_types.dwo", ".zdebug_types.dwo", NULL, NULL, 0, 0, abbrev_dwo, NULL }, display_debug_types, &do_debug_info, 1 }, - { { ".debug_line.dwo", ".zdebug_line.dwo", NULL, NULL, 0, 0, 0 }, + { { ".debug_line.dwo", ".zdebug_line.dwo", NULL, NULL, 0, 0, 0, NULL }, display_debug_lines, &do_debug_lines, 1 }, - { { ".debug_loc.dwo", ".zdebug_loc.dwo", NULL, NULL, 0, 0, 0 }, + { { ".debug_loc.dwo", ".zdebug_loc.dwo", NULL, NULL, 0, 0, 0, NULL }, display_debug_loc, &do_debug_loc, 1 }, - { { ".debug_macro.dwo", ".zdebug_macro.dwo", NULL, NULL, 0, 0, 0 }, + { { ".debug_macro.dwo", ".zdebug_macro.dwo", NULL, NULL, 0, 0, 0, NULL }, display_debug_macro, &do_debug_macinfo, 1 }, - { { ".debug_macinfo.dwo", ".zdebug_macinfo.dwo", NULL, NULL, 0, 0, 0 }, + { { ".debug_macinfo.dwo", ".zdebug_macinfo.dwo", NULL, NULL, 0, 0, 0, NULL }, display_debug_macinfo, &do_debug_macinfo, 0 }, - { { ".debug_str.dwo", ".zdebug_str.dwo", NULL, NULL, 0, 0, 0 }, + { { ".debug_str.dwo", ".zdebug_str.dwo", NULL, NULL, 0, 0, 0, NULL }, display_debug_str, &do_debug_str, 1 }, - { { ".debug_str_offsets", ".zdebug_str_offsets", NULL, NULL, 0, 0, 0 }, + { { ".debug_str_offsets", ".zdebug_str_offsets", NULL, NULL, 0, 0, 0, NULL }, display_debug_str_offsets, NULL, 0 }, - { { ".debug_str_offsets.dwo", ".zdebug_str_offsets.dwo", NULL, NULL, 0, 0, 0 }, + { { ".debug_str_offsets.dwo", ".zdebug_str_offsets.dwo", NULL, NULL, 0, 0, 0, NULL }, display_debug_str_offsets, NULL, 0 }, - { { ".debug_addr", ".zdebug_addr", NULL, NULL, 0, 0, 0 }, + { { ".debug_addr", ".zdebug_addr", NULL, NULL, 0, 0, 0, NULL }, display_debug_addr, &do_debug_addr, 1 }, - { { ".debug_cu_index", "", NULL, NULL, 0, 0, 0 }, + { { ".debug_cu_index", "", NULL, NULL, 0, 0, 0, NULL }, display_cu_index, &do_debug_cu_index, 0 }, - { { ".debug_tu_index", "", NULL, NULL, 0, 0, 0 }, + { { ".debug_tu_index", "", NULL, NULL, 0, 0, 0, NULL }, display_cu_index, &do_debug_cu_index, 0 }, }; diff -ruN binutils-2.25/binutils/dwarf.h binutils-2.25.1/binutils/dwarf.h --- binutils-2.25/binutils/dwarf.h 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/dwarf.h 2015-07-21 10:20:58.000000000 +0200 @@ -25,22 +25,9 @@ /* Structure found in the .debug_line section. */ typedef struct { - unsigned char li_length [4]; - unsigned char li_version [2]; - unsigned char li_prologue_length [4]; - unsigned char li_min_insn_length [1]; - unsigned char li_default_is_stmt [1]; - unsigned char li_line_base [1]; - unsigned char li_line_range [1]; - unsigned char li_opcode_base [1]; -} -DWARF2_External_LineInfo; - -typedef struct -{ dwarf_vma li_length; unsigned short li_version; - unsigned int li_prologue_length; + dwarf_vma li_prologue_length; unsigned char li_min_insn_length; unsigned char li_max_ops_per_insn; unsigned char li_default_is_stmt; @@ -53,15 +40,6 @@ /* Structure found in .debug_pubnames section. */ typedef struct { - unsigned char pn_length [4]; - unsigned char pn_version [2]; - unsigned char pn_offset [4]; - unsigned char pn_size [4]; -} -DWARF2_External_PubNames; - -typedef struct -{ dwarf_vma pn_length; unsigned short pn_version; dwarf_vma pn_offset; @@ -72,15 +50,6 @@ /* Structure found in .debug_info section. */ typedef struct { - unsigned char cu_length [4]; - unsigned char cu_version [2]; - unsigned char cu_abbrev_offset [4]; - unsigned char cu_pointer_size [1]; -} -DWARF2_External_CompUnit; - -typedef struct -{ dwarf_vma cu_length; unsigned short cu_version; dwarf_vma cu_abbrev_offset; @@ -88,16 +57,7 @@ } DWARF2_Internal_CompUnit; -typedef struct -{ - unsigned char ar_length [4]; - unsigned char ar_version [2]; - unsigned char ar_info_offset [4]; - unsigned char ar_pointer_size [1]; - unsigned char ar_segment_size [1]; -} -DWARF2_External_ARange; - +/* Structure found in .debug_aranges section. */ typedef struct { dwarf_vma ar_length; @@ -164,6 +124,8 @@ dwarf_vma address; dwarf_size_type size; enum dwarf_section_display_enum abbrev_sec; + /* A spare field for random use. */ + void *user_data; }; /* A structure containing the name of a debug section @@ -205,7 +167,7 @@ } debug_info; -extern int eh_addr_size; +extern unsigned int eh_addr_size; extern int do_debug_info; extern int do_debug_abbrevs; @@ -246,10 +208,11 @@ extern void dwarf_select_sections_by_letters (const char *); extern void dwarf_select_sections_all (void); -unsigned int * find_cu_tu_set (void *, unsigned int); +extern unsigned int * find_cu_tu_set (void *, unsigned int); -void * cmalloc (size_t, size_t); -void * xcmalloc (size_t, size_t); -void * xcrealloc (void *, size_t, size_t); +extern void * cmalloc (size_t, size_t); +extern void * xcalloc2 (size_t, size_t); +extern void * xcmalloc (size_t, size_t); +extern void * xcrealloc (void *, size_t, size_t); extern dwarf_vma read_leb128 (unsigned char *, unsigned int *, bfd_boolean, const unsigned char * const); diff -ruN binutils-2.25/binutils/elfcomm.c binutils-2.25.1/binutils/elfcomm.c --- binutils-2.25/binutils/elfcomm.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/elfcomm.c 2015-07-21 10:20:58.000000000 +0200 @@ -51,7 +51,7 @@ /* Try to keep warning messages in sync with the program's normal output. */ fflush (stdout); - + va_start (args, message); fprintf (stderr, _("%s: Warning: "), program_name); vfprintf (stderr, message, args); @@ -386,10 +386,11 @@ char * adjust_relative_path (const char *file_name, const char *name, - int name_len) + unsigned long name_len) { char * member_file_name; const char * base_name = lbasename (file_name); + size_t amt; /* This is a proxy entry for a thin archive member. If the extended name table contains an absolute path @@ -399,7 +400,10 @@ archive is located. */ if (IS_ABSOLUTE_PATH (name) || base_name == file_name) { - member_file_name = (char *) malloc (name_len + 1); + amt = name_len + 1; + if (amt == 0) + return NULL; + member_file_name = (char *) malloc (amt); if (member_file_name == NULL) { error (_("Out of memory\n")); @@ -413,7 +417,18 @@ /* Concatenate the path components of the archive file name to the relative path name from the extended name table. */ size_t prefix_len = base_name - file_name; - member_file_name = (char *) malloc (prefix_len + name_len + 1); + + amt = prefix_len + name_len + 1; + /* PR 17531: file: 2896dc8b + Catch wraparound. */ + if (amt < prefix_len || amt < name_len) + { + error (_("Abnormal length of thin archive member name: %lx\n"), + name_len); + return NULL; + } + + member_file_name = (char *) malloc (amt); if (member_file_name == NULL) { error (_("Out of memory\n")); @@ -445,6 +460,14 @@ unsigned long size; size = strtoul (arch->arhdr.ar_size, NULL, 10); + /* PR 17531: file: 912bd7de. */ + if ((signed long) size < 0) + { + error (_("%s: invalid archive header size: %ld\n"), + arch->file_name, size); + return FALSE; + } + size = size + (size & 1); arch->next_arhdr_offset += sizeof arch->arhdr + size; @@ -468,7 +491,7 @@ unsigned char * index_buffer; assert (sizeof_ar_index <= sizeof integer_buffer); - + /* Check the size of the archive index. */ if (size < sizeof_ar_index) { @@ -487,9 +510,11 @@ arch->index_num = byte_get_big_endian (integer_buffer, sizeof_ar_index); size -= sizeof_ar_index; - if (size < arch->index_num * sizeof_ar_index) + if (size < arch->index_num * sizeof_ar_index + /* PR 17531: file: 585515d1. */ + || size < arch->index_num) { - error (_("%s: the archive index is supposed to have %ld entries of %d bytes, but the size is only %ld\n"), + error (_("%s: the archive index is supposed to have 0x%lx entries of %d bytes, but the size is only 0x%lx\n"), arch->file_name, (long) arch->index_num, sizeof_ar_index, size); return FALSE; } @@ -623,9 +648,25 @@ { /* This is the archive string table holding long member names. */ arch->longnames_size = strtoul (arch->arhdr.ar_size, NULL, 10); + /* PR 17531: file: 01068045. */ + if (arch->longnames_size < 8) + { + error (_("%s: long name table is too small, (size = %ld)\n"), + file_name, arch->longnames_size); + return 1; + } + /* PR 17531: file: 639d6a26. */ + if ((signed long) arch->longnames_size < 0) + { + error (_("%s: long name table is too big, (size = 0x%lx)\n"), + file_name, arch->longnames_size); + return 1; + } + arch->next_arhdr_offset += sizeof arch->arhdr + arch->longnames_size; - arch->longnames = (char *) malloc (arch->longnames_size); + /* Plus one to allow for a string terminator. */ + arch->longnames = (char *) malloc (arch->longnames_size + 1); if (arch->longnames == NULL) { error (_("Out of memory reading long symbol names in archive\n")); @@ -643,6 +684,8 @@ if ((arch->longnames_size & 1) != 0) getc (file); + + arch->longnames[arch->longnames_size] = 0; } return 0; @@ -713,23 +756,37 @@ error (_("Archive member uses long names, but no longname table found\n")); return NULL; } - + arch->nested_member_origin = 0; k = j = strtoul (arch->arhdr.ar_name + 1, &endp, 10); if (arch->is_thin_archive && endp != NULL && * endp == ':') arch->nested_member_origin = strtoul (endp + 1, NULL, 10); + if (j > arch->longnames_size) + { + error (_("Found long name index (%ld) beyond end of long name table\n"),j); + return NULL; + } while ((j < arch->longnames_size) && (arch->longnames[j] != '\n') && (arch->longnames[j] != '\0')) j++; - if (arch->longnames[j-1] == '/') + if (j > 0 && arch->longnames[j-1] == '/') j--; + if (j > arch->longnames_size) + j = arch->longnames_size; arch->longnames[j] = '\0'; if (!arch->is_thin_archive || arch->nested_member_origin == 0) return arch->longnames + k; + /* PR 17531: file: 2896dc8b. */ + if (k >= j) + { + error (_("Invalid Thin archive member name\n")); + return NULL; + } + /* This is a proxy for a member of a nested archive. Find the name of the member in that archive. */ member_file_name = adjust_relative_path (arch->file_name, diff -ruN binutils-2.25/binutils/elfcomm.h binutils-2.25.1/binutils/elfcomm.h --- binutils-2.25/binutils/elfcomm.h 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/elfcomm.h 2015-07-21 10:20:58.000000000 +0200 @@ -29,7 +29,7 @@ void error (const char *, ...) ATTRIBUTE_PRINTF_1; void warn (const char *, ...) ATTRIBUTE_PRINTF_1; -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +#if defined HAVE_LONG_LONG && SIZEOF_LONG_LONG > SIZEOF_LONG /* We can't use any bfd types here since readelf may define BFD64 and objdump may not. */ #define HOST_WIDEST_INT long long @@ -77,7 +77,7 @@ }; /* Return the path name for a proxy entry in a thin archive. */ -extern char *adjust_relative_path (const char *, const char *, int); +extern char *adjust_relative_path (const char *, const char *, unsigned long); /* Read the symbol table and long-name table from an archive. */ extern int setup_archive (struct archive_info *, const char *, FILE *, diff -ruN binutils-2.25/binutils/nlmconv.c binutils-2.25.1/binutils/nlmconv.c --- binutils-2.25/binutils/nlmconv.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/nlmconv.c 2015-07-21 10:20:58.000000000 +0200 @@ -211,6 +211,7 @@ program_name = argv[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&argc, &argv); @@ -1415,6 +1416,9 @@ bfd_vma addend; rel = *relocs++; + /* PR 17512: file: 057f89c1. */ + if (rel->sym_ptr_ptr == NULL) + continue; sym = *rel->sym_ptr_ptr; /* We're moving the relocs from the input section to the output @@ -1871,7 +1875,7 @@ toc_howto = bfd_reloc_type_lookup (insec->owner, BFD_RELOC_PPC_TOC16); if (toc_howto == (reloc_howto_type *) NULL) - abort (); + fatal (_("Unable to locate PPC_TOC16 reloc information")); /* If this is the .got section, clear out all the contents beyond the initial size. We must do this here because copy_sections is @@ -1910,6 +1914,10 @@ } } + /* PR 17512: file: 70cfde95. */ + if (rel->howto == NULL) + continue; + /* We must be able to resolve all PC relative relocs at this point. If we get a branch to an undefined symbol we build a stub, since NetWare will resolve undefined symbols into a @@ -1927,6 +1935,13 @@ { bfd_vma val; + if (rel->address > contents_size - 4) + { + non_fatal (_("Out of range relocation: %lx"), + (long) rel->address); + break; + } + assert (rel->howto->size == 2 && rel->howto->pcrel_offset); val = bfd_get_32 (outbfd, (bfd_byte *) contents + rel->address); val = ((val &~ rel->howto->dst_mask) @@ -1976,6 +1991,13 @@ switch (rel->howto->size) { case 1: + if (rel->address > contents_size - 2) + { + non_fatal (_("Out of range relocation: %lx"), + (long) rel->address); + break; + } + val = bfd_get_16 (outbfd, (bfd_byte *) contents + rel->address); val = ((val &~ rel->howto->dst_mask) @@ -1991,6 +2013,14 @@ break; case 2: + /* PR 17512: file: 0455a112. */ + if (rel->address > contents_size - 4) + { + non_fatal (_("Out of range relocation: %lx"), + (long) rel->address); + break; + } + val = bfd_get_32 (outbfd, (bfd_byte *) contents + rel->address); val = ((val &~ rel->howto->dst_mask) @@ -2002,7 +2032,7 @@ break; default: - abort (); + fatal (_("Unsupported relocation size: %d"), rel->howto->size); } if (! bfd_is_und_section (bfd_get_section (sym))) diff -ruN binutils-2.25/binutils/nm.c binutils-2.25.1/binutils/nm.c --- binutils-2.25/binutils/nm.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/nm.c 2015-07-21 10:20:58.000000000 +0200 @@ -806,7 +806,11 @@ /* Print a single symbol. */ static void -print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd) +print_symbol (bfd * abfd, + asymbol * sym, + bfd_vma ssize, + bfd * archive_bfd, + bfd_boolean is_synthetic) { symbol_info syminfo; struct extended_symbol_info info; @@ -816,12 +820,12 @@ format->print_symbol_filename (archive_bfd, abfd); bfd_get_symbol_info (abfd, sym, &syminfo); + info.sinfo = &syminfo; info.ssize = ssize; - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) - info.elfinfo = (elf_symbol_type *) sym; - else - info.elfinfo = NULL; + /* Synthetic symbols do not have a full elf_symbol_type set of data available. */ + info.elfinfo = is_synthetic ? NULL : elf_symbol_from (abfd, sym); + format->print_symbol_info (&info, abfd); if (line_numbers) @@ -941,12 +945,17 @@ /* Print the symbols when sorting by size. */ static void -print_size_symbols (bfd *abfd, bfd_boolean is_dynamic, - struct size_sym *symsizes, long symcount, - bfd *archive_bfd) +print_size_symbols (bfd * abfd, + bfd_boolean is_dynamic, + struct size_sym * symsizes, + long symcount, + long synth_count, + bfd * archive_bfd) { asymbol *store; - struct size_sym *from, *fromend; + struct size_sym *from; + struct size_sym *fromend; + struct size_sym *fromsynth; store = bfd_make_empty_symbol (abfd); if (store == NULL) @@ -954,6 +963,8 @@ from = symsizes; fromend = from + symcount; + fromsynth = symsizes + (symcount - synth_count); + for (; from < fromend; from++) { asymbol *sym; @@ -962,20 +973,34 @@ if (sym == NULL) bfd_fatal (bfd_get_filename (abfd)); - print_symbol (abfd, sym, from->size, archive_bfd); + print_symbol (abfd, sym, from->size, archive_bfd, from >= fromsynth); } } -/* Print the symbols. If ARCHIVE_BFD is non-NULL, it is the archive - containing ABFD. */ +/* Print the symbols of ABFD that are held in MINISYMS. -static void -print_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms, long symcount, - unsigned int size, bfd *archive_bfd) + If ARCHIVE_BFD is non-NULL, it is the archive containing ABFD. + + SYMCOUNT is the number of symbols in MINISYMS and SYNTH_COUNT + is the number of these that are synthetic. Synthetic symbols, + if any are present, always come at the end of the MINISYMS. + + SIZE is the size of a symbol in MINISYMS. */ + +static void +print_symbols (bfd * abfd, + bfd_boolean is_dynamic, + void * minisyms, + long symcount, + long synth_count, + unsigned int size, + bfd * archive_bfd) { asymbol *store; - bfd_byte *from, *fromend; + bfd_byte *from; + bfd_byte *fromend; + bfd_byte *fromsynth; store = bfd_make_empty_symbol (abfd); if (store == NULL) @@ -983,6 +1008,8 @@ from = (bfd_byte *) minisyms; fromend = from + symcount * size; + fromsynth = (bfd_byte *) minisyms + ((symcount - synth_count) * size); + for (; from < fromend; from += size) { asymbol *sym; @@ -991,7 +1018,7 @@ if (sym == NULL) bfd_fatal (bfd_get_filename (abfd)); - print_symbol (abfd, sym, (bfd_vma) 0, archive_bfd); + print_symbol (abfd, sym, (bfd_vma) 0, archive_bfd, from >= fromsynth); } } @@ -1001,6 +1028,7 @@ display_rel_file (bfd *abfd, bfd *archive_bfd) { long symcount; + long synth_count = 0; void *minisyms; unsigned int size; struct size_sym *symsizes; @@ -1031,11 +1059,10 @@ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd)); return; } - + if (show_synthetic && size == sizeof (asymbol *)) { asymbol *synthsyms; - long synth_count; asymbol **static_syms = NULL; asymbol **dyn_syms = NULL; long static_count = 0; @@ -1061,6 +1088,7 @@ bfd_fatal (bfd_get_filename (abfd)); } } + synth_count = bfd_get_synthetic_symtab (abfd, static_count, static_syms, dyn_count, dyn_syms, &synthsyms); if (synth_count > 0) @@ -1106,9 +1134,9 @@ } if (! sort_by_size) - print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd); + print_symbols (abfd, dynamic, minisyms, symcount, synth_count, size, archive_bfd); else - print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd); + print_size_symbols (abfd, dynamic, symsizes, symcount, synth_count, archive_bfd); free (minisyms); free (symsizes); @@ -1181,6 +1209,8 @@ bfd_close (last_arfile); lineno_cache_bfd = NULL; lineno_cache_rel_bfd = NULL; + if (arfile == last_arfile) + return; } last_arfile = arfile; } @@ -1434,7 +1464,6 @@ print_value (abfd, SYM_SIZE (info)); else print_value (abfd, SYM_VALUE (info)); - if (print_size && SYM_SIZE (info)) { printf (" "); @@ -1541,6 +1570,7 @@ program_name = *argv; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); #if BFD_SUPPORTS_PLUGINS bfd_plugin_set_program_name (program_name); #endif diff -ruN binutils-2.25/binutils/objcopy.c binutils-2.25.1/binutils/objcopy.c --- binutils-2.25/binutils/objcopy.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/binutils/objcopy.c 2015-07-21 10:20:58.000000000 +0200 @@ -1776,6 +1776,14 @@ bfd_nonfatal_message (NULL, ibfd, NULL, NULL); return FALSE; } + /* PR 17512: file: d6323821 + If the symbol table could not be loaded do not pretend that we have + any symbols. This trips us up later on when we load the relocs. */ + if (symcount == 0) + { + free (isympp); + osympp = isympp = NULL; + } /* BFD mandates that all output sections be created and sizes set before any output is done. Thus, we traverse all sections multiple times. */ @@ -2552,7 +2560,11 @@ if (! copy_object (ibfd, obfd, input_arch)) status = 1; - if (!bfd_close (obfd)) + /* PR 17512: file: 0f15796a. + If the file could not be copied it may not be in a writeable + state. So use bfd_close_all_done to avoid the possibility of + writing uninitialised data into the file. */ + if (! (status ? bfd_close_all_done (obfd) : bfd_close (obfd))) { status = 1; bfd_nonfatal_message (output_filename, NULL, NULL, NULL); @@ -2948,9 +2960,13 @@ temp_relpp = (arelent **) xmalloc (relsize); for (i = 0; i < relcount; i++) - if (is_specified_symbol (bfd_asymbol_name (*relpp[i]->sym_ptr_ptr), - keep_specific_htab)) - temp_relpp [temp_relcount++] = relpp [i]; + { + /* PR 17512: file: 9e907e0c. */ + if (relpp[i]->sym_ptr_ptr) + if (is_specified_symbol (bfd_asymbol_name (*relpp[i]->sym_ptr_ptr), + keep_specific_htab)) + temp_relpp [temp_relcount++] = relpp [i]; + } relcount = temp_relcount; free (relpp); relpp = temp_relpp; @@ -4399,6 +4415,9 @@ create_symbol_htabs (); + if (argv != NULL) + bfd_set_error_program_name (argv[0]); + if (is_strip) strip_main (argc, argv); else diff -ruN binutils-2.25/binutils/objdump.c binutils-2.25.1/binutils/objdump.c --- binutils-2.25/binutils/objdump.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/binutils/objdump.c 2015-07-21 10:20:58.000000000 +0200 @@ -2265,6 +2265,7 @@ section->address = bfd_get_section_vma (abfd, sec); section->size = bfd_get_section_size (sec); section->start = NULL; + section->user_data = sec; ret = bfd_get_full_section_contents (abfd, sec, §ion->start); if (! ret) @@ -2331,6 +2332,23 @@ if (section->start == NULL) return; + /* PR 17512: file: 0f67f69d. */ + if (section->user_data != NULL) + { + asection * sec = (asection *) section->user_data; + + /* If we are freeing contents that are also pointed to by the BFD + library's section structure then make sure to update those pointers + too. Otherwise, the next time we try to load data for this section + we can end up using a stale pointer. */ + if (section->start == sec->contents) + { + sec->contents = NULL; + sec->flags &= ~ SEC_IN_MEMORY; + sec->compress_status = COMPRESS_SECTION_NONE; + } + } + free ((char *) section->start); section->start = NULL; section->address = 0; @@ -2766,7 +2784,8 @@ if (!bfd_get_full_section_contents (abfd, section, &data)) { - non_fatal (_("Reading section failed")); + non_fatal (_("Reading section %s failed because: %s"), + section->name, bfd_errmsg (bfd_get_error ())); return; } @@ -3375,6 +3394,13 @@ if (level == 0) printf (_("In archive %s:\n"), bfd_get_filename (file)); + else if (level > 100) + { + /* Prevent corrupted files from spinning us into an + infinite loop. 100 is an arbitrary heuristic. */ + fatal (_("Archive nesting is too deep")); + return; + } else printf (_("In nested archive %s:\n"), bfd_get_filename (file)); @@ -3393,7 +3419,15 @@ display_any_bfd (arfile, level + 1); if (last_arfile != NULL) - bfd_close (last_arfile); + { + bfd_close (last_arfile); + /* PR 17512: file: ac585d01. */ + if (arfile == last_arfile) + { + last_arfile = NULL; + break; + } + } last_arfile = arfile; } @@ -3446,6 +3480,7 @@ program_name = *argv; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); START_PROGRESS (program_name, 0); diff -ruN binutils-2.25/binutils/prdbg.c binutils-2.25.1/binutils/prdbg.c --- binutils-2.25/binutils/prdbg.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/prdbg.c 2015-07-21 10:20:58.000000000 +0200 @@ -291,7 +291,8 @@ bfd_boolean print_debugging_info (FILE *f, void *dhandle, bfd *abfd, asymbol **syms, - void *demangler, bfd_boolean as_tags) + char * (*demangler) (struct bfd *, const char *, int), + bfd_boolean as_tags) { struct pr_handle info; @@ -302,7 +303,7 @@ info.filename = NULL; info.abfd = abfd; info.syms = syms; - info.demangler = (char * (*)(struct bfd *, const char *, int)) demangler; + info.demangler = demangler; if (as_tags) { diff -ruN binutils-2.25/binutils/rcparse.c binutils-2.25.1/binutils/rcparse.c --- binutils-2.25/binutils/rcparse.c 2014-12-23 15:38:34.000000000 +0100 +++ binutils-2.25.1/binutils/rcparse.c 2015-07-21 15:45:57.000000000 +0200 @@ -856,7 +856,7 @@ 1776, 1780, 1802, 1806, 1810, 1814, 1821, 1825, 1835, 1838, 1847, 1856, 1865, 1869, 1873, 1878, 1883, 1888, 1893, 1898, 1903, 1908, 1913, 1918, 1929, 1938, 1949, 1953, 1957, 1962, - 1967, 1972, 1977, 1982, 1987, 1992, 1997 + 1967, 1972, 1978, 1983, 1988, 1993, 1998 }; #endif @@ -4280,7 +4280,7 @@ case 257: #line 1889 "rcparse.y" { - (yyval.i).val = (yyvsp[(1) - (3)].i).val / (yyvsp[(3) - (3)].i).val; + (yyval.i).val = (yyvsp[(1) - (3)].i).val / ((yyvsp[(3) - (3)].i).val ? (yyvsp[(3) - (3)].i).val : 1); (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; } break; @@ -4288,7 +4288,7 @@ case 258: #line 1894 "rcparse.y" { - (yyval.i).val = (yyvsp[(1) - (3)].i).val % (yyvsp[(3) - (3)].i).val; + (yyval.i).val = (yyvsp[(1) - (3)].i).val % ((yyvsp[(3) - (3)].i).val ? (yyvsp[(3) - (3)].i).val : 1); (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; } break; @@ -4380,7 +4380,7 @@ case 270: #line 1968 "rcparse.y" { - (yyval.i).val = (yyvsp[(1) - (3)].i).val / (yyvsp[(3) - (3)].i).val; + (yyval.i).val = (yyvsp[(1) - (3)].i).val / ((yyvsp[(3) - (3)].i).val ? (yyvsp[(3) - (3)].i).val : 1); (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; } break; @@ -4388,13 +4388,14 @@ case 271: #line 1973 "rcparse.y" { - (yyval.i).val = (yyvsp[(1) - (3)].i).val % (yyvsp[(3) - (3)].i).val; + /* PR 17512: file: 89105a25. */ + (yyval.i).val = (yyvsp[(1) - (3)].i).val % ((yyvsp[(3) - (3)].i).val ? (yyvsp[(3) - (3)].i).val : 1); (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; } break; case 272: -#line 1978 "rcparse.y" +#line 1979 "rcparse.y" { (yyval.i).val = (yyvsp[(1) - (3)].i).val + (yyvsp[(3) - (3)].i).val; (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; @@ -4402,7 +4403,7 @@ break; case 273: -#line 1983 "rcparse.y" +#line 1984 "rcparse.y" { (yyval.i).val = (yyvsp[(1) - (3)].i).val - (yyvsp[(3) - (3)].i).val; (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; @@ -4410,7 +4411,7 @@ break; case 274: -#line 1988 "rcparse.y" +#line 1989 "rcparse.y" { (yyval.i).val = (yyvsp[(1) - (3)].i).val & (yyvsp[(3) - (3)].i).val; (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; @@ -4418,7 +4419,7 @@ break; case 275: -#line 1993 "rcparse.y" +#line 1994 "rcparse.y" { (yyval.i).val = (yyvsp[(1) - (3)].i).val ^ (yyvsp[(3) - (3)].i).val; (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; @@ -4426,7 +4427,7 @@ break; case 276: -#line 1998 "rcparse.y" +#line 1999 "rcparse.y" { (yyval.i).val = (yyvsp[(1) - (3)].i).val | (yyvsp[(3) - (3)].i).val; (yyval.i).dword = (yyvsp[(1) - (3)].i).dword || (yyvsp[(3) - (3)].i).dword; @@ -4435,7 +4436,7 @@ /* Line 1267 of yacc.c. */ -#line 4439 "rcparse.c" +#line 4440 "rcparse.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4649,7 +4650,7 @@ } -#line 2004 "rcparse.y" +#line 2005 "rcparse.y" /* Set the language from the command line. */ diff -ruN binutils-2.25/binutils/rcparse.y binutils-2.25.1/binutils/rcparse.y --- binutils-2.25/binutils/rcparse.y 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/rcparse.y 2015-07-21 10:20:58.000000000 +0200 @@ -1887,12 +1887,12 @@ } | sizednumexpr '/' sizednumexpr { - $$.val = $1.val / $3.val; + $$.val = $1.val / ($3.val ? $3.val : 1); $$.dword = $1.dword || $3.dword; } | sizednumexpr '%' sizednumexpr { - $$.val = $1.val % $3.val; + $$.val = $1.val % ($3.val ? $3.val : 1); $$.dword = $1.dword || $3.dword; } | sizednumexpr '+' sizednumexpr @@ -1966,12 +1966,13 @@ } | sizedposnumexpr '/' sizednumexpr { - $$.val = $1.val / $3.val; + $$.val = $1.val / ($3.val ? $3.val : 1); $$.dword = $1.dword || $3.dword; } | sizedposnumexpr '%' sizednumexpr { - $$.val = $1.val % $3.val; + /* PR 17512: file: 89105a25. */ + $$.val = $1.val % ($3.val ? $3.val : 1); $$.dword = $1.dword || $3.dword; } | sizedposnumexpr '+' sizednumexpr diff -ruN binutils-2.25/binutils/readelf.c binutils-2.25.1/binutils/readelf.c --- binutils-2.25/binutils/readelf.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/binutils/readelf.c 2015-07-21 10:20:58.000000000 +0200 @@ -165,7 +165,7 @@ #endif char * program_name = "readelf"; -static long archive_file_offset; +static unsigned long archive_file_offset; static unsigned long archive_file_size; static bfd_size_type current_file_size; static unsigned long dynamic_addr; @@ -299,36 +299,62 @@ } \ while (0) -/* Retrieve NMEMB structures, each SIZE bytes long from FILE starting at OFFSET. +/* Retrieve NMEMB structures, each SIZE bytes long from FILE starting at OFFSET + + the offset of the current archive member, if we are examining an archive. Put the retrieved data into VAR, if it is not NULL. Otherwise allocate a buffer using malloc and fill that. In either case return the pointer to the start of the retrieved data or NULL if something went wrong. If something does go wrong - emit an error message using REASON as part of the context. */ + and REASON is not NULL then emit an error message using REASON as part of the + context. */ static void * -get_data (void * var, FILE * file, long offset, size_t size, size_t nmemb, - const char * reason) +get_data (void * var, FILE * file, unsigned long offset, bfd_size_type size, + bfd_size_type nmemb, const char * reason) { void * mvar; + bfd_size_type amt = size * nmemb; if (size == 0 || nmemb == 0) return NULL; - if (fseek (file, archive_file_offset + offset, SEEK_SET)) + /* If the size_t type is smaller than the bfd_size_type, eg because + you are building a 32-bit tool on a 64-bit host, then make sure + that when the sizes are cast to (size_t) no information is lost. */ + if (sizeof (size_t) < sizeof (bfd_size_type) + && ( (bfd_size_type) ((size_t) size) != size + || (bfd_size_type) ((size_t) nmemb) != nmemb)) { if (reason) - error (_("Unable to seek to 0x%lx for %s\n"), - (unsigned long) archive_file_offset + offset, reason); + error (_("Size truncation prevents reading 0x%llx elements of size 0x%llx for %s\n"), + (unsigned long long) nmemb, (unsigned long long) size, reason); + return NULL; + } + + /* Check for size overflow. */ + if (amt < nmemb) + { + if (reason) + error (_("Size overflow prevents reading 0x%llx elements of size 0x%llx for %s\n"), + (unsigned long long) nmemb, (unsigned long long) size, reason); return NULL; } /* Be kind to memory chekers (eg valgrind, address sanitizer) by not attempting to allocate memory when the read is bound to fail. */ - if (offset + archive_file_offset + size * nmemb > current_file_size) + if (amt > current_file_size + || offset + archive_file_offset + amt > current_file_size) { if (reason) - error (_("Reading 0x%lx bytes extends past end of file for %s\n"), - (unsigned long) (size * nmemb), reason); + error (_("Reading 0x%llx bytes extends past end of file for %s\n"), + (unsigned long long) amt, reason); + return NULL; + } + + if (fseek (file, archive_file_offset + offset, SEEK_SET)) + { + if (reason) + error (_("Unable to seek to 0x%lx for %s\n"), + (unsigned long) archive_file_offset + offset, reason); return NULL; } @@ -336,26 +362,26 @@ if (mvar == NULL) { /* Check for overflow. */ - if (nmemb < (~(size_t) 0 - 1) / size) + if (nmemb < (~(bfd_size_type) 0 - 1) / size) /* + 1 so that we can '\0' terminate invalid string table sections. */ - mvar = malloc (size * nmemb + 1); + mvar = malloc ((size_t) amt + 1); if (mvar == NULL) { if (reason) - error (_("Out of memory allocating 0x%lx bytes for %s\n"), - (unsigned long)(size * nmemb), reason); + error (_("Out of memory allocating 0x%llx bytes for %s\n"), + (unsigned long long) amt, reason); return NULL; } - ((char *) mvar)[size * nmemb] = '\0'; + ((char *) mvar)[amt] = '\0'; } - if (fread (mvar, size, nmemb, file) != nmemb) + if (fread (mvar, (size_t) size, (size_t) nmemb, file) != nmemb) { if (reason) - error (_("Unable to read in 0x%lx bytes of %s\n"), - (unsigned long)(size * nmemb), reason); + error (_("Unable to read in 0x%llx bytes of %s\n"), + (unsigned long long) amt, reason); if (mvar != var) free (mvar); return NULL; @@ -525,7 +551,7 @@ { if (remaining < 2) break; - + * buf ++ = '^'; * buf ++ = c + 0x40; remaining -= 2; @@ -1539,7 +1565,10 @@ { bfd_signed_vma off = rels[i].r_addend; - if (off < 0) + /* PR 17531: file: 2e63226f. */ + if (off == ((bfd_signed_vma) 1) << ((sizeof (bfd_signed_vma) * 8) - 1)) + printf (" + %" BFD_VMA_FMT "x", off); + else if (off < 0) printf (" - %" BFD_VMA_FMT "x", - off); else printf (" + %" BFD_VMA_FMT "x", off); @@ -1551,7 +1580,10 @@ bfd_signed_vma off = rels[i].r_addend; printf ("%*c", is_32bit_elf ? 12 : 20, ' '); - if (off < 0) + /* PR 17531: file: 2e63226f. */ + if (off == ((bfd_signed_vma) 1) << ((sizeof (bfd_signed_vma) * 8) - 1)) + printf ("%" BFD_VMA_FMT "x", off); + else if (off < 0) printf ("-%" BFD_VMA_FMT "x", - off); else printf ("%" BFD_VMA_FMT "x", off); @@ -2984,7 +3016,7 @@ if (e_flags & EF_SH_FDPIC) strcat (buf, ", fdpic"); break; - + case EM_OR1K: if (e_flags & EF_OR1K_NODELAY) strcat (buf, ", no delay"); @@ -3085,7 +3117,9 @@ strcat (buf, ", abort"); break; default: - abort (); + warn (_("Unrecognised IA64 VMS Command Code: %x\n"), + e_flags & EF_IA_64_VMS_COMCOD); + strcat (buf, ", "); } } break; @@ -4323,7 +4357,7 @@ /* PR binutils/12467. */ if (elf_header.e_phoff != 0) warn (_("possibly corrupt ELF header - it has a non-zero program" - " header offset, but no program headers")); + " header offset, but no program headers\n")); else if (do_segments) printf (_("\nThere are no program headers in this file.\n")); return 0; @@ -4722,10 +4756,18 @@ Elf_Internal_Sym * psym; unsigned int j; + if (section->sh_size == 0) + { + if (num_syms_return != NULL) + * num_syms_return = 0; + return NULL; + } + /* Run some sanity checks first. */ - if (section->sh_entsize == 0) + if (section->sh_entsize == 0 || section->sh_entsize > section->sh_size) { - error (_("sh_entsize is zero\n")); + error (_("Section %s has an invalid sh_entsize of 0x%lx\n"), + printable_section_name (section), (unsigned long) section->sh_entsize); goto exit_point; } @@ -4740,7 +4782,10 @@ if (number * sizeof (Elf32_External_Sym) > section->sh_size + 1) { - error (_("Invalid sh_entsize\n")); + error (_("Size (0x%lx) of section %s is not a multiple of its sh_entsize (0x%lx)\n"), + (unsigned long) section->sh_size, + printable_section_name (section), + (unsigned long) section->sh_entsize); goto exit_point; } @@ -4760,6 +4805,15 @@ _("symbol table section indicies")); if (shndx == NULL) goto exit_point; + /* PR17531: file: heap-buffer-overflow */ + else if (symtab_shndx_hdr->sh_size / sizeof (Elf_External_Sym_Shndx) < number) + { + error (_("Index section %s has an sh_size of 0x%lx - expected 0x%lx\n"), + printable_section_name (symtab_shndx_hdr), + (unsigned long) symtab_shndx_hdr->sh_size, + (unsigned long) section->sh_size); + goto exit_point; + } } isyms = (Elf_Internal_Sym *) cmalloc (number, sizeof (Elf_Internal_Sym)); @@ -4810,17 +4864,27 @@ Elf_Internal_Sym * psym; unsigned int j; + if (section->sh_size == 0) + { + if (num_syms_return != NULL) + * num_syms_return = 0; + return NULL; + } + /* Run some sanity checks first. */ - if (section->sh_entsize == 0) + if (section->sh_entsize == 0 || section->sh_entsize > section->sh_size) { - error (_("sh_entsize is zero\n")); + error (_("Section %s has an invalid sh_entsize of 0x%lx\n"), + printable_section_name (section), + (unsigned long) section->sh_entsize); goto exit_point; } if (section->sh_size > current_file_size) { error (_("Section %s has an invalid sh_size of 0x%lx\n"), - printable_section_name (section), (unsigned long) section->sh_size); + printable_section_name (section), + (unsigned long) section->sh_size); goto exit_point; } @@ -4828,7 +4892,10 @@ if (number * sizeof (Elf64_External_Sym) > section->sh_size + 1) { - error (_("Invalid sh_entsize\n")); + error (_("Size (0x%lx) of section %s is not a multiple of its sh_entsize (0x%lx)\n"), + (unsigned long) section->sh_size, + printable_section_name (section), + (unsigned long) section->sh_entsize); goto exit_point; } @@ -4847,6 +4914,14 @@ _("symbol table section indicies")); if (shndx == NULL) goto exit_point; + else if (symtab_shndx_hdr->sh_size / sizeof (Elf_External_Sym_Shndx) < number) + { + error (_("Index section %s has an sh_size of 0x%lx - expected 0x%lx\n"), + printable_section_name (symtab_shndx_hdr), + (unsigned long) symtab_shndx_hdr->sh_size, + (unsigned long) section->sh_size); + goto exit_point; + } } isyms = (Elf_Internal_Sym *) cmalloc (number, sizeof (Elf_Internal_Sym)); @@ -5007,7 +5082,10 @@ if (p != buff + field_size + 4) { if (size < (10 + 2)) - abort (); + { + warn (_("Internal error: not enough buffer room for section flag info")); + return _(""); + } size -= 2; *p++ = ','; *p++ = ' '; @@ -5071,7 +5149,10 @@ if (p != buff + field_size + 4) { if (size < (2 + 1)) - abort (); + { + warn (_("Internal error: not enough buffer room for section flag info")); + return _(""); + } size -= 2; *p++ = ','; *p++ = ' '; @@ -5086,7 +5167,10 @@ if (p != buff + field_size + 4) { if (size < (2 + 1)) - abort (); + { + warn (_("Internal error: not enough buffer room for section flag info")); + return _(""); + } size -= 2; *p++ = ','; *p++ = ' '; @@ -5101,7 +5185,10 @@ if (p != buff + field_size + 4) { if (size < (2 + 1)) - abort (); + { + warn (_("Internal error: not enough buffer room for section flag info")); + return _(""); + } size -= 2; *p++ = ','; *p++ = ' '; @@ -5762,6 +5849,16 @@ ? strtab + sym->st_name : _(""); } + /* PR 17531: file: loop. */ + if (section->sh_entsize > section->sh_size) + { + error (_("Section %s has sh_entsize (0x%lx) which is larger than its size (0x%lx)\n"), + printable_section_name (section), + (unsigned long) section->sh_entsize, + (unsigned long) section->sh_size); + break; + } + start = (unsigned char *) get_data (NULL, file, section->sh_offset, 1, section->sh_size, _("section data")); @@ -6097,7 +6194,8 @@ offset_from_vma (file, rel_offset, rel_size), rel_size, dynamic_symbols, num_dynamic_syms, - dynamic_strings, dynamic_strings_length, is_rela); + dynamic_strings, dynamic_strings_length, + is_rela); } } @@ -6172,7 +6270,8 @@ } dump_relocations (file, rel_offset, rel_size, - symtab, nsyms, strtab, strtablen, is_rela); + symtab, nsyms, strtab, strtablen, + is_rela); if (strtab) free (strtab); free (symtab); @@ -6292,6 +6391,7 @@ bfd_vma offset; const unsigned char * dp; const unsigned char * head; + const unsigned char * end; const char * procname; find_symbol_for_address (aux->symtab, aux->nsyms, aux->strtab, @@ -6314,6 +6414,18 @@ printf ("], info at +0x%lx\n", (unsigned long) (tp->info.offset - aux->seg_base)); + /* PR 17531: file: 86232b32. */ + if (aux->info == NULL) + continue; + + /* PR 17531: file: 0997b4d1. */ + if ((ABSADDR (tp->info) - aux->info_addr) >= aux->info_size) + { + warn (_("Invalid offset %lx in table entry %ld\n"), + (long) tp->info.offset, (long) (tp - aux->table)); + continue; + } + head = aux->info + (ABSADDR (tp->info) - aux->info_addr); stamp = byte_get ((unsigned char *) head, sizeof (stamp)); @@ -6331,7 +6443,11 @@ } in_body = 0; - for (dp = head + 8; dp < head + 8 + eh_addr_size * UNW_LENGTH (stamp);) + end = head + 8 + eh_addr_size * UNW_LENGTH (stamp); + /* PR 17531: file: 16ceda89. */ + if (end > aux->info + aux->info_size) + end = aux->info + aux->info_size; + for (dp = head + 8; dp < end;) dp = unw_decode (dp, in_body, & in_body); } } @@ -6352,6 +6468,8 @@ Elf_Internal_Sym * sym; const char * relname; + aux->table_len = 0; + /* First, find the starting address of the segment that includes this section: */ @@ -6383,10 +6501,12 @@ if (!table) return 0; + aux->table_len = size / (3 * eh_addr_size); aux->table = (struct ia64_unw_table_entry *) - xcmalloc (size / (3 * eh_addr_size), sizeof (aux->table[0])); + xcmalloc (aux->table_len, sizeof (aux->table[0])); tep = aux->table; - for (tp = table; tp < table + size; ++tep) + + for (tp = table; tp <= table + size - (3 * eh_addr_size); ++tep) { tep->start.section = SHN_UNDEF; tep->end.section = SHN_UNDEF; @@ -6412,22 +6532,41 @@ if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size, & rela, & nrelas)) - return 0; + { + free (aux->table); + aux->table = NULL; + aux->table_len = 0; + return 0; + } for (rp = rela; rp < rela + nrelas; ++rp) { relname = elf_ia64_reloc_type (get_reloc_type (rp->r_info)); sym = aux->symtab + get_reloc_symindex (rp->r_info); + /* PR 17531: file: 9fa67536. */ + if (relname == NULL) + { + warn (_("Skipping unknown relocation type: %u\n"), get_reloc_type (rp->r_info)); + continue; + } + if (! const_strneq (relname, "R_IA64_SEGREL")) { - warn (_("Skipping unexpected relocation type %s\n"), relname); + warn (_("Skipping unexpected relocation type: %s\n"), relname); continue; } i = rp->r_offset / (3 * eh_addr_size); - switch (rp->r_offset/eh_addr_size % 3) + /* PR 17531: file: 5bc8d9bf. */ + if (i >= aux->table_len) + { + warn (_("Skipping reloc with overlarge offset: %lx\n"), i); + continue; + } + + switch (rp->r_offset / eh_addr_size % 3) { case 0: aux->table[i].start.section = sym->st_shndx; @@ -6449,7 +6588,6 @@ free (rela); } - aux->table_len = size / (3 * eh_addr_size); return 1; } @@ -6587,9 +6725,8 @@ (unsigned long) unwsec->sh_offset, (unsigned long) (unwsec->sh_size / (3 * eh_addr_size))); - (void) slurp_ia64_unwind_table (file, & aux, unwsec); - - if (aux.table_len > 0) + if (slurp_ia64_unwind_table (file, & aux, unwsec) + && aux.table_len > 0) dump_ia64_unwind (& aux); if (aux.table) @@ -7089,6 +7226,13 @@ /* Get the word at the required offset. */ word = byte_get (arm_sec->data + word_offset, 4); + /* PR 17531: file: id:000001,src:001266+003044,op:splice,rep:128. */ + if (arm_sec->rela == NULL) + { + * wordp = word; + return TRUE; + } + /* Look through the relocs to find the one that applies to the provided offset. */ wrapped = FALSE; for (rp = arm_sec->next_rela; rp != arm_sec->rela + arm_sec->nrelas; rp++) @@ -7583,7 +7727,14 @@ if ((buf[i] & 0x80) == 0) break; } - assert (i < sizeof (buf)); + /* PR 17531: file: id:000001,src:001906+004739,op:splice,rep:2. */ + if (i == sizeof (buf)) + { + printf ("\n"); + warn (_("Corrupt stack pointer adjustment detected\n")); + return; + } + offset = read_uleb128 (buf, &len, buf + i + 1); assert (len == i + 1); offset = offset * 8 + 0x408; @@ -8021,9 +8172,13 @@ time_t atime = entry->d_un.d_val; tmp = gmtime (&atime); - snprintf (timebuf, sizeof (timebuf), "%04u-%02u-%02uT%02u:%02u:%02u", - tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, - tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + /* PR 17531: file: 6accc532. */ + if (tmp == NULL) + snprintf (timebuf, sizeof (timebuf), _("")); + else + snprintf (timebuf, sizeof (timebuf), "%04u-%02u-%02uT%02u:%02u:%02u", + tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); printf (_("Time Stamp: %s"), timebuf); } break; @@ -8210,7 +8365,7 @@ might not have the luxury of section headers. Look for the DT_NULL terminator to determine the number of entries. */ for (ext = edyn, dynamic_nent = 0; - (char *) ext < (char *) edyn + dynamic_size - sizeof (* entry); + (char *) (ext + 1) <= (char *) edyn + dynamic_size; ext++) { dynamic_nent++; @@ -8258,8 +8413,8 @@ might not have the luxury of section headers. Look for the DT_NULL terminator to determine the number of entries. */ for (ext = edyn, dynamic_nent = 0; - /* PR 17533 file: 033-67080-0.004 - do not read off the end of the buffer. */ - (char *) ext < ((char *) edyn) + dynamic_size - sizeof (* ext); + /* PR 17533 file: 033-67080-0.004 - do not read past end of buffer. */ + (char *) (ext + 1) <= (char *) edyn + dynamic_size; ext++) { dynamic_nent++; @@ -9119,6 +9274,10 @@ if (j < ent.vd_cnt) printf (_(" Version def aux past end of section\n")); + /* PR 17531: file: id:000001,src:000172+005151,op:splice,rep:2. */ + if (idx + ent.vd_next <= idx) + break; + idx += ent.vd_next; } @@ -9219,8 +9378,14 @@ get_ver_flags (aux.vna_flags), aux.vna_other); /* Check for overflow. */ - if (aux.vna_next > (size_t) (endbuf - vstart)) - break; + if (aux.vna_next > (size_t) (endbuf - vstart) + || (aux.vna_next == 0 && j < ent.vn_cnt - 1)) + { + warn (_("Invalid vna_next field of %lx\n"), + aux.vna_next); + j = ent.vn_cnt; + break; + } isum += aux.vna_next; vstart += aux.vna_next; @@ -9440,7 +9605,7 @@ _("version def")) == NULL) { ivd.vd_next = 0; - /* PR 17531: file: 046-1082287-0.004. */ + /* PR 17531: file: 046-1082287-0.004. */ ivd.vd_ndx = (data[cnt + j] & VERSYM_VERSION) + 1; break; } @@ -9598,7 +9763,9 @@ case STV_INTERNAL: return "INTERNAL"; case STV_HIDDEN: return "HIDDEN"; case STV_PROTECTED: return "PROTECTED"; - default: abort (); + default: + error (_("Unrecognized visibility value: %u"), visibility); + return _(""); } } @@ -9653,7 +9820,10 @@ strcat (res, " RSV"); break; default: - abort (); + warn (_("Unrecognized IA64 VMS ST Function type: %d\n"), + VMS_ST_FUNC_TYPE (other)); + strcat (res, " "); + break; } break; default: @@ -9674,7 +9844,10 @@ strcat (res, " LNK"); break; default: - abort (); + warn (_("Unrecognized IA64 VMS ST Linkage: %d\n"), + VMS_ST_LINKAGE (other)); + strcat (res, " "); + break; } if (res[0] != 0) @@ -9774,41 +9947,52 @@ } static bfd_vma * -get_dynamic_data (FILE * file, size_t number, unsigned int ent_size) +get_dynamic_data (FILE * file, bfd_size_type number, unsigned int ent_size) { unsigned char * e_data; bfd_vma * i_data; + /* If the size_t type is smaller than the bfd_size_type, eg because + you are building a 32-bit tool on a 64-bit host, then make sure + that when (number) is cast to (size_t) no information is lost. */ + if (sizeof (size_t) < sizeof (bfd_size_type) + && (bfd_size_type) ((size_t) number) != number) + { + error (_("Size truncation prevents reading %llu elements of size %u\n"), + (unsigned long long) number, ent_size); + return NULL; + } + /* Be kind to memory chekers (eg valgrind, address sanitizer) by not attempting to allocate memory when the read is bound to fail. */ if (ent_size * number > current_file_size) { - error (_("Invalid number of dynamic entries: %lu\n"), - (unsigned long) number); + error (_("Invalid number of dynamic entries: %llu\n"), + (unsigned long long) number); return NULL; } - e_data = (unsigned char *) cmalloc (number, ent_size); + e_data = (unsigned char *) cmalloc ((size_t) number, ent_size); if (e_data == NULL) { - error (_("Out of memory reading %lu dynamic entries\n"), - (unsigned long) number); + error (_("Out of memory reading %llu dynamic entries\n"), + (unsigned long long) number); return NULL; } - if (fread (e_data, ent_size, number, file) != number) + if (fread (e_data, ent_size, (size_t) number, file) != number) { - error (_("Unable to read in %lu bytes of dynamic data\n"), - (unsigned long) (number * ent_size)); + error (_("Unable to read in %llu bytes of dynamic data\n"), + (unsigned long long) (number * ent_size)); free (e_data); return NULL; } - i_data = (bfd_vma *) cmalloc (number, sizeof (*i_data)); + i_data = (bfd_vma *) cmalloc ((size_t) number, sizeof (*i_data)); if (i_data == NULL) { - error (_("Out of memory allocating space for %lu dynamic entries\n"), - (unsigned long) number); + error (_("Out of memory allocating space for %llu dynamic entries\n"), + (unsigned long long) number); free (e_data); return NULL; } @@ -10196,7 +10380,8 @@ vers_data = byte_get (data, 2); - is_nobits = (psym->st_shndx < elf_header.e_shnum + is_nobits = (section_headers != NULL + && psym->st_shndx < elf_header.e_shnum && section_headers[psym->st_shndx].sh_type == SHT_NOBITS); @@ -10357,6 +10542,7 @@ unsigned long maxlength = 0; unsigned long nzero_counts = 0; unsigned long nsyms = 0; + unsigned long chained; printf (_("\nHistogram for bucket list length (total of %lu buckets):\n"), (unsigned long) nbuckets); @@ -10371,20 +10557,22 @@ printf (_(" Length Number %% of total Coverage\n")); for (hn = 0; hn < nbuckets; ++hn) { - for (si = buckets[hn]; si > 0 && si < nchains; si = chains[si]) + for (si = buckets[hn], chained = 0; + si > 0 && si < nchains && si < nbuckets && chained <= nchains; + si = chains[si], ++chained) { ++nsyms; if (maxlength < ++lengths[hn]) ++maxlength; + } - /* PR binutils/17531: A corrupt binary could contain broken - histogram data. Do not go into an infinite loop trying - to process it. */ - if (chains[si] == si) - { - error (_("histogram chain links to itself\n")); - break; - } + /* PR binutils/17531: A corrupt binary could contain broken + histogram data. Do not go into an infinite loop trying + to process it. */ + if (chained > nchains) + { + error (_("histogram chain is corrupt\n")); + break; } } @@ -10839,7 +11027,7 @@ default: error (_("Missing knowledge of 32-bit reloc types used in DWARF sections of machine number %d\n"), elf_header.e_machine); - abort (); + return FALSE; } } @@ -12105,7 +12293,8 @@ break; default: - abort (); + printf (_("\n"), tag); + break; } return p; @@ -13066,10 +13255,12 @@ /* DATA points to the contents of a MIPS GOT that starts at VMA PLTGOT. Print the Address, Access and Initial fields of an entry at VMA ADDR - and return the VMA of the next entry. */ + and return the VMA of the next entry, or -1 if there was a problem. + Does not read from DATA_END or beyond. */ static bfd_vma -print_mips_got_entry (unsigned char * data, bfd_vma pltgot, bfd_vma addr) +print_mips_got_entry (unsigned char * data, bfd_vma pltgot, bfd_vma addr, + unsigned char * data_end) { printf (" "); print_vma (addr, LONG_HEX); @@ -13084,9 +13275,19 @@ else { bfd_vma entry; + unsigned char * from = data + addr - pltgot; - entry = byte_get (data + addr - pltgot, is_32bit_elf ? 4 : 8); - print_vma (entry, LONG_HEX); + if (from + (is_32bit_elf ? 4 : 8) > data_end) + { + warn (_("MIPS GOT entry extends beyond the end of available data\n")); + printf ("%*s", is_32bit_elf ? 8 : 16, _("")); + return (bfd_vma) -1; + } + else + { + entry = byte_get (data + addr - pltgot, is_32bit_elf ? 4 : 8); + print_vma (entry, LONG_HEX); + } } return addr + (is_32bit_elf ? 4 : 8); } @@ -13448,7 +13649,7 @@ /* Find the section header so that we get the size. */ sect = find_section_by_type (SHT_MIPS_OPTIONS); - /* PR 17533 file: 012-277276-0.004. */ + /* PR 17533 file: 012-277276-0.004. */ if (sect == NULL) { error (_("No MIPS_OPTIONS header found\n")); @@ -13470,7 +13671,7 @@ offset = cnt = 0; option = iopt; - while (offset < sect->sh_size) + while (offset <= sect->sh_size - sizeof (* eopt)) { Elf_External_Options * eoption; @@ -13481,6 +13682,13 @@ option->section = BYTE_GET (eoption->section); option->info = BYTE_GET (eoption->info); + /* PR 17531: file: ffa0fa3b. */ + if (option->size < sizeof (* eopt) + || offset + option->size > sect->sh_size) + { + error (_("Invalid size (%u) for MIPS option\n"), option->size); + return 0; + } offset += option->size; ++option; @@ -13491,6 +13699,7 @@ printable_section_name (sect), cnt); option = iopt; + offset = 0; while (cnt-- > 0) { @@ -13627,13 +13836,18 @@ len = sizeof (* eopt); while (len < option->size) - if (((char *) option)[len] >= ' ' - && ((char *) option)[len] < 0x7f) - printf ("%c", ((char *) option)[len++]); - else - printf ("\\%03o", ((char *) option)[len++]); + { + char datum = * ((char *) eopt + offset + len); + + if (ISPRINT (datum)) + printf ("%c", datum); + else + printf ("\\%03o", datum); + len ++; + } fputs ("\n", stdout); + offset += option->size; ++option; } @@ -13723,6 +13937,7 @@ bfd_vma ent, local_end, global_end; size_t i, offset; unsigned char * data; + unsigned char * data_end; int addr_size; ent = pltgot; @@ -13733,18 +13948,25 @@ if (symtabno < gotsym) { error (_("The GOT symbol offset (%lu) is greater than the symbol table size (%lu)\n"), - (long) gotsym, (long) symtabno); + (unsigned long) gotsym, (unsigned long) symtabno); return 0; } - + global_end = local_end + (symtabno - gotsym) * addr_size; - assert (global_end >= local_end); + /* PR 17531: file: 54c91a34. */ + if (global_end < local_end) + { + error (_("Too many GOT symbols: %lu\n"), (unsigned long) symtabno); + return 0; + } + offset = offset_from_vma (file, pltgot, global_end - pltgot); data = (unsigned char *) get_data (NULL, file, offset, global_end - pltgot, 1, _("Global Offset Table data")); if (data == NULL) return 0; + data_end = data + (global_end - pltgot); printf (_("\nPrimary GOT:\n")); printf (_(" Canonical gp value: ")); @@ -13755,14 +13977,18 @@ printf (_(" %*s %10s %*s Purpose\n"), addr_size * 2, _("Address"), _("Access"), addr_size * 2, _("Initial")); - ent = print_mips_got_entry (data, pltgot, ent); + ent = print_mips_got_entry (data, pltgot, ent, data_end); printf (_(" Lazy resolver\n")); + if (ent == (bfd_vma) -1) + goto got_print_fail; if (data && (byte_get (data + ent - pltgot, addr_size) >> (addr_size * 8 - 1)) != 0) { - ent = print_mips_got_entry (data, pltgot, ent); + ent = print_mips_got_entry (data, pltgot, ent, data_end); printf (_(" Module pointer (GNU extension)\n")); + if (ent == (bfd_vma) -1) + goto got_print_fail; } printf ("\n"); @@ -13774,8 +14000,10 @@ addr_size * 2, _("Initial")); while (ent < local_end) { - ent = print_mips_got_entry (data, pltgot, ent); + ent = print_mips_got_entry (data, pltgot, ent, data_end); printf ("\n"); + if (ent == (bfd_vma) -1) + goto got_print_fail; } printf ("\n"); } @@ -13798,7 +14026,7 @@ for (i = gotsym; i < symtabno; i++) { - ent = print_mips_got_entry (data, pltgot, ent); + ent = print_mips_got_entry (data, pltgot, ent, data_end); printf (" "); if (dynamic_symbols == NULL) @@ -13822,10 +14050,13 @@ (unsigned long) i); printf ("\n"); + if (ent == (bfd_vma) -1) + break; } printf ("\n"); } + got_print_fail: if (data) free (data); } @@ -14490,7 +14721,7 @@ case NT_VMS_FPMODE: printf (_(" Floating Point mode: ")); printf ("0x%016" BFD_VMA_FMT "x\n", - (bfd_vma)byte_get ((unsigned char *)pnote->descdata, 8)); + (bfd_vma) byte_get ((unsigned char *)pnote->descdata, 8)); break; case NT_VMS_LINKTIME: printf (_(" Link time: ")); @@ -14513,9 +14744,9 @@ ((bfd_int64_t) byte_get ((unsigned char *)pnote->descdata + 8, 8)); printf (_("\n Link flags : ")); printf ("0x%016" BFD_VMA_FMT "x\n", - (bfd_vma)byte_get ((unsigned char *)pnote->descdata + 16, 8)); + (bfd_vma) byte_get ((unsigned char *)pnote->descdata + 16, 8)); printf (_(" Header flags: 0x%08x\n"), - (unsigned)byte_get ((unsigned char *)pnote->descdata + 24, 4)); + (unsigned) byte_get ((unsigned char *)pnote->descdata + 24, 4)); printf (_(" Image id : %s\n"), pnote->descdata + 32); break; #endif @@ -14600,6 +14831,7 @@ { Elf_External_Note * pnotes; Elf_External_Note * external; + char * end; int res = 1; if (length <= 0) @@ -14616,13 +14848,14 @@ (unsigned long) offset, (unsigned long) length); printf (_(" %-20s %10s\tDescription\n"), _("Owner"), _("Data size")); - while ((char *) external < (char *) pnotes + length) + end = (char *) pnotes + length; + while ((char *) external < end) { Elf_Internal_Note inote; size_t min_notesz; char *next; char * temp = NULL; - size_t data_remaining = ((char *) pnotes + length) - (char *) external; + size_t data_remaining = end - (char *) external; if (!is_ia64_vms ()) { @@ -14640,6 +14873,14 @@ inote.namedata = external->name; inote.descsz = BYTE_GET (external->descsz); inote.descdata = inote.namedata + align_power (inote.namesz, 2); + /* PR 17531: file: 3443835e. */ + if (inote.descdata < (char *) pnotes || inote.descdata > end) + { + warn (_("Corrupt note: name size is too big: %lx\n"), inote.namesz); + inote.descdata = inote.namedata; + inote.namesz = 0; + } + inote.descpos = offset + (inote.descdata - (char *) pnotes); next = inote.descdata + align_power (inote.descsz, 2); } @@ -14669,6 +14910,9 @@ if (inote.descdata < (char *) external + min_notesz || next < (char *) external + min_notesz + /* PR binutils/17531: file: id:000000,sig:11,src:006986,op:havoc,rep:4. */ + || inote.namedata + inote.namesz < inote.namedata + || inote.descdata + inote.descsz < inote.descdata || data_remaining < (size_t)(next - (char *) external)) { warn (_("note with invalid namesz and/or descsz found at offset 0x%lx\n"), @@ -14687,7 +14931,6 @@ if (inote.namedata[inote.namesz - 1] != '\0') { temp = (char *) malloc (inote.namesz + 1); - if (temp == NULL) { error (_("Out of memory allocating space for inote name\n")); @@ -15112,11 +15355,11 @@ error (_("%s: unable to dump the index as none was found\n"), file_name); else { - unsigned int i, l; + unsigned long i, l; unsigned long current_pos; - printf (_("Index of archive %s: (%ld entries, 0x%lx bytes in the symbol table)\n"), - file_name, (long) arch.index_num, arch.sym_size); + printf (_("Index of archive %s: (%lu entries, 0x%lx bytes in the symbol table)\n"), + file_name, (unsigned long) arch.index_num, arch.sym_size); current_pos = ftell (file); for (i = l = 0; i < arch.index_num; i++) @@ -15147,8 +15390,9 @@ file_name); break; } - printf ("\t%s\n", arch.sym_table + l); - l += strlen (arch.sym_table + l) + 1; + /* PR 17531: file: 0b6630b2. */ + printf ("\t%.*s\n", (int) (arch.sym_size - l), arch.sym_table + l); + l += strnlen (arch.sym_table + l, arch.sym_size - l) + 1; } if (arch.uses_64bit_indicies) diff -ruN binutils-2.25/binutils/rescoff.c binutils-2.25.1/binutils/rescoff.c --- binutils-2.25/binutils/rescoff.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/rescoff.c 2015-07-21 10:20:58.000000000 +0200 @@ -142,8 +142,14 @@ set_windres_bfd (&wrbfd, abfd, sec, WR_KIND_BFD); size = bfd_section_size (abfd, sec); - data = (bfd_byte *) res_alloc (size); + /* PR 17512: file: 1b25ba5d + The call to get_file_size here may be expensive + but there is no other way to determine if the section size + is reasonable. */ + if (size > (bfd_size_type) get_file_size (filename)) + fatal (_("%s: .rsrc section is bigger than the file!"), filename); + data = (bfd_byte *) res_alloc (size); get_windres_bfd_content (&wrbfd, data, 0, size); flaginfo.filename = filename; @@ -185,6 +191,13 @@ rc_res_entry **pp; const struct extern_res_entry *ere; + /* PR 17512: file: 09d80f53. + Whilst in theory resources can nest to any level, in practice + Microsoft only defines 3 levels. Corrupt files however might + claim to use more. */ + if (level > 4) + overrun (flaginfo, _("Resources nest too deep")); + if ((size_t) (flaginfo->data_end - data) < sizeof (struct extern_res_directory)) overrun (flaginfo, _("directory")); @@ -234,7 +247,12 @@ re->id.u.n.length = length; re->id.u.n.name = (unichar *) res_alloc (length * sizeof (unichar)); for (j = 0; j < length; j++) - re->id.u.n.name[j] = windres_get_16 (wrbfd, ers + j * 2 + 2, 2); + { + /* PR 17512: file: 05dc4a16. */ + if (length < 0 || ers >= (bfd_byte *) ere || ers + j * 2 + 4 >= (bfd_byte *) ere) + overrun (flaginfo, _("resource name")); + re->id.u.n.name[j] = windres_get_16 (wrbfd, ers + j * 2 + 2, 2); + } if (level == 0) type = &re->id; diff -ruN binutils-2.25/binutils/resrc.c binutils-2.25.1/binutils/resrc.c --- binutils-2.25/binutils/resrc.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/resrc.c 2015-07-21 10:20:58.000000000 +0200 @@ -2923,6 +2923,7 @@ { int has_error = 0; const struct bin_messagetable *mt; + fprintf (e, "BEGIN\n"); write_rc_datablock (e, length, data, 0, 0, 0); @@ -2932,53 +2933,68 @@ if (length < BIN_MESSAGETABLE_SIZE) has_error = 1; else - do { - rc_uint_type m, i; - mt = (const struct bin_messagetable *) data; - m = windres_get_32 (&wrtarget, mt->cblocks, length); - if (length < (BIN_MESSAGETABLE_SIZE + m * BIN_MESSAGETABLE_BLOCK_SIZE)) - { - has_error = 1; - break; - } - for (i = 0; i < m; i++) - { - rc_uint_type low, high, offset; - const struct bin_messagetable_item *mti; + do + { + rc_uint_type m, i; + + mt = (const struct bin_messagetable *) data; + m = windres_get_32 (&wrtarget, mt->cblocks, length); + + if (length < (BIN_MESSAGETABLE_SIZE + m * BIN_MESSAGETABLE_BLOCK_SIZE)) + { + has_error = 1; + break; + } + for (i = 0; i < m; i++) + { + rc_uint_type low, high, offset; + const struct bin_messagetable_item *mti; + + low = windres_get_32 (&wrtarget, mt->items[i].lowid, 4); + high = windres_get_32 (&wrtarget, mt->items[i].highid, 4); + offset = windres_get_32 (&wrtarget, mt->items[i].offset, 4); + + while (low <= high) + { + rc_uint_type elen, flags; + if ((offset + BIN_MESSAGETABLE_ITEM_SIZE) > length) + { + has_error = 1; + break; + } + mti = (const struct bin_messagetable_item *) &data[offset]; + elen = windres_get_16 (&wrtarget, mti->length, 2); + flags = windres_get_16 (&wrtarget, mti->flags, 2); + if ((offset + elen) > length) + { + has_error = 1; + break; + } + wr_printcomment (e, "MessageId = 0x%x", low); + wr_printcomment (e, ""); + + if ((flags & MESSAGE_RESOURCE_UNICODE) == MESSAGE_RESOURCE_UNICODE) + { + /* PR 17512: file: 5c3232dc. */ + if (elen > BIN_MESSAGETABLE_ITEM_SIZE * 2) + unicode_print (e, (const unichar *) mti->data, + (elen - BIN_MESSAGETABLE_ITEM_SIZE) / 2); + } + else + { + if (elen > BIN_MESSAGETABLE_ITEM_SIZE) + ascii_print (e, (const char *) mti->data, + (elen - BIN_MESSAGETABLE_ITEM_SIZE)); + } + + wr_printcomment (e,""); + ++low; + offset += elen; + } + } + } + while (0); - low = windres_get_32 (&wrtarget, mt->items[i].lowid, 4); - high = windres_get_32 (&wrtarget, mt->items[i].highid, 4); - offset = windres_get_32 (&wrtarget, mt->items[i].offset, 4); - while (low <= high) - { - rc_uint_type elen, flags; - if ((offset + BIN_MESSAGETABLE_ITEM_SIZE) > length) - { - has_error = 1; - break; - } - mti = (const struct bin_messagetable_item *) &data[offset]; - elen = windres_get_16 (&wrtarget, mti->length, 2); - flags = windres_get_16 (&wrtarget, mti->flags, 2); - if ((offset + elen) > length) - { - has_error = 1; - break; - } - wr_printcomment (e, "MessageId = 0x%x", low); - wr_printcomment (e, ""); - if ((flags & MESSAGE_RESOURCE_UNICODE) == MESSAGE_RESOURCE_UNICODE) - unicode_print (e, (const unichar *) mti->data, - (elen - BIN_MESSAGETABLE_ITEM_SIZE) / 2); - else - ascii_print (e, (const char *) mti->data, - (elen - BIN_MESSAGETABLE_ITEM_SIZE)); - wr_printcomment (e,""); - ++low; - offset += elen; - } - } - } while (0); if (has_error) wr_printcomment (e, "Illegal data"); wr_print_flush (e); @@ -2995,7 +3011,7 @@ fprintf (e, "BEGIN\n"); if (show_comment == -1) - { + { if (test_rc_datablock_text(length, data)) { rc_uint_type i, c; @@ -3008,7 +3024,7 @@ ; if (i < length && data[i] == '\n') ++i, ++c; - ascii_print (e, (const char *) &data[i - c], c); + ascii_print(e, (const char *) &data[i - c], c); fprintf (e, "\""); if (i < length) fprintf (e, "\n"); diff -ruN binutils-2.25/binutils/size.c binutils-2.25.1/binutils/size.c --- binutils-2.25/binutils/size.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/size.c 2015-07-21 10:20:58.000000000 +0200 @@ -133,6 +133,7 @@ program_name = *argv; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&argc, &argv); @@ -365,7 +366,14 @@ display_bfd (arfile); if (last_arfile != NULL) - bfd_close (last_arfile); + { + bfd_close (last_arfile); + + /* PR 17512: file: a244edbc. */ + if (last_arfile == arfile) + return; + } + last_arfile = arfile; } diff -ruN binutils-2.25/binutils/srconv.c binutils-2.25.1/binutils/srconv.c --- binutils-2.25/binutils/srconv.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/srconv.c 2015-07-21 10:20:58.000000000 +0200 @@ -167,7 +167,8 @@ last = !(ccode & 0xff00); if (size & 0x7) - abort (); + fatal (_("Checksum failure")); + ptr[0] = ccode | (last ? 0x80 : 0); ptr[1] = bytes + 1; @@ -178,7 +179,7 @@ ptr[bytes] = ~sum; if (fwrite (ptr, bytes + 1, 1, ffile) != 1) /* FIXME: Return error status. */ - abort (); + fatal (_("Failed to write checksum")); } @@ -218,7 +219,7 @@ ptr[byte + 3] = n >> 0; break; default: - abort (); + fatal (_("Unsupported integer write size: %d"), size); } *idx += size * 8; } @@ -304,7 +305,7 @@ if (fwrite (b, sizeof (b), 1, file) != 1) /* FIXME: Return error status. */ - abort (); + fatal (_("Failed to write TR block")); } static void @@ -395,7 +396,8 @@ toolname = "C_H8/300S"; break; default: - abort(); + fatal (_("Unrecognized H8300 sub-architecture: %ld"), + bfd_get_mach (abfd)); } rnames = rname_h8300; break; @@ -412,7 +414,7 @@ rnames = rname_sh; break; default: - abort (); + fatal (_("Unsupported architecture: %d"), bfd_get_arch (abfd)); } if (! (bfd_get_file_flags(abfd) & EXEC_P)) @@ -866,7 +868,7 @@ break; default: - abort (); + fatal (_("Unrecognised type: %d"), type->type); } } @@ -995,7 +997,7 @@ return; default: - abort (); + fatal (_("Unrecognised coff symbol type: %d"), symbol->type->type); } if (symbol->where->where == coff_where_member_of_struct) @@ -1057,7 +1059,7 @@ break; default: - abort (); + fatal (_("Unrecognised coff symbol visibility: %d"), symbol->visible->type); } dsy.dlength = symbol->type->size; @@ -1083,7 +1085,7 @@ break; default: - abort (); + fatal (_("Unrecognised coff symbol location: %d"), symbol->where->where); } switch (symbol->where->where) @@ -1128,7 +1130,7 @@ break; default: - abort (); + fatal (_("Unrecognised coff symbol location: %d"), symbol->where->where); } if (symbol->where->where == coff_where_register) @@ -1157,7 +1159,7 @@ break; default: - abort (); + fatal (_("Unrecognised coff symbol visibility: %d"), symbol->visible->type); } dsy.sfn = 0; @@ -1202,6 +1204,8 @@ static void wr_program_structure (struct coff_ofile *p, struct coff_sfile *sfile) { + if (p->nsections < 4) + return; walk_tree_sfile (p->sections + 4, sfile); } @@ -1460,7 +1464,7 @@ if (fwrite (b, sizeof (b), 1, file) != 1) /* FIXME: Return error status. */ - abort (); + fatal (_("Failed to write CS struct")); } /* Write out the SC records for a unit. Create an SC @@ -1703,6 +1707,9 @@ struct coff_symbol *s; struct coff_section *common_section; + if (otree->nsections < 3) + return; + /* Find the common section - always section 3. */ common_section = otree->sections + 3; @@ -1772,6 +1779,7 @@ program_name = av[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&ac, &av); @@ -1883,10 +1891,12 @@ printf ("ids %d %d\n", base1, base2); tree = coff_grok (abfd); + if (tree) + { + if (!noprescan) + prescan (tree); - if (!noprescan) - prescan (tree); - - wr_module (tree); + wr_module (tree); + } return 0; } diff -ruN binutils-2.25/binutils/strings.c binutils-2.25.1/binutils/strings.c --- binutils-2.25/binutils/strings.c 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/binutils/strings.c 2015-07-21 10:20:58.000000000 +0200 @@ -164,6 +164,7 @@ program_name = argv[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&argc, &argv); @@ -578,14 +579,14 @@ switch (address_radix) { case 8: -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +#ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { -#ifndef __MSVCRT__ +# ifndef __MSVCRT__ printf ("%7llo ", (unsigned long long) start); -#else +# else printf ("%7I64o ", (unsigned long long) start); -#endif +# endif } else #elif !BFD_HOST_64BIT_LONG @@ -597,14 +598,14 @@ break; case 10: -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +#ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { -#ifndef __MSVCRT__ +# ifndef __MSVCRT__ printf ("%7lld ", (unsigned long long) start); -#else +# else printf ("%7I64d ", (unsigned long long) start); -#endif +# endif } else #elif !BFD_HOST_64BIT_LONG @@ -616,14 +617,14 @@ break; case 16: -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +#ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { -#ifndef __MSVCRT__ +# ifndef __MSVCRT__ printf ("%7llx ", (unsigned long long) start); -#else +# else printf ("%7I64x ", (unsigned long long) start); -#endif +# endif } else #elif !BFD_HOST_64BIT_LONG diff -ruN binutils-2.25/binutils/sysdump.c binutils-2.25.1/binutils/sysdump.c --- binutils-2.25/binutils/sysdump.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/sysdump.c 2015-07-21 10:20:58.000000000 +0200 @@ -66,6 +66,9 @@ if (b == 0) { + /* PR 17512: file: 13caced2. */ + if (oc >= max) + return _("*corrupt*"); /* Got to work out the length of the string from self. */ b = ptr[oc++]; (*idx) += 8; @@ -166,7 +169,12 @@ int byte = *idx / 8; if (byte >= max) - return 0; + { + /* PR 17512: file: id:000001,src:000002,op:flip1,pos:45. */ + /* Prevent infinite loops re-reading beyond the end of the buffer. */ + fatal (_("ICE: getINT: Out of buffer space")); + return 0; + } if (size == -2) size = addrsize; @@ -188,7 +196,7 @@ n = (ptr[byte + 0] << 24) + (ptr[byte + 1] << 16) + (ptr[byte + 2] << 8) + (ptr[byte + 3]); break; default: - abort (); + fatal (_("Unsupported read size: %d"), size); } *idx += size * 8; @@ -615,6 +623,8 @@ do { c = getc (file); + if (c == EOF) + break; ungetc (c, file); c &= 0x7f; @@ -676,6 +686,7 @@ program_name = av[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&ac, &av); diff -ruN binutils-2.25/binutils/testsuite/ChangeLog binutils-2.25.1/binutils/testsuite/ChangeLog --- binutils-2.25/binutils/testsuite/ChangeLog 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/testsuite/ChangeLog 2015-07-21 10:20:58.000000000 +0200 @@ -1,3 +1,15 @@ +2015-03-11 Jiong Wang + + * binutils-all/arm/rvct_symbol.s: New testcase. + * binutils-all/arm/objdump.exp: Run it. + +2015-02-11 Alan Modra + + Apply from master. + 2014-12-26 Alan Modra + * binutils-all/strip-11.d: New test. + * binutils-all/objcopy.exp: Run it. + 2014-09-12 Andrew Bennett * binutils-all/objcopy.exp: Add mips*-img-elf* target triple. diff -ruN binutils-2.25/binutils/testsuite/binutils-all/arm/objdump.exp binutils-2.25.1/binutils/testsuite/binutils-all/arm/objdump.exp --- binutils-2.25/binutils/testsuite/binutils-all/arm/objdump.exp 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/testsuite/binutils-all/arm/objdump.exp 2015-07-21 10:20:58.000000000 +0200 @@ -86,3 +86,25 @@ } else { fail "multiple input files" } + +if {![binutils_assemble $srcdir/$subdir/rvct_symbol.s tmpdir/rvct_symbol.o]} then { + return +} + +if [is_remote host] { + set objfile [remote_download host tmpdir/rvct_symbol.o] +} else { + set objfile tmpdir/rvct_symbol.o +} + +# Make sure multiple disassemblies come out the same + +set got [binutils_run $OBJDUMP "-D $objfile $objfile"] + +set want "foo.*global_a.*global_b" + +if [regexp $want $got] then { + pass "skip rvct symbol" +} else { + fail "skip rvct symbol" +} diff -ruN binutils-2.25/binutils/testsuite/binutils-all/arm/rvct_symbol.s binutils-2.25.1/binutils/testsuite/binutils-all/arm/rvct_symbol.s --- binutils-2.25/binutils/testsuite/binutils-all/arm/rvct_symbol.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/binutils/testsuite/binutils-all/arm/rvct_symbol.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,15 @@ + .text +foo: +__tagsym$$0: + add r0, r1, r2 + + .data + .global global_a +__tagsym$$used0: +global_a: + .word 0xcafedead + + .global __tagsym$$used1 +__tagsym$$used1: +global_b: + .word 0xcafecafe diff -ruN binutils-2.25/binutils/testsuite/binutils-all/objcopy.exp binutils-2.25.1/binutils/testsuite/binutils-all/objcopy.exp --- binutils-2.25/binutils/testsuite/binutils-all/objcopy.exp 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/testsuite/binutils-all/objcopy.exp 2015-07-21 10:20:58.000000000 +0200 @@ -959,6 +959,12 @@ && !([istarget "arm*-*-*"] && ![istarget "arm-*-*eabi*"])} { run_dump_test "strip-10" } + set extra_strip11 "" + if { [istarget "sh64*-*"] } { + # pr17755 testcase + set extra_strip11 { { "as" "--isa=SHmedia --abi=64" } } + } + run_dump_test "strip-11" $extra_strip11 if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } { # Check to make sure we don't strip a symbol named in relocations. diff -ruN binutils-2.25/binutils/testsuite/binutils-all/strip-11.d binutils-2.25.1/binutils/testsuite/binutils-all/strip-11.d --- binutils-2.25/binutils/testsuite/binutils-all/strip-11.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/binutils/testsuite/binutils-all/strip-11.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,12 @@ +#PROG: strip +#source: empty.s +#strip: -g +#readelf: -S --wide +#name: strip -g empty file + +#... + \[ 0\] +NULL +0+ .* +#... + \[ .\] \.shstrtab +STRTAB +0+ .* +Key to Flags: +#pass diff -ruN binutils-2.25/binutils/windmc.c binutils-2.25.1/binutils/windmc.c --- binutils-2.25/binutils/windmc.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/windmc.c 2015-07-21 10:20:58.000000000 +0200 @@ -952,6 +952,7 @@ program_name = argv[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&argc, &argv); diff -ruN binutils-2.25/binutils/windres.c binutils-2.25.1/binutils/windres.c --- binutils-2.25/binutils/windres.c 2014-10-14 09:32:02.000000000 +0200 +++ binutils-2.25.1/binutils/windres.c 2015-07-21 10:20:58.000000000 +0200 @@ -204,6 +204,7 @@ *real_filename = n; return e; } + free (n); if (errno != ENOENT) break; @@ -807,6 +808,7 @@ program_name = argv[0]; xmalloc_set_program_name (program_name); + bfd_set_error_program_name (program_name); expandargv (&argc, &argv); diff -ruN binutils-2.25/gas/ChangeLog binutils-2.25.1/gas/ChangeLog --- binutils-2.25/gas/ChangeLog 2014-12-23 15:22:05.000000000 +0100 +++ binutils-2.25.1/gas/ChangeLog 2015-07-21 15:42:55.000000000 +0200 @@ -1,3 +1,110 @@ +2015-07-21 Tristan Gingold + + * configure: Regenerate. + +2015-07-10 Alan Modra + + Apply from master + 2015-07-03 Alan Modra + * config/tc-ppc.c (md_show_usage): Add -m821, -m850, -m860. + * doc/c-ppc.texi (PowerPC-Opts): Likewise. + + 2015-06-19 Peter Bergner + * config/tc-ppc.c (md_assemble): Use ppc_optional_operand_value. + Allow for optional operands without insert functions. + + 2015-03-11 Alan Modra + * config/tc-ppc.c (md_assemble): Don't abort on 8 byte insn fixups. + (md_apply_fix): Report an error on data-only fixups used with insns. + +2015-06-19 Nick Clifton + + PR gas/18541 + * config/tc-arm.c (md_apply_fix): Add support for ADR in thumb + mode against a nearby symbol. + +2015-06-17 Renlin Li + + Applied from master. + 2015-04-28 Renlin Li + 2015-06-03 Renlin Li + + * config/tc-arm.c (arm_init_frag): Always emit mapping symbols. + +2015-06-17 Renlin Li + + Applied from master. + 2015-05-05 Renlin Li + + * config/tc-aarch64.c (aarch64_init_frag): Always generate mapping + symbols. + +2015-06-04 Matthew Wahab + + * config/tc-aarch64.c (mapping_state): Set minimum alignment for code + sections. + +2015-05-07 Renlin Li + + * config/tc-aarch64.c (s_aarch64_inst): Align frag during state + transition within executable section. + (md_assemble): Likewise. + +2015-04-06 Evandro Menezes + + * config/tc-aarch64.c: Add support for Samsung Exynos M1. + * doc/c-aarch64.texi (-mcpu=): Add "exynos-m1". + +2015-04-06 Evandro Menezes + + * config/tc-arm.c: Add support for Samsung Exynos M1. + * doc/c-arm.texi (-mcpu=): Add "exynos-m1". + +2015-04-04 Alan Modra + + Apply from master. + 2014-12-25 Yaakov Selkowitz + PR gas/17753 + * config/tc-mep.c (md_begin): Specify types of vararg literals. + +2015-03-20 H.J. Lu + + Apply patch from master: + 2015-03-20 H.J. Lu + + * config/tc-i386.c (i386_align_code): Limit multi-byte nop + instructions to 10 bytes. + +2015-03-11 Matthew Wahab + + * config/tc-aarch64.c: Add support for Cortex-A72. + * doc/c-aarch64.texi (-mcpu=): Add "cortex-a72". + +2015-03-11 Matthew Wahab + + * config/tc-arm.c: Add support for Cortex-A72. + +2015-02-11 Alan Modra + + Apply from master. + 2015-01-12 Alan Modra + * read.c (s_altmacro, s_reloc): Make definition static. + + 2014-12-12 Alan Modra + * config/tc-ppc.h (md_reg_eh_frame_to_debug_frame): Match current + gcc behaviour. + * config/te-aix.h: New file. + * configure.tgt: Use em=aix for powerpc-aix. + +2015-01-28 Matthew Wahab + + * config/tc-arm.c (parse_ifimm_zero): Accept #0x0 as a synonym for #0, + restoring previous behaviour. + +2014-12-23 Tristan Gingold + + * configure: Regenerate. + 2014-12-23 Tristan Gingold * configure: Regenerate. diff -ruN binutils-2.25/gas/config/tc-aarch64.c binutils-2.25.1/gas/config/tc-aarch64.c --- binutils-2.25/gas/config/tc-aarch64.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gas/config/tc-aarch64.c 2015-07-21 10:20:58.000000000 +0200 @@ -1481,7 +1481,14 @@ /* The mapping symbol has already been emitted. There is nothing else to do. */ return; - else if (TRANSITION (MAP_UNDEFINED, MAP_DATA)) + + if (state == MAP_INSN) + /* AArch64 instructions require 4-byte alignment. When emitting + instructions into any section, record the appropriate section + alignment. */ + record_alignment (now_seg, 2); + + if (TRANSITION (MAP_UNDEFINED, MAP_DATA)) /* This case will be evaluated later in the next else. */ return; else if (TRANSITION (MAP_UNDEFINED, MAP_INSN)) @@ -1863,8 +1870,14 @@ return; } - if (!need_pass_2) + /* Sections are assumed to start aligned. In text section, there is no + MAP_DATA symbol pending. So we only align the address during + MAP_DATA --> MAP_INSN transition. + For other sections, this is not guaranteed. */ + enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate; + if (!need_pass_2 && (subseg_text_p (now_seg) && mapstate == MAP_DATA)) frag_align_code (2, 0); + #ifdef OBJ_ELF mapping_state (MAP_INSN); #endif @@ -5571,6 +5584,14 @@ init_operand_error_report (); + /* Sections are assumed to start aligned. In text section, there is no + MAP_DATA symbol pending. So we only align the address during + MAP_DATA --> MAP_INSN transition. + For other sections, this is not guaranteed. */ + enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate; + if (!need_pass_2 && (subseg_text_p (now_seg) && mapstate == MAP_DATA)) + frag_align_code (2, 0); + saved_cond = inst.cond; reset_aarch64_instruction (&inst); inst.cond = saved_cond; @@ -5900,21 +5921,20 @@ /* Record a mapping symbol for alignment frags. We will delete this later if the alignment ends up empty. */ if (!fragP->tc_frag_data.recorded) + fragP->tc_frag_data.recorded = 1; + + switch (fragP->fr_type) { - fragP->tc_frag_data.recorded = 1; - switch (fragP->fr_type) - { - case rs_align: - case rs_align_test: - case rs_fill: - mapping_state_2 (MAP_DATA, max_chars); - break; - case rs_align_code: - mapping_state_2 (MAP_INSN, max_chars); - break; - default: - break; - } + case rs_align: + case rs_align_test: + case rs_fill: + mapping_state_2 (MAP_DATA, max_chars); + break; + case rs_align_code: + mapping_state_2 (MAP_INSN, max_chars); + break; + default: + break; } } @@ -7184,6 +7204,11 @@ AARCH64_FEATURE_CRC), "Cortex-A53"}, {"cortex-a57", AARCH64_FEATURE(AARCH64_ARCH_V8, AARCH64_FEATURE_CRC), "Cortex-A57"}, + {"cortex-a72", AARCH64_FEATURE (AARCH64_ARCH_V8, + AARCH64_FEATURE_CRC), "Cortex-A72"}, + {"exynos-m1", AARCH64_FEATURE (AARCH64_ARCH_V8, + AARCH64_FEATURE_CRC | AARCH64_FEATURE_CRYPTO), + "Samsung Exynos M1"}, /* The 'xgene-1' name is an older name for 'xgene1', which was used in earlier releases and is superseded by 'xgene1' in all tools. */ diff -ruN binutils-2.25/gas/config/tc-arm.c binutils-2.25.1/gas/config/tc-arm.c --- binutils-2.25/gas/config/tc-arm.c 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/config/tc-arm.c 2015-07-21 10:20:58.000000000 +0200 @@ -4959,6 +4959,16 @@ return FALSE; ++*in; + + /* Accept #0x0 as a synonym for #0. */ + if (strncmp (*in, "0x", 2) == 0) + { + int val; + if (parse_immediate (in, &val, 0, 0, TRUE) == FAIL) + return FALSE; + return TRUE; + } + error_code = atof_generic (in, ".", EXP_CHARS, &generic_floating_point_number); @@ -20960,27 +20970,29 @@ void arm_init_frag (fragS * fragP, int max_chars) { + int frag_thumb_mode; /* If the current ARM vs THUMB mode has not already been recorded into this frag then do so now. */ if ((fragP->tc_frag_data.thumb_mode & MODE_RECORDED) == 0) - { - fragP->tc_frag_data.thumb_mode = thumb_mode | MODE_RECORDED; + fragP->tc_frag_data.thumb_mode = thumb_mode | MODE_RECORDED; - /* Record a mapping symbol for alignment frags. We will delete this - later if the alignment ends up empty. */ - switch (fragP->fr_type) - { - case rs_align: - case rs_align_test: - case rs_fill: - mapping_state_2 (MAP_DATA, max_chars); - break; - case rs_align_code: - mapping_state_2 (thumb_mode ? MAP_THUMB : MAP_ARM, max_chars); - break; - default: - break; - } + frag_thumb_mode = fragP->tc_frag_data.thumb_mode ^ MODE_RECORDED; + + + /* Record a mapping symbol for alignment frags. We will delete this + later if the alignment ends up empty. */ + switch (fragP->fr_type) + { + case rs_align: + case rs_align_test: + case rs_fill: + mapping_state_2 (MAP_DATA, max_chars); + break; + case rs_align_code: + mapping_state_2 (frag_thumb_mode ? MAP_THUMB : MAP_ARM, max_chars); + break; + default: + break; } } @@ -23235,7 +23247,6 @@ case BFD_RELOC_ARM_SBREL32: case BFD_RELOC_ARM_PREL31: case BFD_RELOC_ARM_TARGET2: - case BFD_RELOC_ARM_TLS_LE32: case BFD_RELOC_ARM_TLS_LDO32: case BFD_RELOC_ARM_PCREL_CALL: case BFD_RELOC_ARM_PCREL_JUMP: @@ -23273,6 +23284,7 @@ case BFD_RELOC_ARM_TLS_GOTDESC: case BFD_RELOC_ARM_TLS_GD32: + case BFD_RELOC_ARM_TLS_LE32: case BFD_RELOC_ARM_TLS_IE32: case BFD_RELOC_ARM_TLS_LDM32: /* BFD will include the symbol's address in the addend. @@ -24398,6 +24410,8 @@ "Cortex-A53"), ARM_CPU_OPT ("cortex-a57", ARM_ARCH_V8A, FPU_ARCH_CRYPTO_NEON_VFP_ARMV8, "Cortex-A57"), + ARM_CPU_OPT ("cortex-a72", ARM_ARCH_V8A, FPU_ARCH_CRYPTO_NEON_VFP_ARMV8, + "Cortex-A72"), ARM_CPU_OPT ("cortex-r4", ARM_ARCH_V7R, FPU_NONE, "Cortex-R4"), ARM_CPU_OPT ("cortex-r4f", ARM_ARCH_V7R, FPU_ARCH_VFP_V3D16, "Cortex-R4F"), @@ -24411,6 +24425,9 @@ ARM_CPU_OPT ("cortex-m1", ARM_ARCH_V6SM, FPU_NONE, "Cortex-M1"), ARM_CPU_OPT ("cortex-m0", ARM_ARCH_V6SM, FPU_NONE, "Cortex-M0"), ARM_CPU_OPT ("cortex-m0plus", ARM_ARCH_V6SM, FPU_NONE, "Cortex-M0+"), + ARM_CPU_OPT ("exynos-m1", ARM_ARCH_V8A, FPU_ARCH_CRYPTO_NEON_VFP_ARMV8, + "Samsung " \ + "Exynos M1"), /* ??? XSCALE is really an architecture. */ ARM_CPU_OPT ("xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2, NULL), /* ??? iwmmxt is not a processor. */ diff -ruN binutils-2.25/gas/config/tc-i386.c binutils-2.25.1/gas/config/tc-i386.c --- binutils-2.25/gas/config/tc-i386.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gas/config/tc-i386.c 2015-07-21 15:42:38.000000000 +0200 @@ -1129,85 +1129,9 @@ /* nopw %cs:0L(%[re]ax,%[re]ax,1) */ static const char alt_10[] = {0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; - /* data16 - nopw %cs:0L(%[re]ax,%[re]ax,1) */ - static const char alt_long_11[] = - {0x66, - 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; - /* data16 - data16 - nopw %cs:0L(%[re]ax,%[re]ax,1) */ - static const char alt_long_12[] = - {0x66, - 0x66, - 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; - /* data16 - data16 - data16 - nopw %cs:0L(%[re]ax,%[re]ax,1) */ - static const char alt_long_13[] = - {0x66, - 0x66, - 0x66, - 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; - /* data16 - data16 - data16 - data16 - nopw %cs:0L(%[re]ax,%[re]ax,1) */ - static const char alt_long_14[] = - {0x66, - 0x66, - 0x66, - 0x66, - 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; - /* data16 - data16 - data16 - data16 - data16 - nopw %cs:0L(%[re]ax,%[re]ax,1) */ - static const char alt_long_15[] = - {0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; - /* nopl 0(%[re]ax,%[re]ax,1) - nopw 0(%[re]ax,%[re]ax,1) */ - static const char alt_short_11[] = - {0x0f,0x1f,0x44,0x00,0x00, - 0x66,0x0f,0x1f,0x44,0x00,0x00}; - /* nopw 0(%[re]ax,%[re]ax,1) - nopw 0(%[re]ax,%[re]ax,1) */ - static const char alt_short_12[] = - {0x66,0x0f,0x1f,0x44,0x00,0x00, - 0x66,0x0f,0x1f,0x44,0x00,0x00}; - /* nopw 0(%[re]ax,%[re]ax,1) - nopl 0L(%[re]ax) */ - static const char alt_short_13[] = - {0x66,0x0f,0x1f,0x44,0x00,0x00, - 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00}; - /* nopl 0L(%[re]ax) - nopl 0L(%[re]ax) */ - static const char alt_short_14[] = - {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00, - 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00}; - /* nopl 0L(%[re]ax) - nopl 0L(%[re]ax,%[re]ax,1) */ - static const char alt_short_15[] = - {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00, - 0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; - static const char *const alt_short_patt[] = { + static const char *const alt_patt[] = { f32_1, f32_2, alt_3, alt_4, alt_5, alt_6, alt_7, alt_8, - alt_9, alt_10, alt_short_11, alt_short_12, alt_short_13, - alt_short_14, alt_short_15 - }; - static const char *const alt_long_patt[] = { - f32_1, f32_2, alt_3, alt_4, alt_5, alt_6, alt_7, alt_8, - alt_9, alt_10, alt_long_11, alt_long_12, alt_long_13, - alt_long_14, alt_long_15 + alt_9, alt_10 }; /* Only align for at least a positive non-zero boundary. */ @@ -1219,14 +1143,9 @@ 1. For PROCESSOR_I386, PROCESSOR_I486, PROCESSOR_PENTIUM and PROCESSOR_GENERIC32, f32_patt will be used. - 2. For PROCESSOR_PENTIUMPRO, PROCESSOR_PENTIUM4, PROCESSOR_NOCONA, - PROCESSOR_CORE, PROCESSOR_CORE2, PROCESSOR_COREI7, and - PROCESSOR_GENERIC64, alt_long_patt will be used. - 3. For PROCESSOR_ATHLON, PROCESSOR_K6, PROCESSOR_K8 and - PROCESSOR_AMDFAM10, PROCESSOR_BD and PROCESSOR_BT, alt_short_patt - will be used. + 2. For the rest, alt_patt will be used. - When -mtune= isn't used, alt_long_patt will be used if + When -mtune= isn't used, alt_patt will be used if cpu_arch_isa_flags has CpuNop. Otherwise, f32_patt will be used. @@ -1259,7 +1178,7 @@ /* We use cpu_arch_isa_flags to check if we SHOULD optimize with nops. */ if (fragP->tc_frag_data.isa_flags.bitfield.cpunop) - patt = alt_long_patt; + patt = alt_patt; else patt = f32_patt; break; @@ -1271,15 +1190,13 @@ case PROCESSOR_L1OM: case PROCESSOR_K1OM: case PROCESSOR_GENERIC64: - patt = alt_long_patt; - break; case PROCESSOR_K6: case PROCESSOR_ATHLON: case PROCESSOR_K8: case PROCESSOR_AMDFAM10: case PROCESSOR_BD: case PROCESSOR_BT: - patt = alt_short_patt; + patt = alt_patt; break; case PROCESSOR_I386: case PROCESSOR_I486: @@ -1313,7 +1230,7 @@ /* We use cpu_arch_isa_flags to check if we CAN optimize with nops. */ if (fragP->tc_frag_data.isa_flags.bitfield.cpunop) - patt = alt_short_patt; + patt = alt_patt; else patt = f32_patt; break; @@ -1326,12 +1243,12 @@ case PROCESSOR_L1OM: case PROCESSOR_K1OM: if (fragP->tc_frag_data.isa_flags.bitfield.cpunop) - patt = alt_long_patt; + patt = alt_patt; else patt = f32_patt; break; case PROCESSOR_GENERIC64: - patt = alt_long_patt; + patt = alt_patt; break; } } @@ -1362,15 +1279,15 @@ } else { - /* Maximum length of an instruction is 15 byte. If the - padding is greater than 15 bytes and we don't use jump, + /* Maximum length of an instruction is 10 byte. If the + padding is greater than 10 bytes and we don't use jump, we have to break it into smaller pieces. */ int padding = count; - while (padding > 15) + while (padding > 10) { - padding -= 15; + padding -= 10; memcpy (fragP->fr_literal + fragP->fr_fix + padding, - patt [14], 15); + patt [9], 10); } if (padding) diff -ruN binutils-2.25/gas/config/tc-mep.c binutils-2.25.1/gas/config/tc-mep.c --- binutils-2.25/gas/config/tc-mep.c 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/config/tc-mep.c 2015-07-21 10:20:58.000000000 +0200 @@ -486,12 +486,12 @@ mep_cop = mep_config_map[mep_config_index].cpu_flag & EF_MEP_COP_MASK; /* Set the machine number and endian. */ - gas_cgen_cpu_desc = mep_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0, + gas_cgen_cpu_desc = mep_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0U, CGEN_CPU_OPEN_ENDIAN, target_big_endian ? CGEN_ENDIAN_BIG : CGEN_ENDIAN_LITTLE, - CGEN_CPU_OPEN_ISAS, 0, + CGEN_CPU_OPEN_ISAS, (CGEN_BITSET *) 0, CGEN_CPU_OPEN_END); mep_cgen_init_asm (gas_cgen_cpu_desc); diff -ruN binutils-2.25/gas/config/tc-ppc.c binutils-2.25.1/gas/config/tc-ppc.c --- binutils-2.25/gas/config/tc-ppc.c 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/config/tc-ppc.c 2015-07-21 10:20:58.000000000 +0200 @@ -1281,7 +1281,8 @@ -m476 generate code for PowerPC 476\n\ -m7400, -m7410, -m7450, -m7455\n\ generate code for PowerPC 7400/7410/7450/7455\n\ --m750cl generate code for PowerPC 750cl\n")); +-m750cl generate code for PowerPC 750cl\n\ +-m821, -m850, -m860 generate code for PowerPC 821/850/860\n")); fprintf (stream, _("\ -mppc64, -m620 generate code for PowerPC 620/625/630\n\ -mppc64bridge generate code for PowerPC 64, including bridge insns\n\ @@ -2752,12 +2753,18 @@ if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0 && skip_optional) { + long val = ppc_optional_operand_value (operand); if (operand->insert) { - insn = (*operand->insert) (insn, 0L, ppc_cpu, &errmsg); + insn = (*operand->insert) (insn, val, ppc_cpu, &errmsg); if (errmsg != (const char *) NULL) as_bad ("%s", errmsg); } + else if (operand->shift >= 0) + insn |= ((long) val & operand->bitm) << operand->shift; + else + insn |= ((long) val & operand->bitm) >> -operand->shift; + if ((operand->flags & PPC_OPERAND_NEXT) != 0) next_opindex = *opindex_ptr + 1; continue; @@ -3431,9 +3438,6 @@ size = bfd_get_reloc_size (reloc_howto); offset = target_big_endian ? (insn_length - size) : 0; - if (size < 1 || size > 4) - abort (); - fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size, @@ -6774,6 +6778,29 @@ break; #endif + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + case BFD_RELOC_PPC_DTPMOD: + case BFD_RELOC_PPC_TPREL: + case BFD_RELOC_PPC_DTPREL: + case BFD_RELOC_PPC_COPY: + case BFD_RELOC_PPC_GLOB_DAT: + case BFD_RELOC_32_PLT_PCREL: + case BFD_RELOC_PPC_EMB_NADDR32: + case BFD_RELOC_PPC64_TOC: + case BFD_RELOC_CTOR: + case BFD_RELOC_32: + case BFD_RELOC_32_PCREL: + case BFD_RELOC_RVA: + case BFD_RELOC_64: + case BFD_RELOC_64_PCREL: + case BFD_RELOC_PPC64_ADDR64_LOCAL: + as_bad_where (fixP->fx_file, fixP->fx_line, + _("%s unsupported as instruction fixup"), + bfd_get_reloc_code_name (fixP->fx_r_type)); + fixP->fx_done = 1; + return; + default: break; } diff -ruN binutils-2.25/gas/config/tc-ppc.h binutils-2.25.1/gas/config/tc-ppc.h --- binutils-2.25/gas/config/tc-ppc.h 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/config/tc-ppc.h 2015-07-21 10:20:58.000000000 +0200 @@ -267,11 +267,24 @@ #define md_cleanup() ppc_cleanup () extern void ppc_cleanup (void); +#if (defined TE_AIX5 || defined TE_AIX \ + || defined TE_FreeBSD || defined TE_NetBSD || defined TE_LYNX) /* ppc uses different register numbers between .eh_frame and .debug_frame. This macro translates the .eh_frame register numbers to .debug_frame register numbers. */ -#define md_reg_eh_frame_to_debug_frame(regno) \ - ((regno) == 70 ? 64 /* cr2 */ : (regno)) +#define md_reg_eh_frame_to_debug_frame(regno) \ + ((regno) == 70 ? 64 /* cr2 */ \ + : (regno) == 65 ? 108 /* lr */ \ + : (regno) == 66 ? 109 /* ctr */ \ + : (regno) >= 68 && (regno) <= 75 ? (regno) + 86 - 68 /* crN */ \ + : (regno) == 76 ? 101 /* xer */ \ + : (regno) >= 77 && (regno) <= 108 ? (regno) + 1124 - 77 /* vrN */ \ + : (regno) == 109 ? 356 /* vrsave */ \ + : (regno) == 110 ? 67 /* vscr */ \ + : (regno) == 111 ? 99 /* spe_acc */ \ + : (regno) == 112 ? 612 /* spefscr */ \ + : (regno)) +#endif #define TARGET_USE_CFIPOP 1 diff -ruN binutils-2.25/gas/config/te-aix.h binutils-2.25.1/gas/config/te-aix.h --- binutils-2.25/gas/config/te-aix.h 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gas/config/te-aix.h 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,22 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3, + or (at your option) any later version. + + GAS is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#define TE_AIX + +#include "obj-format.h" diff -ruN binutils-2.25/gas/configure binutils-2.25.1/gas/configure --- binutils-2.25/gas/configure 2014-12-23 15:22:05.000000000 +0100 +++ binutils-2.25.1/gas/configure 2015-07-21 15:42:55.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for gas 2.25. +# Generated by GNU Autoconf 2.64 for gas 2.25.1. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -556,8 +556,8 @@ # Identity of this package. PACKAGE_NAME='gas' PACKAGE_TARNAME='gas' -PACKAGE_VERSION='2.25' -PACKAGE_STRING='gas 2.25' +PACKAGE_VERSION='2.25.1' +PACKAGE_STRING='gas 2.25.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1320,7 +1320,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gas 2.25 to adapt to many kinds of systems. +\`configure' configures gas 2.25.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1391,7 +1391,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gas 2.25:";; + short | recursive ) echo "Configuration of gas 2.25.1:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gas configure 2.25 +gas configure 2.25.1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -1915,7 +1915,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gas $as_me 2.25, which was +It was created by gas $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -3723,7 +3723,7 @@ # Define the identity of the package. PACKAGE='gas' - VERSION='2.25' + VERSION='2.25.1' cat >>confdefs.h <<_ACEOF @@ -15061,7 +15061,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gas $as_me 2.25, which was +This file was extended by gas $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15125,7 +15125,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -gas config.status 2.25 +gas config.status 2.25.1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -ruN binutils-2.25/gas/configure.tgt binutils-2.25.1/gas/configure.tgt --- binutils-2.25/gas/configure.tgt 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/configure.tgt 2015-07-21 10:20:58.000000000 +0200 @@ -372,7 +372,7 @@ ppc-*-winnt*) fmt=coff em=pe ;; ppc-*-aix5.[01]) fmt=coff em=aix5 ;; ppc-*-aix[5-9].*) fmt=coff em=aix5 ;; - ppc-*-aix*) fmt=coff ;; + ppc-*-aix*) fmt=coff em=aix ;; ppc-*-beos*) fmt=coff ;; ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; diff -ruN binutils-2.25/gas/doc/as.1 binutils-2.25.1/gas/doc/as.1 --- binutils-2.25/gas/doc/as.1 2014-12-23 15:38:32.000000000 +0100 +++ binutils-2.25.1/gas/doc/as.1 2015-07-21 15:45:57.000000000 +0200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "AS 1" -.TH AS 1 "2014-12-23" "binutils-2.25" "GNU Development Tools" +.TH AS 1 "2015-07-21" "binutils-2.25.1" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -698,6 +698,8 @@ on the target processor. The following processor names are recognized: \&\f(CW\*(C`cortex\-a53\*(C'\fR, \&\f(CW\*(C`cortex\-a57\*(C'\fR, +\&\f(CW\*(C`cortex\-a72\*(C'\fR, +\&\f(CW\*(C`exynos\-m1\*(C'\fR, \&\f(CW\*(C`xgene1\*(C'\fR, and \&\f(CW\*(C`xgene2\*(C'\fR. @@ -1511,6 +1513,9 @@ .IP "\fB\-m750cl\fR" 4 .IX Item "-m750cl" Generate code for PowerPC 750CL. +.IP "\fB\-m821, \-m850, \-m860\fR" 4 +.IX Item "-m821, -m850, -m860" +Generate code for PowerPC 821/850/860. .IP "\fB\-mppc64, \-m620\fR" 4 .IX Item "-mppc64, -m620" Generate code for PowerPC 620/625/630. diff -ruN binutils-2.25/gas/doc/as.info binutils-2.25.1/gas/doc/as.info --- binutils-2.25/gas/doc/as.info 2014-12-23 15:38:32.000000000 +0100 +++ binutils-2.25.1/gas/doc/as.info 2015-07-21 15:45:56.000000000 +0200 @@ -24,7 +24,7 @@ ******** This file is a user guide to the GNU assembler `as' (GNU Binutils) -version 2.25. +version 2.25.1. This document is distributed under the terms of the GNU Free Documentation License. A copy of the license is included in the @@ -5856,9 +5856,10 @@ issue an error message if an attempt is made to assemble an instruction which will not execute on the target processor. The following processor names are recognized: `cortex-a53', - `cortex-a57', `xgene1', and `xgene2'. The special name `all' may - be used to allow the assembler to accept instructions valid for - any supported processor, including all optional extensions. + `cortex-a57', `cortex-a72', `exynos-m1', `xgene1', and `xgene2'. + The special name `all' may be used to allow the assembler to accept + instructions valid for any supported processor, including all + optional extensions. In addition to the basic instruction set, the assembler can be told to accept, or restrict, various extension mnemonics that @@ -6855,10 +6856,11 @@ `cortex-a9', `cortex-a15', `cortex-r4', `cortex-r4f', `cortex-r5', `cortex-r7', `cortex-m4', `cortex-m3', `cortex-m1', `cortex-m0', `cortex-m0plus', `ep9312' (ARM920 with Cirrus Maverick - coprocessor), `i80200' (Intel XScale processor) `iwmmxt' (Intel(r) - XScale processor with Wireless MMX(tm) technology coprocessor) and - `xscale'. The special name `all' may be used to allow the - assembler to accept instructions valid for any ARM processor. + coprocessor), `exynos-m1', `i80200' (Intel XScale processor) + `iwmmxt' (Intel(r) XScale processor with Wireless MMX(tm) + technology coprocessor) and `xscale'. The special name `all' may + be used to allow the assembler to accept instructions valid for + any ARM processor. In addition to the basic instruction set, the assembler can be told to accept various extension mnemonics that extend the @@ -16193,6 +16195,9 @@ `-m750cl' Generate code for PowerPC 750CL. +`-m821, -m850, -m860' + Generate code for PowerPC 821/850/860. + `-mppc64, -m620' Generate code for PowerPC 620/625/630. @@ -23616,7 +23621,7 @@ * --enforce-aligned-data: Sparc-Aligned-Data. (line 11) * --fatal-warnings: W. (line 16) * --fdpic: SH Options. (line 31) -* --fix-v4bx command line option, ARM: ARM Options. (line 173) +* --fix-v4bx command line option, ARM: ARM Options. (line 174) * --fixed-special-register-names command line option, MMIX: MMIX-Opts. (line 8) * --force-long-branches: M68HC11-Opts. (line 82) @@ -23711,16 +23716,16 @@ * -D: D. (line 6) * -D, ignored on VAX: VAX-Opts. (line 11) * -d, VAX option: VAX-Opts. (line 16) -* -eabi= command line option, ARM: ARM Options. (line 156) +* -eabi= command line option, ARM: ARM Options. (line 157) * -EB command line option, AArch64: AArch64 Options. (line 6) * -EB command line option, ARC: ARC Options. (line 31) -* -EB command line option, ARM: ARM Options. (line 161) +* -EB command line option, ARM: ARM Options. (line 162) * -EB option (MIPS): MIPS Options. (line 13) * -EB option, M32R: M32R-Opts. (line 39) * -EB option, TILE-Gx: TILE-Gx Options. (line 11) * -EL command line option, AArch64: AArch64 Options. (line 10) * -EL command line option, ARC: ARC Options. (line 35) -* -EL command line option, ARM: ARM Options. (line 165) +* -EL command line option, ARM: ARM Options. (line 166) * -EL option (MIPS): MIPS Options. (line 13) * -EL option, M32R: M32R-Opts. (line 32) * -EL option, TILE-Gx: TILE-Gx Options. (line 11) @@ -23736,7 +23741,7 @@ * -Ip option, M32RX: M32R-Opts. (line 97) * -J, ignored on VAX: VAX-Opts. (line 27) * -K: K. (line 6) -* -k command line option, ARM: ARM Options. (line 169) +* -k command line option, ARM: ARM Options. (line 170) * -KPIC option, M32R: M32R-Opts. (line 42) * -KPIC option, MIPS: MIPS Options. (line 21) * -L: L. (line 6) @@ -23799,19 +23804,19 @@ * -mall-enabled command line option, LM32: LM32 Options. (line 30) * -mall-extensions: PDP-11-Options. (line 26) * -mall-opcodes command line option, AVR: AVR Options. (line 109) -* -mapcs-26 command line option, ARM: ARM Options. (line 128) -* -mapcs-32 command line option, ARM: ARM Options. (line 128) -* -mapcs-float command line option, ARM: ARM Options. (line 142) -* -mapcs-reentrant command line option, ARM: ARM Options. (line 147) +* -mapcs-26 command line option, ARM: ARM Options. (line 129) +* -mapcs-32 command line option, ARM: ARM Options. (line 129) +* -mapcs-float command line option, ARM: ARM Options. (line 143) +* -mapcs-reentrant command line option, ARM: ARM Options. (line 148) * -marc[5|6|7|8] command line option, ARC: ARC Options. (line 6) -* -march= command line option, AArch64: AArch64 Options. (line 37) -* -march= command line option, ARM: ARM Options. (line 65) +* -march= command line option, AArch64: AArch64 Options. (line 38) +* -march= command line option, ARM: ARM Options. (line 66) * -march= command line option, M680x0: M68K-Opts. (line 8) * -march= command line option, TIC6X: TIC6X Options. (line 6) * -march= option, i386: i386-Options. (line 31) * -march= option, s390: s390 Options. (line 25) * -march= option, x86-64: i386-Options. (line 31) -* -matpcs command line option, ARM: ARM Options. (line 134) +* -matpcs command line option, ARM: ARM Options. (line 135) * -mavxscalar= option, i386: i386-Options. (line 84) * -mavxscalar= option, x86-64: i386-Options. (line 84) * -mbarrel-shift-enabled command line option, LM32: LM32 Options. @@ -23819,7 +23824,7 @@ * -mbig-endian: RX-Opts. (line 20) * -mbig-obj option, x86-64: i386-Options. (line 131) * -mbreak-enabled command line option, LM32: LM32 Options. (line 27) -* -mccs command line option, ARM: ARM Options. (line 182) +* -mccs command line option, ARM: ARM Options. (line 183) * -mcis: PDP-11-Options. (line 32) * -mconstant-gp command line option, IA-64: IA-64 Options. (line 6) * -mCPU command line option, Alpha: Alpha Options. (line 6) @@ -23852,15 +23857,15 @@ * -mfar-mode option, far-mode: TIC54X-Opts. (line 8) * -mfdpic command line option, Blackfin: Blackfin Options. (line 19) * -mfis: PDP-11-Options. (line 51) -* -mfloat-abi= command line option, ARM: ARM Options. (line 151) +* -mfloat-abi= command line option, ARM: ARM Options. (line 152) * -mfp-11: PDP-11-Options. (line 56) * -mfpp: PDP-11-Options. (line 56) * -mfpu: PDP-11-Options. (line 56) -* -mfpu= command line option, ARM: ARM Options. (line 81) +* -mfpu= command line option, ARM: ARM Options. (line 82) * -mgcc-abi: RX-Opts. (line 63) * -mgcc-abi command line option, V850: V850 Options. (line 79) * -micache-enabled command line option, LM32: LM32 Options. (line 21) -* -mimplicit-it command line option, ARM: ARM Options. (line 112) +* -mimplicit-it command line option, ARM: ARM Options. (line 113) * -mint-register: RX-Opts. (line 57) * -mip2022 option, IP2K: IP2K-Opts. (line 14) * -mip2022ext option, IP2022: IP2K-Opts. (line 9) @@ -23919,7 +23924,7 @@ * -mno-spl: PDP-11-Options. (line 80) * -mno-sym32: MIPS Options. (line 280) * -mno-verbose-error command line option, AArch64: AArch64 Options. - (line 56) + (line 57) * -mno-wrap command line option, AVR: AVR Options. (line 115) * -mnopic command line option, Blackfin: Blackfin Options. (line 22) * -momit-lock-prefix= option, i386: i386-Options. (line 135) @@ -23949,8 +23954,8 @@ * -msyntax= option, i386: i386-Options. (line 115) * -msyntax= option, x86-64: i386-Options. (line 115) * -mt11: PDP-11-Options. (line 130) -* -mthumb command line option, ARM: ARM Options. (line 103) -* -mthumb-interwork command line option, ARM: ARM Options. (line 108) +* -mthumb command line option, ARM: ARM Options. (line 104) +* -mthumb-interwork command line option, ARM: ARM Options. (line 109) * -mtune= option, i386: i386-Options. (line 62) * -mtune= option, x86-64: i386-Options. (line 62) * -muse-conventional-section-names: RX-Opts. (line 33) @@ -23965,10 +23970,10 @@ * -mv850e2v4 command line option, V850: V850 Options. (line 63) * -mv850e3v5 command line option, V850: V850 Options. (line 66) * -mverbose-error command line option, AArch64: AArch64 Options. - (line 52) + (line 53) * -mvxworks-pic option, MIPS: MIPS Options. (line 26) * -mwarn-areg-zero option, s390: s390 Options. (line 38) -* -mwarn-deprecated command line option, ARM: ARM Options. (line 177) +* -mwarn-deprecated command line option, ARM: ARM Options. (line 178) * -mzarch option, s390: s390 Options. (line 17) * -N command line option, CRIS: CRIS-Opts. (line 58) * -nIp option, M32RX: M32R-Opts. (line 101) @@ -25488,7 +25493,7 @@ * PDP-11 line separator: PDP-11-Syntax. (line 19) * PDP-11 support: PDP-11-Dependent. (line 6) * PDP-11 syntax: PDP-11-Syntax. (line 6) -* PIC code generation for ARM: ARM Options. (line 169) +* PIC code generation for ARM: ARM Options. (line 170) * PIC code generation for M32R: M32R-Opts. (line 42) * PIC selection, MIPS: MIPS Options. (line 21) * PJ endianness: Overview. (line 667) @@ -26120,643 +26125,643 @@  Tag Table: Node: Top739 -Node: Overview1725 -Node: Manual36226 -Node: GNU Assembler37170 -Node: Object Formats38341 -Node: Command Line38793 -Node: Input Files39880 -Node: Object41861 -Node: Errors42757 -Node: Invoking43952 -Node: a45907 -Node: alternate47818 -Node: D47990 -Node: f48223 -Node: I48731 -Node: K49275 -Node: L49579 -Node: listing50318 -Node: M51977 -Node: MD56378 -Node: o56804 -Node: R57259 -Node: statistics58289 -Node: traditional-format58696 -Node: v59169 -Node: W59444 -Node: Z60351 -Node: Syntax60873 -Node: Preprocessing61465 -Node: Whitespace63028 -Node: Comments63424 -Node: Symbol Intro65435 -Node: Statements66162 -Node: Constants68151 -Node: Characters68782 -Node: Strings69284 -Node: Chars71450 -Node: Numbers72204 -Node: Integers72744 -Node: Bignums73400 -Node: Flonums73756 -Node: Sections75503 -Node: Secs Background75881 -Node: Ld Sections80920 -Node: As Sections83304 -Node: Sub-Sections84214 -Node: bss87359 -Node: Symbols88309 -Node: Labels88957 -Node: Setting Symbols89688 -Node: Symbol Names90242 -Node: Dot95533 -Node: Symbol Attributes95980 -Node: Symbol Value96717 -Node: Symbol Type97762 -Node: a.out Symbols98150 -Node: Symbol Desc98412 -Node: Symbol Other98707 -Node: COFF Symbols98876 -Node: SOM Symbols99549 -Node: Expressions99991 -Node: Empty Exprs100740 -Node: Integer Exprs101087 -Node: Arguments101482 -Node: Operators102588 -Node: Prefix Ops102923 -Node: Infix Ops103251 -Node: Pseudo Ops105641 -Node: Abort111265 -Node: ABORT (COFF)111677 -Node: Align111885 -Node: Altmacro114167 -Node: Ascii115496 -Node: Asciz115805 -Node: Balign116050 -Node: Bundle directives117926 -Node: Byte120855 -Node: CFI directives121116 -Node: Comm126745 -Ref: Comm-Footnote-1128346 -Node: Data128708 -Node: Def129025 -Node: Desc129257 -Node: Dim129757 -Node: Double130014 -Node: Eject130352 -Node: Else130527 -Node: Elseif130827 -Node: End131121 -Node: Endef131336 -Node: Endfunc131513 -Node: Endif131688 -Node: Equ131949 -Node: Equiv132463 -Node: Eqv133019 -Node: Err133383 -Node: Error133694 -Node: Exitm134139 -Node: Extern134308 -Node: Fail134569 -Node: File135014 -Node: Fill136343 -Node: Float137307 -Node: Func137649 -Node: Global138239 -Node: Gnu_attribute138996 -Node: Hidden139221 -Node: hword139807 -Node: Ident140135 -Node: If140709 -Node: Incbin143768 -Node: Include144463 -Node: Int145014 -Node: Internal145395 -Node: Irp146043 -Node: Irpc146922 -Node: Lcomm147839 -Node: Lflags148587 -Node: Line148781 -Node: Linkonce149694 -Node: List150923 -Node: Ln151531 -Node: Loc151681 -Node: Loc_mark_labels153067 -Node: Local153551 -Node: Long154163 -Node: Macro154341 -Node: MRI160263 -Node: Noaltmacro160601 -Node: Nolist160770 -Node: Octa161200 -Node: Offset161537 -Node: Org161864 -Node: P2align163149 -Node: PopSection165077 -Node: Previous165585 -Node: Print166998 -Node: Protected167227 -Node: Psize167874 -Node: Purgem168558 -Node: PushSection168779 -Node: Quad169522 -Node: Reloc169978 -Node: Rept170739 -Node: Sbttl171153 -Node: Scl171518 -Node: Section171859 -Node: Set178013 -Node: Short178586 -Node: Single178909 -Node: Size179256 -Node: Skip179930 -Node: Sleb128180254 -Node: Space180578 -Node: Stab181219 -Node: String183223 -Node: Struct184217 -Node: SubSection184942 -Node: Symver185505 -Node: Tag187898 -Node: Text188280 -Node: Title188601 -Node: Type188982 -Node: Uleb128191295 -Node: Val191619 -Node: Version191869 -Node: VTableEntry192144 -Node: VTableInherit192434 -Node: Warning192884 -Node: Weak193118 -Node: Weakref193787 -Node: Word194752 -Node: Deprecated196598 -Node: Object Attributes196833 -Node: GNU Object Attributes198553 -Node: Defining New Object Attributes201780 -Node: Machine Dependencies202577 -Node: AArch64-Dependent206470 -Node: AArch64 Options206952 -Node: AArch64 Extensions209419 -Node: AArch64 Syntax210887 -Node: AArch64-Chars211187 -Node: AArch64-Regs211673 -Node: AArch64-Relocations211967 -Node: AArch64 Floating Point213041 -Node: AArch64 Directives213266 -Node: AArch64 Opcodes214811 -Node: AArch64 Mapping Symbols215489 -Node: Alpha-Dependent215871 -Node: Alpha Notes216311 -Node: Alpha Options216592 -Node: Alpha Syntax219067 -Node: Alpha-Chars219536 -Node: Alpha-Regs219948 -Node: Alpha-Relocs220335 -Node: Alpha Floating Point226593 -Node: Alpha Directives226815 -Node: Alpha Opcodes232338 -Node: ARC-Dependent232633 -Node: ARC Options233016 -Node: ARC Syntax234085 -Node: ARC-Chars234317 -Node: ARC-Regs234798 -Node: ARC Floating Point234922 -Node: ARC Directives235233 -Node: ARC Opcodes241198 -Node: ARM-Dependent241424 -Node: ARM Options241889 -Node: ARM Syntax250813 -Node: ARM-Instruction-Set251181 -Node: ARM-Chars252401 -Node: ARM-Regs253112 -Node: ARM-Relocations253321 -Node: ARM-Neon-Alignment254455 -Node: ARM Floating Point254919 -Node: ARM Directives255118 -Ref: arm_fnend259566 -Ref: arm_fnstart259890 -Ref: arm_pad262298 -Ref: arm_save262900 -Ref: arm_setfp263601 -Node: ARM Opcodes266893 -Node: ARM Mapping Symbols268981 -Node: ARM Unwinding Tutorial269791 -Node: AVR-Dependent275993 -Node: AVR Options276283 -Node: AVR Syntax282004 -Node: AVR-Chars282291 -Node: AVR-Regs282850 -Node: AVR-Modifiers283429 -Node: AVR Opcodes285489 -Node: Blackfin-Dependent290735 -Node: Blackfin Options291047 -Node: Blackfin Syntax292021 -Node: Blackfin Directives298228 -Node: CR16-Dependent298974 -Node: CR16 Operand Qualifiers299274 -Node: CR16 Syntax302003 -Node: CR16-Chars302189 -Node: CRIS-Dependent302726 -Node: CRIS-Opts303072 -Ref: march-option304758 -Node: CRIS-Expand306575 -Node: CRIS-Symbols307758 -Node: CRIS-Syntax308927 -Node: CRIS-Chars309263 -Node: CRIS-Pic309814 -Ref: crispic310010 -Node: CRIS-Regs313550 -Node: CRIS-Pseudos313967 -Ref: crisnous314743 -Node: D10V-Dependent316025 -Node: D10V-Opts316376 -Node: D10V-Syntax317338 -Node: D10V-Size317867 -Node: D10V-Subs318840 -Node: D10V-Chars319875 -Node: D10V-Regs321787 -Node: D10V-Addressing322832 -Node: D10V-Word323518 -Node: D10V-Float324033 -Node: D10V-Opcodes324344 -Node: D30V-Dependent324737 -Node: D30V-Opts325094 -Node: D30V-Syntax325771 -Node: D30V-Size326305 -Node: D30V-Subs327278 -Node: D30V-Chars328315 -Node: D30V-Guarded330923 -Node: D30V-Regs331605 -Node: D30V-Addressing332746 -Node: D30V-Float333416 -Node: D30V-Opcodes333729 -Node: Epiphany-Dependent334124 -Node: Epiphany Options334412 -Node: Epiphany Syntax334811 -Node: Epiphany-Chars335012 -Node: H8/300-Dependent335566 -Node: H8/300 Options335982 -Node: H8/300 Syntax336249 -Node: H8/300-Chars336550 -Node: H8/300-Regs336849 -Node: H8/300-Addressing337768 -Node: H8/300 Floating Point338809 -Node: H8/300 Directives339136 -Node: H8/300 Opcodes340264 -Node: HPPA-Dependent348586 -Node: HPPA Notes349021 -Node: HPPA Options349779 -Node: HPPA Syntax349974 -Node: HPPA Floating Point351244 -Node: HPPA Directives351450 -Node: HPPA Opcodes360136 -Node: ESA/390-Dependent360395 -Node: ESA/390 Notes360855 -Node: ESA/390 Options361646 -Node: ESA/390 Syntax361856 -Node: ESA/390 Floating Point364029 -Node: ESA/390 Directives364308 -Node: ESA/390 Opcodes367597 -Node: i386-Dependent367859 -Node: i386-Options369189 -Node: i386-Directives375839 -Node: i386-Syntax376577 -Node: i386-Variations376882 -Node: i386-Chars379423 -Node: i386-Mnemonics380152 -Node: i386-Regs383463 -Node: i386-Prefixes385508 -Node: i386-Memory388268 -Node: i386-Jumps391205 -Node: i386-Float392326 -Node: i386-SIMD394157 -Node: i386-LWP395266 -Node: i386-BMI396100 -Node: i386-TBM396478 -Node: i386-16bit397008 -Node: i386-Bugs399079 -Node: i386-Arch399833 -Node: i386-Notes402943 -Node: i860-Dependent403801 -Node: Notes-i860404241 -Node: Options-i860405146 -Node: Directives-i860406509 -Node: Opcodes for i860407578 -Node: Syntax of i860409768 -Node: i860-Chars409952 -Node: i960-Dependent410511 -Node: Options-i960410958 -Node: Floating Point-i960414843 -Node: Directives-i960415111 -Node: Opcodes for i960417145 -Node: callj-i960417785 -Node: Compare-and-branch-i960418274 -Node: Syntax of i960420178 -Node: i960-Chars420378 -Node: IA-64-Dependent420921 -Node: IA-64 Options421222 -Node: IA-64 Syntax424373 -Node: IA-64-Chars424779 -Node: IA-64-Regs425009 -Node: IA-64-Bits425935 -Node: IA-64-Relocs426465 -Node: IA-64 Opcodes426937 -Node: IP2K-Dependent427209 -Node: IP2K-Opts427481 -Node: IP2K-Syntax427981 -Node: IP2K-Chars428155 -Node: LM32-Dependent428698 -Node: LM32 Options428993 -Node: LM32 Syntax429627 -Node: LM32-Regs429923 -Node: LM32-Modifiers430882 -Node: LM32-Chars432257 -Node: LM32 Opcodes432765 -Node: M32C-Dependent433069 -Node: M32C-Opts433578 -Node: M32C-Syntax433998 -Node: M32C-Modifiers434233 -Node: M32C-Chars436022 -Node: M32R-Dependent436588 -Node: M32R-Opts436909 -Node: M32R-Directives441072 -Node: M32R-Warnings445047 -Node: M68K-Dependent448053 -Node: M68K-Opts448520 -Node: M68K-Syntax455893 -Node: M68K-Moto-Syntax457733 -Node: M68K-Float460323 -Node: M68K-Directives460843 -Node: M68K-opcodes462171 -Node: M68K-Branch462397 -Node: M68K-Chars466595 -Node: M68HC11-Dependent467458 -Node: M68HC11-Opts467989 -Node: M68HC11-Syntax472294 -Node: M68HC11-Modifiers475085 -Node: M68HC11-Directives476913 -Node: M68HC11-Float478289 -Node: M68HC11-opcodes478817 -Node: M68HC11-Branch478999 -Node: Meta-Dependent481448 -Node: Meta Options481733 -Node: Meta Syntax482395 -Node: Meta-Chars482607 -Node: Meta-Regs482907 -Node: MicroBlaze-Dependent483183 -Node: MicroBlaze Directives483872 -Node: MicroBlaze Syntax485255 -Node: MicroBlaze-Chars485487 -Node: MIPS-Dependent486039 -Node: MIPS Options487476 -Node: MIPS Macros502130 -Ref: MIPS Macros-Footnote-1504844 -Node: MIPS Symbol Sizes504987 -Node: MIPS Small Data506659 -Node: MIPS ISA508822 -Node: MIPS assembly options510607 -Node: MIPS autoextend511740 -Node: MIPS insn512474 -Node: MIPS FP ABIs513754 -Node: MIPS FP ABI History514206 -Node: MIPS FP ABI Variants514966 -Node: MIPS FP ABI Selection517520 -Node: MIPS FP ABI Compatibility518584 -Node: MIPS NaN Encodings519394 -Node: MIPS Option Stack521357 -Node: MIPS ASE Instruction Generation Overrides522142 -Node: MIPS Floating-Point524856 -Node: MIPS Syntax525762 -Node: MIPS-Chars526024 -Node: MMIX-Dependent526566 -Node: MMIX-Opts526946 -Node: MMIX-Expand530550 -Node: MMIX-Syntax531865 -Ref: mmixsite532222 -Node: MMIX-Chars533063 -Node: MMIX-Symbols533937 -Node: MMIX-Regs536005 -Node: MMIX-Pseudos537030 -Ref: MMIX-loc537171 -Ref: MMIX-local538251 -Ref: MMIX-is538783 -Ref: MMIX-greg539054 -Ref: GREG-base539973 -Ref: MMIX-byte541290 -Ref: MMIX-constants541761 -Ref: MMIX-prefix542407 -Ref: MMIX-spec542781 -Node: MMIX-mmixal543115 -Node: MSP430-Dependent546613 -Node: MSP430 Options547082 -Node: MSP430 Syntax549045 -Node: MSP430-Macros549361 -Node: MSP430-Chars550092 -Node: MSP430-Regs550807 -Node: MSP430-Ext551367 -Node: MSP430 Floating Point553188 -Node: MSP430 Directives553412 -Node: MSP430 Opcodes554733 -Node: MSP430 Profiling Capability555128 -Node: NDS32-Dependent557457 -Node: NDS32 Options558069 -Node: NDS32 Syntax559970 -Node: NDS32-Chars560238 -Node: NDS32-Regs560705 -Node: NDS32-Ops561559 -Node: NiosII-Dependent565154 -Node: Nios II Options565573 -Node: Nios II Syntax566494 -Node: Nios II Chars566700 -Node: Nios II Relocations566891 -Node: Nios II Directives568463 -Node: Nios II Opcodes570026 -Node: NS32K-Dependent570301 -Node: NS32K Syntax570524 -Node: NS32K-Chars570673 -Node: PDP-11-Dependent571413 -Node: PDP-11-Options571802 -Node: PDP-11-Pseudos576873 -Node: PDP-11-Syntax577218 -Node: PDP-11-Mnemonics578050 -Node: PDP-11-Synthetic578352 -Node: PJ-Dependent578570 -Node: PJ Options578833 -Node: PJ Syntax579128 -Node: PJ-Chars579293 -Node: PPC-Dependent579842 -Node: PowerPC-Opts580175 -Node: PowerPC-Pseudo583671 -Node: PowerPC-Syntax584293 -Node: PowerPC-Chars584483 -Node: RL78-Dependent585234 -Node: RL78-Opts585632 -Node: RL78-Modifiers586171 -Node: RL78-Directives586947 -Node: RL78-Syntax587552 -Node: RL78-Chars587748 -Node: RX-Dependent588304 -Node: RX-Opts588735 -Node: RX-Modifiers592142 -Node: RX-Directives593246 -Node: RX-Float593986 -Node: RX-Syntax594627 -Node: RX-Chars594806 -Node: S/390-Dependent595358 -Node: s390 Options596074 -Node: s390 Characters597620 -Node: s390 Syntax598141 -Node: s390 Register599042 -Node: s390 Mnemonics599855 -Node: s390 Operands602875 -Node: s390 Formats605494 -Node: s390 Aliases613365 -Node: s390 Operand Modifier617262 -Node: s390 Instruction Marker621063 -Node: s390 Literal Pool Entries622079 -Node: s390 Directives624002 -Node: s390 Floating Point629058 -Node: SCORE-Dependent629504 -Node: SCORE-Opts629809 -Node: SCORE-Pseudo631097 -Node: SCORE-Syntax633174 -Node: SCORE-Chars633356 -Node: SH-Dependent633914 -Node: SH Options634325 -Node: SH Syntax635380 -Node: SH-Chars635653 -Node: SH-Regs636196 -Node: SH-Addressing636810 -Node: SH Floating Point637719 -Node: SH Directives638813 -Node: SH Opcodes639214 -Node: SH64-Dependent643536 -Node: SH64 Options643899 -Node: SH64 Syntax645696 -Node: SH64-Chars645979 -Node: SH64-Regs646528 -Node: SH64-Addressing647624 -Node: SH64 Directives648807 -Node: SH64 Opcodes649792 -Node: Sparc-Dependent650508 -Node: Sparc-Opts650920 -Node: Sparc-Aligned-Data655934 -Node: Sparc-Syntax656766 -Node: Sparc-Chars657340 -Node: Sparc-Regs657903 -Node: Sparc-Constants663204 -Node: Sparc-Relocs667964 -Node: Sparc-Size-Translations673100 -Node: Sparc-Float674749 -Node: Sparc-Directives674944 -Node: TIC54X-Dependent676904 -Node: TIC54X-Opts677667 -Node: TIC54X-Block678710 -Node: TIC54X-Env679070 -Node: TIC54X-Constants679418 -Node: TIC54X-Subsyms679820 -Node: TIC54X-Locals681729 -Node: TIC54X-Builtins682473 -Node: TIC54X-Ext684944 -Node: TIC54X-Directives685515 -Node: TIC54X-Macros696416 -Node: TIC54X-MMRegs698527 -Node: TIC54X-Syntax698765 -Node: TIC54X-Chars698955 -Node: TIC6X-Dependent699646 -Node: TIC6X Options699949 -Node: TIC6X Syntax701950 -Node: TIC6X Directives703052 -Node: TILE-Gx-Dependent705337 -Node: TILE-Gx Options705647 -Node: TILE-Gx Syntax705997 -Node: TILE-Gx Opcodes708231 -Node: TILE-Gx Registers708519 -Node: TILE-Gx Modifiers709291 -Node: TILE-Gx Directives714263 -Node: TILEPro-Dependent715167 -Node: TILEPro Options715476 -Node: TILEPro Syntax715660 -Node: TILEPro Opcodes717894 -Node: TILEPro Registers718185 -Node: TILEPro Modifiers718955 -Node: TILEPro Directives723720 -Node: Z80-Dependent724624 -Node: Z80 Options725012 -Node: Z80 Syntax726435 -Node: Z80-Chars727107 -Node: Z80-Regs727957 -Node: Z80-Case728309 -Node: Z80 Floating Point728754 -Node: Z80 Directives728948 -Node: Z80 Opcodes730573 -Node: Z8000-Dependent731917 -Node: Z8000 Options732878 -Node: Z8000 Syntax733095 -Node: Z8000-Chars733385 -Node: Z8000-Regs733867 -Node: Z8000-Addressing734657 -Node: Z8000 Directives735774 -Node: Z8000 Opcodes737383 -Node: Vax-Dependent747325 -Node: VAX-Opts747885 -Node: VAX-float751620 -Node: VAX-directives752252 -Node: VAX-opcodes753113 -Node: VAX-branch753502 -Node: VAX-operands756009 -Node: VAX-no756772 -Node: VAX-Syntax757028 -Node: VAX-Chars757194 -Node: V850-Dependent757748 -Node: V850 Options758146 -Node: V850 Syntax761792 -Node: V850-Chars762032 -Node: V850-Regs762576 -Node: V850 Floating Point764144 -Node: V850 Directives764350 -Node: V850 Opcodes766417 -Node: XGATE-Dependent772309 -Node: XGATE-Opts772729 -Node: XGATE-Syntax773720 -Node: XGATE-Directives775799 -Node: XGATE-Float776038 -Node: XGATE-opcodes776535 -Node: XSTORMY16-Dependent776647 -Node: XStormy16 Syntax776993 -Node: XStormy16-Chars777183 -Node: XStormy16 Directives777796 -Node: XStormy16 Opcodes778451 -Node: Xtensa-Dependent779507 -Node: Xtensa Options780241 -Node: Xtensa Syntax783395 -Node: Xtensa Opcodes785539 -Node: Xtensa Registers787333 -Node: Xtensa Optimizations787966 -Node: Density Instructions788418 -Node: Xtensa Automatic Alignment789520 -Node: Xtensa Relaxation791967 -Node: Xtensa Branch Relaxation792932 -Node: Xtensa Call Relaxation794304 -Node: Xtensa Jump Relaxation796085 -Node: Xtensa Immediate Relaxation798185 -Node: Xtensa Directives800759 -Node: Schedule Directive802468 -Node: Longcalls Directive802808 -Node: Transform Directive803352 -Node: Literal Directive804094 -Ref: Literal Directive-Footnote-1807633 -Node: Literal Position Directive807775 -Node: Literal Prefix Directive809474 -Node: Absolute Literals Directive810372 -Node: Reporting Bugs811679 -Node: Bug Criteria812405 -Node: Bug Reporting813172 -Node: Acknowledgements819821 -Ref: Acknowledgements-Footnote-1824786 -Node: GNU Free Documentation License824812 -Node: AS Index849981 +Node: Overview1727 +Node: Manual36228 +Node: GNU Assembler37172 +Node: Object Formats38343 +Node: Command Line38795 +Node: Input Files39882 +Node: Object41863 +Node: Errors42759 +Node: Invoking43954 +Node: a45909 +Node: alternate47820 +Node: D47992 +Node: f48225 +Node: I48733 +Node: K49277 +Node: L49581 +Node: listing50320 +Node: M51979 +Node: MD56380 +Node: o56806 +Node: R57261 +Node: statistics58291 +Node: traditional-format58698 +Node: v59171 +Node: W59446 +Node: Z60353 +Node: Syntax60875 +Node: Preprocessing61467 +Node: Whitespace63030 +Node: Comments63426 +Node: Symbol Intro65437 +Node: Statements66164 +Node: Constants68153 +Node: Characters68784 +Node: Strings69286 +Node: Chars71452 +Node: Numbers72206 +Node: Integers72746 +Node: Bignums73402 +Node: Flonums73758 +Node: Sections75505 +Node: Secs Background75883 +Node: Ld Sections80922 +Node: As Sections83306 +Node: Sub-Sections84216 +Node: bss87361 +Node: Symbols88311 +Node: Labels88959 +Node: Setting Symbols89690 +Node: Symbol Names90244 +Node: Dot95535 +Node: Symbol Attributes95982 +Node: Symbol Value96719 +Node: Symbol Type97764 +Node: a.out Symbols98152 +Node: Symbol Desc98414 +Node: Symbol Other98709 +Node: COFF Symbols98878 +Node: SOM Symbols99551 +Node: Expressions99993 +Node: Empty Exprs100742 +Node: Integer Exprs101089 +Node: Arguments101484 +Node: Operators102590 +Node: Prefix Ops102925 +Node: Infix Ops103253 +Node: Pseudo Ops105643 +Node: Abort111267 +Node: ABORT (COFF)111679 +Node: Align111887 +Node: Altmacro114169 +Node: Ascii115498 +Node: Asciz115807 +Node: Balign116052 +Node: Bundle directives117928 +Node: Byte120857 +Node: CFI directives121118 +Node: Comm126747 +Ref: Comm-Footnote-1128348 +Node: Data128710 +Node: Def129027 +Node: Desc129259 +Node: Dim129759 +Node: Double130016 +Node: Eject130354 +Node: Else130529 +Node: Elseif130829 +Node: End131123 +Node: Endef131338 +Node: Endfunc131515 +Node: Endif131690 +Node: Equ131951 +Node: Equiv132465 +Node: Eqv133021 +Node: Err133385 +Node: Error133696 +Node: Exitm134141 +Node: Extern134310 +Node: Fail134571 +Node: File135016 +Node: Fill136345 +Node: Float137309 +Node: Func137651 +Node: Global138241 +Node: Gnu_attribute138998 +Node: Hidden139223 +Node: hword139809 +Node: Ident140137 +Node: If140711 +Node: Incbin143770 +Node: Include144465 +Node: Int145016 +Node: Internal145397 +Node: Irp146045 +Node: Irpc146924 +Node: Lcomm147841 +Node: Lflags148589 +Node: Line148783 +Node: Linkonce149696 +Node: List150925 +Node: Ln151533 +Node: Loc151683 +Node: Loc_mark_labels153069 +Node: Local153553 +Node: Long154165 +Node: Macro154343 +Node: MRI160265 +Node: Noaltmacro160603 +Node: Nolist160772 +Node: Octa161202 +Node: Offset161539 +Node: Org161866 +Node: P2align163151 +Node: PopSection165079 +Node: Previous165587 +Node: Print167000 +Node: Protected167229 +Node: Psize167876 +Node: Purgem168560 +Node: PushSection168781 +Node: Quad169524 +Node: Reloc169980 +Node: Rept170741 +Node: Sbttl171155 +Node: Scl171520 +Node: Section171861 +Node: Set178015 +Node: Short178588 +Node: Single178911 +Node: Size179258 +Node: Skip179932 +Node: Sleb128180256 +Node: Space180580 +Node: Stab181221 +Node: String183225 +Node: Struct184219 +Node: SubSection184944 +Node: Symver185507 +Node: Tag187900 +Node: Text188282 +Node: Title188603 +Node: Type188984 +Node: Uleb128191297 +Node: Val191621 +Node: Version191871 +Node: VTableEntry192146 +Node: VTableInherit192436 +Node: Warning192886 +Node: Weak193120 +Node: Weakref193789 +Node: Word194754 +Node: Deprecated196600 +Node: Object Attributes196835 +Node: GNU Object Attributes198555 +Node: Defining New Object Attributes201782 +Node: Machine Dependencies202579 +Node: AArch64-Dependent206472 +Node: AArch64 Options206954 +Node: AArch64 Extensions209452 +Node: AArch64 Syntax210920 +Node: AArch64-Chars211220 +Node: AArch64-Regs211706 +Node: AArch64-Relocations212000 +Node: AArch64 Floating Point213074 +Node: AArch64 Directives213299 +Node: AArch64 Opcodes214844 +Node: AArch64 Mapping Symbols215522 +Node: Alpha-Dependent215904 +Node: Alpha Notes216344 +Node: Alpha Options216625 +Node: Alpha Syntax219100 +Node: Alpha-Chars219569 +Node: Alpha-Regs219981 +Node: Alpha-Relocs220368 +Node: Alpha Floating Point226626 +Node: Alpha Directives226848 +Node: Alpha Opcodes232371 +Node: ARC-Dependent232666 +Node: ARC Options233049 +Node: ARC Syntax234118 +Node: ARC-Chars234350 +Node: ARC-Regs234831 +Node: ARC Floating Point234955 +Node: ARC Directives235266 +Node: ARC Opcodes241231 +Node: ARM-Dependent241457 +Node: ARM Options241922 +Node: ARM Syntax250864 +Node: ARM-Instruction-Set251232 +Node: ARM-Chars252452 +Node: ARM-Regs253163 +Node: ARM-Relocations253372 +Node: ARM-Neon-Alignment254506 +Node: ARM Floating Point254970 +Node: ARM Directives255169 +Ref: arm_fnend259617 +Ref: arm_fnstart259941 +Ref: arm_pad262349 +Ref: arm_save262951 +Ref: arm_setfp263652 +Node: ARM Opcodes266944 +Node: ARM Mapping Symbols269032 +Node: ARM Unwinding Tutorial269842 +Node: AVR-Dependent276044 +Node: AVR Options276334 +Node: AVR Syntax282055 +Node: AVR-Chars282342 +Node: AVR-Regs282901 +Node: AVR-Modifiers283480 +Node: AVR Opcodes285540 +Node: Blackfin-Dependent290786 +Node: Blackfin Options291098 +Node: Blackfin Syntax292072 +Node: Blackfin Directives298279 +Node: CR16-Dependent299025 +Node: CR16 Operand Qualifiers299325 +Node: CR16 Syntax302054 +Node: CR16-Chars302240 +Node: CRIS-Dependent302777 +Node: CRIS-Opts303123 +Ref: march-option304809 +Node: CRIS-Expand306626 +Node: CRIS-Symbols307809 +Node: CRIS-Syntax308978 +Node: CRIS-Chars309314 +Node: CRIS-Pic309865 +Ref: crispic310061 +Node: CRIS-Regs313601 +Node: CRIS-Pseudos314018 +Ref: crisnous314794 +Node: D10V-Dependent316076 +Node: D10V-Opts316427 +Node: D10V-Syntax317389 +Node: D10V-Size317918 +Node: D10V-Subs318891 +Node: D10V-Chars319926 +Node: D10V-Regs321838 +Node: D10V-Addressing322883 +Node: D10V-Word323569 +Node: D10V-Float324084 +Node: D10V-Opcodes324395 +Node: D30V-Dependent324788 +Node: D30V-Opts325145 +Node: D30V-Syntax325822 +Node: D30V-Size326356 +Node: D30V-Subs327329 +Node: D30V-Chars328366 +Node: D30V-Guarded330974 +Node: D30V-Regs331656 +Node: D30V-Addressing332797 +Node: D30V-Float333467 +Node: D30V-Opcodes333780 +Node: Epiphany-Dependent334175 +Node: Epiphany Options334463 +Node: Epiphany Syntax334862 +Node: Epiphany-Chars335063 +Node: H8/300-Dependent335617 +Node: H8/300 Options336033 +Node: H8/300 Syntax336300 +Node: H8/300-Chars336601 +Node: H8/300-Regs336900 +Node: H8/300-Addressing337819 +Node: H8/300 Floating Point338860 +Node: H8/300 Directives339187 +Node: H8/300 Opcodes340315 +Node: HPPA-Dependent348637 +Node: HPPA Notes349072 +Node: HPPA Options349830 +Node: HPPA Syntax350025 +Node: HPPA Floating Point351295 +Node: HPPA Directives351501 +Node: HPPA Opcodes360187 +Node: ESA/390-Dependent360446 +Node: ESA/390 Notes360906 +Node: ESA/390 Options361697 +Node: ESA/390 Syntax361907 +Node: ESA/390 Floating Point364080 +Node: ESA/390 Directives364359 +Node: ESA/390 Opcodes367648 +Node: i386-Dependent367910 +Node: i386-Options369240 +Node: i386-Directives375890 +Node: i386-Syntax376628 +Node: i386-Variations376933 +Node: i386-Chars379474 +Node: i386-Mnemonics380203 +Node: i386-Regs383514 +Node: i386-Prefixes385559 +Node: i386-Memory388319 +Node: i386-Jumps391256 +Node: i386-Float392377 +Node: i386-SIMD394208 +Node: i386-LWP395317 +Node: i386-BMI396151 +Node: i386-TBM396529 +Node: i386-16bit397059 +Node: i386-Bugs399130 +Node: i386-Arch399884 +Node: i386-Notes402994 +Node: i860-Dependent403852 +Node: Notes-i860404292 +Node: Options-i860405197 +Node: Directives-i860406560 +Node: Opcodes for i860407629 +Node: Syntax of i860409819 +Node: i860-Chars410003 +Node: i960-Dependent410562 +Node: Options-i960411009 +Node: Floating Point-i960414894 +Node: Directives-i960415162 +Node: Opcodes for i960417196 +Node: callj-i960417836 +Node: Compare-and-branch-i960418325 +Node: Syntax of i960420229 +Node: i960-Chars420429 +Node: IA-64-Dependent420972 +Node: IA-64 Options421273 +Node: IA-64 Syntax424424 +Node: IA-64-Chars424830 +Node: IA-64-Regs425060 +Node: IA-64-Bits425986 +Node: IA-64-Relocs426516 +Node: IA-64 Opcodes426988 +Node: IP2K-Dependent427260 +Node: IP2K-Opts427532 +Node: IP2K-Syntax428032 +Node: IP2K-Chars428206 +Node: LM32-Dependent428749 +Node: LM32 Options429044 +Node: LM32 Syntax429678 +Node: LM32-Regs429974 +Node: LM32-Modifiers430933 +Node: LM32-Chars432308 +Node: LM32 Opcodes432816 +Node: M32C-Dependent433120 +Node: M32C-Opts433629 +Node: M32C-Syntax434049 +Node: M32C-Modifiers434284 +Node: M32C-Chars436073 +Node: M32R-Dependent436639 +Node: M32R-Opts436960 +Node: M32R-Directives441123 +Node: M32R-Warnings445098 +Node: M68K-Dependent448104 +Node: M68K-Opts448571 +Node: M68K-Syntax455944 +Node: M68K-Moto-Syntax457784 +Node: M68K-Float460374 +Node: M68K-Directives460894 +Node: M68K-opcodes462222 +Node: M68K-Branch462448 +Node: M68K-Chars466646 +Node: M68HC11-Dependent467509 +Node: M68HC11-Opts468040 +Node: M68HC11-Syntax472345 +Node: M68HC11-Modifiers475136 +Node: M68HC11-Directives476964 +Node: M68HC11-Float478340 +Node: M68HC11-opcodes478868 +Node: M68HC11-Branch479050 +Node: Meta-Dependent481499 +Node: Meta Options481784 +Node: Meta Syntax482446 +Node: Meta-Chars482658 +Node: Meta-Regs482958 +Node: MicroBlaze-Dependent483234 +Node: MicroBlaze Directives483923 +Node: MicroBlaze Syntax485306 +Node: MicroBlaze-Chars485538 +Node: MIPS-Dependent486090 +Node: MIPS Options487527 +Node: MIPS Macros502181 +Ref: MIPS Macros-Footnote-1504895 +Node: MIPS Symbol Sizes505038 +Node: MIPS Small Data506710 +Node: MIPS ISA508873 +Node: MIPS assembly options510658 +Node: MIPS autoextend511791 +Node: MIPS insn512525 +Node: MIPS FP ABIs513805 +Node: MIPS FP ABI History514257 +Node: MIPS FP ABI Variants515017 +Node: MIPS FP ABI Selection517571 +Node: MIPS FP ABI Compatibility518635 +Node: MIPS NaN Encodings519445 +Node: MIPS Option Stack521408 +Node: MIPS ASE Instruction Generation Overrides522193 +Node: MIPS Floating-Point524907 +Node: MIPS Syntax525813 +Node: MIPS-Chars526075 +Node: MMIX-Dependent526617 +Node: MMIX-Opts526997 +Node: MMIX-Expand530601 +Node: MMIX-Syntax531916 +Ref: mmixsite532273 +Node: MMIX-Chars533114 +Node: MMIX-Symbols533988 +Node: MMIX-Regs536056 +Node: MMIX-Pseudos537081 +Ref: MMIX-loc537222 +Ref: MMIX-local538302 +Ref: MMIX-is538834 +Ref: MMIX-greg539105 +Ref: GREG-base540024 +Ref: MMIX-byte541341 +Ref: MMIX-constants541812 +Ref: MMIX-prefix542458 +Ref: MMIX-spec542832 +Node: MMIX-mmixal543166 +Node: MSP430-Dependent546664 +Node: MSP430 Options547133 +Node: MSP430 Syntax549096 +Node: MSP430-Macros549412 +Node: MSP430-Chars550143 +Node: MSP430-Regs550858 +Node: MSP430-Ext551418 +Node: MSP430 Floating Point553239 +Node: MSP430 Directives553463 +Node: MSP430 Opcodes554784 +Node: MSP430 Profiling Capability555179 +Node: NDS32-Dependent557508 +Node: NDS32 Options558120 +Node: NDS32 Syntax560021 +Node: NDS32-Chars560289 +Node: NDS32-Regs560756 +Node: NDS32-Ops561610 +Node: NiosII-Dependent565205 +Node: Nios II Options565624 +Node: Nios II Syntax566545 +Node: Nios II Chars566751 +Node: Nios II Relocations566942 +Node: Nios II Directives568514 +Node: Nios II Opcodes570077 +Node: NS32K-Dependent570352 +Node: NS32K Syntax570575 +Node: NS32K-Chars570724 +Node: PDP-11-Dependent571464 +Node: PDP-11-Options571853 +Node: PDP-11-Pseudos576924 +Node: PDP-11-Syntax577269 +Node: PDP-11-Mnemonics578101 +Node: PDP-11-Synthetic578403 +Node: PJ-Dependent578621 +Node: PJ Options578884 +Node: PJ Syntax579179 +Node: PJ-Chars579344 +Node: PPC-Dependent579893 +Node: PowerPC-Opts580226 +Node: PowerPC-Pseudo583789 +Node: PowerPC-Syntax584411 +Node: PowerPC-Chars584601 +Node: RL78-Dependent585352 +Node: RL78-Opts585750 +Node: RL78-Modifiers586289 +Node: RL78-Directives587065 +Node: RL78-Syntax587670 +Node: RL78-Chars587866 +Node: RX-Dependent588422 +Node: RX-Opts588853 +Node: RX-Modifiers592260 +Node: RX-Directives593364 +Node: RX-Float594104 +Node: RX-Syntax594745 +Node: RX-Chars594924 +Node: S/390-Dependent595476 +Node: s390 Options596192 +Node: s390 Characters597738 +Node: s390 Syntax598259 +Node: s390 Register599160 +Node: s390 Mnemonics599973 +Node: s390 Operands602993 +Node: s390 Formats605612 +Node: s390 Aliases613483 +Node: s390 Operand Modifier617380 +Node: s390 Instruction Marker621181 +Node: s390 Literal Pool Entries622197 +Node: s390 Directives624120 +Node: s390 Floating Point629176 +Node: SCORE-Dependent629622 +Node: SCORE-Opts629927 +Node: SCORE-Pseudo631215 +Node: SCORE-Syntax633292 +Node: SCORE-Chars633474 +Node: SH-Dependent634032 +Node: SH Options634443 +Node: SH Syntax635498 +Node: SH-Chars635771 +Node: SH-Regs636314 +Node: SH-Addressing636928 +Node: SH Floating Point637837 +Node: SH Directives638931 +Node: SH Opcodes639332 +Node: SH64-Dependent643654 +Node: SH64 Options644017 +Node: SH64 Syntax645814 +Node: SH64-Chars646097 +Node: SH64-Regs646646 +Node: SH64-Addressing647742 +Node: SH64 Directives648925 +Node: SH64 Opcodes649910 +Node: Sparc-Dependent650626 +Node: Sparc-Opts651038 +Node: Sparc-Aligned-Data656052 +Node: Sparc-Syntax656884 +Node: Sparc-Chars657458 +Node: Sparc-Regs658021 +Node: Sparc-Constants663322 +Node: Sparc-Relocs668082 +Node: Sparc-Size-Translations673218 +Node: Sparc-Float674867 +Node: Sparc-Directives675062 +Node: TIC54X-Dependent677022 +Node: TIC54X-Opts677785 +Node: TIC54X-Block678828 +Node: TIC54X-Env679188 +Node: TIC54X-Constants679536 +Node: TIC54X-Subsyms679938 +Node: TIC54X-Locals681847 +Node: TIC54X-Builtins682591 +Node: TIC54X-Ext685062 +Node: TIC54X-Directives685633 +Node: TIC54X-Macros696534 +Node: TIC54X-MMRegs698645 +Node: TIC54X-Syntax698883 +Node: TIC54X-Chars699073 +Node: TIC6X-Dependent699764 +Node: TIC6X Options700067 +Node: TIC6X Syntax702068 +Node: TIC6X Directives703170 +Node: TILE-Gx-Dependent705455 +Node: TILE-Gx Options705765 +Node: TILE-Gx Syntax706115 +Node: TILE-Gx Opcodes708349 +Node: TILE-Gx Registers708637 +Node: TILE-Gx Modifiers709409 +Node: TILE-Gx Directives714381 +Node: TILEPro-Dependent715285 +Node: TILEPro Options715594 +Node: TILEPro Syntax715778 +Node: TILEPro Opcodes718012 +Node: TILEPro Registers718303 +Node: TILEPro Modifiers719073 +Node: TILEPro Directives723838 +Node: Z80-Dependent724742 +Node: Z80 Options725130 +Node: Z80 Syntax726553 +Node: Z80-Chars727225 +Node: Z80-Regs728075 +Node: Z80-Case728427 +Node: Z80 Floating Point728872 +Node: Z80 Directives729066 +Node: Z80 Opcodes730691 +Node: Z8000-Dependent732035 +Node: Z8000 Options732996 +Node: Z8000 Syntax733213 +Node: Z8000-Chars733503 +Node: Z8000-Regs733985 +Node: Z8000-Addressing734775 +Node: Z8000 Directives735892 +Node: Z8000 Opcodes737501 +Node: Vax-Dependent747443 +Node: VAX-Opts748003 +Node: VAX-float751738 +Node: VAX-directives752370 +Node: VAX-opcodes753231 +Node: VAX-branch753620 +Node: VAX-operands756127 +Node: VAX-no756890 +Node: VAX-Syntax757146 +Node: VAX-Chars757312 +Node: V850-Dependent757866 +Node: V850 Options758264 +Node: V850 Syntax761910 +Node: V850-Chars762150 +Node: V850-Regs762694 +Node: V850 Floating Point764262 +Node: V850 Directives764468 +Node: V850 Opcodes766535 +Node: XGATE-Dependent772427 +Node: XGATE-Opts772847 +Node: XGATE-Syntax773838 +Node: XGATE-Directives775917 +Node: XGATE-Float776156 +Node: XGATE-opcodes776653 +Node: XSTORMY16-Dependent776765 +Node: XStormy16 Syntax777111 +Node: XStormy16-Chars777301 +Node: XStormy16 Directives777914 +Node: XStormy16 Opcodes778569 +Node: Xtensa-Dependent779625 +Node: Xtensa Options780359 +Node: Xtensa Syntax783513 +Node: Xtensa Opcodes785657 +Node: Xtensa Registers787451 +Node: Xtensa Optimizations788084 +Node: Density Instructions788536 +Node: Xtensa Automatic Alignment789638 +Node: Xtensa Relaxation792085 +Node: Xtensa Branch Relaxation793050 +Node: Xtensa Call Relaxation794422 +Node: Xtensa Jump Relaxation796203 +Node: Xtensa Immediate Relaxation798303 +Node: Xtensa Directives800877 +Node: Schedule Directive802586 +Node: Longcalls Directive802926 +Node: Transform Directive803470 +Node: Literal Directive804212 +Ref: Literal Directive-Footnote-1807751 +Node: Literal Position Directive807893 +Node: Literal Prefix Directive809592 +Node: Absolute Literals Directive810490 +Node: Reporting Bugs811797 +Node: Bug Criteria812523 +Node: Bug Reporting813290 +Node: Acknowledgements819939 +Ref: Acknowledgements-Footnote-1824904 +Node: GNU Free Documentation License824930 +Node: AS Index850099  End Tag Table diff -ruN binutils-2.25/gas/doc/c-aarch64.texi binutils-2.25.1/gas/doc/c-aarch64.texi --- binutils-2.25/gas/doc/c-aarch64.texi 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gas/doc/c-aarch64.texi 2015-07-21 10:20:58.000000000 +0200 @@ -57,6 +57,8 @@ on the target processor. The following processor names are recognized: @code{cortex-a53}, @code{cortex-a57}, +@code{cortex-a72}, +@code{exynos-m1}, @code{xgene1}, and @code{xgene2}. diff -ruN binutils-2.25/gas/doc/c-arm.texi binutils-2.25.1/gas/doc/c-arm.texi --- binutils-2.25/gas/doc/c-arm.texi 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/doc/c-arm.texi 2015-07-21 10:20:58.000000000 +0200 @@ -129,6 +129,7 @@ @code{cortex-m0}, @code{cortex-m0plus}, @code{ep9312} (ARM920 with Cirrus Maverick coprocessor), +@code{exynos-m1}, @code{i80200} (Intel XScale processor) @code{iwmmxt} (Intel(r) XScale processor with Wireless MMX(tm) technology coprocessor) and diff -ruN binutils-2.25/gas/doc/c-ppc.texi binutils-2.25.1/gas/doc/c-ppc.texi --- binutils-2.25/gas/doc/c-ppc.texi 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/doc/c-ppc.texi 2015-07-21 10:20:58.000000000 +0200 @@ -75,6 +75,9 @@ @item -m750cl Generate code for PowerPC 750CL. +@item -m821, -m850, -m860 +Generate code for PowerPC 821/850/860. + @item -mppc64, -m620 Generate code for PowerPC 620/625/630. diff -ruN binutils-2.25/gas/read.c binutils-2.25.1/gas/read.c --- binutils-2.25/gas/read.c 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/read.c 2015-07-21 10:20:58.000000000 +0200 @@ -1578,7 +1578,7 @@ /* Switch in and out of alternate macro mode. */ -void +static void s_altmacro (int on) { demand_empty_rest_of_line (); @@ -3983,7 +3983,7 @@ /* .reloc offset, reloc_name, symbol+addend. */ -void +static void s_reloc (int ignore ATTRIBUTE_UNUSED) { char *stop = NULL; diff -ruN binutils-2.25/gas/testsuite/ChangeLog binutils-2.25.1/gas/testsuite/ChangeLog --- binutils-2.25/gas/testsuite/ChangeLog 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/ChangeLog 2015-07-21 15:42:38.000000000 +0200 @@ -1,3 +1,155 @@ +2015-07-10 Alan Modra + + Apply from master + 2015-07-03 Alan Modra + * gas/ppc/titan.d: Correct mfmcsrr0 disassembly. + + 2015-06-22 Peter Bergner + * gas/ppc/e6500.s : Fix invalid test. + * gas/ppc/e6500.d: Likewise. + + 2015-06-19 Peter Bergner + * gas/ppc/power8.d: Fixup rfebb test results. + * gas/ppc/a2.s: Fix invalid mfcr test. + * gas/ppc/a2.d: Likewise. + + 2015-06-04 Peter Bergner + * gas/ppc/a2.d: Fixup test case due to new extended mnemonic. + * gas/ppc/power4.s : Add tests. + * gas/ppc/power4.d: Likewise. + +2015-06-19 Nick Clifton + + PR gas/18481 + * gas/arm/tls.s: Add tests of the tpoff pseudo with a local + symbol. + * gas/arm/tls.d: Update expected output. + +2015-06-17 Renlin Li + + Applied from master. + 2015-04-28 Renlin Li + + * gas/arm/thumb2_vpool_be.d: Adjust the desired output. + * gas/arm/vldconst_be.d: Likewise. + +2015-06-17 Renlin Li + + Applied from master. + 2015-05-05 Renlin Li + + * gas/aarch64/mapping_5.d: New. + * gas/aarch64/mapping_5.s: New. + * gas/aarch64/mapping_6.d: New. + * gas/aarch64/mapping_6.s: New. + +2015-06-16 Matthew Wahab + + Applied from master. + 2015-06-16 Matthew Wahab + + * sysreg.d: Add id_mmfr4_el1, update expected output. + * sysreg.s: Add id_mmfr4_el1. + +2015-06-04 Matthew Wahab + + * gas/aarch64/codealign.d: Add test for code section alignment. + * gas/aarch64/codealign.s: New file. + +2015-05-14 Peter Bergner + + Applied from master. + 2015-05-14 Peter Bergner + + * gas/ppc/power4.d: Add a slbia test. + * gas/ppc/power4.s: Likewise. + * gas/ppc/power6.d: Add slbia and tlbie tests. + * gas/ppc/power6.s: Likewise. + * gas/ppc/power7.d: Remove wait tests. Add a tlbie test. + * gas/ppc/power7.s: Likewise. + +2015-05-07 Renlin Li + + Applied from master. + 2015-03-10 Renlin Li + + * gas/aarch64/ldst-reg-uns-imm.d: Adjust expected output. + * gas/aarch64/ldst-reg-unscaled-imm.d: Likewise. + * gas/aarch64/reloc-insn.d: Likewise. + +2015-04-28 Peter Bergner + + Applied from master. + 2015-04-27 Peter Bergner + + * gas/ppc/a2.s: Fixup test case due to dcbt/dcbtst embedded operand + ordering change. + * gas/ppc/a2.d: Likewise. + * gas/ppc/476.d: Likewise. + * gas/ppc/booke.s: Remove invalid 3 operand dcbt tests. + * gas/ppc/booke.d: Likewise. + * gas/ppc/power7.s: Remove lbarx, lharx, stbcx., sthcx., waitrsv + and waitimpl tests. + * gas/ppc/power7.d: Likewise. + +2015-03-20 H.J. Lu + + Apply patch from master: + 2015-03-20 H.J. Lu + + * gas/i386/i386.exp: Don't run nops-1-bdver1, nops-1-bdver2, + nops-1-bdver3, nops-1-bdver4, nops-1-btver1 nops-1-btver2, + x86-64-nops-1-nocona, x86-64-nops-1-bdver1, x86-64-nops-1-bdver2, + x86-64-nops-1-bdver3, x86-64-nops-1-bdver4, x86-64-nops-1-btver1 + nor x86-64-nops-1-btver2. + * gas/i386/nops-1-core2.d: Updated. + * gas/i386/nops-1-k8.d: Likewise. + * gas/i386/nops-4a-i686.d: Likewise. + * gas/i386/nops-5-i686.d: Likewise. + * gas/i386/nops-5.d: Likewise. + * gas/i386/nops-6.d: Likewise. + * gas/i386/x86-64-nops-1-core2.d: Likewise. + * gas/i386/x86-64-nops-1-g64.d: Likewise. + * gas/i386/x86-64-nops-1-k8.d: Likewise. + * gas/i386/x86-64-nops-1.d: Likewise. + * gas/i386/x86-64-nops-2.d: Likewise. + * gas/i386/x86-64-nops-3.d: Likewise. + * gas/i386/x86-64-nops-4-core2.d: Likewise. + * gas/i386/x86-64-nops-4-k8.d: Likewise. + * gas/i386/x86-64-nops-4.d: Likewise. + * gas/i386/x86-64-nops-5-k8.d: Likewise. + * gas/i386/x86-64-nops-5.d: Likewise. + * gas/i386/ilp32/x86-64-nops-1-core2.d: Likewise. + * gas/i386/ilp32/x86-64-nops-1-k8.d: Likewise. + * gas/i386/ilp32/x86-64-nops-1.d: Likewise. + * gas/i386/ilp32/x86-64-nops-2.d: Likewise. + * gas/i386/ilp32/x86-64-nops-3.d: Likewise. + * gas/i386/ilp32/x86-64-nops-4-core2.d: Likewise. + * gas/i386/ilp32/x86-64-nops-4-k8.d: Likewise. + * gas/i386/ilp32/x86-64-nops-4.d: Likewise. + * gas/i386/ilp32/x86-64-nops-5-k8.d: Likewise. + * gas/i386/ilp32/x86-64-nops-5.d: Likewise. + * gas/i386/nops-1-bdver1.d: Removed. + * gas/i386/nops-1-bdver2.d: Likewise. + * gas/i386/nops-1-bdver3.d: Likewise. + * gas/i386/nops-1-bdver4.d: Likewise. + * gas/i386/nops-1-btver1.d: Likewise. + * gas/i386/nops-1-btver2.d: Likewise. + * gas/i386/x86-64-nops-1-bdver1.d: Likewise. + * gas/i386/x86-64-nops-1-bdver2.d: Likewise. + * gas/i386/x86-64-nops-1-bdver3.d: Likewise. + * gas/i386/x86-64-nops-1-bdver4.d: Likewise. + * gas/i386/x86-64-nops-1-btver1.d: Likewise. + * gas/i386/x86-64-nops-1-btver2.d: Likewise. + * gas/i386/x86-64-nops-1-nocona.d: Likewise. + * gas/i386/ilp32/x86-64-nops-1-nocona.d: Likewise. + +2015-01-28 Matthew Fortune + + * gas/arm/ual-vcmp.s: Add vcmp, vcmpe with #0x0 operand. + * gas/ual/vcmp.d: Update expected output. + * gas/ual/vcmp-zero-bad.l: Likewise + 2014-12-19 Matthew Fortune * gas/mips/r6-64.s: Remove .align directives from LDPC diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/codealign.d binutils-2.25.1/gas/testsuite/gas/aarch64/codealign.d --- binutils-2.25/gas/testsuite/gas/aarch64/codealign.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/codealign.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,16 @@ +#objdump: --section-headers +# Minimum code alignment should be set. +# This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* + +.*: +file format.*aarch64.* + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text .* .* .* .* 2\*\*2 + .*CODE.* + 1 \.data .* .* .* .* 2\*\*0 + .*DATA.* + 2 \.bss .* .* .* .* 2\*\*0 +.* + diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/codealign.s binutils-2.25.1/gas/testsuite/gas/aarch64/codealign.s --- binutils-2.25/gas/testsuite/gas/aarch64/codealign.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/codealign.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,2 @@ +.text + nop diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/ldst-reg-uns-imm.d binutils-2.25.1/gas/testsuite/gas/aarch64/ldst-reg-uns-imm.d --- binutils-2.25/gas/testsuite/gas/aarch64/ldst-reg-uns-imm.d 2013-11-04 16:33:37.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/ldst-reg-uns-imm.d 2015-07-21 10:20:58.000000000 +0200 @@ -5,8 +5,8 @@ Disassembly of section \.text: 0000000000000000 <.*>: - 0: 3c1003e7 str b7, \[sp,#-256\] - 4: 3c1553e7 str b7, \[sp,#-171\] + 0: 3c1003e7 stur b7, \[sp,#-256\] + 4: 3c1553e7 stur b7, \[sp,#-171\] 8: 3d0003e7 str b7, \[sp\] c: 3d0003e7 str b7, \[sp\] 10: 3d000be7 str b7, \[sp,#2\] @@ -16,52 +16,52 @@ 20: 3d0157e7 str b7, \[sp,#85\] 24: 3d03ffe7 str b7, \[sp,#255\] 28: 3d3fffe7 str b7, \[sp,#4095\] - 2c: 7c1003e7 str h7, \[sp,#-256\] - 30: 7c1553e7 str h7, \[sp,#-171\] + 2c: 7c1003e7 stur h7, \[sp,#-256\] + 30: 7c1553e7 stur h7, \[sp,#-171\] 34: 7d0003e7 str h7, \[sp\] 38: 7d0003e7 str h7, \[sp\] 3c: 7d0007e7 str h7, \[sp,#2\] 40: 7d000be7 str h7, \[sp,#4\] 44: 7d0013e7 str h7, \[sp,#8\] 48: 7d0023e7 str h7, \[sp,#16\] - 4c: 7c0553e7 str h7, \[sp,#85\] - 50: 7c0ff3e7 str h7, \[sp,#255\] + 4c: 7c0553e7 stur h7, \[sp,#85\] + 50: 7c0ff3e7 stur h7, \[sp,#255\] 54: 7d3fffe7 str h7, \[sp,#8190\] - 58: bc1003e7 str s7, \[sp,#-256\] - 5c: bc1553e7 str s7, \[sp,#-171\] + 58: bc1003e7 stur s7, \[sp,#-256\] + 5c: bc1553e7 stur s7, \[sp,#-171\] 60: bd0003e7 str s7, \[sp\] 64: bd0003e7 str s7, \[sp\] - 68: bc0023e7 str s7, \[sp,#2\] + 68: bc0023e7 stur s7, \[sp,#2\] 6c: bd0007e7 str s7, \[sp,#4\] 70: bd000be7 str s7, \[sp,#8\] 74: bd0013e7 str s7, \[sp,#16\] - 78: bc0553e7 str s7, \[sp,#85\] - 7c: bc0ff3e7 str s7, \[sp,#255\] + 78: bc0553e7 stur s7, \[sp,#85\] + 7c: bc0ff3e7 stur s7, \[sp,#255\] 80: bd3fffe7 str s7, \[sp,#16380\] - 84: fc1003e7 str d7, \[sp,#-256\] - 88: fc1553e7 str d7, \[sp,#-171\] + 84: fc1003e7 stur d7, \[sp,#-256\] + 88: fc1553e7 stur d7, \[sp,#-171\] 8c: fd0003e7 str d7, \[sp\] 90: fd0003e7 str d7, \[sp\] - 94: fc0023e7 str d7, \[sp,#2\] - 98: fc0043e7 str d7, \[sp,#4\] + 94: fc0023e7 stur d7, \[sp,#2\] + 98: fc0043e7 stur d7, \[sp,#4\] 9c: fd0007e7 str d7, \[sp,#8\] a0: fd000be7 str d7, \[sp,#16\] - a4: fc0553e7 str d7, \[sp,#85\] - a8: fc0ff3e7 str d7, \[sp,#255\] + a4: fc0553e7 stur d7, \[sp,#85\] + a8: fc0ff3e7 stur d7, \[sp,#255\] ac: fd3fffe7 str d7, \[sp,#32760\] - b0: 3c9003e7 str q7, \[sp,#-256\] - b4: 3c9553e7 str q7, \[sp,#-171\] + b0: 3c9003e7 stur q7, \[sp,#-256\] + b4: 3c9553e7 stur q7, \[sp,#-171\] b8: 3d8003e7 str q7, \[sp\] bc: 3d8003e7 str q7, \[sp\] - c0: 3c8023e7 str q7, \[sp,#2\] - c4: 3c8043e7 str q7, \[sp,#4\] - c8: 3c8083e7 str q7, \[sp,#8\] + c0: 3c8023e7 stur q7, \[sp,#2\] + c4: 3c8043e7 stur q7, \[sp,#4\] + c8: 3c8083e7 stur q7, \[sp,#8\] cc: 3d8007e7 str q7, \[sp,#16\] - d0: 3c8553e7 str q7, \[sp,#85\] - d4: 3c8ff3e7 str q7, \[sp,#255\] + d0: 3c8553e7 stur q7, \[sp,#85\] + d4: 3c8ff3e7 stur q7, \[sp,#255\] d8: 3dbfffe7 str q7, \[sp,#65520\] - dc: 3c5003e7 ldr b7, \[sp,#-256\] - e0: 3c5553e7 ldr b7, \[sp,#-171\] + dc: 3c5003e7 ldur b7, \[sp,#-256\] + e0: 3c5553e7 ldur b7, \[sp,#-171\] e4: 3d4003e7 ldr b7, \[sp\] e8: 3d4003e7 ldr b7, \[sp\] ec: 3d400be7 ldr b7, \[sp,#2\] @@ -71,52 +71,52 @@ fc: 3d4157e7 ldr b7, \[sp,#85\] 100: 3d43ffe7 ldr b7, \[sp,#255\] 104: 3d7fffe7 ldr b7, \[sp,#4095\] - 108: 7c5003e7 ldr h7, \[sp,#-256\] - 10c: 7c5553e7 ldr h7, \[sp,#-171\] + 108: 7c5003e7 ldur h7, \[sp,#-256\] + 10c: 7c5553e7 ldur h7, \[sp,#-171\] 110: 7d4003e7 ldr h7, \[sp\] 114: 7d4003e7 ldr h7, \[sp\] 118: 7d4007e7 ldr h7, \[sp,#2\] 11c: 7d400be7 ldr h7, \[sp,#4\] 120: 7d4013e7 ldr h7, \[sp,#8\] 124: 7d4023e7 ldr h7, \[sp,#16\] - 128: 7c4553e7 ldr h7, \[sp,#85\] - 12c: 7c4ff3e7 ldr h7, \[sp,#255\] + 128: 7c4553e7 ldur h7, \[sp,#85\] + 12c: 7c4ff3e7 ldur h7, \[sp,#255\] 130: 7d7fffe7 ldr h7, \[sp,#8190\] - 134: bc5003e7 ldr s7, \[sp,#-256\] - 138: bc5553e7 ldr s7, \[sp,#-171\] + 134: bc5003e7 ldur s7, \[sp,#-256\] + 138: bc5553e7 ldur s7, \[sp,#-171\] 13c: bd4003e7 ldr s7, \[sp\] 140: bd4003e7 ldr s7, \[sp\] - 144: bc4023e7 ldr s7, \[sp,#2\] + 144: bc4023e7 ldur s7, \[sp,#2\] 148: bd4007e7 ldr s7, \[sp,#4\] 14c: bd400be7 ldr s7, \[sp,#8\] 150: bd4013e7 ldr s7, \[sp,#16\] - 154: bc4553e7 ldr s7, \[sp,#85\] - 158: bc4ff3e7 ldr s7, \[sp,#255\] + 154: bc4553e7 ldur s7, \[sp,#85\] + 158: bc4ff3e7 ldur s7, \[sp,#255\] 15c: bd7fffe7 ldr s7, \[sp,#16380\] - 160: fc5003e7 ldr d7, \[sp,#-256\] - 164: fc5553e7 ldr d7, \[sp,#-171\] + 160: fc5003e7 ldur d7, \[sp,#-256\] + 164: fc5553e7 ldur d7, \[sp,#-171\] 168: fd4003e7 ldr d7, \[sp\] 16c: fd4003e7 ldr d7, \[sp\] - 170: fc4023e7 ldr d7, \[sp,#2\] - 174: fc4043e7 ldr d7, \[sp,#4\] + 170: fc4023e7 ldur d7, \[sp,#2\] + 174: fc4043e7 ldur d7, \[sp,#4\] 178: fd4007e7 ldr d7, \[sp,#8\] 17c: fd400be7 ldr d7, \[sp,#16\] - 180: fc4553e7 ldr d7, \[sp,#85\] - 184: fc4ff3e7 ldr d7, \[sp,#255\] + 180: fc4553e7 ldur d7, \[sp,#85\] + 184: fc4ff3e7 ldur d7, \[sp,#255\] 188: fd7fffe7 ldr d7, \[sp,#32760\] - 18c: 3cd003e7 ldr q7, \[sp,#-256\] - 190: 3cd553e7 ldr q7, \[sp,#-171\] + 18c: 3cd003e7 ldur q7, \[sp,#-256\] + 190: 3cd553e7 ldur q7, \[sp,#-171\] 194: 3dc003e7 ldr q7, \[sp\] 198: 3dc003e7 ldr q7, \[sp\] - 19c: 3cc023e7 ldr q7, \[sp,#2\] - 1a0: 3cc043e7 ldr q7, \[sp,#4\] - 1a4: 3cc083e7 ldr q7, \[sp,#8\] + 19c: 3cc023e7 ldur q7, \[sp,#2\] + 1a0: 3cc043e7 ldur q7, \[sp,#4\] + 1a4: 3cc083e7 ldur q7, \[sp,#8\] 1a8: 3dc007e7 ldr q7, \[sp,#16\] - 1ac: 3cc553e7 ldr q7, \[sp,#85\] - 1b0: 3ccff3e7 ldr q7, \[sp,#255\] + 1ac: 3cc553e7 ldur q7, \[sp,#85\] + 1b0: 3ccff3e7 ldur q7, \[sp,#255\] 1b4: 3dffffe7 ldr q7, \[sp,#65520\] - 1b8: 381003e7 strb w7, \[sp,#-256\] - 1bc: 381553e7 strb w7, \[sp,#-171\] + 1b8: 381003e7 sturb w7, \[sp,#-256\] + 1bc: 381553e7 sturb w7, \[sp,#-171\] 1c0: 390003e7 strb w7, \[sp\] 1c4: 390003e7 strb w7, \[sp\] 1c8: 39000be7 strb w7, \[sp,#2\] @@ -126,41 +126,41 @@ 1d8: 390157e7 strb w7, \[sp,#85\] 1dc: 3903ffe7 strb w7, \[sp,#255\] 1e0: 393fffe7 strb w7, \[sp,#4095\] - 1e4: 781003e7 strh w7, \[sp,#-256\] - 1e8: 781553e7 strh w7, \[sp,#-171\] + 1e4: 781003e7 sturh w7, \[sp,#-256\] + 1e8: 781553e7 sturh w7, \[sp,#-171\] 1ec: 790003e7 strh w7, \[sp\] 1f0: 790003e7 strh w7, \[sp\] 1f4: 790007e7 strh w7, \[sp,#2\] 1f8: 79000be7 strh w7, \[sp,#4\] 1fc: 790013e7 strh w7, \[sp,#8\] 200: 790023e7 strh w7, \[sp,#16\] - 204: 780553e7 strh w7, \[sp,#85\] - 208: 780ff3e7 strh w7, \[sp,#255\] + 204: 780553e7 sturh w7, \[sp,#85\] + 208: 780ff3e7 sturh w7, \[sp,#255\] 20c: 793fffe7 strh w7, \[sp,#8190\] - 210: b81003e7 str w7, \[sp,#-256\] - 214: b81553e7 str w7, \[sp,#-171\] + 210: b81003e7 stur w7, \[sp,#-256\] + 214: b81553e7 stur w7, \[sp,#-171\] 218: b90003e7 str w7, \[sp\] 21c: b90003e7 str w7, \[sp\] - 220: b80023e7 str w7, \[sp,#2\] + 220: b80023e7 stur w7, \[sp,#2\] 224: b90007e7 str w7, \[sp,#4\] 228: b9000be7 str w7, \[sp,#8\] 22c: b90013e7 str w7, \[sp,#16\] - 230: b80553e7 str w7, \[sp,#85\] - 234: b80ff3e7 str w7, \[sp,#255\] + 230: b80553e7 stur w7, \[sp,#85\] + 234: b80ff3e7 stur w7, \[sp,#255\] 238: b93fffe7 str w7, \[sp,#16380\] - 23c: f81003e7 str x7, \[sp,#-256\] - 240: f81553e7 str x7, \[sp,#-171\] + 23c: f81003e7 stur x7, \[sp,#-256\] + 240: f81553e7 stur x7, \[sp,#-171\] 244: f90003e7 str x7, \[sp\] 248: f90003e7 str x7, \[sp\] - 24c: f80023e7 str x7, \[sp,#2\] - 250: f80043e7 str x7, \[sp,#4\] + 24c: f80023e7 stur x7, \[sp,#2\] + 250: f80043e7 stur x7, \[sp,#4\] 254: f90007e7 str x7, \[sp,#8\] 258: f9000be7 str x7, \[sp,#16\] - 25c: f80553e7 str x7, \[sp,#85\] - 260: f80ff3e7 str x7, \[sp,#255\] + 25c: f80553e7 stur x7, \[sp,#85\] + 260: f80ff3e7 stur x7, \[sp,#255\] 264: f93fffe7 str x7, \[sp,#32760\] - 268: 385003e7 ldrb w7, \[sp,#-256\] - 26c: 385553e7 ldrb w7, \[sp,#-171\] + 268: 385003e7 ldurb w7, \[sp,#-256\] + 26c: 385553e7 ldurb w7, \[sp,#-171\] 270: 394003e7 ldrb w7, \[sp\] 274: 394003e7 ldrb w7, \[sp\] 278: 39400be7 ldrb w7, \[sp,#2\] @@ -170,41 +170,41 @@ 288: 394157e7 ldrb w7, \[sp,#85\] 28c: 3943ffe7 ldrb w7, \[sp,#255\] 290: 397fffe7 ldrb w7, \[sp,#4095\] - 294: 785003e7 ldrh w7, \[sp,#-256\] - 298: 785553e7 ldrh w7, \[sp,#-171\] + 294: 785003e7 ldurh w7, \[sp,#-256\] + 298: 785553e7 ldurh w7, \[sp,#-171\] 29c: 794003e7 ldrh w7, \[sp\] 2a0: 794003e7 ldrh w7, \[sp\] 2a4: 794007e7 ldrh w7, \[sp,#2\] 2a8: 79400be7 ldrh w7, \[sp,#4\] 2ac: 794013e7 ldrh w7, \[sp,#8\] 2b0: 794023e7 ldrh w7, \[sp,#16\] - 2b4: 784553e7 ldrh w7, \[sp,#85\] - 2b8: 784ff3e7 ldrh w7, \[sp,#255\] + 2b4: 784553e7 ldurh w7, \[sp,#85\] + 2b8: 784ff3e7 ldurh w7, \[sp,#255\] 2bc: 797fffe7 ldrh w7, \[sp,#8190\] - 2c0: b85003e7 ldr w7, \[sp,#-256\] - 2c4: b85553e7 ldr w7, \[sp,#-171\] + 2c0: b85003e7 ldur w7, \[sp,#-256\] + 2c4: b85553e7 ldur w7, \[sp,#-171\] 2c8: b94003e7 ldr w7, \[sp\] 2cc: b94003e7 ldr w7, \[sp\] - 2d0: b84023e7 ldr w7, \[sp,#2\] + 2d0: b84023e7 ldur w7, \[sp,#2\] 2d4: b94007e7 ldr w7, \[sp,#4\] 2d8: b9400be7 ldr w7, \[sp,#8\] 2dc: b94013e7 ldr w7, \[sp,#16\] - 2e0: b84553e7 ldr w7, \[sp,#85\] - 2e4: b84ff3e7 ldr w7, \[sp,#255\] + 2e0: b84553e7 ldur w7, \[sp,#85\] + 2e4: b84ff3e7 ldur w7, \[sp,#255\] 2e8: b97fffe7 ldr w7, \[sp,#16380\] - 2ec: f85003e7 ldr x7, \[sp,#-256\] - 2f0: f85553e7 ldr x7, \[sp,#-171\] + 2ec: f85003e7 ldur x7, \[sp,#-256\] + 2f0: f85553e7 ldur x7, \[sp,#-171\] 2f4: f94003e7 ldr x7, \[sp\] 2f8: f94003e7 ldr x7, \[sp\] - 2fc: f84023e7 ldr x7, \[sp,#2\] - 300: f84043e7 ldr x7, \[sp,#4\] + 2fc: f84023e7 ldur x7, \[sp,#2\] + 300: f84043e7 ldur x7, \[sp,#4\] 304: f94007e7 ldr x7, \[sp,#8\] 308: f9400be7 ldr x7, \[sp,#16\] - 30c: f84553e7 ldr x7, \[sp,#85\] - 310: f84ff3e7 ldr x7, \[sp,#255\] + 30c: f84553e7 ldur x7, \[sp,#85\] + 310: f84ff3e7 ldur x7, \[sp,#255\] 314: f97fffe7 ldr x7, \[sp,#32760\] - 318: 389003e7 ldrsb x7, \[sp,#-256\] - 31c: 389553e7 ldrsb x7, \[sp,#-171\] + 318: 389003e7 ldursb x7, \[sp,#-256\] + 31c: 389553e7 ldursb x7, \[sp,#-171\] 320: 398003e7 ldrsb x7, \[sp\] 324: 398003e7 ldrsb x7, \[sp\] 328: 39800be7 ldrsb x7, \[sp,#2\] @@ -214,30 +214,30 @@ 338: 398157e7 ldrsb x7, \[sp,#85\] 33c: 3983ffe7 ldrsb x7, \[sp,#255\] 340: 39bfffe7 ldrsb x7, \[sp,#4095\] - 344: 789003e7 ldrsh x7, \[sp,#-256\] - 348: 789553e7 ldrsh x7, \[sp,#-171\] + 344: 789003e7 ldursh x7, \[sp,#-256\] + 348: 789553e7 ldursh x7, \[sp,#-171\] 34c: 798003e7 ldrsh x7, \[sp\] 350: 798003e7 ldrsh x7, \[sp\] 354: 798007e7 ldrsh x7, \[sp,#2\] 358: 79800be7 ldrsh x7, \[sp,#4\] 35c: 798013e7 ldrsh x7, \[sp,#8\] 360: 798023e7 ldrsh x7, \[sp,#16\] - 364: 788553e7 ldrsh x7, \[sp,#85\] - 368: 788ff3e7 ldrsh x7, \[sp,#255\] + 364: 788553e7 ldursh x7, \[sp,#85\] + 368: 788ff3e7 ldursh x7, \[sp,#255\] 36c: 79bfffe7 ldrsh x7, \[sp,#8190\] - 370: b89003e7 ldrsw x7, \[sp,#-256\] - 374: b89553e7 ldrsw x7, \[sp,#-171\] + 370: b89003e7 ldursw x7, \[sp,#-256\] + 374: b89553e7 ldursw x7, \[sp,#-171\] 378: b98003e7 ldrsw x7, \[sp\] 37c: b98003e7 ldrsw x7, \[sp\] - 380: b88023e7 ldrsw x7, \[sp,#2\] + 380: b88023e7 ldursw x7, \[sp,#2\] 384: b98007e7 ldrsw x7, \[sp,#4\] 388: b9800be7 ldrsw x7, \[sp,#8\] 38c: b98013e7 ldrsw x7, \[sp,#16\] - 390: b88553e7 ldrsw x7, \[sp,#85\] - 394: b88ff3e7 ldrsw x7, \[sp,#255\] + 390: b88553e7 ldursw x7, \[sp,#85\] + 394: b88ff3e7 ldursw x7, \[sp,#255\] 398: b9bfffe7 ldrsw x7, \[sp,#16380\] - 39c: 38d003e7 ldrsb w7, \[sp,#-256\] - 3a0: 38d553e7 ldrsb w7, \[sp,#-171\] + 39c: 38d003e7 ldursb w7, \[sp,#-256\] + 3a0: 38d553e7 ldursb w7, \[sp,#-171\] 3a4: 39c003e7 ldrsb w7, \[sp\] 3a8: 39c003e7 ldrsb w7, \[sp\] 3ac: 39c00be7 ldrsb w7, \[sp,#2\] @@ -247,14 +247,14 @@ 3bc: 39c157e7 ldrsb w7, \[sp,#85\] 3c0: 39c3ffe7 ldrsb w7, \[sp,#255\] 3c4: 39ffffe7 ldrsb w7, \[sp,#4095\] - 3c8: 78d003e7 ldrsh w7, \[sp,#-256\] - 3cc: 78d553e7 ldrsh w7, \[sp,#-171\] + 3c8: 78d003e7 ldursh w7, \[sp,#-256\] + 3cc: 78d553e7 ldursh w7, \[sp,#-171\] 3d0: 79c003e7 ldrsh w7, \[sp\] 3d4: 79c003e7 ldrsh w7, \[sp\] 3d8: 79c007e7 ldrsh w7, \[sp,#2\] 3dc: 79c00be7 ldrsh w7, \[sp,#4\] 3e0: 79c013e7 ldrsh w7, \[sp,#8\] 3e4: 79c023e7 ldrsh w7, \[sp,#16\] - 3e8: 78c553e7 ldrsh w7, \[sp,#85\] - 3ec: 78cff3e7 ldrsh w7, \[sp,#255\] + 3e8: 78c553e7 ldursh w7, \[sp,#85\] + 3ec: 78cff3e7 ldursh w7, \[sp,#255\] 3f0: 79ffffe7 ldrsh w7, \[sp,#8190\] diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/ldst-reg-unscaled-imm.d binutils-2.25.1/gas/testsuite/gas/aarch64/ldst-reg-unscaled-imm.d --- binutils-2.25/gas/testsuite/gas/aarch64/ldst-reg-unscaled-imm.d 2013-11-04 16:33:37.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/ldst-reg-unscaled-imm.d 2015-07-21 10:20:58.000000000 +0200 @@ -5,8 +5,8 @@ Disassembly of section \.text: 0000000000000000 <.*>: - 0: 3c1003e7 str b7, \[sp,#-256\] - 4: 3c1553e7 str b7, \[sp,#-171\] + 0: 3c1003e7 stur b7, \[sp,#-256\] + 4: 3c1553e7 stur b7, \[sp,#-171\] 8: 3c0003e7 stur b7, \[sp\] c: 3c0003e7 stur b7, \[sp\] 10: 3c0023e7 stur b7, \[sp,#2\] @@ -15,48 +15,48 @@ 1c: 3c0103e7 stur b7, \[sp,#16\] 20: 3c0553e7 stur b7, \[sp,#85\] 24: 3c0ff3e7 stur b7, \[sp,#255\] - 28: 7c1003e7 str h7, \[sp,#-256\] - 2c: 7c1553e7 str h7, \[sp,#-171\] + 28: 7c1003e7 stur h7, \[sp,#-256\] + 2c: 7c1553e7 stur h7, \[sp,#-171\] 30: 7c0003e7 stur h7, \[sp\] 34: 7c0003e7 stur h7, \[sp\] 38: 7c0023e7 stur h7, \[sp,#2\] 3c: 7c0043e7 stur h7, \[sp,#4\] 40: 7c0083e7 stur h7, \[sp,#8\] 44: 7c0103e7 stur h7, \[sp,#16\] - 48: 7c0553e7 str h7, \[sp,#85\] - 4c: 7c0ff3e7 str h7, \[sp,#255\] - 50: bc1003e7 str s7, \[sp,#-256\] - 54: bc1553e7 str s7, \[sp,#-171\] + 48: 7c0553e7 stur h7, \[sp,#85\] + 4c: 7c0ff3e7 stur h7, \[sp,#255\] + 50: bc1003e7 stur s7, \[sp,#-256\] + 54: bc1553e7 stur s7, \[sp,#-171\] 58: bc0003e7 stur s7, \[sp\] 5c: bc0003e7 stur s7, \[sp\] - 60: bc0023e7 str s7, \[sp,#2\] + 60: bc0023e7 stur s7, \[sp,#2\] 64: bc0043e7 stur s7, \[sp,#4\] 68: bc0083e7 stur s7, \[sp,#8\] 6c: bc0103e7 stur s7, \[sp,#16\] - 70: bc0553e7 str s7, \[sp,#85\] - 74: bc0ff3e7 str s7, \[sp,#255\] - 78: fc1003e7 str d7, \[sp,#-256\] - 7c: fc1553e7 str d7, \[sp,#-171\] + 70: bc0553e7 stur s7, \[sp,#85\] + 74: bc0ff3e7 stur s7, \[sp,#255\] + 78: fc1003e7 stur d7, \[sp,#-256\] + 7c: fc1553e7 stur d7, \[sp,#-171\] 80: fc0003e7 stur d7, \[sp\] 84: fc0003e7 stur d7, \[sp\] - 88: fc0023e7 str d7, \[sp,#2\] - 8c: fc0043e7 str d7, \[sp,#4\] + 88: fc0023e7 stur d7, \[sp,#2\] + 8c: fc0043e7 stur d7, \[sp,#4\] 90: fc0083e7 stur d7, \[sp,#8\] 94: fc0103e7 stur d7, \[sp,#16\] - 98: fc0553e7 str d7, \[sp,#85\] - 9c: fc0ff3e7 str d7, \[sp,#255\] - a0: 3c9003e7 str q7, \[sp,#-256\] - a4: 3c9553e7 str q7, \[sp,#-171\] + 98: fc0553e7 stur d7, \[sp,#85\] + 9c: fc0ff3e7 stur d7, \[sp,#255\] + a0: 3c9003e7 stur q7, \[sp,#-256\] + a4: 3c9553e7 stur q7, \[sp,#-171\] a8: 3c8003e7 stur q7, \[sp\] ac: 3c8003e7 stur q7, \[sp\] - b0: 3c8023e7 str q7, \[sp,#2\] - b4: 3c8043e7 str q7, \[sp,#4\] - b8: 3c8083e7 str q7, \[sp,#8\] + b0: 3c8023e7 stur q7, \[sp,#2\] + b4: 3c8043e7 stur q7, \[sp,#4\] + b8: 3c8083e7 stur q7, \[sp,#8\] bc: 3c8103e7 stur q7, \[sp,#16\] - c0: 3c8553e7 str q7, \[sp,#85\] - c4: 3c8ff3e7 str q7, \[sp,#255\] - c8: 3c5003e7 ldr b7, \[sp,#-256\] - cc: 3c5553e7 ldr b7, \[sp,#-171\] + c0: 3c8553e7 stur q7, \[sp,#85\] + c4: 3c8ff3e7 stur q7, \[sp,#255\] + c8: 3c5003e7 ldur b7, \[sp,#-256\] + cc: 3c5553e7 ldur b7, \[sp,#-171\] d0: 3c4003e7 ldur b7, \[sp\] d4: 3c4003e7 ldur b7, \[sp\] d8: 3c4023e7 ldur b7, \[sp,#2\] @@ -65,48 +65,48 @@ e4: 3c4103e7 ldur b7, \[sp,#16\] e8: 3c4553e7 ldur b7, \[sp,#85\] ec: 3c4ff3e7 ldur b7, \[sp,#255\] - f0: 7c5003e7 ldr h7, \[sp,#-256\] - f4: 7c5553e7 ldr h7, \[sp,#-171\] + f0: 7c5003e7 ldur h7, \[sp,#-256\] + f4: 7c5553e7 ldur h7, \[sp,#-171\] f8: 7c4003e7 ldur h7, \[sp\] fc: 7c4003e7 ldur h7, \[sp\] 100: 7c4023e7 ldur h7, \[sp,#2\] 104: 7c4043e7 ldur h7, \[sp,#4\] 108: 7c4083e7 ldur h7, \[sp,#8\] 10c: 7c4103e7 ldur h7, \[sp,#16\] - 110: 7c4553e7 ldr h7, \[sp,#85\] - 114: 7c4ff3e7 ldr h7, \[sp,#255\] - 118: bc5003e7 ldr s7, \[sp,#-256\] - 11c: bc5553e7 ldr s7, \[sp,#-171\] + 110: 7c4553e7 ldur h7, \[sp,#85\] + 114: 7c4ff3e7 ldur h7, \[sp,#255\] + 118: bc5003e7 ldur s7, \[sp,#-256\] + 11c: bc5553e7 ldur s7, \[sp,#-171\] 120: bc4003e7 ldur s7, \[sp\] 124: bc4003e7 ldur s7, \[sp\] - 128: bc4023e7 ldr s7, \[sp,#2\] + 128: bc4023e7 ldur s7, \[sp,#2\] 12c: bc4043e7 ldur s7, \[sp,#4\] 130: bc4083e7 ldur s7, \[sp,#8\] 134: bc4103e7 ldur s7, \[sp,#16\] - 138: bc4553e7 ldr s7, \[sp,#85\] - 13c: bc4ff3e7 ldr s7, \[sp,#255\] - 140: fc5003e7 ldr d7, \[sp,#-256\] - 144: fc5553e7 ldr d7, \[sp,#-171\] + 138: bc4553e7 ldur s7, \[sp,#85\] + 13c: bc4ff3e7 ldur s7, \[sp,#255\] + 140: fc5003e7 ldur d7, \[sp,#-256\] + 144: fc5553e7 ldur d7, \[sp,#-171\] 148: fc4003e7 ldur d7, \[sp\] 14c: fc4003e7 ldur d7, \[sp\] - 150: fc4023e7 ldr d7, \[sp,#2\] - 154: fc4043e7 ldr d7, \[sp,#4\] + 150: fc4023e7 ldur d7, \[sp,#2\] + 154: fc4043e7 ldur d7, \[sp,#4\] 158: fc4083e7 ldur d7, \[sp,#8\] 15c: fc4103e7 ldur d7, \[sp,#16\] - 160: fc4553e7 ldr d7, \[sp,#85\] - 164: fc4ff3e7 ldr d7, \[sp,#255\] - 168: 3cd003e7 ldr q7, \[sp,#-256\] - 16c: 3cd553e7 ldr q7, \[sp,#-171\] + 160: fc4553e7 ldur d7, \[sp,#85\] + 164: fc4ff3e7 ldur d7, \[sp,#255\] + 168: 3cd003e7 ldur q7, \[sp,#-256\] + 16c: 3cd553e7 ldur q7, \[sp,#-171\] 170: 3cc003e7 ldur q7, \[sp\] 174: 3cc003e7 ldur q7, \[sp\] - 178: 3cc023e7 ldr q7, \[sp,#2\] - 17c: 3cc043e7 ldr q7, \[sp,#4\] - 180: 3cc083e7 ldr q7, \[sp,#8\] + 178: 3cc023e7 ldur q7, \[sp,#2\] + 17c: 3cc043e7 ldur q7, \[sp,#4\] + 180: 3cc083e7 ldur q7, \[sp,#8\] 184: 3cc103e7 ldur q7, \[sp,#16\] - 188: 3cc553e7 ldr q7, \[sp,#85\] - 18c: 3ccff3e7 ldr q7, \[sp,#255\] - 190: 381003e7 strb w7, \[sp,#-256\] - 194: 381553e7 strb w7, \[sp,#-171\] + 188: 3cc553e7 ldur q7, \[sp,#85\] + 18c: 3ccff3e7 ldur q7, \[sp,#255\] + 190: 381003e7 sturb w7, \[sp,#-256\] + 194: 381553e7 sturb w7, \[sp,#-171\] 198: 380003e7 sturb w7, \[sp\] 19c: 380003e7 sturb w7, \[sp\] 1a0: 380023e7 sturb w7, \[sp,#2\] @@ -115,38 +115,38 @@ 1ac: 380103e7 sturb w7, \[sp,#16\] 1b0: 380553e7 sturb w7, \[sp,#85\] 1b4: 380ff3e7 sturb w7, \[sp,#255\] - 1b8: 781003e7 strh w7, \[sp,#-256\] - 1bc: 781553e7 strh w7, \[sp,#-171\] + 1b8: 781003e7 sturh w7, \[sp,#-256\] + 1bc: 781553e7 sturh w7, \[sp,#-171\] 1c0: 780003e7 sturh w7, \[sp\] 1c4: 780003e7 sturh w7, \[sp\] 1c8: 780023e7 sturh w7, \[sp,#2\] 1cc: 780043e7 sturh w7, \[sp,#4\] 1d0: 780083e7 sturh w7, \[sp,#8\] 1d4: 780103e7 sturh w7, \[sp,#16\] - 1d8: 780553e7 strh w7, \[sp,#85\] - 1dc: 780ff3e7 strh w7, \[sp,#255\] - 1e0: b81003e7 str w7, \[sp,#-256\] - 1e4: b81553e7 str w7, \[sp,#-171\] + 1d8: 780553e7 sturh w7, \[sp,#85\] + 1dc: 780ff3e7 sturh w7, \[sp,#255\] + 1e0: b81003e7 stur w7, \[sp,#-256\] + 1e4: b81553e7 stur w7, \[sp,#-171\] 1e8: b80003e7 stur w7, \[sp\] 1ec: b80003e7 stur w7, \[sp\] - 1f0: b80023e7 str w7, \[sp,#2\] + 1f0: b80023e7 stur w7, \[sp,#2\] 1f4: b80043e7 stur w7, \[sp,#4\] 1f8: b80083e7 stur w7, \[sp,#8\] 1fc: b80103e7 stur w7, \[sp,#16\] - 200: b80553e7 str w7, \[sp,#85\] - 204: b80ff3e7 str w7, \[sp,#255\] - 208: f81003e7 str x7, \[sp,#-256\] - 20c: f81553e7 str x7, \[sp,#-171\] + 200: b80553e7 stur w7, \[sp,#85\] + 204: b80ff3e7 stur w7, \[sp,#255\] + 208: f81003e7 stur x7, \[sp,#-256\] + 20c: f81553e7 stur x7, \[sp,#-171\] 210: f80003e7 stur x7, \[sp\] 214: f80003e7 stur x7, \[sp\] - 218: f80023e7 str x7, \[sp,#2\] - 21c: f80043e7 str x7, \[sp,#4\] + 218: f80023e7 stur x7, \[sp,#2\] + 21c: f80043e7 stur x7, \[sp,#4\] 220: f80083e7 stur x7, \[sp,#8\] 224: f80103e7 stur x7, \[sp,#16\] - 228: f80553e7 str x7, \[sp,#85\] - 22c: f80ff3e7 str x7, \[sp,#255\] - 230: 385003e7 ldrb w7, \[sp,#-256\] - 234: 385553e7 ldrb w7, \[sp,#-171\] + 228: f80553e7 stur x7, \[sp,#85\] + 22c: f80ff3e7 stur x7, \[sp,#255\] + 230: 385003e7 ldurb w7, \[sp,#-256\] + 234: 385553e7 ldurb w7, \[sp,#-171\] 238: 384003e7 ldurb w7, \[sp\] 23c: 384003e7 ldurb w7, \[sp\] 240: 384023e7 ldurb w7, \[sp,#2\] @@ -155,38 +155,38 @@ 24c: 384103e7 ldurb w7, \[sp,#16\] 250: 384553e7 ldurb w7, \[sp,#85\] 254: 384ff3e7 ldurb w7, \[sp,#255\] - 258: 785003e7 ldrh w7, \[sp,#-256\] - 25c: 785553e7 ldrh w7, \[sp,#-171\] + 258: 785003e7 ldurh w7, \[sp,#-256\] + 25c: 785553e7 ldurh w7, \[sp,#-171\] 260: 784003e7 ldurh w7, \[sp\] 264: 784003e7 ldurh w7, \[sp\] 268: 784023e7 ldurh w7, \[sp,#2\] 26c: 784043e7 ldurh w7, \[sp,#4\] 270: 784083e7 ldurh w7, \[sp,#8\] 274: 784103e7 ldurh w7, \[sp,#16\] - 278: 784553e7 ldrh w7, \[sp,#85\] - 27c: 784ff3e7 ldrh w7, \[sp,#255\] - 280: b85003e7 ldr w7, \[sp,#-256\] - 284: b85553e7 ldr w7, \[sp,#-171\] + 278: 784553e7 ldurh w7, \[sp,#85\] + 27c: 784ff3e7 ldurh w7, \[sp,#255\] + 280: b85003e7 ldur w7, \[sp,#-256\] + 284: b85553e7 ldur w7, \[sp,#-171\] 288: b84003e7 ldur w7, \[sp\] 28c: b84003e7 ldur w7, \[sp\] - 290: b84023e7 ldr w7, \[sp,#2\] + 290: b84023e7 ldur w7, \[sp,#2\] 294: b84043e7 ldur w7, \[sp,#4\] 298: b84083e7 ldur w7, \[sp,#8\] 29c: b84103e7 ldur w7, \[sp,#16\] - 2a0: b84553e7 ldr w7, \[sp,#85\] - 2a4: b84ff3e7 ldr w7, \[sp,#255\] - 2a8: f85003e7 ldr x7, \[sp,#-256\] - 2ac: f85553e7 ldr x7, \[sp,#-171\] + 2a0: b84553e7 ldur w7, \[sp,#85\] + 2a4: b84ff3e7 ldur w7, \[sp,#255\] + 2a8: f85003e7 ldur x7, \[sp,#-256\] + 2ac: f85553e7 ldur x7, \[sp,#-171\] 2b0: f84003e7 ldur x7, \[sp\] 2b4: f84003e7 ldur x7, \[sp\] - 2b8: f84023e7 ldr x7, \[sp,#2\] - 2bc: f84043e7 ldr x7, \[sp,#4\] + 2b8: f84023e7 ldur x7, \[sp,#2\] + 2bc: f84043e7 ldur x7, \[sp,#4\] 2c0: f84083e7 ldur x7, \[sp,#8\] 2c4: f84103e7 ldur x7, \[sp,#16\] - 2c8: f84553e7 ldr x7, \[sp,#85\] - 2cc: f84ff3e7 ldr x7, \[sp,#255\] - 2d0: 389003e7 ldrsb x7, \[sp,#-256\] - 2d4: 389553e7 ldrsb x7, \[sp,#-171\] + 2c8: f84553e7 ldur x7, \[sp,#85\] + 2cc: f84ff3e7 ldur x7, \[sp,#255\] + 2d0: 389003e7 ldursb x7, \[sp,#-256\] + 2d4: 389553e7 ldursb x7, \[sp,#-171\] 2d8: 388003e7 ldursb x7, \[sp\] 2dc: 388003e7 ldursb x7, \[sp\] 2e0: 388023e7 ldursb x7, \[sp,#2\] @@ -195,28 +195,28 @@ 2ec: 388103e7 ldursb x7, \[sp,#16\] 2f0: 388553e7 ldursb x7, \[sp,#85\] 2f4: 388ff3e7 ldursb x7, \[sp,#255\] - 2f8: 789003e7 ldrsh x7, \[sp,#-256\] - 2fc: 789553e7 ldrsh x7, \[sp,#-171\] + 2f8: 789003e7 ldursh x7, \[sp,#-256\] + 2fc: 789553e7 ldursh x7, \[sp,#-171\] 300: 788003e7 ldursh x7, \[sp\] 304: 788003e7 ldursh x7, \[sp\] 308: 788023e7 ldursh x7, \[sp,#2\] 30c: 788043e7 ldursh x7, \[sp,#4\] 310: 788083e7 ldursh x7, \[sp,#8\] 314: 788103e7 ldursh x7, \[sp,#16\] - 318: 788553e7 ldrsh x7, \[sp,#85\] - 31c: 788ff3e7 ldrsh x7, \[sp,#255\] - 320: b89003e7 ldrsw x7, \[sp,#-256\] - 324: b89553e7 ldrsw x7, \[sp,#-171\] + 318: 788553e7 ldursh x7, \[sp,#85\] + 31c: 788ff3e7 ldursh x7, \[sp,#255\] + 320: b89003e7 ldursw x7, \[sp,#-256\] + 324: b89553e7 ldursw x7, \[sp,#-171\] 328: b88003e7 ldursw x7, \[sp\] 32c: b88003e7 ldursw x7, \[sp\] - 330: b88023e7 ldrsw x7, \[sp,#2\] + 330: b88023e7 ldursw x7, \[sp,#2\] 334: b88043e7 ldursw x7, \[sp,#4\] 338: b88083e7 ldursw x7, \[sp,#8\] 33c: b88103e7 ldursw x7, \[sp,#16\] - 340: b88553e7 ldrsw x7, \[sp,#85\] - 344: b88ff3e7 ldrsw x7, \[sp,#255\] - 348: 38d003e7 ldrsb w7, \[sp,#-256\] - 34c: 38d553e7 ldrsb w7, \[sp,#-171\] + 340: b88553e7 ldursw x7, \[sp,#85\] + 344: b88ff3e7 ldursw x7, \[sp,#255\] + 348: 38d003e7 ldursb w7, \[sp,#-256\] + 34c: 38d553e7 ldursb w7, \[sp,#-171\] 350: 38c003e7 ldursb w7, \[sp\] 354: 38c003e7 ldursb w7, \[sp\] 358: 38c023e7 ldursb w7, \[sp,#2\] @@ -225,13 +225,13 @@ 364: 38c103e7 ldursb w7, \[sp,#16\] 368: 38c553e7 ldursb w7, \[sp,#85\] 36c: 38cff3e7 ldursb w7, \[sp,#255\] - 370: 78d003e7 ldrsh w7, \[sp,#-256\] - 374: 78d553e7 ldrsh w7, \[sp,#-171\] + 370: 78d003e7 ldursh w7, \[sp,#-256\] + 374: 78d553e7 ldursh w7, \[sp,#-171\] 378: 78c003e7 ldursh w7, \[sp\] 37c: 78c003e7 ldursh w7, \[sp\] 380: 78c023e7 ldursh w7, \[sp,#2\] 384: 78c043e7 ldursh w7, \[sp,#4\] 388: 78c083e7 ldursh w7, \[sp,#8\] 38c: 78c103e7 ldursh w7, \[sp,#16\] - 390: 78c553e7 ldrsh w7, \[sp,#85\] - 394: 78cff3e7 ldrsh w7, \[sp,#255\] + 390: 78c553e7 ldursh w7, \[sp,#85\] + 394: 78cff3e7 ldursh w7, \[sp,#255\] diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/mapping_5.d binutils-2.25.1/gas/testsuite/gas/aarch64/mapping_5.d --- binutils-2.25/gas/testsuite/gas/aarch64/mapping_5.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/mapping_5.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,14 @@ +#objdump: --syms --special-syms +#name: AArch64 Mapping Symbols Test 5 + +.*: +file format.*aarch64.* + +SYMBOL TABLE: +[0]+00 l d .text [0]+00 .text +[0]+00 l d .data [0]+00 .data +[0]+00 l d .bss [0]+00 .bss +[0]+00 l .text [0]+00 \$x +[0]+04 l .text [0]+00 \$d +[0]+08 l .text [0]+00 \$x +[0]+10 l .text [0]+00 \$d +[0]+14 l .text [0]+00 \$x diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/mapping_5.s binutils-2.25.1/gas/testsuite/gas/aarch64/mapping_5.s --- binutils-2.25/gas/testsuite/gas/aarch64/mapping_5.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/mapping_5.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,5 @@ + .text + nop + .long 0 + .align 4 + .word 0x12345678 diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/mapping_6.d binutils-2.25.1/gas/testsuite/gas/aarch64/mapping_6.d --- binutils-2.25/gas/testsuite/gas/aarch64/mapping_6.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/mapping_6.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,15 @@ +#objdump: --syms --special-syms +#name: AArch64 Mapping Symbols Test 6 + +.*: +file format.*aarch64.* + +SYMBOL TABLE: +[0]+00 l d .text [0]+00 .text +[0]+00 l d .data [0]+00 .data +[0]+00 l d .bss [0]+00 .bss +[0]+00 l .text [0]+00 \$x +[0]+04 l .text [0]+00 \$d +[0]+10 l .text [0]+00 \$d +[0]+14 l .text [0]+00 \$x +[0]+09 l .text [0]+00 \$d +[0]+0c l .text [0]+00 \$x diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/mapping_6.s binutils-2.25.1/gas/testsuite/gas/aarch64/mapping_6.s --- binutils-2.25/gas/testsuite/gas/aarch64/mapping_6.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/mapping_6.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,6 @@ + .text + nop + .long 0 + .byte 1 + .align 4 + .word 0x12345678 diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/reloc-insn.d binutils-2.25.1/gas/testsuite/gas/aarch64/reloc-insn.d --- binutils-2.25/gas/testsuite/gas/aarch64/reloc-insn.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/reloc-insn.d 2015-07-21 10:20:58.000000000 +0200 @@ -139,7 +139,7 @@ 160: d41fffe1 svc #0xffff 164: f8500420 ldr x0, \[x1\],#-256 168: f8500c20 ldr x0, \[x1,#-256\]! - 16c: f8500020 ldr x0, \[x1,#-256\] + 16c: f8500020 ldur x0, \[x1,#-256\] 170: f97ffc20 ldr x0, \[x1,#32760\] 174: 79400000 ldrh w0, \[x0\] 174: R_AARCH64_LDST16_ABS_LO12_NC \.text\+0x194 diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/sysreg.d binutils-2.25.1/gas/testsuite/gas/aarch64/sysreg.d --- binutils-2.25/gas/testsuite/gas/aarch64/sysreg.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/sysreg.d 2015-07-21 10:20:58.000000000 +0200 @@ -17,14 +17,15 @@ 24: d53801a0 mrs x0, id_mmfr1_el1 28: d53801c0 mrs x0, id_mmfr2_el1 2c: d53801e0 mrs x0, id_mmfr3_el1 - 30: d5380200 mrs x0, id_isar0_el1 - 34: d5380220 mrs x0, id_isar1_el1 - 38: d5380240 mrs x0, id_isar2_el1 - 3c: d5380260 mrs x0, id_isar3_el1 - 40: d5380280 mrs x0, id_isar4_el1 - 44: d53802a0 mrs x0, id_isar5_el1 - 48: d538cc00 mrs x0, s3_0_c12_c12_0 - 4c: d5384600 mrs x0, s3_0_c4_c6_0 - 50: d5184600 msr s3_0_c4_c6_0, x0 - 54: d5310300 mrs x0, s2_1_c0_c3_0 - 58: d5110300 msr s2_1_c0_c3_0, x0 + 30: d53802c0 mrs x0, id_mmfr4_el1 + 34: d5380200 mrs x0, id_isar0_el1 + 38: d5380220 mrs x0, id_isar1_el1 + 3c: d5380240 mrs x0, id_isar2_el1 + 40: d5380260 mrs x0, id_isar3_el1 + 44: d5380280 mrs x0, id_isar4_el1 + 48: d53802a0 mrs x0, id_isar5_el1 + 4c: d538cc00 mrs x0, s3_0_c12_c12_0 + 50: d5384600 mrs x0, s3_0_c4_c6_0 + 54: d5184600 msr s3_0_c4_c6_0, x0 + 58: d5310300 mrs x0, s2_1_c0_c3_0 + 5c: d5110300 msr s2_1_c0_c3_0, x0 diff -ruN binutils-2.25/gas/testsuite/gas/aarch64/sysreg.s binutils-2.25.1/gas/testsuite/gas/aarch64/sysreg.s --- binutils-2.25/gas/testsuite/gas/aarch64/sysreg.s 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/aarch64/sysreg.s 2015-07-21 10:20:58.000000000 +0200 @@ -16,6 +16,7 @@ mrs x0, id_mmfr1_el1 mrs x0, id_mmfr2_el1 mrs x0, id_mmfr3_el1 + mrs x0, id_mmfr4_el1 mrs x0, id_isar0_el1 mrs x0, id_isar1_el1 mrs x0, id_isar2_el1 diff -ruN binutils-2.25/gas/testsuite/gas/arm/thumb2_vpool_be.d binutils-2.25.1/gas/testsuite/gas/arm/thumb2_vpool_be.d --- binutils-2.25/gas/testsuite/gas/arm/thumb2_vpool_be.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/arm/thumb2_vpool_be.d 2015-07-21 10:20:58.000000000 +0200 @@ -125,8 +125,7 @@ 000001c8 0ff00fff .word 0x0ff00fff 000001cc f0000000 .word 0xf0000000 000001d0 ed9f 1b01 vldr d1, \[pc, #4\] ; 000001d8 -000001d4 0000 movs r0, r0 -000001d6 0000 movs r0, r0 +000001d4 00000000 .word 0x00000000 000001d8 0000fff0 .word 0x0000fff0 000001dc 00000000 .word 0x00000000 000001e0 f101 0000 add.w r0, r1, #0 @@ -150,8 +149,7 @@ 00000228 eddf 7a03 vldr s15, \[pc, #12\] ; 00000238 0000022c eddf 0b14 vldr d16, \[pc, #80\] ; 00000280 00000230 eddf 1b15 vldr d17, \[pc, #84\] ; 00000288 -00000234 0000 movs r0, r0 -00000236 0000 movs r0, r0 +00000234 00000000 .word 0x00000000 00000238 0000fff0 .word 0x0000fff0 0000023c 00000000 .word 0x00000000 00000240 ff000000 .word 0xff000000 diff -ruN binutils-2.25/gas/testsuite/gas/arm/tls.d binutils-2.25.1/gas/testsuite/gas/arm/tls.d --- binutils-2.25/gas/testsuite/gas/arm/tls.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/arm/tls.d 2015-07-21 10:20:58.000000000 +0200 @@ -47,3 +47,21 @@ 3c: R_ARM_TLS_LE32 td 40: 00000017 .word 0x00000017 40: R_ARM_TLS_GOTDESC te +0+44 : + 44: fffffff4 .word 0xfffffff4 + 44: R_ARM_TLS_LE32 tbase + 48: fffffff8 .word 0xfffffff8 + 48: R_ARM_TLS_LE32 tbase + 4c: fffffffc .word 0xfffffffc + 4c: R_ARM_TLS_LE32 tbase + 50: 00000000 .word 0x00000000 + 50: R_ARM_TLS_LE32 tbase + 54: 00000004 .word 0x00000004 + 54: R_ARM_TLS_LE32 tbase + 58: 00000008 .word 0x00000008 + 58: R_ARM_TLS_LE32 tbase + 5c: 0000000c .word 0x0000000c + 5c: R_ARM_TLS_LE32 tbase + 60: 00000000 .word 0x00000000 + 60: R_ARM_TLS_LE32 tbase +#pass diff -ruN binutils-2.25/gas/testsuite/gas/arm/tls.s binutils-2.25.1/gas/testsuite/gas/arm/tls.s --- binutils-2.25/gas/testsuite/gas/arm/tls.s 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/arm/tls.s 2015-07-21 10:20:58.000000000 +0200 @@ -36,3 +36,26 @@ .word tc(gottpoff) + (. - 1b - 8) .word td(tpoff) 1: .word te(tlsdesc) + (. - 2b + 1) + + @ PR 18481 + .text +foo: + .word tbase(tpoff)-12 + .word tbase(tpoff)-8 + .word tbase(tpoff)-4 + .word tbase(tpoff)+0 + .word tbase(tpoff)+4 + .word tbase(tpoff)+8 + .word tbase(tpoff)+12 + .word tbase(tpoff) + + .section .tdata,"awT",%progbits +tbase = . + 12 + .word -12 + .word -8 + .word -4 + .word 0 + .word 4 + .word 8 + .word 12 + .word 0 diff -ruN binutils-2.25/gas/testsuite/gas/arm/ual-vcmp.d binutils-2.25.1/gas/testsuite/gas/arm/ual-vcmp.d --- binutils-2.25/gas/testsuite/gas/arm/ual-vcmp.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/arm/ual-vcmp.d 2015-07-21 10:20:58.000000000 +0200 @@ -14,11 +14,15 @@ 0+014 <[^>]*> eeb53a40 vcmp.f32 s6, #0.0 0+018 <[^>]*> eef53ac0 vcmpe.f32 s7, #0.0 0+01c <[^>]*> eeb54ac0 vcmpe.f32 s8, #0.0 -0+020 <[^>]*> eeb50b40 vcmp.f64 d0, #0.0 -0+024 <[^>]*> eeb51b40 vcmp.f64 d1, #0.0 -0+028 <[^>]*> eeb52bc0 vcmpe.f64 d2, #0.0 -0+02c <[^>]*> eeb53bc0 vcmpe.f64 d3, #0.0 -0+030 <[^>]*> eeb54b40 vcmp.f64 d4, #0.0 -0+034 <[^>]*> eeb55b40 vcmp.f64 d5, #0.0 -0+038 <[^>]*> eeb56bc0 vcmpe.f64 d6, #0.0 -0+03c <[^>]*> eeb57bc0 vcmpe.f64 d7, #0.0 \ No newline at end of file +0+020 <[^>]*> eef54a40 vcmp.f32 s9, #0.0 +0+024 <[^>]*> eeb55ac0 vcmpe.f32 s10, #0.0 +0+028 <[^>]*> eeb50b40 vcmp.f64 d0, #0.0 +0+02c <[^>]*> eeb51b40 vcmp.f64 d1, #0.0 +0+030 <[^>]*> eeb52bc0 vcmpe.f64 d2, #0.0 +0+034 <[^>]*> eeb53bc0 vcmpe.f64 d3, #0.0 +0+038 <[^>]*> eeb54b40 vcmp.f64 d4, #0.0 +0+03c <[^>]*> eeb55b40 vcmp.f64 d5, #0.0 +0+040 <[^>]*> eeb56bc0 vcmpe.f64 d6, #0.0 +0+044 <[^>]*> eeb57bc0 vcmpe.f64 d7, #0.0 +0+048 <[^>]*> eeb58b40 vcmp.f64 d8, #0.0 +0+04c <[^>]*> eeb59bc0 vcmpe.f64 d9, #0.0 \ No newline at end of file diff -ruN binutils-2.25/gas/testsuite/gas/arm/ual-vcmp.s binutils-2.25.1/gas/testsuite/gas/arm/ual-vcmp.s --- binutils-2.25/gas/testsuite/gas/arm/ual-vcmp.s 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/arm/ual-vcmp.s 2015-07-21 10:20:58.000000000 +0200 @@ -10,6 +10,8 @@ vcmp.f32 s6, #0e-3 vcmpe.f32 s7, #0.0000 vcmpe.f32 s8, #.0 +vcmp.f32 s9, #0x0 +vcmpe.f32 s10, #0x0 vcmp.f64 d0, #0.0 vcmp.f64 d1, #0 @@ -19,3 +21,5 @@ vcmp.f64 d5, #0e-2 vcmpe.f64 d6, #0.00 vcmpe.f64 d7, #.0 +vcmp.f64 d8, #0x0 +vcmpe.f64 d9, #0x0 diff -ruN binutils-2.25/gas/testsuite/gas/arm/vcmp-zero-bad.l binutils-2.25.1/gas/testsuite/gas/arm/vcmp-zero-bad.l --- binutils-2.25/gas/testsuite/gas/arm/vcmp-zero-bad.l 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/arm/vcmp-zero-bad.l 2015-07-21 10:20:58.000000000 +0200 @@ -4,5 +4,5 @@ [^:]*:7: Error: only floating point zero is allowed as immediate value -- `vcmpe.f32 s3,5' [^:]*:8: Error: only floating point zero is allowed as immediate value -- `vcmpe.f32 s4,#-0.0' [^:]*:10: Error: only floating point zero is allowed as immediate value -- `vcmp.f64 d0,#-1' -[^:]*:11: Error: garbage following instruction -- `vcmpe.f64 d3,#0x35' +[^:]*:11: Error: only floating point zero is allowed as immediate value -- `vcmpe.f64 d3,#0x35' [^:]*:12: Error: only floating point zero is allowed as immediate value -- `vcmpe.f64 d4,0xf' diff -ruN binutils-2.25/gas/testsuite/gas/arm/vldconst_be.d binutils-2.25.1/gas/testsuite/gas/arm/vldconst_be.d --- binutils-2.25/gas/testsuite/gas/arm/vldconst_be.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/arm/vldconst_be.d 2015-07-21 10:20:58.000000000 +0200 @@ -236,7 +236,7 @@ 00000388 0000fff0 .word 0x0000fff0 0000038c 00000000 .word 0x00000000 00000390 ed9f1b00 vldr d1, \[pc\] ; 00000398 -00000394 00000000 andeq r0, r0, r0 +00000394 00000000 .word 0x00000000 00000398 0000fff0 .word 0x0000fff0 0000039c 00000000 .word 0x00000000 000003a0 e2810000 add r0, r1, #0 @@ -260,7 +260,7 @@ 000003e8 eddf7a02 vldr s15, \[pc, #8\] ; 000003f8 000003ec eddf0b13 vldr d16, \[pc, #76\] ; 00000440 000003f0 eddf1b14 vldr d17, \[pc, #80\] ; 00000448 -000003f4 00000000 andeq r0, r0, r0 +000003f4 00000000 .word 0x00000000 000003f8 0000fff0 .word 0x0000fff0 000003fc 00000000 .word 0x00000000 00000400 ff000000 .word 0xff000000 diff -ruN binutils-2.25/gas/testsuite/gas/i386/i386.exp binutils-2.25.1/gas/testsuite/gas/i386/i386.exp --- binutils-2.25/gas/testsuite/gas/i386/i386.exp 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/i386.exp 2015-07-21 15:42:38.000000000 +0200 @@ -102,12 +102,6 @@ run_dump_test "nops-1-i686" run_dump_test "nops-1-k8" run_dump_test "nops-1-core2" - run_dump_test "nops-1-bdver1" - run_dump_test "nops-1-bdver2" - run_dump_test "nops-1-bdver3" - run_dump_test "nops-1-bdver4" - run_dump_test "nops-1-btver1" - run_dump_test "nops-1-btver2" run_dump_test "nops-2" run_dump_test "nops-2-i386" run_dump_test "nops-2-core2" @@ -483,15 +477,8 @@ run_dump_test "x86-64-nops-1" run_dump_test "x86-64-nops-1-g64" run_dump_test "x86-64-nops-1-k8" - run_dump_test "x86-64-nops-1-nocona" run_dump_test "x86-64-nops-1-core2" run_dump_test "x86-64-nops-1-pentium" - run_dump_test "x86-64-nops-1-bdver1" - run_dump_test "x86-64-nops-1-bdver2" - run_dump_test "x86-64-nops-1-bdver3" - run_dump_test "x86-64-nops-1-bdver4" - run_dump_test "x86-64-nops-1-btver1" - run_dump_test "x86-64-nops-1-btver2" run_dump_test "x86-64-nops-2" run_dump_test "x86-64-nops-3" run_dump_test "x86-64-nops-4" diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-core2.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-core2.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-core2.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-core2.d 2015-07-21 10:20:58.000000000 +0200 @@ -9,25 +9,29 @@ 0+ : [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop @@ -35,7 +39,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 90 nop diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-k8.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-k8.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-k8.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-k8.d 2015-07-21 10:20:58.000000000 +0200 @@ -8,154 +8,154 @@ Disassembly of section .text: 0+ : -[ ]*0:[ ]+90[ ]+nop[ ]* -[ ]*1:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) -[ ]*8:[ ]+0f 1f 84 00 00 00 00 00[ ]+nopl[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : -[ ]*10:[ ]+90[ ]+nop[ ]* -[ ]*11:[ ]+90[ ]+nop[ ]* -[ ]*12:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) -[ ]*19:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : -[ ]*20:[ ]+90[ ]+nop[ ]* -[ ]*21:[ ]+90[ ]+nop[ ]* -[ ]*22:[ ]+90[ ]+nop[ ]* -[ ]*23:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) -[ ]*29:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : -[ ]*30:[ ]+90[ ]+nop[ ]* -[ ]*31:[ ]+90[ ]+nop[ ]* -[ ]*32:[ ]+90[ ]+nop[ ]* -[ ]*33:[ ]+90[ ]+nop[ ]* -[ ]*34:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) -[ ]*3a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : -[ ]*40:[ ]+90[ ]+nop[ ]* -[ ]*41:[ ]+90[ ]+nop[ ]* -[ ]*42:[ ]+90[ ]+nop[ ]* -[ ]*43:[ ]+90[ ]+nop[ ]* -[ ]*44:[ ]+90[ ]+nop[ ]* -[ ]*45:[ ]+0f 1f 44 00 00[ ]+nopl[ ]+0x0\(%rax,%rax,1\) -[ ]*4a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : -[ ]*50:[ ]+90[ ]+nop[ ]* -[ ]*51:[ ]+90[ ]+nop[ ]* -[ ]*52:[ ]+90[ ]+nop[ ]* -[ ]*53:[ ]+90[ ]+nop[ ]* -[ ]*54:[ ]+90[ ]+nop[ ]* -[ ]*55:[ ]+90[ ]+nop[ ]* -[ ]*56:[ ]+66 2e 0f 1f 84 00 00 00 00 00[ ]+nopw[ ]+%cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : -[ ]*60:[ ]+90[ ]+nop[ ]* -[ ]*61:[ ]+90[ ]+nop[ ]* -[ ]*62:[ ]+90[ ]+nop[ ]* -[ ]*63:[ ]+90[ ]+nop[ ]* -[ ]*64:[ ]+90[ ]+nop[ ]* -[ ]*65:[ ]+90[ ]+nop[ ]* -[ ]*66:[ ]+90[ ]+nop[ ]* -[ ]*67:[ ]+66 0f 1f 84 00 00 00 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) 0+70 : -[ ]*70:[ ]+90[ ]+nop[ ]* -[ ]*71:[ ]+90[ ]+nop[ ]* -[ ]*72:[ ]+90[ ]+nop[ ]* -[ ]*73:[ ]+90[ ]+nop[ ]* -[ ]*74:[ ]+90[ ]+nop[ ]* -[ ]*75:[ ]+90[ ]+nop[ ]* -[ ]*76:[ ]+90[ ]+nop[ ]* -[ ]*77:[ ]+90[ ]+nop[ ]* -[ ]*78:[ ]+0f 1f 84 00 00 00 00 00[ ]+nopl[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+80 : -[ ]*80:[ ]+90[ ]+nop[ ]* -[ ]*81:[ ]+90[ ]+nop[ ]* -[ ]*82:[ ]+90[ ]+nop[ ]* -[ ]*83:[ ]+90[ ]+nop[ ]* -[ ]*84:[ ]+90[ ]+nop[ ]* -[ ]*85:[ ]+90[ ]+nop[ ]* -[ ]*86:[ ]+90[ ]+nop[ ]* -[ ]*87:[ ]+90[ ]+nop[ ]* -[ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) 0+90 : -[ ]*90:[ ]+90[ ]+nop[ ]* -[ ]*91:[ ]+90[ ]+nop[ ]* -[ ]*92:[ ]+90[ ]+nop[ ]* -[ ]*93:[ ]+90[ ]+nop[ ]* -[ ]*94:[ ]+90[ ]+nop[ ]* -[ ]*95:[ ]+90[ ]+nop[ ]* -[ ]*96:[ ]+90[ ]+nop[ ]* -[ ]*97:[ ]+90[ ]+nop[ ]* -[ ]*98:[ ]+90[ ]+nop[ ]* -[ ]*99:[ ]+90[ ]+nop[ ]* -[ ]*9a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+a0 : -[ ]*a0:[ ]+90[ ]+nop[ ]* -[ ]*a1:[ ]+90[ ]+nop[ ]* -[ ]*a2:[ ]+90[ ]+nop[ ]* -[ ]*a3:[ ]+90[ ]+nop[ ]* -[ ]*a4:[ ]+90[ ]+nop[ ]* -[ ]*a5:[ ]+90[ ]+nop[ ]* -[ ]*a6:[ ]+90[ ]+nop[ ]* -[ ]*a7:[ ]+90[ ]+nop[ ]* -[ ]*a8:[ ]+90[ ]+nop[ ]* -[ ]*a9:[ ]+90[ ]+nop[ ]* -[ ]*aa:[ ]+90[ ]+nop[ ]* -[ ]*ab:[ ]+0f 1f 44 00 00[ ]+nopl[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) 0+b0 : -[ ]*b0:[ ]+90[ ]+nop[ ]* -[ ]*b1:[ ]+90[ ]+nop[ ]* -[ ]*b2:[ ]+90[ ]+nop[ ]* -[ ]*b3:[ ]+90[ ]+nop[ ]* -[ ]*b4:[ ]+90[ ]+nop[ ]* -[ ]*b5:[ ]+90[ ]+nop[ ]* -[ ]*b6:[ ]+90[ ]+nop[ ]* -[ ]*b7:[ ]+90[ ]+nop[ ]* -[ ]*b8:[ ]+90[ ]+nop[ ]* -[ ]*b9:[ ]+90[ ]+nop[ ]* -[ ]*ba:[ ]+90[ ]+nop[ ]* -[ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+0f 1f 40 00[ ]+nopl[ ]+0x0\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) 0+c0 : -[ ]*c0:[ ]+90[ ]+nop[ ]* -[ ]*c1:[ ]+90[ ]+nop[ ]* -[ ]*c2:[ ]+90[ ]+nop[ ]* -[ ]*c3:[ ]+90[ ]+nop[ ]* -[ ]*c4:[ ]+90[ ]+nop[ ]* -[ ]*c5:[ ]+90[ ]+nop[ ]* -[ ]*c6:[ ]+90[ ]+nop[ ]* -[ ]*c7:[ ]+90[ ]+nop[ ]* -[ ]*c8:[ ]+90[ ]+nop[ ]* -[ ]*c9:[ ]+90[ ]+nop[ ]* -[ ]*ca:[ ]+90[ ]+nop[ ]* -[ ]*cb:[ ]+90[ ]+nop[ ]* -[ ]*cc:[ ]+90[ ]+nop[ ]* -[ ]*cd:[ ]+0f 1f 00[ ]+nopl[ ]+\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) 0+d0 : -[ ]*d0:[ ]+90[ ]+nop[ ]* -[ ]*d1:[ ]+90[ ]+nop[ ]* -[ ]*d2:[ ]+90[ ]+nop[ ]* -[ ]*d3:[ ]+90[ ]+nop[ ]* -[ ]*d4:[ ]+90[ ]+nop[ ]* -[ ]*d5:[ ]+90[ ]+nop[ ]* -[ ]*d6:[ ]+90[ ]+nop[ ]* -[ ]*d7:[ ]+90[ ]+nop[ ]* -[ ]*d8:[ ]+90[ ]+nop[ ]* -[ ]*d9:[ ]+90[ ]+nop[ ]* -[ ]*da:[ ]+90[ ]+nop[ ]* -[ ]*db:[ ]+90[ ]+nop[ ]* -[ ]*dc:[ ]+90[ ]+nop[ ]* -[ ]*dd:[ ]+90[ ]+nop[ ]* -[ ]*de:[ ]+66 90[ ]+xchg[ ]+%ax,%ax +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-nocona.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-nocona.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-nocona.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-1-nocona.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,156 +0,0 @@ -#source: ../nops-1.s -#as: -mtune=nocona -#objdump: -drw -#name: x86-64 (ILP32) -mtune=nocona nops 1 - -.*: +file format .* - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-1.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-1.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-1.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-1.d 2015-07-21 10:20:58.000000000 +0200 @@ -9,25 +9,29 @@ 0+ : [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop @@ -35,7 +39,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 90 nop diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-2.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-2.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-2.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-2.d 2015-07-21 10:20:58.000000000 +0200 @@ -9,29 +9,34 @@ 0+ : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 90 nop @@ -39,7 +44,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-3.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-3.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-3.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-3.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,8 +10,10 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 89 c3 mov %eax,%ebx -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-4-core2.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-4-core2.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-4-core2.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-4-core2.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,29 +10,33 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 90 nop @@ -40,8 +44,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 90 nop @@ -50,8 +55,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+c0 : [ ]*[a-f0-9]+: 90 nop @@ -61,8 +67,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) 0+e0 : [ ]*[a-f0-9]+: 90 nop @@ -73,8 +80,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+100 : [ ]*[a-f0-9]+: 90 nop @@ -86,8 +94,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+120 : [ ]*[a-f0-9]+: 90 nop @@ -100,8 +109,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+140 : [ ]*[a-f0-9]+: 90 nop @@ -115,8 +125,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+160 : [ ]*[a-f0-9]+: 90 nop @@ -131,8 +142,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+180 : [ ]*[a-f0-9]+: 90 nop @@ -148,8 +159,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1a0 : [ ]*[a-f0-9]+: 90 nop @@ -166,8 +177,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1c0 : [ ]*[a-f0-9]+: 90 nop @@ -185,8 +196,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1e0 : [ ]*[a-f0-9]+: 90 nop @@ -205,6 +216,6 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-4-k8.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-4-k8.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-4-k8.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-4-k8.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,37 +10,33 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) [ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 90 nop @@ -48,10 +44,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 90 nop @@ -60,10 +55,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+c0 : [ ]*[a-f0-9]+: 90 nop @@ -73,9 +67,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+e0 : [ ]*[a-f0-9]+: 90 nop @@ -86,9 +80,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+100 : [ ]*[a-f0-9]+: 90 nop @@ -100,9 +94,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+120 : [ ]*[a-f0-9]+: 90 nop @@ -115,9 +109,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+140 : [ ]*[a-f0-9]+: 90 nop @@ -131,9 +125,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+160 : [ ]*[a-f0-9]+: 90 nop @@ -148,9 +142,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+180 : [ ]*[a-f0-9]+: 90 nop @@ -166,9 +159,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1a0 : [ ]*[a-f0-9]+: 90 nop @@ -185,9 +177,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) [ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1c0 : [ ]*[a-f0-9]+: 90 nop @@ -205,9 +196,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax [ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1e0 : [ ]*[a-f0-9]+: 90 nop @@ -226,7 +216,6 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-4.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-4.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-4.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-4.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,29 +10,33 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 90 nop @@ -40,8 +44,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 90 nop @@ -50,8 +55,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+c0 : [ ]*[a-f0-9]+: 90 nop @@ -61,8 +67,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) 0+e0 : [ ]*[a-f0-9]+: 90 nop @@ -73,8 +80,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+100 : [ ]*[a-f0-9]+: 90 nop @@ -86,8 +94,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+120 : [ ]*[a-f0-9]+: 90 nop @@ -100,8 +109,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+140 : [ ]*[a-f0-9]+: 90 nop @@ -115,8 +125,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+160 : [ ]*[a-f0-9]+: 90 nop @@ -131,8 +142,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+180 : [ ]*[a-f0-9]+: 90 nop @@ -148,8 +159,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1a0 : [ ]*[a-f0-9]+: 90 nop @@ -166,8 +177,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1c0 : [ ]*[a-f0-9]+: 90 nop @@ -185,8 +196,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1e0 : [ ]*[a-f0-9]+: 90 nop @@ -205,6 +216,6 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-5-k8.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-5-k8.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-5-k8.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-5-k8.d 2015-07-21 10:20:58.000000000 +0200 @@ -29,19 +29,23 @@ 0+40 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+70 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -50,13 +54,13 @@ 0+90 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+b0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -65,10 +69,11 @@ 0+c0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+d0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-5.d binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-5.d --- binutils-2.25/gas/testsuite/gas/i386/ilp32/x86-64-nops-5.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/ilp32/x86-64-nops-5.d 2015-07-21 10:20:58.000000000 +0200 @@ -28,19 +28,23 @@ 0+40 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+70 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -49,13 +53,13 @@ 0+90 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+b0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -64,10 +68,11 @@ 0+c0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+d0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-1-bdver1.d binutils-2.25.1/gas/testsuite/gas/i386/nops-1-bdver1.d --- binutils-2.25/gas/testsuite/gas/i386/nops-1-bdver1.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-1-bdver1.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=bdver1 -#source: nops-1.s -#objdump: -drw -#name: i386 -mtune=bdver1 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-1-bdver2.d binutils-2.25.1/gas/testsuite/gas/i386/nops-1-bdver2.d --- binutils-2.25/gas/testsuite/gas/i386/nops-1-bdver2.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-1-bdver2.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=bdver2 -#source: nops-1.s -#objdump: -drw -#name: i386 -mtune=bdver2 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-1-bdver3.d binutils-2.25.1/gas/testsuite/gas/i386/nops-1-bdver3.d --- binutils-2.25/gas/testsuite/gas/i386/nops-1-bdver3.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-1-bdver3.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=bdver3 -#source: nops-1.s -#objdump: -drw -#name: i386 -mtune=bdver3 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-1-bdver4.d binutils-2.25.1/gas/testsuite/gas/i386/nops-1-bdver4.d --- binutils-2.25/gas/testsuite/gas/i386/nops-1-bdver4.d 2014-10-14 09:31:51.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-1-bdver4.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=bdver4 -#source: nops-1.s -#objdump: -drw -#name: i386 -mtune=bdver4 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-1-btver1.d binutils-2.25.1/gas/testsuite/gas/i386/nops-1-btver1.d --- binutils-2.25/gas/testsuite/gas/i386/nops-1-btver1.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-1-btver1.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=btver1 -#source: nops-1.s -#objdump: -drw -#name: i386 -mtune=btver1 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-1-btver2.d binutils-2.25.1/gas/testsuite/gas/i386/nops-1-btver2.d --- binutils-2.25/gas/testsuite/gas/i386/nops-1-btver2.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-1-btver2.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=btver2 -#source: nops-1.s -#objdump: -drw -#name: i386 -mtune=btver2 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-1-core2.d binutils-2.25.1/gas/testsuite/gas/i386/nops-1-core2.d --- binutils-2.25/gas/testsuite/gas/i386/nops-1-core2.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-1-core2.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,25 +10,29 @@ 0+ : [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+10 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+30 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop @@ -36,7 +40,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+50 : [ ]*[a-f0-9]+: 90 nop diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-1-k8.d binutils-2.25.1/gas/testsuite/gas/i386/nops-1-k8.d --- binutils-2.25/gas/testsuite/gas/i386/nops-1-k8.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-1-k8.d 2015-07-21 10:20:58.000000000 +0200 @@ -8,154 +8,154 @@ Disassembly of section .text: 0+ : -[ ]*0:[ ]+90[ ]+nop[ ]* -[ ]*1:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%eax\) -[ ]*8:[ ]+0f 1f 84 00 00 00 00 00[ ]+nopl[ ]+0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+10 : -[ ]*10:[ ]+90[ ]+nop[ ]* -[ ]*11:[ ]+90[ ]+nop[ ]* -[ ]*12:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%eax\) -[ ]*19:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%eax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+20 : -[ ]*20:[ ]+90[ ]+nop[ ]* -[ ]*21:[ ]+90[ ]+nop[ ]* -[ ]*22:[ ]+90[ ]+nop[ ]* -[ ]*23:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%eax,%eax,1\) -[ ]*29:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%eax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+30 : -[ ]*30:[ ]+90[ ]+nop[ ]* -[ ]*31:[ ]+90[ ]+nop[ ]* -[ ]*32:[ ]+90[ ]+nop[ ]* -[ ]*33:[ ]+90[ ]+nop[ ]* -[ ]*34:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%eax,%eax,1\) -[ ]*3a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+40 : -[ ]*40:[ ]+90[ ]+nop[ ]* -[ ]*41:[ ]+90[ ]+nop[ ]* -[ ]*42:[ ]+90[ ]+nop[ ]* -[ ]*43:[ ]+90[ ]+nop[ ]* -[ ]*44:[ ]+90[ ]+nop[ ]* -[ ]*45:[ ]+0f 1f 44 00 00[ ]+nopl[ ]+0x0\(%eax,%eax,1\) -[ ]*4a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+50 : -[ ]*50:[ ]+90[ ]+nop[ ]* -[ ]*51:[ ]+90[ ]+nop[ ]* -[ ]*52:[ ]+90[ ]+nop[ ]* -[ ]*53:[ ]+90[ ]+nop[ ]* -[ ]*54:[ ]+90[ ]+nop[ ]* -[ ]*55:[ ]+90[ ]+nop[ ]* -[ ]*56:[ ]+66 2e 0f 1f 84 00 00 00 00 00[ ]+nopw[ ]+%cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+60 : -[ ]*60:[ ]+90[ ]+nop[ ]* -[ ]*61:[ ]+90[ ]+nop[ ]* -[ ]*62:[ ]+90[ ]+nop[ ]* -[ ]*63:[ ]+90[ ]+nop[ ]* -[ ]*64:[ ]+90[ ]+nop[ ]* -[ ]*65:[ ]+90[ ]+nop[ ]* -[ ]*66:[ ]+90[ ]+nop[ ]* -[ ]*67:[ ]+66 0f 1f 84 00 00 00 00 00[ ]+nopw[ ]+0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) 0+70 : -[ ]*70:[ ]+90[ ]+nop[ ]* -[ ]*71:[ ]+90[ ]+nop[ ]* -[ ]*72:[ ]+90[ ]+nop[ ]* -[ ]*73:[ ]+90[ ]+nop[ ]* -[ ]*74:[ ]+90[ ]+nop[ ]* -[ ]*75:[ ]+90[ ]+nop[ ]* -[ ]*76:[ ]+90[ ]+nop[ ]* -[ ]*77:[ ]+90[ ]+nop[ ]* -[ ]*78:[ ]+0f 1f 84 00 00 00 00 00[ ]+nopl[ ]+0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) 0+80 : -[ ]*80:[ ]+90[ ]+nop[ ]* -[ ]*81:[ ]+90[ ]+nop[ ]* -[ ]*82:[ ]+90[ ]+nop[ ]* -[ ]*83:[ ]+90[ ]+nop[ ]* -[ ]*84:[ ]+90[ ]+nop[ ]* -[ ]*85:[ ]+90[ ]+nop[ ]* -[ ]*86:[ ]+90[ ]+nop[ ]* -[ ]*87:[ ]+90[ ]+nop[ ]* -[ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%eax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) 0+90 : -[ ]*90:[ ]+90[ ]+nop[ ]* -[ ]*91:[ ]+90[ ]+nop[ ]* -[ ]*92:[ ]+90[ ]+nop[ ]* -[ ]*93:[ ]+90[ ]+nop[ ]* -[ ]*94:[ ]+90[ ]+nop[ ]* -[ ]*95:[ ]+90[ ]+nop[ ]* -[ ]*96:[ ]+90[ ]+nop[ ]* -[ ]*97:[ ]+90[ ]+nop[ ]* -[ ]*98:[ ]+90[ ]+nop[ ]* -[ ]*99:[ ]+90[ ]+nop[ ]* -[ ]*9a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) 0+a0 : -[ ]*a0:[ ]+90[ ]+nop[ ]* -[ ]*a1:[ ]+90[ ]+nop[ ]* -[ ]*a2:[ ]+90[ ]+nop[ ]* -[ ]*a3:[ ]+90[ ]+nop[ ]* -[ ]*a4:[ ]+90[ ]+nop[ ]* -[ ]*a5:[ ]+90[ ]+nop[ ]* -[ ]*a6:[ ]+90[ ]+nop[ ]* -[ ]*a7:[ ]+90[ ]+nop[ ]* -[ ]*a8:[ ]+90[ ]+nop[ ]* -[ ]*a9:[ ]+90[ ]+nop[ ]* -[ ]*aa:[ ]+90[ ]+nop[ ]* -[ ]*ab:[ ]+0f 1f 44 00 00[ ]+nopl[ ]+0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) 0+b0 : -[ ]*b0:[ ]+90[ ]+nop[ ]* -[ ]*b1:[ ]+90[ ]+nop[ ]* -[ ]*b2:[ ]+90[ ]+nop[ ]* -[ ]*b3:[ ]+90[ ]+nop[ ]* -[ ]*b4:[ ]+90[ ]+nop[ ]* -[ ]*b5:[ ]+90[ ]+nop[ ]* -[ ]*b6:[ ]+90[ ]+nop[ ]* -[ ]*b7:[ ]+90[ ]+nop[ ]* -[ ]*b8:[ ]+90[ ]+nop[ ]* -[ ]*b9:[ ]+90[ ]+nop[ ]* -[ ]*ba:[ ]+90[ ]+nop[ ]* -[ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+0f 1f 40 00[ ]+nopl[ ]+0x0\(%eax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) 0+c0 : -[ ]*c0:[ ]+90[ ]+nop[ ]* -[ ]*c1:[ ]+90[ ]+nop[ ]* -[ ]*c2:[ ]+90[ ]+nop[ ]* -[ ]*c3:[ ]+90[ ]+nop[ ]* -[ ]*c4:[ ]+90[ ]+nop[ ]* -[ ]*c5:[ ]+90[ ]+nop[ ]* -[ ]*c6:[ ]+90[ ]+nop[ ]* -[ ]*c7:[ ]+90[ ]+nop[ ]* -[ ]*c8:[ ]+90[ ]+nop[ ]* -[ ]*c9:[ ]+90[ ]+nop[ ]* -[ ]*ca:[ ]+90[ ]+nop[ ]* -[ ]*cb:[ ]+90[ ]+nop[ ]* -[ ]*cc:[ ]+90[ ]+nop[ ]* -[ ]*cd:[ ]+0f 1f 00[ ]+nopl[ ]+\(%eax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) 0+d0 : -[ ]*d0:[ ]+90[ ]+nop[ ]* -[ ]*d1:[ ]+90[ ]+nop[ ]* -[ ]*d2:[ ]+90[ ]+nop[ ]* -[ ]*d3:[ ]+90[ ]+nop[ ]* -[ ]*d4:[ ]+90[ ]+nop[ ]* -[ ]*d5:[ ]+90[ ]+nop[ ]* -[ ]*d6:[ ]+90[ ]+nop[ ]* -[ ]*d7:[ ]+90[ ]+nop[ ]* -[ ]*d8:[ ]+90[ ]+nop[ ]* -[ ]*d9:[ ]+90[ ]+nop[ ]* -[ ]*da:[ ]+90[ ]+nop[ ]* -[ ]*db:[ ]+90[ ]+nop[ ]* -[ ]*dc:[ ]+90[ ]+nop[ ]* -[ ]*dd:[ ]+90[ ]+nop[ ]* -[ ]*de:[ ]+66 90[ ]+xchg[ ]+%ax,%ax +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-4a-i686.d binutils-2.25.1/gas/testsuite/gas/i386/nops-4a-i686.d --- binutils-2.25/gas/testsuite/gas/i386/nops-4a-i686.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-4a-i686.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,29 +10,33 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+80 : [ ]*[a-f0-9]+: 90 nop @@ -40,8 +44,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+a0 : [ ]*[a-f0-9]+: 90 nop @@ -50,8 +55,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+c0 : [ ]*[a-f0-9]+: 90 nop @@ -61,8 +67,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) [ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) 0+e0 : [ ]*[a-f0-9]+: 90 nop @@ -73,8 +80,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+100 : [ ]*[a-f0-9]+: 90 nop @@ -86,8 +94,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+120 : [ ]*[a-f0-9]+: 90 nop @@ -100,8 +109,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+140 : [ ]*[a-f0-9]+: 90 nop @@ -115,8 +125,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+160 : [ ]*[a-f0-9]+: 90 nop @@ -131,8 +142,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+180 : [ ]*[a-f0-9]+: 90 nop @@ -148,8 +159,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%eax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+1a0 : [ ]*[a-f0-9]+: 90 nop @@ -166,8 +177,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+1c0 : [ ]*[a-f0-9]+: 90 nop @@ -185,8 +196,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+1e0 : [ ]*[a-f0-9]+: 90 nop @@ -205,6 +216,6 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-5-i686.d binutils-2.25.1/gas/testsuite/gas/i386/nops-5-i686.d --- binutils-2.25/gas/testsuite/gas/i386/nops-5-i686.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-5-i686.d 2015-07-21 10:20:58.000000000 +0200 @@ -29,19 +29,23 @@ 0+40 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+50 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+60 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+70 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+80 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -50,13 +54,13 @@ 0+90 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+a0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+b0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -65,10 +69,11 @@ 0+c0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+d0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-5.d binutils-2.25.1/gas/testsuite/gas/i386/nops-5.d --- binutils-2.25/gas/testsuite/gas/i386/nops-5.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-5.d 2015-07-21 10:20:58.000000000 +0200 @@ -27,19 +27,23 @@ 0+40 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+50 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+60 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+70 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+80 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -48,13 +52,13 @@ 0+90 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+a0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+b0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -63,10 +67,11 @@ 0+c0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%eax,%eax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) 0+d0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/nops-6.d binutils-2.25.1/gas/testsuite/gas/i386/nops-6.d --- binutils-2.25/gas/testsuite/gas/i386/nops-6.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/nops-6.d 2015-07-21 10:20:58.000000000 +0200 @@ -12,6 +12,6 @@ 0+10 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%eax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%eax,%eax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-bdver1.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-bdver1.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-bdver1.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-bdver1.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=bdver1 -#source: nops-1.s -#objdump: -drw -#name: x86-64 -mtune=bdver1 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-bdver2.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-bdver2.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-bdver2.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-bdver2.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=bdver2 -#source: nops-1.s -#objdump: -drw -#name: x86-64 -mtune=bdver2 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-bdver3.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-bdver3.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-bdver3.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-bdver3.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=bdver3 -#source: nops-1.s -#objdump: -drw -#name: x86-64 -mtune=bdver3 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-bdver4.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-bdver4.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-bdver4.d 2014-10-14 09:31:51.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-bdver4.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=bdver4 -#source: nops-1.s -#objdump: -drw -#name: x86-64 -mtune=bdver4 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-btver1.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-btver1.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-btver1.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-btver1.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=btver1 -#source: nops-1.s -#objdump: -drw -#name: x86-64 -mtune=btver1 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-btver2.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-btver2.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-btver2.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-btver2.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,162 +0,0 @@ -#as: -mtune=btver2 -#source: nops-1.s -#objdump: -drw -#name: x86-64 -mtune=btver2 nops 1 - -.*: +file format .* - - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-core2.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-core2.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-core2.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-core2.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,25 +10,29 @@ 0+ : [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop @@ -36,7 +40,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 90 nop diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-g64.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-g64.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-g64.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-g64.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,25 +10,29 @@ 0+ : [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop @@ -36,7 +40,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 90 nop diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-k8.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-k8.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-k8.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-k8.d 2015-07-21 10:20:58.000000000 +0200 @@ -8,154 +8,154 @@ Disassembly of section .text: 0+ : -[ ]*0:[ ]+90[ ]+nop[ ]* -[ ]*1:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) -[ ]*8:[ ]+0f 1f 84 00 00 00 00 00[ ]+nopl[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : -[ ]*10:[ ]+90[ ]+nop[ ]* -[ ]*11:[ ]+90[ ]+nop[ ]* -[ ]*12:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) -[ ]*19:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : -[ ]*20:[ ]+90[ ]+nop[ ]* -[ ]*21:[ ]+90[ ]+nop[ ]* -[ ]*22:[ ]+90[ ]+nop[ ]* -[ ]*23:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) -[ ]*29:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : -[ ]*30:[ ]+90[ ]+nop[ ]* -[ ]*31:[ ]+90[ ]+nop[ ]* -[ ]*32:[ ]+90[ ]+nop[ ]* -[ ]*33:[ ]+90[ ]+nop[ ]* -[ ]*34:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) -[ ]*3a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : -[ ]*40:[ ]+90[ ]+nop[ ]* -[ ]*41:[ ]+90[ ]+nop[ ]* -[ ]*42:[ ]+90[ ]+nop[ ]* -[ ]*43:[ ]+90[ ]+nop[ ]* -[ ]*44:[ ]+90[ ]+nop[ ]* -[ ]*45:[ ]+0f 1f 44 00 00[ ]+nopl[ ]+0x0\(%rax,%rax,1\) -[ ]*4a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : -[ ]*50:[ ]+90[ ]+nop[ ]* -[ ]*51:[ ]+90[ ]+nop[ ]* -[ ]*52:[ ]+90[ ]+nop[ ]* -[ ]*53:[ ]+90[ ]+nop[ ]* -[ ]*54:[ ]+90[ ]+nop[ ]* -[ ]*55:[ ]+90[ ]+nop[ ]* -[ ]*56:[ ]+66 2e 0f 1f 84 00 00 00 00 00[ ]+nopw[ ]+%cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : -[ ]*60:[ ]+90[ ]+nop[ ]* -[ ]*61:[ ]+90[ ]+nop[ ]* -[ ]*62:[ ]+90[ ]+nop[ ]* -[ ]*63:[ ]+90[ ]+nop[ ]* -[ ]*64:[ ]+90[ ]+nop[ ]* -[ ]*65:[ ]+90[ ]+nop[ ]* -[ ]*66:[ ]+90[ ]+nop[ ]* -[ ]*67:[ ]+66 0f 1f 84 00 00 00 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) 0+70 : -[ ]*70:[ ]+90[ ]+nop[ ]* -[ ]*71:[ ]+90[ ]+nop[ ]* -[ ]*72:[ ]+90[ ]+nop[ ]* -[ ]*73:[ ]+90[ ]+nop[ ]* -[ ]*74:[ ]+90[ ]+nop[ ]* -[ ]*75:[ ]+90[ ]+nop[ ]* -[ ]*76:[ ]+90[ ]+nop[ ]* -[ ]*77:[ ]+90[ ]+nop[ ]* -[ ]*78:[ ]+0f 1f 84 00 00 00 00 00[ ]+nopl[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+80 : -[ ]*80:[ ]+90[ ]+nop[ ]* -[ ]*81:[ ]+90[ ]+nop[ ]* -[ ]*82:[ ]+90[ ]+nop[ ]* -[ ]*83:[ ]+90[ ]+nop[ ]* -[ ]*84:[ ]+90[ ]+nop[ ]* -[ ]*85:[ ]+90[ ]+nop[ ]* -[ ]*86:[ ]+90[ ]+nop[ ]* -[ ]*87:[ ]+90[ ]+nop[ ]* -[ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+0f 1f 80 00 00 00 00[ ]+nopl[ ]+0x0\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) 0+90 : -[ ]*90:[ ]+90[ ]+nop[ ]* -[ ]*91:[ ]+90[ ]+nop[ ]* -[ ]*92:[ ]+90[ ]+nop[ ]* -[ ]*93:[ ]+90[ ]+nop[ ]* -[ ]*94:[ ]+90[ ]+nop[ ]* -[ ]*95:[ ]+90[ ]+nop[ ]* -[ ]*96:[ ]+90[ ]+nop[ ]* -[ ]*97:[ ]+90[ ]+nop[ ]* -[ ]*98:[ ]+90[ ]+nop[ ]* -[ ]*99:[ ]+90[ ]+nop[ ]* -[ ]*9a:[ ]+66 0f 1f 44 00 00[ ]+nopw[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+a0 : -[ ]*a0:[ ]+90[ ]+nop[ ]* -[ ]*a1:[ ]+90[ ]+nop[ ]* -[ ]*a2:[ ]+90[ ]+nop[ ]* -[ ]*a3:[ ]+90[ ]+nop[ ]* -[ ]*a4:[ ]+90[ ]+nop[ ]* -[ ]*a5:[ ]+90[ ]+nop[ ]* -[ ]*a6:[ ]+90[ ]+nop[ ]* -[ ]*a7:[ ]+90[ ]+nop[ ]* -[ ]*a8:[ ]+90[ ]+nop[ ]* -[ ]*a9:[ ]+90[ ]+nop[ ]* -[ ]*aa:[ ]+90[ ]+nop[ ]* -[ ]*ab:[ ]+0f 1f 44 00 00[ ]+nopl[ ]+0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) 0+b0 : -[ ]*b0:[ ]+90[ ]+nop[ ]* -[ ]*b1:[ ]+90[ ]+nop[ ]* -[ ]*b2:[ ]+90[ ]+nop[ ]* -[ ]*b3:[ ]+90[ ]+nop[ ]* -[ ]*b4:[ ]+90[ ]+nop[ ]* -[ ]*b5:[ ]+90[ ]+nop[ ]* -[ ]*b6:[ ]+90[ ]+nop[ ]* -[ ]*b7:[ ]+90[ ]+nop[ ]* -[ ]*b8:[ ]+90[ ]+nop[ ]* -[ ]*b9:[ ]+90[ ]+nop[ ]* -[ ]*ba:[ ]+90[ ]+nop[ ]* -[ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+0f 1f 40 00[ ]+nopl[ ]+0x0\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) 0+c0 : -[ ]*c0:[ ]+90[ ]+nop[ ]* -[ ]*c1:[ ]+90[ ]+nop[ ]* -[ ]*c2:[ ]+90[ ]+nop[ ]* -[ ]*c3:[ ]+90[ ]+nop[ ]* -[ ]*c4:[ ]+90[ ]+nop[ ]* -[ ]*c5:[ ]+90[ ]+nop[ ]* -[ ]*c6:[ ]+90[ ]+nop[ ]* -[ ]*c7:[ ]+90[ ]+nop[ ]* -[ ]*c8:[ ]+90[ ]+nop[ ]* -[ ]*c9:[ ]+90[ ]+nop[ ]* -[ ]*ca:[ ]+90[ ]+nop[ ]* -[ ]*cb:[ ]+90[ ]+nop[ ]* -[ ]*cc:[ ]+90[ ]+nop[ ]* -[ ]*cd:[ ]+0f 1f 00[ ]+nopl[ ]+\(%rax\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) 0+d0 : -[ ]*d0:[ ]+90[ ]+nop[ ]* -[ ]*d1:[ ]+90[ ]+nop[ ]* -[ ]*d2:[ ]+90[ ]+nop[ ]* -[ ]*d3:[ ]+90[ ]+nop[ ]* -[ ]*d4:[ ]+90[ ]+nop[ ]* -[ ]*d5:[ ]+90[ ]+nop[ ]* -[ ]*d6:[ ]+90[ ]+nop[ ]* -[ ]*d7:[ ]+90[ ]+nop[ ]* -[ ]*d8:[ ]+90[ ]+nop[ ]* -[ ]*d9:[ ]+90[ ]+nop[ ]* -[ ]*da:[ ]+90[ ]+nop[ ]* -[ ]*db:[ ]+90[ ]+nop[ ]* -[ ]*dc:[ ]+90[ ]+nop[ ]* -[ ]*dd:[ ]+90[ ]+nop[ ]* -[ ]*de:[ ]+66 90[ ]+xchg[ ]+%ax,%ax +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-nocona.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-nocona.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1-nocona.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1-nocona.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,156 +0,0 @@ -#as: -mtune=nocona -#source: nops-1.s -#objdump: -drw -#name: x86-64 -mtune=nocona nops 1 - -.*: +file format .* - -Disassembly of section .text: - -0+ : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+10 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+20 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+30 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+40 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) - -0+50 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) - -0+60 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) - -0+70 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) - -0+80 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) - -0+90 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) - -0+a0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) - -0+b0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - -0+c0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - -0+d0 : -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -#pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-1.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-1.d 2015-07-21 10:20:58.000000000 +0200 @@ -9,25 +9,29 @@ 0+ : [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop @@ -35,7 +39,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 90 nop diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-2.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-2.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-2.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-2.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,29 +10,34 @@ 0+ : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+10 : [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+30 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 90 nop @@ -40,7 +45,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-3.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-3.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-3.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-3.d 2015-07-21 10:20:58.000000000 +0200 @@ -11,8 +11,10 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 89 c3 mov %eax,%ebx -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-4-core2.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-4-core2.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-4-core2.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-4-core2.d 2015-07-21 10:20:58.000000000 +0200 @@ -11,29 +11,33 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 90 nop @@ -41,8 +45,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 90 nop @@ -51,8 +56,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+c0 : [ ]*[a-f0-9]+: 90 nop @@ -62,8 +68,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) 0+e0 : [ ]*[a-f0-9]+: 90 nop @@ -74,8 +81,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+100 : [ ]*[a-f0-9]+: 90 nop @@ -87,8 +95,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+120 : [ ]*[a-f0-9]+: 90 nop @@ -101,8 +110,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+140 : [ ]*[a-f0-9]+: 90 nop @@ -116,8 +126,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+160 : [ ]*[a-f0-9]+: 90 nop @@ -132,8 +143,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+180 : [ ]*[a-f0-9]+: 90 nop @@ -149,8 +160,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1a0 : [ ]*[a-f0-9]+: 90 nop @@ -167,8 +178,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1c0 : [ ]*[a-f0-9]+: 90 nop @@ -186,8 +197,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1e0 : [ ]*[a-f0-9]+: 90 nop @@ -206,6 +217,6 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-4-k8.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-4-k8.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-4-k8.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-4-k8.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,37 +10,33 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) [ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 90 nop @@ -48,10 +44,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 90 nop @@ -60,10 +55,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+c0 : [ ]*[a-f0-9]+: 90 nop @@ -73,9 +67,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+e0 : [ ]*[a-f0-9]+: 90 nop @@ -86,9 +80,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+100 : [ ]*[a-f0-9]+: 90 nop @@ -100,9 +94,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+120 : [ ]*[a-f0-9]+: 90 nop @@ -115,9 +109,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+140 : [ ]*[a-f0-9]+: 90 nop @@ -131,9 +125,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+160 : [ ]*[a-f0-9]+: 90 nop @@ -148,9 +142,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+180 : [ ]*[a-f0-9]+: 90 nop @@ -166,9 +159,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1a0 : [ ]*[a-f0-9]+: 90 nop @@ -185,9 +177,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) [ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1c0 : [ ]*[a-f0-9]+: 90 nop @@ -205,9 +196,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax [ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1e0 : [ ]*[a-f0-9]+: 90 nop @@ -226,7 +216,6 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-4.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-4.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-4.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-4.d 2015-07-21 10:20:58.000000000 +0200 @@ -11,29 +11,33 @@ 0+ : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+20 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+40 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 90 nop @@ -41,8 +45,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 90 nop @@ -51,8 +56,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+c0 : [ ]*[a-f0-9]+: 90 nop @@ -62,8 +68,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) [ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) 0+e0 : [ ]*[a-f0-9]+: 90 nop @@ -74,8 +81,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+100 : [ ]*[a-f0-9]+: 90 nop @@ -87,8 +95,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+120 : [ ]*[a-f0-9]+: 90 nop @@ -101,8 +110,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+140 : [ ]*[a-f0-9]+: 90 nop @@ -116,8 +126,9 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+160 : [ ]*[a-f0-9]+: 90 nop @@ -132,8 +143,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+180 : [ ]*[a-f0-9]+: 90 nop @@ -149,8 +160,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 84 00 00 00 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1a0 : [ ]*[a-f0-9]+: 90 nop @@ -167,8 +178,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1c0 : [ ]*[a-f0-9]+: 90 nop @@ -186,8 +197,8 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+1e0 : [ ]*[a-f0-9]+: 90 nop @@ -206,6 +217,6 @@ [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-5-k8.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-5-k8.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-5-k8.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-5-k8.d 2015-07-21 10:20:58.000000000 +0200 @@ -30,19 +30,23 @@ 0+40 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+70 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -51,13 +55,13 @@ 0+90 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+b0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -66,10 +70,11 @@ 0+c0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+d0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-5.d binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-5.d --- binutils-2.25/gas/testsuite/gas/i386/x86-64-nops-5.d 2014-10-14 09:32:03.000000000 +0200 +++ binutils-2.25.1/gas/testsuite/gas/i386/x86-64-nops-5.d 2015-07-21 10:20:58.000000000 +0200 @@ -29,19 +29,23 @@ 0+40 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+50 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+60 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+70 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+80 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -50,13 +54,13 @@ 0+90 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+a0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+b0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi @@ -65,10 +69,11 @@ 0+c0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 nopw %cs:0x0\(%rax,%rax,1\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) 0+d0 : [ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi -[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) -[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\) +[ ]*[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0\(%rax,%rax,1\) #pass diff -ruN binutils-2.25/gas/testsuite/gas/ppc/476.d binutils-2.25.1/gas/testsuite/gas/ppc/476.d --- binutils-2.25/gas/testsuite/gas/ppc/476.d 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/476.d 2015-07-21 10:20:58.000000000 +0200 @@ -90,13 +90,13 @@ 140: (7c 06 3b ac|ac 3b 06 7c) dcbi r6,r7 144: (7c 85 33 0c|0c 33 85 7c) dcblc 4,r5,r6 148: (7c 06 38 6c|6c 38 06 7c) dcbst r6,r7 - 14c: (7c c0 2a 2c|2c 2a c0 7c) dcbt 0,r5,6 + 14c: (7c 05 32 2c|2c 32 05 7c) dcbt r5,r6 150: (7c 05 32 2c|2c 32 05 7c) dcbt r5,r6 - 154: (7c c8 2a 2c|2c 2a c8 7c) dcbt r8,r5,6 + 154: (7d 05 32 2c|2c 32 05 7d) dcbt 8,r5,r6 158: (7c e8 49 4c|4c 49 e8 7c) dcbtls 7,r8,r9 - 15c: (7c e0 31 ec|ec 31 e0 7c) dcbtst 0,r6,7 + 15c: (7c 06 39 ec|ec 39 06 7c) dcbtst r6,r7 160: (7c 06 39 ec|ec 39 06 7c) dcbtst r6,r7 - 164: (7c e9 31 ec|ec 31 e9 7c) dcbtst r9,r6,7 + 164: (7d 26 39 ec|ec 39 26 7d) dcbtst 9,r6,r7 168: (7d 4b 61 0c|0c 61 4b 7d) dcbtstls 10,r11,r12 16c: (7c 01 17 ec|ec 17 01 7c) dcbz r1,r2 170: (7c 05 37 ec|ec 37 05 7c) dcbz r5,r6 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/a2.d binutils-2.25.1/gas/testsuite/gas/ppc/a2.d --- binutils-2.25/gas/testsuite/gas/ppc/a2.d 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/a2.d 2015-07-21 10:20:58.000000000 +0200 @@ -117,12 +117,12 @@ 164: (7c 0a 58 6c|6c 58 0a 7c) dcbst r10,r11 168: (7c 0a 58 7e|7e 58 0a 7c) dcbstep r10,r11 16c: (7c 0a 5a 2c|2c 5a 0a 7c) dcbt r10,r11 - 170: (7c 2a 5a 2c|2c 5a 2a 7c) dcbt r10,r11,1 + 170: (7c 2a 5a 2c|2c 5a 2a 7c) dcbt 1,r10,r11 174: (7d 4b 62 7e|7e 62 4b 7d) dcbtep r10,r11,r12 178: (7c 0a 59 4c|4c 59 0a 7c) dcbtls r10,r11 17c: (7c 2a 59 4c|4c 59 2a 7c) dcbtls 1,r10,r11 180: (7c 0a 59 ec|ec 59 0a 7c) dcbtst r10,r11 - 184: (7c 2a 59 ec|ec 59 2a 7c) dcbtst r10,r11,1 + 184: (7c 2a 59 ec|ec 59 2a 7c) dcbtst 1,r10,r11 188: (7d 4b 61 fe|fe 61 4b 7d) dcbtstep r10,r11,r12 18c: (7c 0a 59 0c|0c 59 0a 7c) dcbtstls r10,r11 190: (7c 2a 59 0c|0c 59 2a 7c) dcbtstls 1,r10,r11 @@ -347,7 +347,7 @@ 4fc: (7c 00 04 00|00 04 00 7c) mcrxr cr0 500: (7d 80 04 00|00 04 80 7d) mcrxr cr3 504: (7c 60 00 26|26 00 60 7c) mfcr r3 - 508: (7c 60 00 26|26 00 60 7c) mfcr r3 + 508: (7c 70 20 26|26 20 70 7c) mfocrf r3,2 50c: (7c 70 10 26|26 10 70 7c) mfocrf r3,1 510: (7c 78 00 26|26 00 78 7c) mfocrf r3,128 514: (7d 4a 3a 87|87 3a 4a 7d) mfdcr\. r10,234 @@ -544,9 +544,9 @@ 810: (7e 95 01 90|90 01 95 7e) subfze r20,r21 814: (7e 95 05 91|91 05 95 7e) subfzeo\. r20,r21 818: (7e 95 05 90|90 05 95 7e) subfzeo r20,r21 - 81c: (7c 00 04 ac|ac 04 00 7c) sync - 820: (7c 00 04 ac|ac 04 00 7c) sync - 824: (7c 00 04 ac|ac 04 00 7c) sync + 81c: (7c 00 04 ac|ac 04 00 7c) hwsync + 820: (7c 00 04 ac|ac 04 00 7c) hwsync + 824: (7c 00 04 ac|ac 04 00 7c) hwsync 828: (7c 20 04 ac|ac 04 20 7c) lwsync 82c: (7c aa 58 88|88 58 aa 7c) tdlge r10,r11 830: (08 aa 00 64|64 00 aa 08) tdlgei r10,100 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/a2.s binutils-2.25.1/gas/testsuite/gas/ppc/a2.s --- binutils-2.25/gas/testsuite/gas/ppc/a2.s 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/a2.s 2015-07-21 10:20:58.000000000 +0200 @@ -91,13 +91,13 @@ dcblc 1,10,11 dcbst 10,11 dcbstep 10,11 - dcbt 10,11,0 - dcbt 10,11,1 + dcbt 0,10,11 + dcbt 1,10,11 dcbtep 10,11,12 dcbtls 0,10,11 dcbtls 1,10,11 - dcbtst 10,11,0 - dcbtst 10,11,1 + dcbtst 0,10,11 + dcbtst 1,10,11 dcbtstep 10,11,12 dcbtstls 0,10,11 dcbtstls 1,10,11 @@ -322,7 +322,7 @@ mcrxr 0 mcrxr 3 mfcr 3 - mfcr 3,0 + mfcr 3,0x02 mfcr 3,0x01 mfcr 3,0x80 mfdcr. 10,234 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/booke.d binutils-2.25.1/gas/testsuite/gas/ppc/booke.d --- binutils-2.25/gas/testsuite/gas/ppc/booke.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/booke.d 2015-07-21 10:20:58.000000000 +0200 @@ -39,5 +39,3 @@ 6c: (7c 17 43 a6|a6 43 17 7c) mtsprg 7,r0 70: (7c 17 43 a6|a6 43 17 7c) mtsprg 7,r0 74: (7c 05 32 2c|2c 32 05 7c) dcbt r5,r6 - 78: (7c 05 32 2c|2c 32 05 7c) dcbt r5,r6 - 7c: (7d 05 32 2c|2c 32 05 7d) dcbt 8,r5,r6 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/booke.s binutils-2.25.1/gas/testsuite/gas/ppc/booke.s --- binutils-2.25/gas/testsuite/gas/ppc/booke.s 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/booke.s 2015-07-21 10:20:58.000000000 +0200 @@ -38,5 +38,3 @@ mtsprg7 0 dcbt 5,6 - dcbt 0,5,6 - dcbt 8,5,6 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/e6500.d binutils-2.25.1/gas/testsuite/gas/ppc/e6500.d --- binutils-2.25/gas/testsuite/gas/ppc/e6500.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/e6500.d 2015-07-21 10:20:58.000000000 +0200 @@ -62,7 +62,7 @@ d0: (7c 00 04 ac|ac 04 00 7c) sync d4: (7c 00 04 ac|ac 04 00 7c) sync d8: (7c 20 04 ac|ac 04 20 7c) lwsync - dc: (7c 00 04 ac|ac 04 00 7c) sync + dc: (7c 21 04 ac|ac 04 21 7c) sync 1,1 e0: (7c 07 04 ac|ac 04 07 7c) sync 0,7 e4: (7c 28 04 ac|ac 04 28 7c) sync 1,8 e8: (7c 00 00 c3|c3 00 00 7c) dni 0,0 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/e6500.s binutils-2.25.1/gas/testsuite/gas/ppc/e6500.s --- binutils-2.25/gas/testsuite/gas/ppc/e6500.s 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/e6500.s 2015-07-21 10:20:58.000000000 +0200 @@ -56,9 +56,9 @@ sync sync 0,0 sync 1,0 - sync 2,0 - sync 3,7 - sync 3,8 + sync 1,1 + sync 0,7 + sync 1,8 dni 0,0 dni 31,31 dcblq. 2,0,1 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/power4.d binutils-2.25.1/gas/testsuite/gas/ppc/power4.d --- binutils-2.25/gas/testsuite/gas/ppc/power4.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/power4.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,7 +10,7 @@ Sections: Idx Name +Size +VMA +LMA +File off +Algn - +0 \.text +0+c8 +0+ +0+ +.* + +0 \.text +0+e8 +0+ +0+ +.* +CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE +1 \.data +0+20 +0+ +0+ +.* +CONTENTS, ALLOC, LOAD, DATA @@ -98,3 +98,11 @@ .*: (f8 40 00 12|12 00 40 f8) stq r2,16\(0\) .*: (f8 05 00 12|12 00 05 f8) stq r0,16\(r5\) .*: (f8 45 00 12|12 00 45 f8) stq r2,16\(r5\) +.*: (7c 00 03 e4|e4 03 00 7c) slbia +.*: (7c 00 04 ac|ac 04 00 7c) hwsync +.*: (7c 00 04 ac|ac 04 00 7c) hwsync +.*: (7c 00 04 ac|ac 04 00 7c) hwsync +.*: (7c 20 04 ac|ac 04 20 7c) lwsync +.*: (7c 20 04 ac|ac 04 20 7c) lwsync +.*: (7c 40 04 ac|ac 04 40 7c) ptesync +.*: (7c 40 04 ac|ac 04 40 7c) ptesync diff -ruN binutils-2.25/gas/testsuite/gas/ppc/power4.s binutils-2.25.1/gas/testsuite/gas/ppc/power4.s --- binutils-2.25/gas/testsuite/gas/ppc/power4.s 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/power4.s 2015-07-21 10:20:58.000000000 +0200 @@ -71,6 +71,14 @@ stq 2,16(0) stq 0,16(5) stq 2,16(5) + slbia + hwsync + sync + sync 0 + lwsync + sync 1 + ptesync + sync 2 .section ".data" usym0: .llong 0xcafebabe diff -ruN binutils-2.25/gas/testsuite/gas/ppc/power6.d binutils-2.25.1/gas/testsuite/gas/ppc/power6.d --- binutils-2.25/gas/testsuite/gas/ppc/power6.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/power6.d 2015-07-21 10:20:58.000000000 +0200 @@ -71,4 +71,10 @@ f4: (7d 4b 60 94|94 60 4b 7d) addg6s r10,r11,r12 f8: (60 21 00 00|00 00 21 60) ori r1,r1,0 fc: (60 21 00 00|00 00 21 60) ori r1,r1,0 +.*: (7c 00 03 e4|e4 03 00 7c) slbia +.*: (7c 00 03 e4|e4 03 00 7c) slbia +.*: (7c e0 03 e4|e4 03 e0 7c) slbia 7 +.*: (7c 00 52 64|64 52 00 7c) tlbie r10 +.*: (7c 00 52 64|64 52 00 7c) tlbie r10 +.*: (7c 20 52 64|64 52 20 7c) tlbie r10,1 #pass diff -ruN binutils-2.25/gas/testsuite/gas/ppc/power6.s binutils-2.25.1/gas/testsuite/gas/ppc/power6.s --- binutils-2.25/gas/testsuite/gas/ppc/power6.s 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/power6.s 2015-07-21 10:20:58.000000000 +0200 @@ -66,3 +66,9 @@ addg6s 10,11,12 ori 1,1,0 .p2align 4,,15 + slbia + slbia 0 + slbia 7 + tlbie 10 + tlbie 10,0 + tlbie 10,1 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/power7.d binutils-2.25.1/gas/testsuite/gas/ppc/power7.d --- binutils-2.25/gas/testsuite/gas/ppc/power7.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/power7.d 2015-07-21 10:20:58.000000000 +0200 @@ -7,118 +7,105 @@ Disassembly of section \.text: 0+00 : - 0: (7c 64 2e 98|98 2e 64 7c) lxvd2x vs3,r4,r5 - 4: (7d 64 2e 99|99 2e 64 7d) lxvd2x vs43,r4,r5 - 8: (7c 64 2f 98|98 2f 64 7c) stxvd2x vs3,r4,r5 - c: (7d 64 2f 99|99 2f 64 7d) stxvd2x vs43,r4,r5 - 10: (f0 64 28 50|50 28 64 f0) xxmrghd vs3,vs4,vs5 - 14: (f1 6c 68 57|57 68 6c f1) xxmrghd vs43,vs44,vs45 - 18: (f0 64 2b 50|50 2b 64 f0) xxmrgld vs3,vs4,vs5 - 1c: (f1 6c 6b 57|57 6b 6c f1) xxmrgld vs43,vs44,vs45 - 20: (f0 64 28 50|50 28 64 f0) xxmrghd vs3,vs4,vs5 - 24: (f1 6c 68 57|57 68 6c f1) xxmrghd vs43,vs44,vs45 - 28: (f0 64 2b 50|50 2b 64 f0) xxmrgld vs3,vs4,vs5 - 2c: (f1 6c 6b 57|57 6b 6c f1) xxmrgld vs43,vs44,vs45 - 30: (f0 64 29 50|50 29 64 f0) xxpermdi vs3,vs4,vs5,1 - 34: (f1 6c 69 57|57 69 6c f1) xxpermdi vs43,vs44,vs45,1 - 38: (f0 64 2a 50|50 2a 64 f0) xxpermdi vs3,vs4,vs5,2 - 3c: (f1 6c 6a 57|57 6a 6c f1) xxpermdi vs43,vs44,vs45,2 - 40: (f0 64 27 80|80 27 64 f0) xvmovdp vs3,vs4 - 44: (f1 6c 67 87|87 67 6c f1) xvmovdp vs43,vs44 - 48: (f0 64 27 80|80 27 64 f0) xvmovdp vs3,vs4 - 4c: (f1 6c 67 87|87 67 6c f1) xvmovdp vs43,vs44 - 50: (f0 64 2f 80|80 2f 64 f0) xvcpsgndp vs3,vs4,vs5 - 54: (f1 6c 6f 87|87 6f 6c f1) xvcpsgndp vs43,vs44,vs45 - 58: (7c 00 00 7c|7c 00 00 7c) wait - 5c: (7c 00 00 7c|7c 00 00 7c) wait - 60: (7c 20 00 7c|7c 00 20 7c) waitrsv - 64: (7c 20 00 7c|7c 00 20 7c) waitrsv - 68: (7c 40 00 7c|7c 00 40 7c) waitimpl - 6c: (7c 40 00 7c|7c 00 40 7c) waitimpl - 70: (4c 00 03 24|24 03 00 4c) doze - 74: (4c 00 03 64|64 03 00 4c) nap - 78: (4c 00 03 a4|a4 03 00 4c) sleep - 7c: (4c 00 03 e4|e4 03 00 4c) rvwinkle - 80: (7c 83 01 34|34 01 83 7c) prtyw r3,r4 - 84: (7d cd 01 74|74 01 cd 7d) prtyd r13,r14 - 88: (7d 5c 02 a6|a6 02 5c 7d) mfcfar r10 - 8c: (7d 7c 03 a6|a6 03 7c 7d) mtcfar r11 - 90: (7c 83 2b f8|f8 2b 83 7c) cmpb r3,r4,r5 - 94: (7d 4b 66 2a|2a 66 4b 7d) lwzcix r10,r11,r12 - 98: (ee 11 90 04|04 90 11 ee) dadd f16,f17,f18 - 9c: (fe 96 c0 04|04 c0 96 fe) daddq f20,f22,f24 - a0: (7c 60 06 6c|6c 06 60 7c) dss 3 - a4: (7e 00 06 6c|6c 06 00 7e) dssall - a8: (7c 25 22 ac|ac 22 25 7c) dst r5,r4,1 - ac: (7e 08 3a ac|ac 3a 08 7e) dstt r8,r7,0 - b0: (7c 65 32 ec|ec 32 65 7c) dstst r5,r6,3 - b4: (7e 44 2a ec|ec 2a 44 7e) dststt r4,r5,2 - b8: (7d 4b 63 56|56 63 4b 7d) divwe r10,r11,r12 - bc: (7d 6c 6b 57|57 6b 6c 7d) divwe\. r11,r12,r13 - c0: (7d 8d 77 56|56 77 8d 7d) divweo r12,r13,r14 - c4: (7d ae 7f 57|57 7f ae 7d) divweo\. r13,r14,r15 - c8: (7d 4b 63 16|16 63 4b 7d) divweu r10,r11,r12 - cc: (7d 6c 6b 17|17 6b 6c 7d) divweu\. r11,r12,r13 - d0: (7d 8d 77 16|16 77 8d 7d) divweuo r12,r13,r14 - d4: (7d ae 7f 17|17 7f ae 7d) divweuo\. r13,r14,r15 - d8: (7e 27 d9 f8|f8 d9 27 7e) bpermd r7,r17,r27 - dc: (7e 8a 02 f4|f4 02 8a 7e) popcntw r10,r20 - e0: (7e 8a 03 f4|f4 03 8a 7e) popcntd r10,r20 - e4: (7e 95 b4 28|28 b4 95 7e) ldbrx r20,r21,r22 - e8: (7e 95 b5 28|28 b5 95 7e) stdbrx r20,r21,r22 - ec: (7d 40 56 ee|ee 56 40 7d) lfiwzx f10,0,r10 - f0: (7d 49 56 ee|ee 56 49 7d) lfiwzx f10,r9,r10 - f4: (ec 80 2e 9c|9c 2e 80 ec) fcfids f4,f5 - f8: (ec 80 2e 9d|9d 2e 80 ec) fcfids\. f4,f5 - fc: (ec 80 2f 9c|9c 2f 80 ec) fcfidus f4,f5 - 100: (ec 80 2f 9d|9d 2f 80 ec) fcfidus\. f4,f5 - 104: (fc 80 29 1c|1c 29 80 fc) fctiwu f4,f5 - 108: (fc 80 29 1d|1d 29 80 fc) fctiwu\. f4,f5 - 10c: (fc 80 29 1e|1e 29 80 fc) fctiwuz f4,f5 - 110: (fc 80 29 1f|1f 29 80 fc) fctiwuz\. f4,f5 - 114: (fc 80 2f 5c|5c 2f 80 fc) fctidu f4,f5 - 118: (fc 80 2f 5d|5d 2f 80 fc) fctidu\. f4,f5 - 11c: (fc 80 2f 5e|5e 2f 80 fc) fctiduz f4,f5 - 120: (fc 80 2f 5f|5f 2f 80 fc) fctiduz\. f4,f5 - 124: (fc 80 2f 9c|9c 2f 80 fc) fcfidu f4,f5 - 128: (fc 80 2f 9d|9d 2f 80 fc) fcfidu\. f4,f5 - 12c: (fc 0a 59 00|00 59 0a fc) ftdiv cr0,f10,f11 - 130: (ff 8a 59 00|00 59 8a ff) ftdiv cr7,f10,f11 - 134: (fc 00 51 40|40 51 00 fc) ftsqrt cr0,f10 - 138: (ff 80 51 40|40 51 80 ff) ftsqrt cr7,f10 - 13c: (7e 08 4a 2c|2c 4a 08 7e) dcbtt r8,r9 - 140: (7e 08 49 ec|ec 49 08 7e) dcbtstt r8,r9 - 144: (ed 40 66 44|44 66 40 ed) dcffix f10,f12 - 148: (ee 80 b6 45|45 b6 80 ee) dcffix\. f20,f22 - 14c: (7d 4b 60 68|68 60 4b 7d) lbarx r10,r11,r12 - 150: (7d 4b 60 68|68 60 4b 7d) lbarx r10,r11,r12 - 154: (7d 4b 60 69|69 60 4b 7d) lbarx r10,r11,r12,1 - 158: (7e 95 b0 e8|e8 b0 95 7e) lharx r20,r21,r22 - 15c: (7e 95 b0 e8|e8 b0 95 7e) lharx r20,r21,r22 - 160: (7e 95 b0 e9|e9 b0 95 7e) lharx r20,r21,r22,1 - 164: (7d 4b 65 6d|6d 65 4b 7d) stbcx\. r10,r11,r12 - 168: (7d 4b 65 ad|ad 65 4b 7d) sthcx\. r10,r11,r12 - 16c: (fd c0 78 30|30 78 c0 fd) fre f14,f15 - 170: (fd c0 78 31|31 78 c0 fd) fre\. f14,f15 - 174: (ed c0 78 30|30 78 c0 ed) fres f14,f15 - 178: (ed c0 78 31|31 78 c0 ed) fres\. f14,f15 - 17c: (fd c0 78 34|34 78 c0 fd) frsqrte f14,f15 - 180: (fd c0 78 35|35 78 c0 fd) frsqrte\. f14,f15 - 184: (ed c0 78 34|34 78 c0 ed) frsqrtes f14,f15 - 188: (ed c0 78 35|35 78 c0 ed) frsqrtes\. f14,f15 - 18c: (7c 43 27 1e|1e 27 43 7c) isel r2,r3,r4,28 - 190: (60 42 00 00|00 00 42 60) ori r2,r2,0 - 194: (60 00 00 00|00 00 00 60) nop - 198: (60 00 00 00|00 00 00 60) nop - 19c: (60 42 00 00|00 00 42 60) ori r2,r2,0 - 1a0: (7f 7b db 78|78 db 7b 7f) yield - 1a4: (7f 7b db 78|78 db 7b 7f) yield - 1a8: (7f bd eb 78|78 eb bd 7f) mdoio - 1ac: (7f bd eb 78|78 eb bd 7f) mdoio - 1b0: (7f de f3 78|78 f3 de 7f) mdoom - 1b4: (7f de f3 78|78 f3 de 7f) mdoom - 1b8: (7d 40 e2 a6|a6 e2 40 7d) mfppr r10 - 1bc: (7d 62 e2 a6|a6 e2 62 7d) mfppr32 r11 - 1c0: (7d 80 e3 a6|a6 e3 80 7d) mtppr r12 - 1c4: (7d a2 e3 a6|a6 e3 a2 7d) mtppr32 r13 +.*: (7c 64 2e 98|98 2e 64 7c) lxvd2x vs3,r4,r5 +.*: (7d 64 2e 99|99 2e 64 7d) lxvd2x vs43,r4,r5 +.*: (7c 64 2f 98|98 2f 64 7c) stxvd2x vs3,r4,r5 +.*: (7d 64 2f 99|99 2f 64 7d) stxvd2x vs43,r4,r5 +.*: (f0 64 28 50|50 28 64 f0) xxmrghd vs3,vs4,vs5 +.*: (f1 6c 68 57|57 68 6c f1) xxmrghd vs43,vs44,vs45 +.*: (f0 64 2b 50|50 2b 64 f0) xxmrgld vs3,vs4,vs5 +.*: (f1 6c 6b 57|57 6b 6c f1) xxmrgld vs43,vs44,vs45 +.*: (f0 64 28 50|50 28 64 f0) xxmrghd vs3,vs4,vs5 +.*: (f1 6c 68 57|57 68 6c f1) xxmrghd vs43,vs44,vs45 +.*: (f0 64 2b 50|50 2b 64 f0) xxmrgld vs3,vs4,vs5 +.*: (f1 6c 6b 57|57 6b 6c f1) xxmrgld vs43,vs44,vs45 +.*: (f0 64 29 50|50 29 64 f0) xxpermdi vs3,vs4,vs5,1 +.*: (f1 6c 69 57|57 69 6c f1) xxpermdi vs43,vs44,vs45,1 +.*: (f0 64 2a 50|50 2a 64 f0) xxpermdi vs3,vs4,vs5,2 +.*: (f1 6c 6a 57|57 6a 6c f1) xxpermdi vs43,vs44,vs45,2 +.*: (f0 64 27 80|80 27 64 f0) xvmovdp vs3,vs4 +.*: (f1 6c 67 87|87 67 6c f1) xvmovdp vs43,vs44 +.*: (f0 64 27 80|80 27 64 f0) xvmovdp vs3,vs4 +.*: (f1 6c 67 87|87 67 6c f1) xvmovdp vs43,vs44 +.*: (f0 64 2f 80|80 2f 64 f0) xvcpsgndp vs3,vs4,vs5 +.*: (f1 6c 6f 87|87 6f 6c f1) xvcpsgndp vs43,vs44,vs45 +.*: (4c 00 03 24|24 03 00 4c) doze +.*: (4c 00 03 64|64 03 00 4c) nap +.*: (4c 00 03 a4|a4 03 00 4c) sleep +.*: (4c 00 03 e4|e4 03 00 4c) rvwinkle +.*: (7c 83 01 34|34 01 83 7c) prtyw r3,r4 +.*: (7d cd 01 74|74 01 cd 7d) prtyd r13,r14 +.*: (7d 5c 02 a6|a6 02 5c 7d) mfcfar r10 +.*: (7d 7c 03 a6|a6 03 7c 7d) mtcfar r11 +.*: (7c 83 2b f8|f8 2b 83 7c) cmpb r3,r4,r5 +.*: (7d 4b 66 2a|2a 66 4b 7d) lwzcix r10,r11,r12 +.*: (ee 11 90 04|04 90 11 ee) dadd f16,f17,f18 +.*: (fe 96 c0 04|04 c0 96 fe) daddq f20,f22,f24 +.*: (7c 60 06 6c|6c 06 60 7c) dss 3 +.*: (7e 00 06 6c|6c 06 00 7e) dssall +.*: (7c 25 22 ac|ac 22 25 7c) dst r5,r4,1 +.*: (7e 08 3a ac|ac 3a 08 7e) dstt r8,r7,0 +.*: (7c 65 32 ec|ec 32 65 7c) dstst r5,r6,3 +.*: (7e 44 2a ec|ec 2a 44 7e) dststt r4,r5,2 +.*: (7d 4b 63 56|56 63 4b 7d) divwe r10,r11,r12 +.*: (7d 6c 6b 57|57 6b 6c 7d) divwe\. r11,r12,r13 +.*: (7d 8d 77 56|56 77 8d 7d) divweo r12,r13,r14 +.*: (7d ae 7f 57|57 7f ae 7d) divweo\. r13,r14,r15 +.*: (7d 4b 63 16|16 63 4b 7d) divweu r10,r11,r12 +.*: (7d 6c 6b 17|17 6b 6c 7d) divweu\. r11,r12,r13 +.*: (7d 8d 77 16|16 77 8d 7d) divweuo r12,r13,r14 +.*: (7d ae 7f 17|17 7f ae 7d) divweuo\. r13,r14,r15 +.*: (7e 27 d9 f8|f8 d9 27 7e) bpermd r7,r17,r27 +.*: (7e 8a 02 f4|f4 02 8a 7e) popcntw r10,r20 +.*: (7e 8a 03 f4|f4 03 8a 7e) popcntd r10,r20 +.*: (7e 95 b4 28|28 b4 95 7e) ldbrx r20,r21,r22 +.*: (7e 95 b5 28|28 b5 95 7e) stdbrx r20,r21,r22 +.*: (7d 40 56 ee|ee 56 40 7d) lfiwzx f10,0,r10 +.*: (7d 49 56 ee|ee 56 49 7d) lfiwzx f10,r9,r10 +.*: (ec 80 2e 9c|9c 2e 80 ec) fcfids f4,f5 +.*: (ec 80 2e 9d|9d 2e 80 ec) fcfids\. f4,f5 +.*: (ec 80 2f 9c|9c 2f 80 ec) fcfidus f4,f5 +.*: (ec 80 2f 9d|9d 2f 80 ec) fcfidus\. f4,f5 +.*: (fc 80 29 1c|1c 29 80 fc) fctiwu f4,f5 +.*: (fc 80 29 1d|1d 29 80 fc) fctiwu\. f4,f5 +.*: (fc 80 29 1e|1e 29 80 fc) fctiwuz f4,f5 +.*: (fc 80 29 1f|1f 29 80 fc) fctiwuz\. f4,f5 +.*: (fc 80 2f 5c|5c 2f 80 fc) fctidu f4,f5 +.*: (fc 80 2f 5d|5d 2f 80 fc) fctidu\. f4,f5 +.*: (fc 80 2f 5e|5e 2f 80 fc) fctiduz f4,f5 +.*: (fc 80 2f 5f|5f 2f 80 fc) fctiduz\. f4,f5 +.*: (fc 80 2f 9c|9c 2f 80 fc) fcfidu f4,f5 +.*: (fc 80 2f 9d|9d 2f 80 fc) fcfidu\. f4,f5 +.*: (fc 0a 59 00|00 59 0a fc) ftdiv cr0,f10,f11 +.*: (ff 8a 59 00|00 59 8a ff) ftdiv cr7,f10,f11 +.*: (fc 00 51 40|40 51 00 fc) ftsqrt cr0,f10 +.*: (ff 80 51 40|40 51 80 ff) ftsqrt cr7,f10 +.*: (7e 08 4a 2c|2c 4a 08 7e) dcbtt r8,r9 +.*: (7e 08 49 ec|ec 49 08 7e) dcbtstt r8,r9 +.*: (ed 40 66 44|44 66 40 ed) dcffix f10,f12 +.*: (ee 80 b6 45|45 b6 80 ee) dcffix\. f20,f22 +.*: (fd c0 78 30|30 78 c0 fd) fre f14,f15 +.*: (fd c0 78 31|31 78 c0 fd) fre\. f14,f15 +.*: (ed c0 78 30|30 78 c0 ed) fres f14,f15 +.*: (ed c0 78 31|31 78 c0 ed) fres\. f14,f15 +.*: (fd c0 78 34|34 78 c0 fd) frsqrte f14,f15 +.*: (fd c0 78 35|35 78 c0 fd) frsqrte\. f14,f15 +.*: (ed c0 78 34|34 78 c0 ed) frsqrtes f14,f15 +.*: (ed c0 78 35|35 78 c0 ed) frsqrtes\. f14,f15 +.*: (7c 43 27 1e|1e 27 43 7c) isel r2,r3,r4,28 +.*: (7f 7b db 78|78 db 7b 7f) yield +.*: (7f 7b db 78|78 db 7b 7f) yield +.*: (60 42 00 00|00 00 42 60) ori r2,r2,0 +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 42 00 00|00 00 42 60) ori r2,r2,0 +.*: (7f bd eb 78|78 eb bd 7f) mdoio +.*: (7f bd eb 78|78 eb bd 7f) mdoio +.*: (7f de f3 78|78 f3 de 7f) mdoom +.*: (7f de f3 78|78 f3 de 7f) mdoom +.*: (7d 40 e2 a6|a6 e2 40 7d) mfppr r10 +.*: (7d 62 e2 a6|a6 e2 62 7d) mfppr32 r11 +.*: (7d 80 e3 a6|a6 e3 80 7d) mtppr r12 +.*: (7d a2 e3 a6|a6 e3 a2 7d) mtppr32 r13 +.*: (7d 60 52 64|64 52 60 7d) tlbie r10,r11 #pass diff -ruN binutils-2.25/gas/testsuite/gas/ppc/power7.s binutils-2.25.1/gas/testsuite/gas/ppc/power7.s --- binutils-2.25/gas/testsuite/gas/ppc/power7.s 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/power7.s 2015-07-21 10:20:58.000000000 +0200 @@ -22,12 +22,6 @@ xvcpsgndp 43,44,44 xvcpsgndp 3,4,5 xvcpsgndp 43,44,45 - wait - wait 0 - waitrsv - wait 1 - waitimpl - wait 2 doze nap sleep @@ -83,14 +77,6 @@ dcbtstt 8,9 dcffix 10,12 dcffix. 20,22 - lbarx 10,11,12 - lbarx 10,11,12,0 - lbarx 10,11,12,1 - lharx 20,21,22 - lharx 20,21,22,0 - lharx 20,21,22,1 - stbcx. 10,11,12 - sthcx. 10,11,12 fre 14,15 fre. 14,15 fres 14,15 @@ -100,10 +86,10 @@ frsqrtes 14,15 frsqrtes. 14,15 isel 2,3,4,28 - ori 2,2,0 - .p2align 4,,15 yield or 27,27,27 + ori 2,2,0 + .p2align 4,,15 mdoio or 29,29,29 mdoom @@ -112,3 +98,4 @@ mfppr32 11 mtppr 12 mtppr32 13 + tlbie 10,11 diff -ruN binutils-2.25/gas/testsuite/gas/ppc/power8.d binutils-2.25.1/gas/testsuite/gas/ppc/power8.d --- binutils-2.25/gas/testsuite/gas/ppc/power8.d 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/power8.d 2015-07-21 10:20:58.000000000 +0200 @@ -27,9 +27,9 @@ 44: (60 42 00 00|00 00 42 60) ori r2,r2,0 48: (60 00 00 00|00 00 00 60) nop 4c: (60 42 00 00|00 00 42 60) ori r2,r2,0 - 50: (4c 00 01 24|24 01 00 4c) rfebb - 54: (4c 00 01 24|24 01 00 4c) rfebb - 58: (4c 00 09 24|24 09 00 4c) rfebb 1 + 50: (4c 00 01 24|24 01 00 4c) rfebb 0 + 54: (4c 00 09 24|24 09 00 4c) rfebb + 58: (4c 00 09 24|24 09 00 4c) rfebb 5c: (4d 95 04 60|60 04 95 4d) bctar- 12,4\*cr5\+gt 60: (4c 87 04 61|61 04 87 4c) bctarl- 4,4\*cr1\+so 64: (4d ac 04 60|60 04 ac 4d) bctar\+ 12,4\*cr3\+lt diff -ruN binutils-2.25/gas/testsuite/gas/ppc/titan.d binutils-2.25.1/gas/testsuite/gas/ppc/titan.d --- binutils-2.25/gas/testsuite/gas/ppc/titan.d 2013-11-04 16:33:38.000000000 +0100 +++ binutils-2.25.1/gas/testsuite/gas/ppc/titan.d 2015-07-21 10:20:58.000000000 +0200 @@ -229,8 +229,8 @@ 36c: (7c 9f 62 a6|a6 62 9f 7c) mfivor15 r4 370: (7c 93 82 a6|a6 82 93 7c) mfivor35 r4 374: (7c 93 82 a6|a6 82 93 7c) mfivor35 r4 - 378: (7c 9a 8a a6|a6 8a 9a 7c) mfdc_dat r4 - 37c: (7c 9a 8a a6|a6 8a 9a 7c) mfdc_dat r4 + 378: (7c 9a 8a a6|a6 8a 9a 7c) mfmcsrr0 r4 + 37c: (7c 9a 8a a6|a6 8a 9a 7c) mfmcsrr0 r4 380: (7c 9b 8a a6|a6 8a 9b 7c) mfmcsrr1 r4 384: (7c 9b 8a a6|a6 8a 9b 7c) mfmcsrr1 r4 388: (7c 9c 8a a6|a6 8a 9c 7c) mfmcsr r4 diff -ruN binutils-2.25/gold/ChangeLog binutils-2.25.1/gold/ChangeLog --- binutils-2.25/gold/ChangeLog 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gold/ChangeLog 2015-07-21 10:20:58.000000000 +0200 @@ -1,3 +1,119 @@ +2015-07-06 Doug Kwan + + Apply from master + 2015-06-29 Doug Kwan + + * testsuite/arm_bl_out_of_range.s: Align stub table so that it appears + at address expected by test. + * testsuite/arm_cortex_a8_b.s: Ditto. + * testsuite/arm_cortex_a8_b_cond.s: Ditto. + * testsuite/arm_cortex_a8_bl.s: Ditto. + * testsuite/arm_cortex_a8_blx.s: Ditto. + * testsuite/arm_cortex_a8_local.s: Ditto. + * testsuite/arm_fix_v4bx.s: Ditto. + * testsuite/arm_unaligned_reloc.s: Ditto. + * testsuite/thumb_bl_out_of_range.s: Ditto. + * testsuite/thumb_bl_out_of_range_local.s: Ditto. + * testsuite/thumb_blx_out_of_range.s: Ditto. + +2015-06-05 Alan Modra + + Apply from master + 2015-05-16 Alan Modra + * reloc.cc (Sized_relobj_file::find_functions): Use function_location. + * powerpc.cc (Target_powerpc::do_calls_non_split): New function. + (addi_12_1, addis_2_12, addis_12_1, cmpld_7_12_0): New constants. + (lis_0): Rename from lis_0_0. + + 2015-04-28 Alan Modra + * powerpc.cc (Target_powerpc::do_dynsym_value): Use Address rather + than unsigned int for find_global_entry result temp. Compare + against invalid_address. + (Target_powerpc::do_plt_address_for_global): Likewise. + (Target_powerpc::Relocate::relocate): Likewise. Don't assert + on plt call stub existence for debug info. Do assert for plt + and global entry stub existence if an alloc section. + + 2015-04-28 Alan Modra + * powerpc.cc (Target_powerpc::Relocate::relocate): Don't assert + on missing global entry stub due to bogus debug info. + + 2015-03-24 Alan Modra + PR 18147 + * powerpc.cc (Target_powerpc::Relocate::relocate): Don't report + relocation errors for branches to strong undefined symbols. + +2015-03-18 Alan Modra + + Apply from master + 2015-02-24 Alan Modra + PR 18010 + * powerpc.cc (Powerpc_relocate_functions::addr16_ds): Always + complain if value is not a multiple of four. + (Target_powerpc::Relocate::relocate): Correct handling of + R_POWERPC_GOT_TPREL16 and R_POWERPC_GOT_TPREL16_LO for ppc64. + + 2015-02-18 Alan Modra + PR 17954 + * powerpc.cc (Global_symbol_visitor_opd::operator()): Set default + visibility. + +2015-02-22 H.J. Lu + + Cherry-pick from master + 2015-02-21 H.J. Lu + + * configure.ac (default_size): Set to 32 for x32. + * configure: Regenerated. + +2015-02-11 Alan Modra + + Apply from master + 2015-01-29 Alan Modra + * powerpc.cc (Target_powerpc::Relocate::relocate): Correct GOT_TLSLD + and GOT_TLSGD to LE optimization. + + 2015-01-22 Alan Modra + * powerpc.cc (Target_powerpc::Scan::local ): Correct + condition for need of ifunc plt entry. + (Target_powerpc::Scan::global ): Likewise. + + 2014-12-22 Cary Coutant + * powerpc.cc (Target_powerpc::relocate): Fix overflow check. + +2015-01-06 H.J. Lu + Cary Coutant + + PR gold/17729 + * configure.ac (DEFAULT_TARGET_X86_64): Don't set for x32. + (DEFAULT_TARGET_X32): Set for x32. + * x86_64.cc (cmp_insn_32): New. + (lea_r10_insn_32): Likewise. + (lea_r11_insn_32): Likewise. + (cmp_insn_64): Likewise. + (lea_r10_insn_64): Likewise. + (lea_r11_insn_64): Likewise. + (Target_x86_64::do_calls_non_split): Handle x32. + * testsuite/Makefile.am (check_SCRIPTS): Add split_x32.sh. + (check_DATA): Add split_x32 files. + (split_x32_[1234n].o): New targets. + (split_x32_[124]): New targets. + (split_x32_[1234r].stdout): New targets. + * testsuite/split_x32.sh: New file. + * testsuite/split_x32_1.s: Likewise. + * testsuite/split_x32_2.s: Likewise. + * testsuite/split_x32_3.s: Likewise. + * testsuite/split_x32_4.s: Likewise. + * testsuite/split_x32_n.s: Likewise. + * configure: Regenerated. + * testsuite/Makefile.in: Likewise. + +2015-01-06 H.J. Lu + + PR gold/17809 + * x86_64.cc (Target_x86_64::Relocate::tls_ie_to_le): Handle + x32. + 2014-12-04 Alan Modra * Powerpc.cc (Target_powerpc::Branch_info::make_stub): Ignore diff -ruN binutils-2.25/gold/configure binutils-2.25.1/gold/configure --- binutils-2.25/gold/configure 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/gold/configure 2015-07-21 10:20:58.000000000 +0200 @@ -688,6 +688,8 @@ DEFAULT_TARGET_MIPS_TRUE DEFAULT_TARGET_TILEGX_FALSE DEFAULT_TARGET_TILEGX_TRUE +DEFAULT_TARGET_X32_FALSE +DEFAULT_TARGET_X32_TRUE DEFAULT_TARGET_X86_64_FALSE DEFAULT_TARGET_X86_64_TRUE DEFAULT_TARGET_SPARC_FALSE @@ -3475,7 +3477,20 @@ DEFAULT_TARGET_SPARC_FALSE= fi - if test "$targ_obj" = "x86_64"; then + target_x86_64=no + target_x32=no + if test "$targ_obj" = "x86_64"; then + case "$target" in + x86_64*-linux-gnux32) + target_x32=yes + default_size=32 + ;; + *) + target_x86_64=yes + ;; + esac + fi + if test "$target_x86_64" = "yes"; then DEFAULT_TARGET_X86_64_TRUE= DEFAULT_TARGET_X86_64_FALSE='#' else @@ -3483,6 +3498,14 @@ DEFAULT_TARGET_X86_64_FALSE= fi + if test "$target_x32" = "yes"; then + DEFAULT_TARGET_X32_TRUE= + DEFAULT_TARGET_X32_FALSE='#' +else + DEFAULT_TARGET_X32_TRUE='#' + DEFAULT_TARGET_X32_FALSE= +fi + if test "$targ_obj" = "tilegx"; then DEFAULT_TARGET_TILEGX_TRUE= DEFAULT_TARGET_TILEGX_FALSE='#' @@ -7811,6 +7834,10 @@ as_fn_error "conditional \"DEFAULT_TARGET_X86_64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${DEFAULT_TARGET_X32_TRUE}" && test -z "${DEFAULT_TARGET_X32_FALSE}"; then + as_fn_error "conditional \"DEFAULT_TARGET_X32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${DEFAULT_TARGET_TILEGX_TRUE}" && test -z "${DEFAULT_TARGET_TILEGX_FALSE}"; then as_fn_error "conditional \"DEFAULT_TARGET_TILEGX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff -ruN binutils-2.25/gold/configure.ac binutils-2.25.1/gold/configure.ac --- binutils-2.25/gold/configure.ac 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/gold/configure.ac 2015-07-21 10:20:58.000000000 +0200 @@ -204,7 +204,21 @@ AM_CONDITIONAL(DEFAULT_TARGET_I386, test "$targ_obj" = "i386") AM_CONDITIONAL(DEFAULT_TARGET_POWERPC, test "$targ_obj" = "powerpc") AM_CONDITIONAL(DEFAULT_TARGET_SPARC, test "$targ_obj" = "sparc") - AM_CONDITIONAL(DEFAULT_TARGET_X86_64, test "$targ_obj" = "x86_64") + target_x86_64=no + target_x32=no + if test "$targ_obj" = "x86_64"; then + case "$target" in + x86_64*-linux-gnux32) + target_x32=yes + default_size=32 + ;; + *) + target_x86_64=yes + ;; + esac + fi + AM_CONDITIONAL(DEFAULT_TARGET_X86_64, test "$target_x86_64" = "yes") + AM_CONDITIONAL(DEFAULT_TARGET_X32, test "$target_x32" = "yes") AM_CONDITIONAL(DEFAULT_TARGET_TILEGX, test "$targ_obj" = "tilegx") AM_CONDITIONAL(DEFAULT_TARGET_MIPS, test "$targ_obj" = "mips") DEFAULT_TARGET=${targ_obj} diff -ruN binutils-2.25/gold/powerpc.cc binutils-2.25.1/gold/powerpc.cc --- binutils-2.25/gold/powerpc.cc 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/gold/powerpc.cc 2015-07-21 10:20:58.000000000 +0200 @@ -604,6 +604,13 @@ do_can_check_for_function_pointers() const { return true; } + // Adjust -fsplit-stack code which calls non-split-stack code. + void + do_calls_non_split(Relobj* object, unsigned int shndx, + section_offset_type fnoffset, section_size_type fnsize, + unsigned char* view, section_size_type view_size, + std::string* from, std::string* to) const; + // Relocate a section. void relocate_section(const Relocate_info*, @@ -1626,7 +1633,7 @@ addr16_ds(unsigned char* view, Address value, Overflow_check overflow) { Status stat = This::template rela<16,16>(view, 0, 0xfffc, value, overflow); - if (overflow != CHECK_NONE && (value & 3) != 0) + if ((value & 3) != 0) stat = STATUS_OVERFLOW; return stat; } @@ -3089,14 +3096,15 @@ static const uint32_t addi_2_2 = 0x38420000; static const uint32_t addi_3_3 = 0x38630000; static const uint32_t addi_11_11 = 0x396b0000; +static const uint32_t addi_12_1 = 0x39810000; static const uint32_t addi_12_12 = 0x398c0000; static const uint32_t addis_0_2 = 0x3c020000; static const uint32_t addis_0_13 = 0x3c0d0000; -static const uint32_t addis_3_2 = 0x3c620000; -static const uint32_t addis_3_13 = 0x3c6d0000; +static const uint32_t addis_2_12 = 0x3c4c0000; static const uint32_t addis_11_2 = 0x3d620000; static const uint32_t addis_11_11 = 0x3d6b0000; static const uint32_t addis_11_30 = 0x3d7e0000; +static const uint32_t addis_12_1 = 0x3d810000; static const uint32_t addis_12_2 = 0x3d820000; static const uint32_t addis_12_12 = 0x3d8c0000; static const uint32_t b = 0x48000000; @@ -3104,6 +3112,7 @@ static const uint32_t bctr = 0x4e800420; static const uint32_t blr = 0x4e800020; static const uint32_t bnectr_p4 = 0x4ce20420; +static const uint32_t cmpld_7_12_0 = 0x7fac0040; static const uint32_t cmpldi_2_0 = 0x28220000; static const uint32_t cror_15_15_15 = 0x4def7b82; static const uint32_t cror_31_31_31 = 0x4ffffb82; @@ -3120,7 +3129,7 @@ static const uint32_t lfd_0_1 = 0xc8010000; static const uint32_t li_0_0 = 0x38000000; static const uint32_t li_12_0 = 0x39800000; -static const uint32_t lis_0_0 = 0x3c000000; +static const uint32_t lis_0 = 0x3c000000; static const uint32_t lis_11 = 0x3d600000; static const uint32_t lis_12 = 0x3d800000; static const uint32_t lvx_0_12_0 = 0x7c0c00ce; @@ -4534,7 +4543,7 @@ } else { - write_insn(p, lis_0_0 + hi(indx)), p += 4; + write_insn(p, lis_0 + hi(indx)), p += 4; write_insn(p, ori_0_0_0 + l(indx)), p += 4; } } @@ -5584,8 +5593,8 @@ if (!parameters->options().output_is_position_independent()) { - if ((size == 32 && is_ifunc) - || (size == 64 && target->abiversion() >= 2)) + if (is_ifunc + && (size == 32 || target->abiversion() >= 2)) got->add_local_plt(object, r_sym, GOT_TYPE_STANDARD); else got->add_local(object, r_sym, GOT_TYPE_STANDARD); @@ -6032,8 +6041,8 @@ got = target->got_section(symtab, layout); if (gsym->final_value_is_known()) { - if ((size == 32 && is_ifunc) - || (size == 64 && target->abiversion() >= 2)) + if (is_ifunc + && (size == 32 || target->abiversion() >= 2)) got->add_global_plt(gsym, GOT_TYPE_STANDARD); else got->add_global(gsym, GOT_TYPE_STANDARD); @@ -6393,6 +6402,113 @@ } } +// FNOFFSET in section SHNDX in OBJECT is the start of a function +// compiled with -fsplit-stack. The function calls non-split-stack +// code. Change the function to ensure it has enough stack space to +// call some random function. + +template +void +Target_powerpc::do_calls_non_split( + Relobj* object, + unsigned int shndx, + section_offset_type fnoffset, + section_size_type fnsize, + unsigned char* view, + section_size_type view_size, + std::string* from, + std::string* to) const +{ + // 32-bit not supported. + if (size == 32) + { + // warn + Target::do_calls_non_split(object, shndx, fnoffset, fnsize, + view, view_size, from, to); + return; + } + + // The function always starts with + // ld %r0,-0x7000-64(%r13) # tcbhead_t.__private_ss + // addis %r12,%r1,-allocate@ha + // addi %r12,%r12,-allocate@l + // cmpld %r12,%r0 + // but note that the addis or addi may be replaced with a nop + + unsigned char *entry = view + fnoffset; + uint32_t insn = elfcpp::Swap<32, big_endian>::readval(entry); + + if ((insn & 0xffff0000) == addis_2_12) + { + /* Skip ELFv2 global entry code. */ + entry += 8; + insn = elfcpp::Swap<32, big_endian>::readval(entry); + } + + unsigned char *pinsn = entry; + bool ok = false; + const uint32_t ld_private_ss = 0xe80d8fc0; + if (insn == ld_private_ss) + { + int32_t allocate = 0; + while (1) + { + pinsn += 4; + insn = elfcpp::Swap<32, big_endian>::readval(pinsn); + if ((insn & 0xffff0000) == addis_12_1) + allocate += (insn & 0xffff) << 16; + else if ((insn & 0xffff0000) == addi_12_1 + || (insn & 0xffff0000) == addi_12_12) + allocate += ((insn & 0xffff) ^ 0x8000) - 0x8000; + else if (insn != nop) + break; + } + if (insn == cmpld_7_12_0 && pinsn == entry + 12) + { + int extra = parameters->options().split_stack_adjust_size(); + allocate -= extra; + if (allocate >= 0 || extra < 0) + { + object->error(_("split-stack stack size overflow at " + "section %u offset %0zx"), + shndx, static_cast(fnoffset)); + return; + } + pinsn = entry + 4; + insn = addis_12_1 | (((allocate + 0x8000) >> 16) & 0xffff); + if (insn != addis_12_1) + { + elfcpp::Swap<32, big_endian>::writeval(pinsn, insn); + pinsn += 4; + insn = addi_12_12 | (allocate & 0xffff); + if (insn != addi_12_12) + { + elfcpp::Swap<32, big_endian>::writeval(pinsn, insn); + pinsn += 4; + } + } + else + { + insn = addi_12_1 | (allocate & 0xffff); + elfcpp::Swap<32, big_endian>::writeval(pinsn, insn); + pinsn += 4; + } + if (pinsn != entry + 12) + elfcpp::Swap<32, big_endian>::writeval(pinsn, nop); + + ok = true; + } + } + + if (!ok) + { + if (!object->has_no_split_stack()) + object->error(_("failed to match split-stack sequence at " + "section %u offset %0zx"), + shndx, static_cast(fnoffset)); + } +} + // Scan relocations for a section. template @@ -6466,6 +6582,7 @@ && symobj->get_opd_discard(sym->value())) { sym->set_undefined(); + sym->set_visibility(elfcpp::STV_DEFAULT); sym->set_is_defined_in_discarded_section(); sym->set_symtab_index(-1U); } @@ -6748,9 +6865,12 @@ && !parameters->options().output_is_position_independent() && !is_branch_reloc(r_type)) { - unsigned int off = target->glink_section()->find_global_entry(gsym); - gold_assert(off != (unsigned int)-1); - value = target->glink_section()->global_entry_address() + off; + Address off = target->glink_section()->find_global_entry(gsym); + if (off != invalid_address) + { + value = target->glink_section()->global_entry_address() + off; + has_stub_value = true; + } } else { @@ -6762,18 +6882,26 @@ if (target->stub_tables().size() != 0) stub_table = target->stub_tables()[0]; } - gold_assert(stub_table != NULL); - Address off; - if (gsym != NULL) - off = stub_table->find_plt_call_entry(object, gsym, r_type, - rela.get_r_addend()); - else - off = stub_table->find_plt_call_entry(object, r_sym, r_type, - rela.get_r_addend()); - gold_assert(off != invalid_address); - value = stub_table->stub_address() + off; + if (stub_table != NULL) + { + Address off; + if (gsym != NULL) + off = stub_table->find_plt_call_entry(object, gsym, r_type, + rela.get_r_addend()); + else + off = stub_table->find_plt_call_entry(object, r_sym, r_type, + rela.get_r_addend()); + if (off != invalid_address) + { + value = stub_table->stub_address() + off; + has_stub_value = true; + } + } } - has_stub_value = true; + // We don't care too much about bogus debug references to + // non-local functions, but otherwise there had better be a plt + // call stub or global entry stub as appropriate. + gold_assert(has_stub_value || !(os->flags() & elfcpp::SHF_ALLOC)); } if (r_type == elfcpp::R_POWERPC_GOT16 @@ -6921,9 +7049,12 @@ || r_type == elfcpp::R_POWERPC_GOT_TLSGD16_LO) { Insn* iview = reinterpret_cast(view - 2 * big_endian); - Insn insn = addis_3_13; + Insn insn = elfcpp::Swap<32, big_endian>::readval(iview); + insn &= (1 << 26) - (1 << 21); // extract rt if (size == 32) - insn = addis_3_2; + insn |= addis_0_2; + else + insn |= addis_0_13; elfcpp::Swap<32, big_endian>::writeval(iview, insn); r_type = elfcpp::R_POWERPC_TPREL16_HA; value = psymval->value(object, rela.get_r_addend()); @@ -6956,9 +7087,12 @@ || r_type == elfcpp::R_POWERPC_GOT_TLSLD16_LO) { Insn* iview = reinterpret_cast(view - 2 * big_endian); - Insn insn = addis_3_13; + Insn insn = elfcpp::Swap<32, big_endian>::readval(iview); + insn &= (1 << 26) - (1 << 21); // extract rt if (size == 32) - insn = addis_3_2; + insn |= addis_0_2; + else + insn |= addis_0_13; elfcpp::Swap<32, big_endian>::writeval(iview, insn); r_type = elfcpp::R_POWERPC_TPREL16_HA; value = dtp_offset; @@ -7452,7 +7586,6 @@ Insn* iview = reinterpret_cast(view - 2 * big_endian); Insn insn = elfcpp::Swap<32, big_endian>::readval(iview); - overflow = Reloc::CHECK_SIGNED; if ((insn & (0x3f << 26)) == 10u << 26 /* cmpli */) overflow = Reloc::CHECK_BITFIELD; else if (overflow == Reloc::CHECK_LOW_INSN @@ -7463,6 +7596,8 @@ || (insn & (0x3f << 26)) == 25u << 26 /* oris */ || (insn & (0x3f << 26)) == 27u << 26 /* xoris */)) overflow = Reloc::CHECK_UNSIGNED; + else + overflow = Reloc::CHECK_SIGNED; } typename Powerpc_relocate_functions::Status status @@ -7512,8 +7647,11 @@ case elfcpp::R_POWERPC_GOT_DTPREL16: case elfcpp::R_POWERPC_GOT_DTPREL16_LO: + case elfcpp::R_POWERPC_GOT_TPREL16: + case elfcpp::R_POWERPC_GOT_TPREL16_LO: if (size == 64) { + // On ppc64 these are all ds form status = Reloc::addr16_ds(view, value, overflow); break; } @@ -7526,7 +7664,6 @@ case elfcpp::R_POWERPC_DTPREL16: case elfcpp::R_POWERPC_GOT_TLSGD16: case elfcpp::R_POWERPC_GOT_TLSLD16: - case elfcpp::R_POWERPC_GOT_TPREL16: case elfcpp::R_POWERPC_ADDR16_LO: case elfcpp::R_POWERPC_REL16_LO: case elfcpp::R_PPC64_TOC16_LO: @@ -7536,7 +7673,6 @@ case elfcpp::R_POWERPC_DTPREL16_LO: case elfcpp::R_POWERPC_GOT_TLSGD16_LO: case elfcpp::R_POWERPC_GOT_TLSLD16_LO: - case elfcpp::R_POWERPC_GOT_TPREL16_LO: status = Reloc::addr16(view, value, overflow); break; @@ -7706,7 +7842,7 @@ if (status != Powerpc_relocate_functions::STATUS_OK && (has_stub_value || !(gsym != NULL - && gsym->is_weak_undefined() + && gsym->is_undefined() && is_branch_reloc(r_type)))) { gold_error_at_location(relinfo, relnum, rela.get_r_offset(), @@ -8142,8 +8278,8 @@ } else if (this->abiversion() >= 2) { - unsigned int off = this->glink_section()->find_global_entry(gsym); - if (off != (unsigned int)-1) + Address off = this->glink_section()->find_global_entry(gsym); + if (off != invalid_address) return this->glink_section()->global_entry_address() + off; } gold_unreachable(); @@ -8192,8 +8328,8 @@ } else if (this->abiversion() >= 2) { - unsigned int off = this->glink_section()->find_global_entry(gsym); - if (off != (unsigned int)-1) + Address off = this->glink_section()->find_global_entry(gsym); + if (off != invalid_address) return this->glink_section()->global_entry_address() + off; } gold_unreachable(); diff -ruN binutils-2.25/gold/reloc.cc binutils-2.25.1/gold/reloc.cc --- binutils-2.25/gold/reloc.cc 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/gold/reloc.cc 2015-07-21 10:20:58.000000000 +0200 @@ -1415,13 +1415,21 @@ continue; bool is_ordinary; - unsigned int sym_shndx = this->adjust_sym_shndx(i, isym.get_st_shndx(), - &is_ordinary); - if (!is_ordinary || sym_shndx != shndx) + Symbol_location loc; + loc.shndx = this->adjust_sym_shndx(i, isym.get_st_shndx(), + &is_ordinary); + if (!is_ordinary) + continue; + + loc.object = this; + loc.offset = isym.get_st_value(); + parameters->target().function_location(&loc); + + if (loc.shndx != shndx) continue; section_offset_type value = - convert_to_section_size_type(isym.get_st_value()); + convert_to_section_size_type(loc.offset); section_size_type fnsize = convert_to_section_size_type(isym.get_st_size()); diff -ruN binutils-2.25/gold/testsuite/Makefile.am binutils-2.25.1/gold/testsuite/Makefile.am --- binutils-2.25/gold/testsuite/Makefile.am 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/gold/testsuite/Makefile.am 2015-07-21 10:20:58.000000000 +0200 @@ -2483,6 +2483,43 @@ endif DEFAULT_TARGET_X86_64 +if DEFAULT_TARGET_X32 + +check_SCRIPTS += split_x32.sh +check_DATA += split_x32_1.stdout split_x32_2.stdout \ + split_x32_3.stdout split_x32_4.stdout split_x32_r.stdout +SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 +split_x32_1.o: split_x32_1.s + $(TEST_AS) -o $@ $< +split_x32_2.o: split_x32_2.s + $(TEST_AS) -o $@ $< +split_x32_3.o: split_x32_3.s + $(TEST_AS) -o $@ $< +split_x32_4.o: split_x32_4.s + $(TEST_AS) -o $@ $< +split_x32_n.o: split_x32_n.s + $(TEST_AS) -o $@ $< +split_x32_1: split_x32_1.o split_x32_n.o ../ld-new + ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x32_1.o split_x32_n.o +split_x32_1.stdout: split_x32_1 + $(TEST_OBJDUMP) -d $< > $@ +split_x32_2: split_x32_2.o split_x32_n.o ../ld-new + ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x32_2.o split_x32_n.o +split_x32_2.stdout: split_x32_2 + $(TEST_OBJDUMP) -d $< > $@ +split_x32_3.stdout: split_x32_3.o split_x32_n.o ../ld-new + ../ld-new $(SPLIT_DEFSYMS) -o split_x32_3 split_x32_3.o split_x32_n.o > $@ 2>&1 || exit 0 +split_x32_4: split_x32_4.o split_x32_n.o ../ld-new + ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x32_4.o split_x32_n.o +split_x32_4.stdout: split_x32_4 + $(TEST_OBJDUMP) -d $< > $@ +split_x32_r.stdout: split_x32_1.o split_x32_n.o ../ld-new + ../ld-new -r split_x32_1.o split_x32_n.o -o split_x32_r > $@ 2>&1 || exit 0 +MOSTLYCLEANFILES += split_x32_1 split_x32_2 split_x32_3 \ + split_x32_4 split_x32_r + +endif DEFAULT_TARGET_X32 + if DEFAULT_TARGET_ARM check_SCRIPTS += arm_abs_global.sh diff -ruN binutils-2.25/gold/testsuite/Makefile.in binutils-2.25.1/gold/testsuite/Makefile.in --- binutils-2.25/gold/testsuite/Makefile.in 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/gold/testsuite/Makefile.in 2015-07-21 10:20:58.000000000 +0200 @@ -623,6 +623,13 @@ @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_83 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \ @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_4 split_x86_64_r +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_84 = split_x32.sh +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_85 = split_x32_1.stdout split_x32_2.stdout \ +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x32_3.stdout split_x32_4.stdout split_x32_r.stdout + +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_86 = split_x32_1 split_x32_2 split_x32_3 \ +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x32_4 split_x32_r + # ARM1176 workaround test. @@ -635,7 +642,7 @@ # Check Thumb to Thumb farcall veneers # Check Thumb to ARM farcall veneers -@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_84 = arm_abs_global.sh \ +@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_87 = arm_abs_global.sh \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_branch_in_range.sh \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_branch_out_of_range.sh \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_fix_v4bx.sh \ @@ -649,7 +656,7 @@ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_arm_thumb.sh \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_thumb.sh \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_arm.sh -@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_85 = arm_abs_global.stdout \ +@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_88 = arm_abs_global.stdout \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_in_range.stdout \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_out_of_range.stdout \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_in_range.stdout \ @@ -694,7 +701,7 @@ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_thumb_6m.stdout \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_arm.stdout \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_arm_5t.stdout -@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_86 = arm_abs_global \ +@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_89 = arm_abs_global \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_in_range \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_out_of_range \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_in_range \ @@ -737,10 +744,10 @@ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_thumb_6m \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_arm \ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_arm_5t -@DEFAULT_TARGET_X86_64_TRUE@am__append_87 = *.dwo *.dwp -@DEFAULT_TARGET_X86_64_TRUE@am__append_88 = dwp_test_1.sh \ +@DEFAULT_TARGET_X86_64_TRUE@am__append_90 = *.dwo *.dwp +@DEFAULT_TARGET_X86_64_TRUE@am__append_91 = dwp_test_1.sh \ @DEFAULT_TARGET_X86_64_TRUE@ dwp_test_2.sh -@DEFAULT_TARGET_X86_64_TRUE@am__append_89 = dwp_test_1.stdout \ +@DEFAULT_TARGET_X86_64_TRUE@am__append_92 = dwp_test_1.stdout \ @DEFAULT_TARGET_X86_64_TRUE@ dwp_test_2.stdout subdir = testsuite DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am @@ -2224,7 +2231,8 @@ $(am__append_41) $(am__append_47) $(am__append_63) \ $(am__append_66) $(am__append_69) $(am__append_72) \ $(am__append_74) $(am__append_77) $(am__append_80) \ - $(am__append_83) $(am__append_86) $(am__append_87) + $(am__append_83) $(am__append_86) $(am__append_89) \ + $(am__append_90) # We will add to these later, for each individual test. Note # that we add each test under check_SCRIPTS or check_PROGRAMS; @@ -2233,13 +2241,13 @@ $(am__append_42) $(am__append_45) $(am__append_61) \ $(am__append_64) $(am__append_67) $(am__append_70) \ $(am__append_75) $(am__append_78) $(am__append_81) \ - $(am__append_84) $(am__append_88) + $(am__append_84) $(am__append_87) $(am__append_91) check_DATA = $(am__append_3) $(am__append_27) $(am__append_29) \ $(am__append_35) $(am__append_39) $(am__append_43) \ $(am__append_46) $(am__append_62) $(am__append_65) \ $(am__append_68) $(am__append_71) $(am__append_76) \ $(am__append_79) $(am__append_82) $(am__append_85) \ - $(am__append_89) + $(am__append_88) $(am__append_92) BUILT_SOURCES = $(am__append_25) TESTS = $(check_SCRIPTS) $(check_PROGRAMS) @@ -2736,6 +2744,7 @@ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDFLAGS = $(exception_test_LDFLAGS) @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDADD = exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o @DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -4166,6 +4175,8 @@ @p='split_i386.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) split_x86_64.sh.log: split_x86_64.sh @p='split_x86_64.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +split_x32.sh.log: split_x32.sh + @p='split_x32.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) arm_abs_global.sh.log: arm_abs_global.sh @p='arm_abs_global.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) arm_branch_in_range.sh.log: arm_branch_in_range.sh @@ -5777,6 +5788,32 @@ @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_OBJDUMP) -d $< > $@ @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x86_64_r.stdout: split_x86_64_1.o split_x86_64_n.o ../ld-new @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new -r split_x86_64_1.o split_x86_64_n.o -o split_x86_64_r > $@ 2>&1 || exit 0 +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_1.o: split_x32_1.s +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $< +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_2.o: split_x32_2.s +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $< +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_3.o: split_x32_3.s +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $< +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_4.o: split_x32_4.s +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $< +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_n.o: split_x32_n.s +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $< +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_1: split_x32_1.o split_x32_n.o ../ld-new +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x32_1.o split_x32_n.o +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_1.stdout: split_x32_1 +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_OBJDUMP) -d $< > $@ +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_2: split_x32_2.o split_x32_n.o ../ld-new +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x32_2.o split_x32_n.o +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_2.stdout: split_x32_2 +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_OBJDUMP) -d $< > $@ +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_3.stdout: split_x32_3.o split_x32_n.o ../ld-new +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new $(SPLIT_DEFSYMS) -o split_x32_3 split_x32_3.o split_x32_n.o > $@ 2>&1 || exit 0 +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_4: split_x32_4.o split_x32_n.o ../ld-new +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x32_4.o split_x32_n.o +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_4.stdout: split_x32_4 +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_OBJDUMP) -d $< > $@ +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@split_x32_r.stdout: split_x32_1.o split_x32_n.o ../ld-new +@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new -r split_x32_1.o split_x32_n.o -o split_x32_r > $@ 2>&1 || exit 0 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_abs_lib.o: arm_abs_lib.s @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -march=armv7-a -o $@ $< @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@libarm_abs.so: arm_abs_lib.o ../ld-new diff -ruN binutils-2.25/gold/testsuite/arm_bl_out_of_range.s binutils-2.25.1/gold/testsuite/arm_bl_out_of_range.s --- binutils-2.25/gold/testsuite/arm_bl_out_of_range.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/arm_bl_out_of_range.s 2015-07-21 10:20:58.000000000 +0200 @@ -34,6 +34,9 @@ bl _forward_target .size _forward_test, .-_forward_test +# Align stub table for address matching + .align 8 + .section .text.post,"x" # Add padding so that target is just out of branch range. diff -ruN binutils-2.25/gold/testsuite/arm_cortex_a8_b.s binutils-2.25.1/gold/testsuite/arm_cortex_a8_b.s --- binutils-2.25/gold/testsuite/arm_cortex_a8_b.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/arm_cortex_a8_b.s 2015-07-21 10:20:58.000000000 +0200 @@ -28,3 +28,6 @@ add.w r0, r0, 0 b.w _func .size _test,.-_test + +# Align stub table for address matching. + .align 12 diff -ruN binutils-2.25/gold/testsuite/arm_cortex_a8_b_cond.s binutils-2.25.1/gold/testsuite/arm_cortex_a8_b_cond.s --- binutils-2.25/gold/testsuite/arm_cortex_a8_b_cond.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/arm_cortex_a8_b_cond.s 2015-07-21 10:20:58.000000000 +0200 @@ -28,3 +28,6 @@ add.w r0, r0, 0 beq.w _func .size _test,.-_test + +# Align stub table for address matching. + .align 12 diff -ruN binutils-2.25/gold/testsuite/arm_cortex_a8_bl.s binutils-2.25.1/gold/testsuite/arm_cortex_a8_bl.s --- binutils-2.25/gold/testsuite/arm_cortex_a8_bl.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/arm_cortex_a8_bl.s 2015-07-21 10:20:58.000000000 +0200 @@ -28,3 +28,6 @@ add.w r0, r0, 0 bl _func .size _test,.-_test + +# Align stub table for address matching. + .align 12 diff -ruN binutils-2.25/gold/testsuite/arm_cortex_a8_blx.s binutils-2.25.1/gold/testsuite/arm_cortex_a8_blx.s --- binutils-2.25/gold/testsuite/arm_cortex_a8_blx.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/arm_cortex_a8_blx.s 2015-07-21 10:20:58.000000000 +0200 @@ -30,4 +30,9 @@ # We have no mapping symbols for stubs. This make the disassembler # list the stub correctly in ARM mode. + .align 2 .arm + +# Align stub table for address matching. + .align 12 + diff -ruN binutils-2.25/gold/testsuite/arm_cortex_a8_local.s binutils-2.25.1/gold/testsuite/arm_cortex_a8_local.s --- binutils-2.25/gold/testsuite/arm_cortex_a8_local.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/arm_cortex_a8_local.s 2015-07-21 10:20:58.000000000 +0200 @@ -27,3 +27,6 @@ add.w r0, r0, 0 bpl.w .Lfunc .size _test,.-_test + +# Align stub table for address matching. + .align 12 diff -ruN binutils-2.25/gold/testsuite/arm_fix_v4bx.s binutils-2.25.1/gold/testsuite/arm_fix_v4bx.s --- binutils-2.25/gold/testsuite/arm_fix_v4bx.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/arm_fix_v4bx.s 2015-07-21 10:20:58.000000000 +0200 @@ -13,3 +13,6 @@ bx r0 bx r15 .size _start, .-_start + +# Align this to 256-byte boundary for easier address matching. + .align 8 diff -ruN binutils-2.25/gold/testsuite/arm_unaligned_reloc.s binutils-2.25.1/gold/testsuite/arm_unaligned_reloc.s --- binutils-2.25/gold/testsuite/arm_unaligned_reloc.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/arm_unaligned_reloc.s 2015-07-21 10:20:58.000000000 +0200 @@ -15,7 +15,7 @@ .word 1 .section .data.1,"aw",%progbits - .align 2 + .align 12 # This causes following relocations to be unaligned. .global padding diff -ruN binutils-2.25/gold/testsuite/split_x32.sh binutils-2.25.1/gold/testsuite/split_x32.sh --- binutils-2.25/gold/testsuite/split_x32.sh 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/split_x32.sh 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,55 @@ +#!/bin/sh + +# split_x32.sh -- test -fstack-split for x32 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# Written by Ian Lance Taylor . +# Modified by H.J. Lu . + +# This file is part of gold. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. + +match() +{ + if ! egrep "$1" "$2" >/dev/null 2>&1; then + echo 1>&2 "could not find '$1' in $2" + exit 1 + fi +} + +nomatch() +{ + if egrep "$1" "$2" >/dev/null 2>&1; then + echo 1>&2 "found unexpected '$1' in $2" + exit 1 + fi +} + +match 'cmp.*+%fs:[^,]*,%esp' split_x32_1.stdout +match 'callq.*__morestack>?$' split_x32_1.stdout +match 'lea.*-0x200\(%rsp\),' split_x32_1.stdout + +match 'stc' split_x32_2.stdout +match 'callq.*__morestack_non_split>?$' split_x32_2.stdout +nomatch 'callq.*__morestack>?$' split_x32_2.stdout +match 'lea.*-0x4200\(%rsp\),' split_x32_2.stdout + +match 'failed to match' split_x32_3.stdout + +match 'callq.*__morestack>?$' split_x32_4.stdout + +match 'cannot mix' split_x32_r.stdout diff -ruN binutils-2.25/gold/testsuite/split_x32_1.s binutils-2.25.1/gold/testsuite/split_x32_1.s --- binutils-2.25/gold/testsuite/split_x32_1.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/split_x32_1.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,33 @@ +# split_x32_1.s: x32 specific test case for -fsplit-stack. + + .text + + .global fn1 + .type fn1,@function +fn1: + cmp %fs:0x40,%esp + jae 1f + callq __morestack + retq +1: + callq fn2 + retq + + .size fn1,. - fn1 + + .global fn2 + .type fn2,@function +fn2: + lea -0x200(%rsp),%r10d + cmp %fs:0x40,%r10d + jae 1f + callq __morestack + retq +1: + callq fn1 + retq + + .size fn2,. - fn2 + + .section .note.GNU-stack,"",@progbits + .section .note.GNU-split-stack,"",@progbits diff -ruN binutils-2.25/gold/testsuite/split_x32_2.s binutils-2.25.1/gold/testsuite/split_x32_2.s --- binutils-2.25/gold/testsuite/split_x32_2.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/split_x32_2.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,33 @@ +# split_x32_2.s: x32 specific, -fsplit-stack calling non-split + + .text + + .global fn1 + .type fn1,@function +fn1: + cmp %fs:0x40,%esp + jae 1f + callq __morestack + retq +1: + callq fn3 + retq + + .size fn1,. - fn1 + + .global fn2 + .type fn2,@function +fn2: + lea -0x200(%rsp),%r10d + cmp %fs:0x40,%r10d + jae 1f + callq __morestack + retq +1: + callq fn3 + retq + + .size fn2,. - fn2 + + .section .note.GNU-stack,"",@progbits + .section .note.GNU-split-stack,"",@progbits diff -ruN binutils-2.25/gold/testsuite/split_x32_3.s binutils-2.25.1/gold/testsuite/split_x32_3.s --- binutils-2.25/gold/testsuite/split_x32_3.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/split_x32_3.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,22 @@ +# split_x32_3.s: x32 specific, adjustment failure + + .text + + .global fn1 + .type fn1,@function +fn1: + push %rbp + mov %esp,%ebp + cmp %fs:0x40,%esp + jae 1f + callq __morestack + retq +1: + callq fn3 + leaveq + retq + + .size fn1,. - fn1 + + .section .note.GNU-stack,"",@progbits + .section .note.GNU-split-stack,"",@progbits diff -ruN binutils-2.25/gold/testsuite/split_x32_4.s binutils-2.25.1/gold/testsuite/split_x32_4.s --- binutils-2.25/gold/testsuite/split_x32_4.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/split_x32_4.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,23 @@ +# split_x32_4.s: x32 specific, permitted adjustment failure + + .text + + .global fn1 + .type fn1,@function +fn1: + push %rbp + mov %esp,%ebp + cmp %fs:0x40,%esp + jae 1f + callq __morestack + retq +1: + callq fn3 + leaveq + retq + + .size fn1,. - fn1 + + .section .note.GNU-stack,"",@progbits + .section .note.GNU-split-stack,"",@progbits + .section .note.GNU-no-split-stack,"",@progbits diff -ruN binutils-2.25/gold/testsuite/split_x32_n.s binutils-2.25.1/gold/testsuite/split_x32_n.s --- binutils-2.25/gold/testsuite/split_x32_n.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/split_x32_n.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,12 @@ +# split_x32_n.s: x32 specific, -fsplit-stack calling non-split + + .text + + .global fn3 + .type fn3,@function +fn3: + retq + + .size fn3,. - fn3 + + .section .note.GNU-stack,"",@progbits diff -ruN binutils-2.25/gold/testsuite/thumb_bl_out_of_range.s binutils-2.25.1/gold/testsuite/thumb_bl_out_of_range.s --- binutils-2.25/gold/testsuite/thumb_bl_out_of_range.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/thumb_bl_out_of_range.s 2015-07-21 10:20:58.000000000 +0200 @@ -45,8 +45,11 @@ .size _forward_test, .-_forward_test # switch back to ARM mode so that stubs are disassembled correctly. + .align 2 .code 32 - nop + +# Align stub table for address matching. + .align 8 .section .text.post,"x" diff -ruN binutils-2.25/gold/testsuite/thumb_bl_out_of_range_local.s binutils-2.25.1/gold/testsuite/thumb_bl_out_of_range_local.s --- binutils-2.25/gold/testsuite/thumb_bl_out_of_range_local.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/thumb_bl_out_of_range_local.s 2015-07-21 10:20:58.000000000 +0200 @@ -45,8 +45,11 @@ .size _forward_test, .-_forward_test # Switch back to ARM mode so that we can see stubs + .align 2 .code 32 - nop + +# Align stub table for address matching. + .align 8 .section .text.post,"x" diff -ruN binutils-2.25/gold/testsuite/thumb_blx_out_of_range.s binutils-2.25.1/gold/testsuite/thumb_blx_out_of_range.s --- binutils-2.25/gold/testsuite/thumb_blx_out_of_range.s 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/gold/testsuite/thumb_blx_out_of_range.s 2015-07-21 10:20:58.000000000 +0200 @@ -50,9 +50,12 @@ .size _forward_test, .-_forward_test # switch back to ARM mode so that stubs are disassembled correctly. + .align 2 .code 32 - nop +# Align stub table for address matching. + .align 8 + .section .text.post,"x" # Add padding so that target is just out of branch range. diff -ruN binutils-2.25/gold/x86_64.cc binutils-2.25.1/gold/x86_64.cc --- binutils-2.25/gold/x86_64.cc 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/gold/x86_64.cc 2015-07-21 10:20:58.000000000 +0200 @@ -4100,6 +4100,8 @@ // movq if (op1 == 0x4c) view[-3] = 0x49; + else if (size == 32 && op1 == 0x44) + view[-3] = 0x41; view[-2] = 0xc7; view[-1] = 0xc0 | reg; } @@ -4108,6 +4110,8 @@ // Special handling for %rsp. if (op1 == 0x4c) view[-3] = 0x49; + else if (size == 32 && op1 == 0x44) + view[-3] = 0x41; view[-2] = 0x81; view[-1] = 0xc0 | reg; } @@ -4116,6 +4120,8 @@ // addq if (op1 == 0x4c) view[-3] = 0x4d; + else if (size == 32 && op1 == 0x44) + view[-3] = 0x45; view[-2] = 0x8d; view[-1] = 0x80 | reg | (reg << 3); } @@ -4457,6 +4463,14 @@ // code. We have to change the function so that it always ensures // that it has enough stack space to run some random function. +static const unsigned char cmp_insn_32[] = { 0x64, 0x3b, 0x24, 0x25 }; +static const unsigned char lea_r10_insn_32[] = { 0x44, 0x8d, 0x94, 0x24 }; +static const unsigned char lea_r11_insn_32[] = { 0x44, 0x8d, 0x9c, 0x24 }; + +static const unsigned char cmp_insn_64[] = { 0x64, 0x48, 0x3b, 0x24, 0x25 }; +static const unsigned char lea_r10_insn_64[] = { 0x4c, 0x8d, 0x94, 0x24 }; +static const unsigned char lea_r11_insn_64[] = { 0x4c, 0x8d, 0x9c, 0x24 }; + template void Target_x86_64::do_calls_non_split(Relobj* object, unsigned int shndx, @@ -4467,25 +4481,40 @@ std::string* from, std::string* to) const { + const char* const cmp_insn = reinterpret_cast + (size == 32 ? cmp_insn_32 : cmp_insn_64); + const char* const lea_r10_insn = reinterpret_cast + (size == 32 ? lea_r10_insn_32 : lea_r10_insn_64); + const char* const lea_r11_insn = reinterpret_cast + (size == 32 ? lea_r11_insn_32 : lea_r11_insn_64); + + const size_t cmp_insn_len = + (size == 32 ? sizeof(cmp_insn_32) : sizeof(cmp_insn_64)); + const size_t lea_r10_insn_len = + (size == 32 ? sizeof(lea_r10_insn_32) : sizeof(lea_r10_insn_64)); + const size_t lea_r11_insn_len = + (size == 32 ? sizeof(lea_r11_insn_32) : sizeof(lea_r11_insn_64)); + const size_t nop_len = (size == 32 ? 7 : 8); + // The function starts with a comparison of the stack pointer and a // field in the TCB. This is followed by a jump. // cmp %fs:NN,%rsp - if (this->match_view(view, view_size, fnoffset, "\x64\x48\x3b\x24\x25", 5) - && fnsize > 9) + if (this->match_view(view, view_size, fnoffset, cmp_insn, cmp_insn_len) + && fnsize > nop_len + 1) { // We will call __morestack if the carry flag is set after this // comparison. We turn the comparison into an stc instruction // and some nops. view[fnoffset] = '\xf9'; - this->set_view_to_nop(view, view_size, fnoffset + 1, 8); + this->set_view_to_nop(view, view_size, fnoffset + 1, nop_len); } // lea NN(%rsp),%r10 // lea NN(%rsp),%r11 else if ((this->match_view(view, view_size, fnoffset, - "\x4c\x8d\x94\x24", 4) + lea_r10_insn, lea_r10_insn_len) || this->match_view(view, view_size, fnoffset, - "\x4c\x8d\x9c\x24", 4)) + lea_r11_insn, lea_r11_insn_len)) && fnsize > 8) { // This is loading an offset from the stack pointer for a diff -ruN binutils-2.25/gprof/ChangeLog binutils-2.25.1/gprof/ChangeLog --- binutils-2.25/gprof/ChangeLog 2014-12-23 15:22:08.000000000 +0100 +++ binutils-2.25.1/gprof/ChangeLog 2015-07-21 15:42:59.000000000 +0200 @@ -1,3 +1,11 @@ +2015-07-21 Tristan Gingold + + * configure: Regenerate. + +2014-12-23 Tristan Gingold + + * configure: Regenerate. + 2014-12-23 Tristan Gingold * configure: Regenerate. diff -ruN binutils-2.25/gprof/configure binutils-2.25.1/gprof/configure --- binutils-2.25/gprof/configure 2014-12-23 15:22:08.000000000 +0100 +++ binutils-2.25.1/gprof/configure 2015-07-21 15:42:59.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for gprof 2.25. +# Generated by GNU Autoconf 2.64 for gprof 2.25.1. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -556,8 +556,8 @@ # Identity of this package. PACKAGE_NAME='gprof' PACKAGE_TARNAME='gprof' -PACKAGE_VERSION='2.25' -PACKAGE_STRING='gprof 2.25' +PACKAGE_VERSION='2.25.1' +PACKAGE_STRING='gprof 2.25.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1299,7 +1299,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gprof 2.25 to adapt to many kinds of systems. +\`configure' configures gprof 2.25.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1370,7 +1370,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gprof 2.25:";; + short | recursive ) echo "Configuration of gprof 2.25.1:";; esac cat <<\_ACEOF @@ -1476,7 +1476,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gprof configure 2.25 +gprof configure 2.25.1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -1841,7 +1841,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gprof $as_me 2.25, which was +It was created by gprof $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -3649,7 +3649,7 @@ # Define the identity of the package. PACKAGE='gprof' - VERSION='2.25' + VERSION='2.25.1' cat >>confdefs.h <<_ACEOF @@ -12706,7 +12706,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gprof $as_me 2.25, which was +This file was extended by gprof $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12770,7 +12770,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -gprof config.status 2.25 +gprof config.status 2.25.1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -ruN binutils-2.25/include/ChangeLog binutils-2.25.1/include/ChangeLog --- binutils-2.25/include/ChangeLog 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/include/ChangeLog 2015-07-21 10:20:58.000000000 +0200 @@ -1,3 +1,14 @@ +2015-02-11 Alan Modra + + Apply from master. + 2014-12-23 Alan Modra + * bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref. Add + linker_def. + + 2014-11-24 Mark Wielaard + * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and + DW_LANG_C_plus_plus_14. + 2014-11-18 Igor Zamyatin * bfdlink.h (struct bfd_link_info): Add bndplt. diff -ruN binutils-2.25/include/bfdlink.h binutils-2.25.1/include/bfdlink.h --- binutils-2.25/include/bfdlink.h 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/include/bfdlink.h 2015-07-21 10:20:58.000000000 +0200 @@ -91,8 +91,14 @@ /* Type of this entry. */ ENUM_BITFIELD (bfd_link_hash_type) type : 8; + /* Symbol is referenced in a normal object file, as distict from a LTO + IR object file. */ unsigned int non_ir_ref : 1; + /* Symbol is a built-in define. These will be overridden by PROVIDE + in a linker script. */ + unsigned int linker_def : 1; + /* A union of information depending upon the type. */ union { diff -ruN binutils-2.25/include/dwarf2.h binutils-2.25.1/include/dwarf2.h --- binutils-2.25/include/dwarf2.h 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/include/dwarf2.h 2015-07-21 10:20:58.000000000 +0200 @@ -309,6 +309,10 @@ /* DWARF 5. */ DW_LANG_Go = 0x0016, + DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */ + DW_LANG_C11 = 0x001d, + DW_LANG_C_plus_plus_14 = 0x0021, + DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */ DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */ diff -ruN binutils-2.25/include/elf/ChangeLog binutils-2.25.1/include/elf/ChangeLog --- binutils-2.25/include/elf/ChangeLog 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/include/elf/ChangeLog 2015-07-21 10:20:58.000000000 +0200 @@ -1,3 +1,10 @@ +2015-07-10 Alan Modra + + Apply from master + 2015-04-24 Alan Modra + * internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and + similar segments only contain alloc sections. + 2014-10-09 Jose E. Marchesi * sparc.h (Tag_GNU_Sparc_HWCAPS2): New object attribute. diff -ruN binutils-2.25/include/elf/internal.h binutils-2.25.1/include/elf/internal.h --- binutils-2.25/include/elf/internal.h 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/include/elf/internal.h 2015-07-21 10:20:58.000000000 +0200 @@ -317,6 +317,13 @@ || (((sec_hdr)->sh_flags & SHF_TLS) == 0 \ && (segment)->p_type != PT_TLS \ && (segment)->p_type != PT_PHDR)) \ + /* PT_LOAD and similar segments only have SHF_ALLOC sections. */ \ + && !(((sec_hdr)->sh_flags & SHF_ALLOC) == 0 \ + && ((segment)->p_type == PT_LOAD \ + || (segment)->p_type == PT_DYNAMIC \ + || (segment)->p_type == PT_GNU_EH_FRAME \ + || (segment)->p_type == PT_GNU_RELRO \ + || (segment)->p_type == PT_GNU_STACK)) \ /* Any section besides one of type SHT_NOBITS must have file \ offsets within the segment. */ \ && ((sec_hdr)->sh_type == SHT_NOBITS \ diff -ruN binutils-2.25/include/opcode/ChangeLog binutils-2.25.1/include/opcode/ChangeLog --- binutils-2.25/include/opcode/ChangeLog 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/include/opcode/ChangeLog 2015-07-21 10:20:58.000000000 +0200 @@ -1,3 +1,13 @@ +2015-07-10 Alan Modra + + Apply from master + 2015-07-03 Alan Modra + * ppc.h (PPC_OPCODE_750, PPC_OPCODE_7450, PPC_OPCODE_860): Define. + + 2015-06-19 Peter Bergner + * ppc.h (PPC_OPERAND_OPTIONAL_VALUE): New. + (ppc_optional_operand_value): New inline function. + 2014-10-09 Jose E. Marchesi * sparc.h (sparc_opcode): new field `hwcaps2'. diff -ruN binutils-2.25/include/opcode/ppc.h binutils-2.25.1/include/opcode/ppc.h --- binutils-2.25/include/opcode/ppc.h 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/include/opcode/ppc.h 2015-07-21 10:20:58.000000000 +0200 @@ -195,6 +195,15 @@ that isn't a superset of POWER8, we can define this to its own mask. */ #define PPC_OPCODE_HTM PPC_OPCODE_POWER8 +/* Opcode is supported by ppc750cl. */ +#define PPC_OPCODE_750 0x4000000000ull + +/* Opcode is supported by ppc7450. */ +#define PPC_OPCODE_7450 0x8000000000ull + +/* Opcode is supported by ppc821/850/860. */ +#define PPC_OPCODE_860 0x10000000000ull + /* A macro to extract the major opcode from an instruction. */ #define PPC_OP(i) (((i) >> 26) & 0x3f) @@ -380,6 +389,11 @@ /* This is a CR FIELD that does not use symbolic names. */ #define PPC_OPERAND_CR_REG (0x200000) + +/* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand + is omitted, then the value it should use for the operand is stored + in the SHIFT field of the immediatly following operand field. */ +#define PPC_OPERAND_OPTIONAL_VALUE (0x400000) /* The POWER and PowerPC assemblers use a few macros. We keep them with the operands table for simplicity. The macro table is an @@ -409,4 +423,12 @@ extern ppc_cpu_t ppc_parse_cpu (ppc_cpu_t, ppc_cpu_t *, const char *); +static inline long +ppc_optional_operand_value (const struct powerpc_operand *operand) +{ + if ((operand->flags & PPC_OPERAND_OPTIONAL_VALUE) != 0) + return (operand+1)->shift; + return 0; +} + #endif /* PPC_H */ diff -ruN binutils-2.25/ld/ChangeLog binutils-2.25.1/ld/ChangeLog --- binutils-2.25/ld/ChangeLog 2014-12-23 15:22:07.000000000 +0100 +++ binutils-2.25.1/ld/ChangeLog 2015-07-21 15:42:58.000000000 +0200 @@ -1,3 +1,70 @@ +2015-07-21 Tristan Gingold + + * configure: Regenerate. + +2015-07-10 Alan Modra + + Apply from master. + 2015-04-24 Alan Modra + * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): + Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out. + + 2015-04-23 Alan Modra + * emulparams/elf64ppc.sh (GOT): Align. + + 2015-04-22 Alan Modra + * ldexp.h (struct ldexp_control): Delete dataseg.min_base. Add + data_seg.relro_offset. + * ldexp.c (fold_binary ): Don't set min_base. + (fold_binary ): Do set relro_offset. + * ldlang.c (lang_size_sections): Rewrite code adjusting relro + segment base to line up last section on page boundary. + +2015-02-11 Alan Modra + + Apply from master. + 2015-01-20 Andrew Burgess + * ldlang.c (print_assignment): Only evaluate the expression for a + PROVIDE'd assignment when the destination is being defined. + Display a special message for PROVIDE'd symbols that are not being + provided. + + 2015-01-19 Alan Modra + PR 17165 + * ldlang.c (lang_process): Run lang_common before lang_gc_sections. + + 2014-12-24 Alan Modra + * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Exclude + shared libraries in loop looking for .eh_frame sections. + Similarly for build-id loop. + + 2014-12-23 Alan Modra + * ldexp.c (exp_fold_tree_1 ): Test linker_def. + + 2014-12-23 Alan Modra + * ldexp.c (exp_fold_tree_1 ): Leave bfd_link_hash_common + symbols alone. + + 2014-12-23 Alan Modra + * ldexp.c (update_definedness): Correct logic setting by_object. + + 2014-12-23 Alan Modra + * ldexp.c (struct definedness_hash_entry, definedness_table) + (definedness_newfunc, symbol_defined, update_definedness): Move + and rename from.. + * ldlang.h (struct lang_definedness_hash_entry): ..here,.. + * ldlang.c (lang_definedness_table, lang_definedness_newfunc) + (lang_symbol_defined, lang_update_definedness): ..and here. + * ldexp.c (ldexp_init, ldexp_finish): New functions, extracted from.. + * ldlang.c (lang_init, lang_finish): ..here. + * ldexp.h (ldexp_init, ldexp_finish): Declare. + * ldlang.h (lang_symbol_defined, lang_update_definedness): Delete. + * ldmain.c (main): Call ldexp_init and ldexp_finish. + +2014-12-23 Tristan Gingold + + * configure: Regenerate. + 2014-12-23 Tristan Gingold * configure: Regenerate. diff -ruN binutils-2.25/ld/configure binutils-2.25.1/ld/configure --- binutils-2.25/ld/configure 2014-12-23 15:22:07.000000000 +0100 +++ binutils-2.25.1/ld/configure 2015-07-21 15:42:58.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for ld 2.25. +# Generated by GNU Autoconf 2.64 for ld 2.25.1. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -556,8 +556,8 @@ # Identity of this package. PACKAGE_NAME='ld' PACKAGE_TARNAME='ld' -PACKAGE_VERSION='2.25' -PACKAGE_STRING='ld 2.25' +PACKAGE_VERSION='2.25.1' +PACKAGE_STRING='ld 2.25.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1347,7 +1347,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ld 2.25 to adapt to many kinds of systems. +\`configure' configures ld 2.25.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1418,7 +1418,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ld 2.25:";; + short | recursive ) echo "Configuration of ld 2.25.1:";; esac cat <<\_ACEOF @@ -1541,7 +1541,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ld configure 2.25 +ld configure 2.25.1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2250,7 +2250,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ld $as_me 2.25, which was +It was created by ld $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -4059,7 +4059,7 @@ # Define the identity of the package. PACKAGE='ld' - VERSION='2.25' + VERSION='2.25.1' cat >>confdefs.h <<_ACEOF @@ -17594,7 +17594,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ld $as_me 2.25, which was +This file was extended by ld $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17658,7 +17658,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -ld config.status 2.25 +ld config.status 2.25.1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -ruN binutils-2.25/ld/emulparams/elf64ppc.sh binutils-2.25.1/ld/emulparams/elf64ppc.sh --- binutils-2.25/ld/emulparams/elf64ppc.sh 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/emulparams/elf64ppc.sh 2015-07-21 10:20:58.000000000 +0200 @@ -23,7 +23,7 @@ if test x${RELOCATING+set} = xset; then GOT=" - .got : ALIGN(8) { *(.got .toc) }" + .got : ALIGN(256) { *(.got .toc) }" else GOT=" .got 0 : { *(.got) } diff -ruN binutils-2.25/ld/emultempl/elf32.em binutils-2.25.1/ld/emultempl/elf32.em --- binutils-2.25/ld/emultempl/elf32.em 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/ld/emultempl/elf32.em 2015-07-21 10:20:58.000000000 +0200 @@ -1015,7 +1015,8 @@ /* Find an ELF input. */ for (abfd = link_info.input_bfds; abfd != (bfd *) NULL; abfd = abfd->link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour + && bfd_count_sections (abfd) != 0) break; /* PR 10555: If there are no ELF input files do not try to @@ -1053,6 +1054,8 @@ for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) { + if (bfd_count_sections (abfd) == 0) + continue; if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) elfbfd = abfd; if (!warn_eh_frame) diff -ruN binutils-2.25/ld/emultempl/ppc64elf.em binutils-2.25.1/ld/emultempl/ppc64elf.em --- binutils-2.25/ld/emultempl/ppc64elf.em 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/ld/emultempl/ppc64elf.em 2015-07-21 10:20:58.000000000 +0200 @@ -509,13 +509,16 @@ else if (ret > 0) need_laying_out = 1; - if (need_laying_out != -1) - { - gld${EMULATION_NAME}_map_segments (need_laying_out); + /* Call map_segments regardless of the state of need_laying_out. + need_laying_out set to -1 means we have just laid everything out, + but ppc64_elf_size_stubs strips .branch_lt and .eh_frame if + unneeded, after ppc_layout_sections_again. Another call removes + these sections from the segment map. Their presence is + innocuous except for confusing ELF_SECTION_IN_SEGMENT. */ + gld${EMULATION_NAME}_map_segments (need_laying_out > 0); - if (!link_info.relocatable) - ppc64_elf_set_toc (&link_info, link_info.output_bfd); - } + if (need_laying_out != -1 && !link_info.relocatable) + ppc64_elf_set_toc (&link_info, link_info.output_bfd); } diff -ruN binutils-2.25/ld/ldexp.c binutils-2.25.1/ld/ldexp.c --- binutils-2.25/ld/ldexp.c 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/ldexp.c 2015-07-21 10:20:58.000000000 +0200 @@ -48,6 +48,19 @@ struct ldexp_control expld; +/* This structure records symbols for which we need to keep track of + definedness for use in the DEFINED () test. */ + +struct definedness_hash_entry +{ + struct bfd_hash_entry root; + unsigned int by_object : 1; + unsigned int by_script : 1; + unsigned int iteration : 1; +}; + +static struct bfd_hash_table definedness_table; + /* Print the string representation of the given token. Surround it with spaces if INFIX_P is TRUE. */ @@ -244,6 +257,64 @@ expld.result.section = s; } +/* New-function for the definedness hash table. */ + +static struct bfd_hash_entry * +definedness_newfunc (struct bfd_hash_entry *entry, + struct bfd_hash_table *table ATTRIBUTE_UNUSED, + const char *name ATTRIBUTE_UNUSED) +{ + struct definedness_hash_entry *ret = (struct definedness_hash_entry *) entry; + + if (ret == NULL) + ret = (struct definedness_hash_entry *) + bfd_hash_allocate (table, sizeof (struct definedness_hash_entry)); + + if (ret == NULL) + einfo (_("%P%F: bfd_hash_allocate failed creating symbol %s\n"), name); + + ret->by_object = 0; + ret->by_script = 0; + ret->iteration = 0; + return &ret->root; +} + +/* Called during processing of linker script script expressions. + For symbols assigned in a linker script, return a struct describing + where the symbol is defined relative to the current expression, + otherwise return NULL. */ + +static struct definedness_hash_entry * +symbol_defined (const char *name) +{ + return ((struct definedness_hash_entry *) + bfd_hash_lookup (&definedness_table, name, FALSE, FALSE)); +} + +/* Update the definedness state of NAME. */ + +static void +update_definedness (const char *name, struct bfd_link_hash_entry *h) +{ + struct definedness_hash_entry *defentry + = (struct definedness_hash_entry *) + bfd_hash_lookup (&definedness_table, name, TRUE, FALSE); + + if (defentry == NULL) + einfo (_("%P%F: bfd_hash_lookup failed creating symbol %s\n"), name); + + /* If the symbol was already defined, and not by a script, then it + must be defined by an object file or by the linker target code. */ + if (!defentry->by_script + && (h->type == bfd_link_hash_defined + || h->type == bfd_link_hash_defweak + || h->type == bfd_link_hash_common)) + defentry->by_object = 1; + + defentry->by_script = 1; + defentry->iteration = lang_statement_iteration; +} + static void fold_unary (etree_type *tree) { @@ -494,7 +565,6 @@ else if (expld.dataseg.phase == exp_dataseg_none) { expld.dataseg.phase = exp_dataseg_align_seen; - expld.dataseg.min_base = expld.dot; expld.dataseg.base = expld.result.value; expld.dataseg.pagesize = commonpage; expld.dataseg.maxpagesize = maxpage; @@ -508,6 +578,7 @@ case DATA_SEGMENT_RELRO_END: expld.dataseg.relro = exp_dataseg_relro_end; + expld.dataseg.relro_offset = expld.result.value; if (expld.phase == lang_first_phase_enum || expld.section != bfd_abs_section_ptr) expld.result.valid_p = FALSE; @@ -578,7 +649,7 @@ if (expld.phase != lang_first_phase_enum) { struct bfd_link_hash_entry *h; - struct lang_definedness_hash_entry *def; + struct definedness_hash_entry *def; h = bfd_wrapped_link_hash_lookup (link_info.output_bfd, &link_info, @@ -588,7 +659,7 @@ && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak || h->type == bfd_link_hash_common) - && ((def = lang_symbol_defined (tree->name.name)) == NULL + && ((def = symbol_defined (tree->name.name)) == NULL || def->by_object || def->iteration == (lang_statement_iteration & 1))); } @@ -601,7 +672,7 @@ /* Self-assignment is only allowed for absolute symbols defined in a linker script. */ struct bfd_link_hash_entry *h; - struct lang_definedness_hash_entry *def; + struct definedness_hash_entry *def; h = bfd_wrapped_link_hash_lookup (link_info.output_bfd, &link_info, @@ -611,7 +682,7 @@ && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak) && h->u.def.section == bfd_abs_section_ptr - && (def = lang_symbol_defined (tree->name.name)) != NULL + && (def = symbol_defined (tree->name.name)) != NULL && def->iteration == (lang_statement_iteration & 1))) expld.assign_name = NULL; } @@ -817,11 +888,11 @@ is_sym_value (const etree_type *tree, bfd_vma val) { struct bfd_link_hash_entry *h; - struct lang_definedness_hash_entry *def; + struct definedness_hash_entry *def; return (tree->type.node_class == etree_name && tree->type.node_code == NAME - && (def = lang_symbol_defined (tree->name.name)) != NULL + && (def = symbol_defined (tree->name.name)) != NULL && def->by_script && def->iteration == (lang_statement_iteration & 1) && (h = bfd_wrapped_link_hash_lookup (link_info.output_bfd, @@ -999,15 +1070,13 @@ h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst, FALSE, FALSE, TRUE); if (h == NULL - || (h->type != bfd_link_hash_new - && h->type != bfd_link_hash_undefined - && h->type != bfd_link_hash_common - && !(h->type == bfd_link_hash_defined - && (h->u.def.section->flags - & SEC_LINKER_CREATED) != 0))) + || !(h->type == bfd_link_hash_new + || h->type == bfd_link_hash_undefined + || h->linker_def)) { - /* Do nothing. The symbol was never referenced, or was - defined by some object. */ + /* Do nothing. The symbol was never referenced, or + was defined in some object file. Undefined weak + symbols stay undefined. */ break; } } @@ -1041,7 +1110,7 @@ /* FIXME: Should we worry if the symbol is already defined? */ - lang_update_definedness (tree->assign.dst, h); + update_definedness (tree->assign.dst, h); h->type = bfd_link_hash_defined; h->u.def.value = expld.result.value; if (expld.result.section == NULL) @@ -1470,3 +1539,21 @@ value = (value + align - 1) / align; return value * align; } + +void +ldexp_init (void) +{ + /* The value "13" is ad-hoc, somewhat related to the expected number of + assignments in a linker script. */ + if (!bfd_hash_table_init_n (&definedness_table, + definedness_newfunc, + sizeof (struct definedness_hash_entry), + 13)) + einfo (_("%P%F: can not create hash table: %E\n")); +} + +void +ldexp_finish (void) +{ + bfd_hash_table_free (&definedness_table); +} diff -ruN binutils-2.25/ld/ldexp.h binutils-2.25.1/ld/ldexp.h --- binutils-2.25/ld/ldexp.h 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/ldexp.h 2015-07-21 10:20:58.000000000 +0200 @@ -156,7 +156,7 @@ struct { enum phase_enum phase; - bfd_vma base, min_base, relro_end, end, pagesize, maxpagesize; + bfd_vma base, relro_offset, relro_end, end, pagesize, maxpagesize; enum relro_enum relro; @@ -221,5 +221,7 @@ (etree_type *, fill_type *, char *); bfd_vma exp_get_abs_int (etree_type *, int, char *); +void ldexp_init (void); +void ldexp_finish (void); #endif diff -ruN binutils-2.25/ld/ldlang.c binutils-2.25.1/ld/ldlang.c --- binutils-2.25/ld/ldlang.c 2014-10-15 09:43:36.000000000 +0200 +++ binutils-2.25.1/ld/ldlang.c 2015-07-21 10:20:58.000000000 +0200 @@ -64,7 +64,6 @@ static lang_input_statement_type *first_file; static const char *current_target; static lang_statement_list_type statement_list; -static struct bfd_hash_table lang_definedness_table; static lang_statement_list_type *stat_save[10]; static lang_statement_list_type **stat_save_ptr = &stat_save[0]; static struct unique_sections *unique_section_list; @@ -73,8 +72,6 @@ /* Forward declarations. */ static void exp_init_os (etree_type *); static lang_input_statement_type *lookup_name (const char *); -static struct bfd_hash_entry *lang_definedness_newfunc - (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); static void insert_undefined (const char *); static bfd_boolean sort_def_symbol (struct bfd_link_hash_entry *, void *); static void print_statement (lang_statement_union_type *, @@ -1241,14 +1238,6 @@ abs_output_section->bfd_section = bfd_abs_section_ptr; - /* The value "13" is ad-hoc, somewhat related to the expected number of - assignments in a linker script. */ - if (!bfd_hash_table_init_n (&lang_definedness_table, - lang_definedness_newfunc, - sizeof (struct lang_definedness_hash_entry), - 13)) - einfo (_("%P%F: can not create hash table: %E\n")); - asneeded_list_head = NULL; asneeded_list_tail = &asneeded_list_head; } @@ -1256,7 +1245,6 @@ void lang_finish (void) { - bfd_hash_table_free (&lang_definedness_table); output_section_statement_table_free (); } @@ -3365,65 +3353,6 @@ einfo ("%F"); } -/* New-function for the definedness hash table. */ - -static struct bfd_hash_entry * -lang_definedness_newfunc (struct bfd_hash_entry *entry, - struct bfd_hash_table *table ATTRIBUTE_UNUSED, - const char *name ATTRIBUTE_UNUSED) -{ - struct lang_definedness_hash_entry *ret - = (struct lang_definedness_hash_entry *) entry; - - if (ret == NULL) - ret = (struct lang_definedness_hash_entry *) - bfd_hash_allocate (table, sizeof (struct lang_definedness_hash_entry)); - - if (ret == NULL) - einfo (_("%P%F: bfd_hash_allocate failed creating symbol %s\n"), name); - - ret->by_object = 0; - ret->by_script = 0; - ret->iteration = 0; - return &ret->root; -} - -/* Called during processing of linker script script expressions. - For symbols assigned in a linker script, return a struct describing - where the symbol is defined relative to the current expression, - otherwise return NULL. */ - -struct lang_definedness_hash_entry * -lang_symbol_defined (const char *name) -{ - return ((struct lang_definedness_hash_entry *) - bfd_hash_lookup (&lang_definedness_table, name, FALSE, FALSE)); -} - -/* Update the definedness state of NAME. */ - -void -lang_update_definedness (const char *name, struct bfd_link_hash_entry *h) -{ - struct lang_definedness_hash_entry *defentry - = (struct lang_definedness_hash_entry *) - bfd_hash_lookup (&lang_definedness_table, name, TRUE, FALSE); - - if (defentry == NULL) - einfo (_("%P%F: bfd_hash_lookup failed creating symbol %s\n"), name); - - /* If the symbol was already defined, and not by a script, then it - must be defined by an object file. */ - if (!defentry->by_script - && h->type != bfd_link_hash_undefined - && h->type != bfd_link_hash_common - && h->type != bfd_link_hash_new) - defentry->by_object = 1; - - defentry->by_script = 1; - defentry->iteration = lang_statement_iteration; -} - /* Add the supplied name to the symbol table as an undefined reference. This is a two step process as the symbol table doesn't even exist at the time the ld command line is processed. First we put the name @@ -4054,7 +3983,12 @@ osec = output_section->bfd_section; if (osec == NULL) osec = bfd_abs_section_ptr; - exp_fold_tree (tree, osec, &print_dot); + + if (assignment->exp->type.node_class != etree_provide) + exp_fold_tree (tree, osec, &print_dot); + else + expld.result.valid_p = FALSE; + if (expld.result.valid_p) { bfd_vma value; @@ -4092,7 +4026,10 @@ } else { - minfo ("*undef* "); + if (assignment->exp->type.node_class == etree_provide) + minfo ("[!provide]"); + else + minfo ("*undef* "); #ifdef BFD64 minfo (" "); #endif @@ -5442,55 +5379,51 @@ if (expld.dataseg.phase == exp_dataseg_end_seen && link_info.relro && expld.dataseg.relro_end) { - /* If DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END pair was seen, try - to put expld.dataseg.relro_end on a (common) page boundary. */ - bfd_vma min_base, relro_end, maxpage; + bfd_vma initial_base, relro_end, desired_end; + asection *sec; - expld.dataseg.phase = exp_dataseg_relro_adjust; - maxpage = expld.dataseg.maxpagesize; - /* MIN_BASE is the absolute minimum address we are allowed to start the - read-write segment (byte before will be mapped read-only). */ - min_base = (expld.dataseg.min_base + maxpage - 1) & ~(maxpage - 1); - expld.dataseg.base += (-expld.dataseg.relro_end - & (expld.dataseg.pagesize - 1)); /* Compute the expected PT_GNU_RELRO segment end. */ relro_end = ((expld.dataseg.relro_end + expld.dataseg.pagesize - 1) & ~(expld.dataseg.pagesize - 1)); - if (min_base + maxpage < expld.dataseg.base) - { - expld.dataseg.base -= maxpage; - relro_end -= maxpage; - } + + /* Adjust by the offset arg of DATA_SEGMENT_RELRO_END. */ + desired_end = relro_end - expld.dataseg.relro_offset; + + /* For sections in the relro segment.. */ + for (sec = link_info.output_bfd->section_last; sec; sec = sec->prev) + if (!IGNORE_SECTION (sec) + && sec->vma >= expld.dataseg.base + && sec->vma < expld.dataseg.relro_end - expld.dataseg.relro_offset) + { + /* Where do we want to put this section so that it ends as + desired? */ + bfd_vma start = sec->vma; + bfd_vma end = start + sec->size; + bfd_vma bump = desired_end - end; + /* We'd like to increase START by BUMP, but we must heed + alignment so the increase might be less than optimum. */ + start += bump & ~(((bfd_vma) 1 << sec->alignment_power) - 1); + /* This is now the desired end for the previous section. */ + desired_end = start; + } + + expld.dataseg.phase = exp_dataseg_relro_adjust; + ASSERT (desired_end >= expld.dataseg.base); + initial_base = expld.dataseg.base; + expld.dataseg.base = desired_end; lang_reset_memory_regions (); one_lang_size_sections_pass (relax, check_regions); + if (expld.dataseg.relro_end > relro_end) { - /* The alignment of sections between DATA_SEGMENT_ALIGN - and DATA_SEGMENT_RELRO_END can cause excessive padding to - be inserted at DATA_SEGMENT_RELRO_END. Try to start a - bit lower so that the section alignments will fit in. */ - asection *sec; - unsigned int max_alignment_power = 0; - - /* Find maximum alignment power of sections between - DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END. */ - for (sec = link_info.output_bfd->sections; sec; sec = sec->next) - if (sec->vma >= expld.dataseg.base - && sec->vma < expld.dataseg.relro_end - && sec->alignment_power > max_alignment_power) - max_alignment_power = sec->alignment_power; - - if (((bfd_vma) 1 << max_alignment_power) < expld.dataseg.pagesize) - { - /* Aligning the adjusted base guarantees the padding - between sections won't change. This is better than - simply subtracting 1 << max_alignment_power which is - what we used to do here. */ - expld.dataseg.base &= ~((1 << max_alignment_power) - 1); - lang_reset_memory_regions (); - one_lang_size_sections_pass (relax, check_regions); - } + /* Assignments to dot, or to output section address in a + user script have increased padding over the original. + Revert. */ + expld.dataseg.base = initial_base; + lang_reset_memory_regions (); + one_lang_size_sections_pass (relax, check_regions); } + link_info.relro_start = expld.dataseg.base; link_info.relro_end = expld.dataseg.relro_end; } @@ -6772,12 +6705,12 @@ lang_do_assignments (lang_mark_phase_enum); expld.phase = lang_first_phase_enum; - /* Remove unreferenced sections if asked to. */ - lang_gc_sections (); - /* Size up the common data. */ lang_common (); + /* Remove unreferenced sections if asked to. */ + lang_gc_sections (); + /* Update wild statements. */ update_wild_statements (statement_list.head); diff -ruN binutils-2.25/ld/ldlang.h binutils-2.25.1/ld/ldlang.h --- binutils-2.25/ld/ldlang.h 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/ldlang.h 2015-07-21 10:20:58.000000000 +0200 @@ -470,17 +470,6 @@ const char *name; }; -/* This structure records symbols for which we need to keep track of - definedness for use in the DEFINED () test. */ - -struct lang_definedness_hash_entry -{ - struct bfd_hash_entry root; - unsigned int by_object : 1; - unsigned int by_script : 1; - unsigned int iteration : 1; -}; - /* Used by place_orphan to keep track of orphan sections and statements. */ struct orphan_save @@ -683,10 +672,6 @@ (const char *); extern const char *lang_get_output_target (void); -extern struct lang_definedness_hash_entry *lang_symbol_defined (const char *); -extern void lang_update_definedness - (const char *, struct bfd_link_hash_entry *); - extern void add_excluded_libs (const char *); extern bfd_boolean load_symbols (lang_input_statement_type *, lang_statement_list_type *); diff -ruN binutils-2.25/ld/ldmain.c binutils-2.25.1/ld/ldmain.c --- binutils-2.25/ld/ldmain.c 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/ldmain.c 2015-07-21 10:20:58.000000000 +0200 @@ -297,6 +297,7 @@ config.maxpagesize = bfd_emul_get_maxpagesize (default_target); config.commonpagesize = bfd_emul_get_commonpagesize (default_target); lang_init (); + ldexp_init (); ldemul_before_parse (); lang_has_input_file = FALSE; parse_args (argc, argv); @@ -440,6 +441,7 @@ fprintf (stderr, "lookup = %p val %lx\n", h, h ? h->u.def.value : 1); } #endif + ldexp_finish (); lang_finish (); /* Even if we're producing relocatable output, some non-fatal errors should diff -ruN binutils-2.25/ld/testsuite/ChangeLog binutils-2.25.1/ld/testsuite/ChangeLog --- binutils-2.25/ld/testsuite/ChangeLog 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ChangeLog 2015-07-21 10:20:58.000000000 +0200 @@ -1,3 +1,228 @@ +2015-07-10 Alan Modra + + Apply from master + 2015-07-05 Richard Sandiford + * ld-powerpc/tocopt6-inc.s, ld-powerpc/tocopt6a.s, + ld-powerpc/tocopt6b.s, ld-powerpc/tocopt6c.s, + ld-powerpc/tocopt6.d: New test. + * ld-powerpc/powerpc.exp (ppc64elftests): Add it. + + 2015-06-16 Alan Modra + * ld-powerpc/ppc476-shared.s: Repeat dynamic reloc generating insns. + * ld-powerpc/ppc476-shared.d: Update. + * ld-powerpc/ppc476-shared2.d: Update. + + 2015-06-05 Alan Modra + * ld-powerpc/ppc476-shared.s, + * ld-powerpc/ppc476-shared.lnk, + * ld-powerpc/ppc476-shared.d, + * ld-powerpc/ppc476-shared2.d: New tests. + * ld-powerpc/powerpc.exp: Run them. + + 2015-04-23 Alan Modra + * ld-powerpc/ambiguousv1.d: Update for aligned .got. + * ld-powerpc/ambiguousv1b.d: Likewise. + * ld-powerpc/ambiguousv2.d: Likewise. + * ld-powerpc/defsym.d: Likewise. + * ld-powerpc/elfv2-2exe.d: Likewise. + * ld-powerpc/elfv2exe.d: Likewise. + * ld-powerpc/elfv2so.d: Likewise. + * ld-powerpc/relbrlt.d: Likewise. + * ld-powerpc/tls.g: Likewise. + * ld-powerpc/tlsexe.d: Likewise. + * ld-powerpc/tlsexe.g: Likewise. + * ld-powerpc/tlsexe.r: Likewise. + * ld-powerpc/tlsexetoc.d: Likewise. + * ld-powerpc/tlsexetoc.g: Likewise. + * ld-powerpc/tlsexetoc.r: Likewise. + * ld-powerpc/tlsso.d: Likewise. + * ld-powerpc/tlsso.g: Likewise. + * ld-powerpc/tlsso.r: Likewise. + * ld-powerpc/tlstoc.g: Likewise. + * ld-powerpc/tlstocso.d: Likewise. + * ld-powerpc/tlstocso.g: Likewise. + * ld-powerpc/tlstocso.r: Likewise. + * ld-powerpc/tocopt.d: Likewise. + * ld-powerpc/tocopt2.d: Likewise. + * ld-powerpc/tocopt3.d: Likewise. + * ld-powerpc/tocopt4.d: Likewise. + * ld-powerpc/tocopt5.d: Likewise. + +2015-06-23 Jiong Wang + + Apply from master: + 2015-06-23 Jiong. Wang + + * ld-aarch64/dt_textrel.s: New testcase. + * ld-aarch64/dt_textrel.d: New expectation file. + * ld-aarch64/aarch64-elf.exp: Run new testcase. + +2015-06-17 Renlin Li + + Applied from master. + 2015-04-29 Renlin Li + + * ld-arm/ifunc-10.dd: Adjust the desired output. + * ld-arm/ifunc-2.dd: Likewise. + +2015-05-05 Jiong Wang + + Apply from master: + + 2015-04-24 Jiong. Wang + + * ld-aarch64/pcrel.s: New testcase. + * ld-aarch64/pcrel_pic_defiend_local.d: New expect file. + * ld-aarch64/pcrel_pic_undefined.d: Ditto. + * ld-aarch64/aarch64-elf.exp: Run them. + +2015-04-10 Alan Modra + + Revert 2015-03-06 H.J. Lu + PR ld/pr15228 + PR ld/pr17709 + * ld-i386/i386.exp (i386tests): Remove test for PR ld/17709. + * ld-i386/pr17709-nacl.rd: Delete. + * ld-i386/pr17709.rd: Likewise. + * ld-i386/pr17709a.s: Likewise. + * ld-i386/pr17709b.s: Likewise. + * ld-i386/protected3.d: Updated. + * ld-i386/protected3.s: Likewise. + * ld-x86-64/pr17709-nacl.rd: Delete. + * ld-x86-64/pr17709.rd: Likewise. + * ld-x86-64/pr17709a.s: Likewise. + * ld-x86-64/pr17709b.s: Likewise. + * ld-x86-64/protected3.d: Updated. + * ld-x86-64/protected3.s: Likewise. + * ld-x86-64/x86-64.exp (x86_64tests): Remove test for PR ld/17709. + +2015-03-26 Tejas Belagod + + * ld-aarch64/farcall-back-be.d: New. + +2015-03-18 Alan Modra + + Apply from master + 2015-03-11 Alan Modra + * ld-powerpc/tls32.s: Add GOT pointer setup. + * ld-powerpc/tls32.d: Update. + * ld-powerpc/tls32.g: Update. + * ld-powerpc/tls32.t: Update. + * ld-powerpc/tlsexe.d: Update. + * ld-powerpc/tlsexe32.d: Update. + * ld-powerpc/tlsexe32.g: Update. + * ld-powerpc/tlsexe32.r: Update. + * ld-powerpc/tlsexetoc.d: Update. + * ld-powerpc/tlsso32.d: Update. + * ld-powerpc/tlsso32.g: Update. + * ld-powerpc/tlsso32.r: Update. + +2015-03-06 H.J. Lu + + Backport from master + 2015-03-05 H.J. Lu + + PR ld/pr15228 + PR ld/pr17709 + * ld-i386/i386.exp (i386tests): Add a test for PR ld/17709. + * ld-i386/pr17709-nacl.rd: New file. + * ld-i386/pr17709.rd: Likewise. + * ld-i386/pr17709a.s: Likewise. + * ld-i386/pr17709b.s: Likewise. + * ld-i386/protected3.d: Updated. + * ld-i386/protected3.s: Likewise. + * ld-x86-64/pr17709-nacl.rd: New file. + * ld-x86-64/pr17709.rd: Likewise. + * ld-x86-64/pr17709a.s: Likewise. + * ld-x86-64/pr17709b.s: Likewise. + * ld-x86-64/protected3.d: Updated. + * ld-x86-64/protected3.s: Likewise. + * ld-x86-64/x86-64.exp (x86_64tests): Add a test for PR ld/17709. + +2015-02-11 Alan Modra + + Apply from master. + 2015-01-29 Alan Modra + * ld-powerpc/tlsld.d, * ld-powerpc/tlsld.s: New test. + * ld-powerpc/tlsld32.d, * ld-powerpc/tlsld32.s: New test. + * ld-powerpc/powerpc.exp: Run them. + + 2015-01-20 Andrew Burgess + * ld-scripts/provide-4-map.d: Update expected output. + * ld-scripts/provide-5-map.d: Likewise. + + 2015-01-20 Andrew Burgess + * ld-scripts/provide-4.d: New file. + * ld-scripts/provide-4-map.d: New file. + * ld-scripts/provide-4.t: New file. + * ld-scripts/provide-5.d: New file. + * ld-scripts/provide-5.s: New file. + * ld-scripts/provide-5-map.d: New file. + * ld-scripts/provide-5.t: New file. + * ld-scripts/provide.exp: Run the provide-4.d and provide-5.d + tests. + + 2015-01-20 Andrew Burgess + * ld-scripts/overlay-size.d: Add 'map' option. + * ld-scripts/overlay-size.exp: Remove manual check of mapfile. + * lib/ld-lib.exp (run_dump_test): Add support for new 'map' + option, checking linker mapfile output. + + 2015-01-19 Alan Modra + * ld-gc/pr14265.d, + * ld-cris/tls-gc-68.d, + * ld-cris/tls-gc-69.d, + * ld-cris/tls-gc-70.d, + * ld-cris/tls-gc-71.d, + * ld-cris/tls-gc-75.d, + * ld-cris/tls-gc-76.d, + * ld-cris/tls-gc-79.d, + * ld-mmix/bpo-10.d, + * ld-mmix/bpo-11.d: Update. + + 2014-12-23 Alan Modra + * ld-powerpc/sdabase.s, + * ld-powerpc/sdabase.t, + * ld-powerpc/sdabase.d: New test. + * ld-powerpc/sdabase2.t, + * ld-powerpc/sdabase2.d: New test. + * ld-powerpc/powerpc.exp: Run them. + + 2014-12-23 Alan Modra + * ld-elf/endsym.s, *ld-elf/endsym.d: New test. + + 2014-12-04 Alan Modra + * ld-powerpc/vxworks-relax.rd: Update for reloc sorting. + * ld-powerpc/vxworks-relax-2.rd: Likewise. + * ld-sh/sh64/reldl32.rd: Likewise. + * ld-sh/sh64/reldl64.rd: Likewise. + +2015-01-22 Thomas Preud'homme + + Backport from mainline + 2015-01-13 Thomas Preud'homme + + * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND + to check if a symbol should be bound symbolically. + +2015-01-11 H.J. Lu + + PR ld/17827 + * ld-x86-64/pr17689.out: Updated. + * ld-x86-64/pr17689b.S: Likewise. + + * ld-x86-64/pr17827.rd: New file. + + * ld-x86-64/x86-64.exp: Run PR ld/17827 test. + +2015-01-05 H.J. Lu + + PR ld/17773 + * ld-elf/binutils.exp (binutils_test): Add an optional + readelf_options. Replace -l with $readelf_options. Add a + gap test. + * ld/testsuite/ld-elf/gap.s: New file. + 2014-12-19 Matthew Fortune * ld-mips-elf/attr-gnu-4-00.d: Relax check for ISA extension. diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/aarch64-elf.exp binutils-2.25.1/ld/testsuite/ld-aarch64/aarch64-elf.exp --- binutils-2.25/ld/testsuite/ld-aarch64/aarch64-elf.exp 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/aarch64-elf.exp 2015-07-21 10:20:58.000000000 +0200 @@ -104,6 +104,10 @@ # test addend correctness when -r specified. run_dump_test "local-addend-r" +# test error handling on pcrel relocation for shared libraries. +run_dump_test "pcrel_pic_undefined" +run_dump_test "pcrel_pic_defined_local" + run_dump_test "limit-b" run_dump_test "limit-bl" run_dump_test "farcall-section" @@ -175,6 +179,9 @@ run_dump_test "ifunc-22" run_dump_test "relasz" +run_dump_test "relocs-257-symbolic-func" + +run_dump_test "dt_textrel" set aarch64elflinktests { {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s} diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/dt_textrel.d binutils-2.25.1/ld/testsuite/ld-aarch64/dt_textrel.d --- binutils-2.25/ld/testsuite/ld-aarch64/dt_textrel.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/dt_textrel.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,7 @@ +#source: dt_textrel.s +#ld: -shared +#readelf: -d +#... +.*TEXTREL.* +.* + diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/dt_textrel.s binutils-2.25.1/ld/testsuite/ld-aarch64/dt_textrel.s --- binutils-2.25/ld/testsuite/ld-aarch64/dt_textrel.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/dt_textrel.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,9 @@ + .cpu generic+fp+simd + .global p + .comm x,4,4 + .section .rodata + .align 3 + .type p, %object + .size p, 8 +p: + .xword x diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/farcall-back-be.d binutils-2.25.1/ld/testsuite/ld-aarch64/farcall-back-be.d --- binutils-2.25/ld/testsuite/ld-aarch64/farcall-back-be.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/farcall-back-be.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,74 @@ +#name: aarch64-farcall-back-be +#source: farcall-back.s +#as: +#ld: -Ttext 0x1000 --section-start .foo=0x100000000 +#objdump: -dr +#target: aarch64_be-*-* +#... + +Disassembly of section .text: + +0000000000001000 <_start>: + 1000: 14000413 b 204c <__bar1_veneer> + 1004: 94000412 bl 204c <__bar1_veneer> + 1008: 14000407 b 2024 <__bar2_veneer> + 100c: 94000406 bl 2024 <__bar2_veneer> + 1010: 14000409 b 2034 <__bar3_veneer> + 1014: 94000408 bl 2034 <__bar3_veneer> + 1018: d65f03c0 ret + ... + +000000000000201c <_back>: + 201c: d65f03c0 ret + +[ \t]+2020:[ \t]+14000013[ \t]+b[ \t]+206c <__bar1_veneer\+0x20> +0000000000002024 <__bar2_veneer>: + 2024: f07ffff0 adrp x16, 100001000 + 2028: 91002210 add x16, x16, #0x8 + 202c: d61f0200 br x16 + 2030: 00000000 .inst 0x00000000 ; undefined + +0000000000002034 <__bar3_veneer>: + 2034: 58000090 ldr x16, 2044 <__bar3_veneer\+0x10> + 2038: 10000011 adr x17, 2038 <__bar3_veneer\+0x4> + 203c: 8b110210 add x16, x16, x17 + 2040: d61f0200 br x16 + 2044: 00000000 .word 0x00000000 + 2048: ffffffd8 .word 0xffffffd8 + +000000000000204c <__bar1_veneer>: + 204c: d07ffff0 adrp x16, 100000000 + 2050: 91000210 add x16, x16, #0x0 + 2054: d61f0200 br x16 + ... + +Disassembly of section .foo: + +0000000100000000 : + 100000000: d65f03c0 ret + 100000004: 14000806 b 10000201c <___start_veneer> + ... + +0000000100001008 : + 100001008: d65f03c0 ret + 10000100c: 14000404 b 10000201c <___start_veneer> + ... + +0000000100002010 : + 100002010: d65f03c0 ret + 100002014: 14000008 b 100002034 <___back_veneer> + +[ \t]+100002018:[ \t]+1400000d[ \t]+b[ \t]+10000204c <___back_veneer\+0x18> +000000010000201c <___start_veneer>: + 10000201c: 58000090 ldr x16, 10000202c <___start_veneer\+0x10> + 100002020: 10000011 adr x17, 100002020 <___start_veneer\+0x4> + 100002024: 8b110210 add x16, x16, x17 + 100002028: d61f0200 br x16 + 10000202c: fffffffe .word 0xfffffffe + 100002030: ffffefe0 .word 0xffffefe0 + +0000000100002034 <___back_veneer>: + 100002034: 90800010 adrp x16, 2000 <_start\+0x1000> + 100002038: 91007210 add x16, x16, #0x1c + 10000203c: d61f0200 br x16 + ... diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/pcrel.s binutils-2.25.1/ld/testsuite/ld-aarch64/pcrel.s --- binutils-2.25/ld/testsuite/ld-aarch64/pcrel.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/pcrel.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,20 @@ + .text + .align 2 +main: + # R_AARCH64_ADR_PREL_PG_HI21 + # R_AARCH64_ADR_PREL_PG_HI21_NC + # R_AARCH64_ADR_LO_21 + adrp x0, :pg_hi21:global_a + adrp x1, :pg_hi21_nc:global_a + adr x2, global_a + + #R_AARCH64_LD_PREL_LO19 + ldr x3, global_a + + # R_AARCH64_PREL16 + # R_AARCH64_PREL32 + # R_AARCH64_PREL64 + .hword global_a - . + .word global_a - . + .xword global_a - . + diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/pcrel_pic_defined_local.d binutils-2.25.1/ld/testsuite/ld-aarch64/pcrel_pic_defined_local.d --- binutils-2.25/ld/testsuite/ld-aarch64/pcrel_pic_defined_local.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/pcrel_pic_defined_local.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,5 @@ +#name: PC-Rel relocation against defined +#source: pcrel.s +#objdump: -r +#ld: -shared -e0 -defsym global_a=0x1000 +#... diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/pcrel_pic_undefined.d binutils-2.25.1/ld/testsuite/ld-aarch64/pcrel_pic_undefined.d --- binutils-2.25/ld/testsuite/ld-aarch64/pcrel_pic_undefined.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/pcrel_pic_undefined.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,10 @@ +#name: PC-Rel relocation against undefined +#source: pcrel.s +#ld: -shared -e0 +#warning: .*: relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol.*fPIC.* +#warning: .*: relocation R_AARCH64_ADR_PREL_PG_HI21_NC against external symbol.*fPIC.* +#warning: .*: relocation R_AARCH64_ADR_PREL_LO21 against external symbol.*fPIC.* +#warning: .*: relocation R_AARCH64_LD_PREL_LO19 against external symbol.*fPIC.* +#warning: .*: relocation R_AARCH64_PREL16 against external symbol.*fPIC.* +#warning: .*: relocation R_AARCH64_PREL32 against external symbol.*fPIC.* +#warning: .*: relocation R_AARCH64_PREL64 against external symbol.*fPIC.* diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d binutils-2.25.1/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d --- binutils-2.25/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,5 @@ +#source: relocs-257-symbolic-func.s +#ld: -shared -Bsymbolic-functions +#readelf: -r --wide +#... +.* +R_AARCH64_RELATIVE +.* diff -ruN binutils-2.25/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s binutils-2.25.1/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s --- binutils-2.25/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,11 @@ + .text + .global tempy + .type tempy, %function +tempy: + .size tempy, .-tempy + .section .data.rel + .align 3 + .type tempy_ptr, %object + .size tempy_ptr, 8 +tempy_ptr: + .xword tempy diff -ruN binutils-2.25/ld/testsuite/ld-arm/ifunc-10.dd binutils-2.25.1/ld/testsuite/ld-arm/ifunc-10.dd --- binutils-2.25/ld/testsuite/ld-arm/ifunc-10.dd 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-arm/ifunc-10.dd 2015-07-21 10:20:58.000000000 +0200 @@ -267,7 +267,7 @@ 0000a010 : a010: 46f7 mov pc, lr - a012: 0000 movs r0, r0 + a012: 0000 .short 0x0000 a014: e1a0f00e mov pc, lr a018: e1a0f00e mov pc, lr a01c: e1a0f00e mov pc, lr diff -ruN binutils-2.25/ld/testsuite/ld-arm/ifunc-2.dd binutils-2.25.1/ld/testsuite/ld-arm/ifunc-2.dd --- binutils-2.25/ld/testsuite/ld-arm/ifunc-2.dd 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-arm/ifunc-2.dd 2015-07-21 10:20:58.000000000 +0200 @@ -84,10 +84,10 @@ 0000a00c : a00c: 46f7 mov pc, lr - a00e: 0000 movs r0, r0 + a00e: 0000 .short 0x0000 a010: e1a0f00e mov pc, lr a014: 46f7 mov pc, lr - a016: 0000 movs r0, r0 + a016: 0000 .short 0x0000 a018: e1a0f00e mov pc, lr a01c: 46f7 mov pc, lr \.\.\. diff -ruN binutils-2.25/ld/testsuite/ld-cris/tls-gc-68.d binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-68.d --- binutils-2.25/ld/testsuite/ld-cris/tls-gc-68.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-68.d 2015-07-21 10:20:58.000000000 +0200 @@ -21,11 +21,11 @@ SYMBOL TABLE: 0+80074 l d \.text 0+ \.text 0+82078 l d \.got 0+ \.got -0+82084 l \.got 0+ __bss_start -0+82084 l \.got 0+ _edata 0+82078 l O \.got 0+ _GLOBAL_OFFSET_TABLE_ -0+820a0 l \.got 0+ _end 0+80074 g \.text 0+ _start +0+82084 g \.got 0+ __bss_start +0+82084 g \.got 0+ _edata +0+820a0 g \.got 0+ _end Contents of section \.text: 80074 41b20+ .* diff -ruN binutils-2.25/ld/testsuite/ld-cris/tls-gc-69.d binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-69.d --- binutils-2.25/ld/testsuite/ld-cris/tls-gc-69.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-69.d 2015-07-21 10:20:58.000000000 +0200 @@ -22,11 +22,11 @@ SYMBOL TABLE: 0+80074 l d \.text 0+ \.text 0+82078 l d \.got 0+ \.got -0+82084 l \.got 0+ __bss_start -0+82084 l \.got 0+ _edata 0+82078 l O \.got 0+ _GLOBAL_OFFSET_TABLE_ -0+820a0 l \.got 0+ _end 0+80074 g \.text 0+ _start +0+82084 g \.got 0+ __bss_start +0+82084 g \.got 0+ _edata +0+820a0 g \.got 0+ _end Contents of section .text: 80074 41b20+ .* diff -ruN binutils-2.25/ld/testsuite/ld-cris/tls-gc-70.d binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-70.d --- binutils-2.25/ld/testsuite/ld-cris/tls-gc-70.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-70.d 2015-07-21 10:20:58.000000000 +0200 @@ -22,11 +22,11 @@ SYMBOL TABLE: 0+80074 l d \.text 0+ \.text 0+82078 l d \.got 0+ \.got -0+82084 l \.got 0+ __bss_start -0+82084 l \.got 0+ _edata 0+82078 l O \.got 0+ _GLOBAL_OFFSET_TABLE_ -0+820a0 l \.got 0+ _end 0+80074 g \.text 0+ _start +0+82084 g \.got 0+ __bss_start +0+82084 g \.got 0+ _edata +0+820a0 g \.got 0+ _end Contents of section \.text: 80074 41b20+ .* diff -ruN binutils-2.25/ld/testsuite/ld-cris/tls-gc-71.d binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-71.d --- binutils-2.25/ld/testsuite/ld-cris/tls-gc-71.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-71.d 2015-07-21 10:20:58.000000000 +0200 @@ -17,11 +17,11 @@ DYNAMIC SYMBOL TABLE: 0+18e l d \.text 0+ \.text 0+2194 l d \.tdata 0+ \.tdata -0+2280 l D \.got 0+ __bss_start -0+2280 l D \.got 0+ _edata -0+2280 l D \.got 0+ _end 0+18e g DF \.text 0+2 _init +0+2280 g D \.got 0+ __bss_start 0+ g D .tdata 0+80 tls128 +0+2280 g D \.got 0+ _edata +0+2280 g D \.got 0+ _end DYNAMIC RELOCATION RECORDS \(none\) #... diff -ruN binutils-2.25/ld/testsuite/ld-cris/tls-gc-75.d binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-75.d --- binutils-2.25/ld/testsuite/ld-cris/tls-gc-75.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-75.d 2015-07-21 10:20:58.000000000 +0200 @@ -24,11 +24,11 @@ SYMBOL TABLE: 0+80074 l d \.text 0+ \.text 0+82078 l d \.got 0+ \.got -0+82084 l \.got 0+ __bss_start -0+82084 l \.got 0+ _edata 0+82078 l O \.got 0+ _GLOBAL_OFFSET_TABLE_ -0+820a0 l \.got 0+ _end 0+80074 g \.text 0+ _start +0+82084 g \.got 0+ __bss_start +0+82084 g \.got 0+ _edata +0+820a0 g \.got 0+ _end Contents of section \.text: 80074 41b20+ .* diff -ruN binutils-2.25/ld/testsuite/ld-cris/tls-gc-76.d binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-76.d --- binutils-2.25/ld/testsuite/ld-cris/tls-gc-76.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-76.d 2015-07-21 10:20:58.000000000 +0200 @@ -25,11 +25,11 @@ 0+ l df \*ABS\* 0+ .* 0+82090 l O \.data 0+4 gc76var 0+ l df \*ABS\* 0+ .* -0+82094 l \.data 0+ __bss_start -0+82094 l \.data 0+ _edata 0+82080 l O \.got 0+ _GLOBAL_OFFSET_TABLE_ -0+820a0 l \.data 0+ _end 0+80074 g \.text 0+ _start +0+82094 g \.data 0+ __bss_start +0+82094 g \.data 0+ _edata +0+820a0 g \.data 0+ _end 0+80078 g F \.text 0+6 gc76fn Contents of section \.text: diff -ruN binutils-2.25/ld/testsuite/ld-cris/tls-gc-79.d binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-79.d --- binutils-2.25/ld/testsuite/ld-cris/tls-gc-79.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-cris/tls-gc-79.d 2015-07-21 10:20:58.000000000 +0200 @@ -22,11 +22,11 @@ SYMBOL TABLE: 0+80074 l d \.text 0+ \.text 0+82078 l d \.got 0+ \.got -0+82084 l \.got 0+ __bss_start -0+82084 l \.got 0+ _edata 0+82078 l O \.got 0+ _GLOBAL_OFFSET_TABLE_ -0+820a0 l \.got 0+ _end 0+80074 g \.text 0+ _start +0+82084 g \.got 0+ __bss_start +0+82084 g \.got 0+ _edata +0+820a0 g \.got 0+ _end Contents of section \.text: 80074 41b20+ .* diff -ruN binutils-2.25/ld/testsuite/ld-elf/binutils.exp binutils-2.25.1/ld/testsuite/ld-elf/binutils.exp --- binutils-2.25/ld/testsuite/ld-elf/binutils.exp 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-elf/binutils.exp 2015-07-21 10:20:58.000000000 +0200 @@ -38,8 +38,9 @@ # to hardwire the test name. This is important if ld_options contains # absolute path names because the default test name is constructed # from the prog_name and ld_options and we do not want absolute paths -# to appear in the test_name. -proc binutils_test { prog_name ld_options test {test_name ""}} { +# to appear in the test_name. The optional readelf_options can be +# used to specify different options for readelf. +proc binutils_test { prog_name ld_options test {test_name ""} {readelf_options "-l"}} { global as global ld global READELF @@ -71,8 +72,8 @@ return } - send_log "$READELF -l --wide tmpdir/$test > tmpdir/$test.exp\n" - set got [remote_exec host "$READELF -l --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.exp"] + send_log "$READELF $readelf_options --wide tmpdir/$test > tmpdir/$test.exp\n" + set got [remote_exec host "$READELF $readelf_options --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.exp"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" @@ -111,8 +112,8 @@ return } - send_log "$READELF -l --wide tmpdir/$test > tmpdir/$test.out\n" - set got [remote_exec host "$READELF -l --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] + send_log "$READELF $readelf_options --wide tmpdir/$test > tmpdir/$test.out\n" + set got [remote_exec host "$READELF $readelf_options --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" @@ -176,3 +177,5 @@ binutils_test objcopy $testopt $testitem } } + +binutils_test strip "-s" gap "" "-lS" diff -ruN binutils-2.25/ld/testsuite/ld-elf/endsym.d binutils-2.25.1/ld/testsuite/ld-elf/endsym.d --- binutils-2.25/ld/testsuite/ld-elf/endsym.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-elf/endsym.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,13 @@ +#source: start.s +#source: endsym.s +#ld: --sort-common +#nm: -n +#notarget: hppa*-*-hpux* + +#... +.* end +#... +.* end2 +#... +.* _?_end +#pass diff -ruN binutils-2.25/ld/testsuite/ld-elf/endsym.s binutils-2.25.1/ld/testsuite/ld-elf/endsym.s --- binutils-2.25/ld/testsuite/ld-elf/endsym.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-elf/endsym.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,2 @@ + .comm end,4,4 + .comm end2,2,2 diff -ruN binutils-2.25/ld/testsuite/ld-elf/gap.s binutils-2.25.1/ld/testsuite/ld-elf/gap.s --- binutils-2.25/ld/testsuite/ld-elf/gap.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-elf/gap.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,4 @@ + .text + .global _start +_start: + .long 0 diff -ruN binutils-2.25/ld/testsuite/ld-gc/pr14265.d binutils-2.25.1/ld/testsuite/ld-gc/pr14265.d --- binutils-2.25/ld/testsuite/ld-gc/pr14265.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-gc/pr14265.d 2015-07-21 10:20:58.000000000 +0200 @@ -4,10 +4,10 @@ #nm: --format=bsd --numeric-sort #... -[0-9a-f]+[ ]d[ ]_*foo1_start +[0-9a-f]+[ ][dD][ ]_*foo1_start [0-9a-f]+[ ]D[ ]_*foo1 -[0-9a-f]+[ ]d[ ]_*foo1_end -[0-9a-f]+[ ]d[ ]_*foo2_start +[0-9a-f]+[ ][dD][ ]_*foo1_end +[0-9a-f]+[ ][dD][ ]_*foo2_start [0-9a-f]+[ ]D[ ]_*foo2 -[0-9a-f]+[ ]d[ ]_*foo2_end +[0-9a-f]+[ ][dD][ ]_*foo2_end #... diff -ruN binutils-2.25/ld/testsuite/ld-mmix/bpo-10.d binutils-2.25.1/ld/testsuite/ld-mmix/bpo-10.d --- binutils-2.25/ld/testsuite/ld-mmix/bpo-10.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-mmix/bpo-10.d 2015-07-21 10:20:58.000000000 +0200 @@ -15,10 +15,10 @@ 0+ l df \*ABS\* 0+ .* 0+ l \.init 0+ _start 0+ l df \*ABS\* 0+ .* -2000000000000000 l \.init 0+ __bss_start -2000000000000000 l \.init 0+ _edata -2000000000000000 l \.init 0+ _end 0+4 l \.init 0+ _start\. +2000000000000000 g \.init 0+ __bss_start +2000000000000000 g \.init 0+ _edata +2000000000000000 g \.init 0+ _end Contents of section \.init: 0000 e37704a6 .* diff -ruN binutils-2.25/ld/testsuite/ld-mmix/bpo-11.d binutils-2.25.1/ld/testsuite/ld-mmix/bpo-11.d --- binutils-2.25/ld/testsuite/ld-mmix/bpo-11.d 2013-11-04 16:33:39.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-mmix/bpo-11.d 2015-07-21 10:20:58.000000000 +0200 @@ -17,12 +17,12 @@ 0+ l df \*ABS\* 0+ .* 0+ l \.init 0+ _start 0+ l df \*ABS\* 0+ .* -2000000000000000 l \.text 0+ __bss_start -2000000000000000 l \.text 0+ _edata -2000000000000000 l \.text 0+ _end 0+10 l \.text 0+ _start\. 0+14 g \.text 0+ x 0+10 g \.text 0+ x2 +2000000000000000 g \.text 0+ __bss_start +2000000000000000 g \.text 0+ _edata +2000000000000000 g \.text 0+ _end Contents of section \.init: 0000 00000000 0000003d 00000000 0000003a .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/ambiguousv1.d binutils-2.25.1/ld/testsuite/ld-powerpc/ambiguousv1.d --- binutils-2.25/ld/testsuite/ld-powerpc/ambiguousv1.d 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/ambiguousv1.d 2015-07-21 10:20:58.000000000 +0200 @@ -17,9 +17,9 @@ .* 0: .* 1: 0+00000000 0 FUNC GLOBAL DEFAULT UND my_func - 2: 0+10010390 0 NOTYPE GLOBAL DEFAULT 11 __bss_start - 3: 0+10010390 0 NOTYPE GLOBAL DEFAULT 11 _edata - 4: 0+10010390 0 NOTYPE GLOBAL DEFAULT 11 _end + 2: 0+10010408 0 NOTYPE GLOBAL DEFAULT 11 __bss_start + 3: 0+10010408 0 NOTYPE GLOBAL DEFAULT 11 _edata + 4: 0+10010408 0 NOTYPE GLOBAL DEFAULT 11 _end Symbol table '\.symtab' contains 19 entries: Num: Value Size Type Bind Vis Ndx Name @@ -34,11 +34,11 @@ 8: 0+10010268 0 SECTION LOCAL DEFAULT 8 9: 0+10010368 0 SECTION LOCAL DEFAULT 9 10: 0+10010370 0 SECTION LOCAL DEFAULT 10 - 11: 0+10010388 0 SECTION LOCAL DEFAULT 11 + 11: 0+10010400 0 SECTION LOCAL DEFAULT 11 12: 0+10010268 0 OBJECT LOCAL DEFAULT 8 _DYNAMIC 13: 0+10010368 0 NOTYPE GLOBAL DEFAULT 9 func_tab 14: 0+00000000 0 FUNC GLOBAL DEFAULT UND my_func 15: 0+10010370 0 FUNC GLOBAL DEFAULT 10 _start - 16: 0+10010390 0 NOTYPE GLOBAL DEFAULT 11 __bss_start - 17: 0+10010390 0 NOTYPE GLOBAL DEFAULT 11 _edata - 18: 0+10010390 0 NOTYPE GLOBAL DEFAULT 11 _end + 16: 0+10010408 0 NOTYPE GLOBAL DEFAULT 11 __bss_start + 17: 0+10010408 0 NOTYPE GLOBAL DEFAULT 11 _edata + 18: 0+10010408 0 NOTYPE GLOBAL DEFAULT 11 _end diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/ambiguousv1b.d binutils-2.25.1/ld/testsuite/ld-powerpc/ambiguousv1b.d --- binutils-2.25/ld/testsuite/ld-powerpc/ambiguousv1b.d 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/ambiguousv1b.d 2015-07-21 10:20:58.000000000 +0200 @@ -16,30 +16,9 @@ Symbol table '\.dynsym' contains 5 entries: .* 0: .* - 1: 0+10010390 4 FUNC GLOBAL DEFAULT 12 my_func - 2: 0+10010390 0 NOTYPE GLOBAL DEFAULT 12 __bss_start - 3: 0+10010390 0 NOTYPE GLOBAL DEFAULT 11 _edata - 4: 0+10010398 0 NOTYPE GLOBAL DEFAULT 12 _end - + 1: 0+10010408 4 FUNC GLOBAL DEFAULT 12 my_func +#... Symbol table '\.symtab' contains 20 entries: -.* - 0: .* - 1: 0+10000158 0 SECTION LOCAL DEFAULT 1 - 2: 0+10000170 0 SECTION LOCAL DEFAULT 2 - 3: 0+10000198 0 SECTION LOCAL DEFAULT 3 - 4: 0+10000210 0 SECTION LOCAL DEFAULT 4 - 5: 0+10000248 0 SECTION LOCAL DEFAULT 5 - 6: 0+10000260 0 SECTION LOCAL DEFAULT 6 - 7: 0+10000264 0 SECTION LOCAL DEFAULT 7 - 8: 0+1000026c 0 SECTION LOCAL DEFAULT 8 - 9: 0+10010270 0 SECTION LOCAL DEFAULT 9 - 10: 0+10010370 0 SECTION LOCAL DEFAULT 10 - 11: 0+10010388 0 SECTION LOCAL DEFAULT 11 - 12: 0+10010390 0 SECTION LOCAL DEFAULT 12 - 13: 0+10010270 0 OBJECT LOCAL DEFAULT 9 _DYNAMIC - 14: 0+10000264 0 NOTYPE GLOBAL DEFAULT 7 func_tab - 15: 0+10010390 4 FUNC GLOBAL DEFAULT 12 my_func - 16: 0+10010370 0 FUNC GLOBAL DEFAULT 10 _start - 17: 0+10010390 0 NOTYPE GLOBAL DEFAULT 12 __bss_start - 18: 0+10010390 0 NOTYPE GLOBAL DEFAULT 11 _edata - 19: 0+10010398 0 NOTYPE GLOBAL DEFAULT 12 _end +#... + 15: 0+10010408 4 FUNC GLOBAL DEFAULT 12 my_func +#pass diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/ambiguousv2.d binutils-2.25.1/ld/testsuite/ld-powerpc/ambiguousv2.d --- binutils-2.25/ld/testsuite/ld-powerpc/ambiguousv2.d 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/ambiguousv2.d 2015-07-21 10:20:58.000000000 +0200 @@ -22,9 +22,9 @@ .* 0: .* 1: 0+00000000 0 FUNC GLOBAL DEFAULT UND my_func - 2: 0+10010438 0 NOTYPE GLOBAL DEFAULT 12 __bss_start - 3: 0+10010438 0 NOTYPE GLOBAL DEFAULT 11 _edata - 4: 0+10010450 0 NOTYPE GLOBAL DEFAULT 12 _end + 2: 0+10010508 0 NOTYPE GLOBAL DEFAULT 12 __bss_start + 3: 0+10010508 0 NOTYPE GLOBAL DEFAULT 11 _edata + 4: 0+10010520 0 NOTYPE GLOBAL DEFAULT 12 _end Symbol table '\.symtab' contains 21 entries: .* @@ -39,13 +39,13 @@ 8: 0+100002c4 0 SECTION LOCAL DEFAULT 8 9: 0+100102c8 0 SECTION LOCAL DEFAULT 9 10: 0+10010428 0 SECTION LOCAL DEFAULT 10 - 11: 0+10010430 0 SECTION LOCAL DEFAULT 11 - 12: 0+10010438 0 SECTION LOCAL DEFAULT 12 + 11: 0+10010500 0 SECTION LOCAL DEFAULT 11 + 12: 0+10010508 0 SECTION LOCAL DEFAULT 12 13: 0+100102c8 0 OBJECT LOCAL DEFAULT 9 _DYNAMIC 14: 0+10000288 0 NOTYPE LOCAL DEFAULT 7 __glink_PLTresolve 15: 0+10010428 0 NOTYPE GLOBAL DEFAULT 10 func_tab 16: 0+00000000 0 FUNC GLOBAL DEFAULT UND my_func 17: 0+10000278 0 NOTYPE GLOBAL DEFAULT 7 _start - 18: 0+10010438 0 NOTYPE GLOBAL DEFAULT 12 __bss_start - 19: 0+10010438 0 NOTYPE GLOBAL DEFAULT 11 _edata - 20: 0+10010450 0 NOTYPE GLOBAL DEFAULT 12 _end + 18: 0+10010508 0 NOTYPE GLOBAL DEFAULT 12 __bss_start + 19: 0+10010508 0 NOTYPE GLOBAL DEFAULT 11 _edata + 20: 0+10010520 0 NOTYPE GLOBAL DEFAULT 12 _end diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/defsym.d binutils-2.25.1/ld/testsuite/ld-powerpc/defsym.d --- binutils-2.25/ld/testsuite/ld-powerpc/defsym.d 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/defsym.d 2015-07-21 10:20:58.000000000 +0200 @@ -8,19 +8,19 @@ Disassembly of section \.text: 0+100000b0 <_start>: - 100000b0: (15 00 00 48|48 00 00 15) bl 100000c4 <(foo|bar)\+0x8> - 100000b4: (11 00 00 48|48 00 00 11) bl 100000c4 <(foo|bar)\+0x8> - 100000b8: (00 00 00 60|60 00 00 00) nop + 100000b0: (48 00 00 15|15 00 00 48) bl 100000c4 <(foo|bar)\+0x8> + 100000b4: (48 00 00 11|11 00 00 48) bl 100000c4 <(foo|bar)\+0x8> + 100000b8: (60 00 00 00|00 00 00 60) nop 0+100000bc <(foo|bar)>: - 100000bc: (02 10 40 3c|3c 40 10 02) lis r2,4098 - 100000c0: (c8 80 42 38|38 42 80 c8) addi r2,r2,-32568 - 100000c4: (20 00 80 4e|4e 80 00 20) blr + 100000bc: (3c 40 10 02|02 10 40 3c) lis r2,4098 + 100000c0: (38 42 80 00|00 80 42 38) addi r2,r2,-32768 + 100000c4: (4e 80 00 20|20 00 80 4e) blr Disassembly of section \.data: 0+100100c8 .*: - 100100c8: (bc 00 00 10|00 00 00 00) .* - 100100cc: (00 00 00 00|10 00 00 bc) .* - 100100d0: (bc 00 00 10|00 00 00 00) .* - 100100d4: (00 00 00 00|10 00 00 bc) .* + 100100c8: (00 00 00 00|bc 00 00 10) .* + 100100cc: (10 00 00 bc|00 00 00 00) .* + 100100d0: (00 00 00 00|bc 00 00 10) .* + 100100d4: (10 00 00 bc|00 00 00 00) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/elfv2-2exe.d binutils-2.25.1/ld/testsuite/ld-powerpc/elfv2-2exe.d --- binutils-2.25/ld/testsuite/ld-powerpc/elfv2-2exe.d 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/elfv2-2exe.d 2015-07-21 10:20:58.000000000 +0200 @@ -10,10 +10,10 @@ 0+10000078 : .*: (3c 40 10 01|01 10 40 3c) lis r2,4097 -.*: (38 42 80 78|78 80 42 38) addi r2,r2,-32648 +.*: (38 42 80 00|00 80 42 38) addi r2,r2,-32768 .*: (4e 80 00 20|20 00 80 4e) blr 0+10000084 : -.*: (38 4c 7f f4|f4 7f 4c 38) addi r2,r12,32756 +.*: (38 4c 7f 7c|7c 7f 4c 38) addi r2,r12,32636 .*: (4e 80 00 20|20 00 80 4e) blr .*: (00 00 00 00|78 00 00 10) .* .*: (10 00 00 78|00 00 00 00) .* @@ -34,7 +34,7 @@ 0+100000cc : .*: (3c 40 10 01|01 10 40 3c) lis r2,4097 -.*: (38 42 80 78|78 80 42 38) addi r2,r2,-32648 +.*: (38 42 80 00|00 80 42 38) addi r2,r2,-32768 .*: (4e 80 00 20|20 00 80 4e) blr 0+100000d8 : diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/elfv2exe.d binutils-2.25.1/ld/testsuite/ld-powerpc/elfv2exe.d --- binutils-2.25/ld/testsuite/ld-powerpc/elfv2exe.d 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/elfv2exe.d 2015-07-21 10:20:58.000000000 +0200 @@ -8,33 +8,33 @@ Disassembly of section \.text: 0+100000c0 <.*\.plt_branch\.f2>: -.*: (ff ff 82 3d|3d 82 ff ff) addis r12,r2,-1 -.*: (f0 7f 8c e9|e9 8c 7f f0) ld r12,32752\(r12\) -.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12 -.*: (20 04 80 4e|4e 80 04 20) bctr +.*: (3d 82 ff ff|ff ff 82 3d) addis r12,r2,-1 +.*: (e9 8c 7f 30|30 7f 8c e9) ld r12,32560\(r12\) +.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 +.*: (4e 80 04 20|20 04 80 4e) bctr 0+100000d0 <.*\.plt_branch\.f4>: -.*: (ff ff 82 3d|3d 82 ff ff) addis r12,r2,-1 -.*: (f8 7f 8c e9|e9 8c 7f f8) ld r12,32760\(r12\) -.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12 -.*: (20 04 80 4e|4e 80 04 20) bctr +.*: (3d 82 ff ff|ff ff 82 3d) addis r12,r2,-1 +.*: (e9 8c 7f 38|38 7f 8c e9) ld r12,32568\(r12\) +.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 +.*: (4e 80 04 20|20 04 80 4e) bctr 0+100000e0 <_start>: -.*: (02 10 40 3c|3c 40 10 02) lis r2,4098 -.*: (40 81 42 38|38 42 81 40) addi r2,r2,-32448 -.*: (a6 02 08 7c|7c 08 02 a6) mflr r0 -.*: (e1 ff 21 f8|f8 21 ff e1) stdu r1,-32\(r1\) -.*: (30 00 01 f8|f8 01 00 30) std r0,48\(r1\) -.*: (f5 ff ff 4b|4b ff ff f5) bl .* <_start\+0x8> -.*: (08 80 62 e8|e8 62 80 08) ld r3,-32760\(r2\) -.*: (c5 ff ff 4b|4b ff ff c5) bl .*\.plt_branch\.f2> -.*: (00 00 00 60|60 00 00 00) nop -.*: (10 80 62 e8|e8 62 80 10) ld r3,-32752\(r2\) -.*: (81 87 00 48|48 00 87 81) bl 10008888 -.*: (00 00 00 60|60 00 00 00) nop -.*: (c1 ff ff 4b|4b ff ff c1) bl .*\.plt_branch\.f4> -.*: (00 00 00 60|60 00 00 00) nop -.*: (30 00 01 e8|e8 01 00 30) ld r0,48\(r1\) -.*: (20 00 21 38|38 21 00 20) addi r1,r1,32 -.*: (a6 03 08 7c|7c 08 03 a6) mtlr r0 -.*: (20 00 80 4e|4e 80 00 20) blr +.*: (3c 40 10 02|02 10 40 3c) lis r2,4098 +.*: (38 42 82 00|00 82 42 38) addi r2,r2,-32256 +.*: (7c 08 02 a6|a6 02 08 7c) mflr r0 +.*: (f8 21 ff e1|e1 ff 21 f8) stdu r1,-32\(r1\) +.*: (f8 01 00 30|30 00 01 f8) std r0,48\(r1\) +.*: (4b ff ff f5|f5 ff ff 4b) bl .* <_start\+0x8> +.*: (e8 62 80 08|08 80 62 e8) ld r3,-32760\(r2\) +.*: (4b ff ff c5|c5 ff ff 4b) bl .*\.plt_branch\.f2> +.*: (60 00 00 00|00 00 00 60) nop +.*: (e8 62 80 10|10 80 62 e8) ld r3,-32752\(r2\) +.*: (48 00 87 81|81 87 00 48) bl 10008888 +.*: (60 00 00 00|00 00 00 60) nop +.*: (4b ff ff c1|c1 ff ff 4b) bl .*\.plt_branch\.f4> +.*: (60 00 00 00|00 00 00 60) nop +.*: (e8 01 00 30|30 00 01 e8) ld r0,48\(r1\) +.*: (38 21 00 20|20 00 21 38) addi r1,r1,32 +.*: (7c 08 03 a6|a6 03 08 7c) mtlr r0 +.*: (4e 80 00 20|20 00 80 4e) blr diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/elfv2so.d binutils-2.25.1/ld/testsuite/ld-powerpc/elfv2so.d --- binutils-2.25/ld/testsuite/ld-powerpc/elfv2so.d 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/elfv2so.d 2015-07-21 10:20:58.000000000 +0200 @@ -8,75 +8,75 @@ Disassembly of section \.text: 0+300 <.*\.plt_call\.f4>: -.*: (18 00 41 f8|f8 41 00 18) std r2,24\(r1\) -.*: (38 80 82 e9|e9 82 80 38) ld r12,-32712\(r2\) -.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12 -.*: (20 04 80 4e|4e 80 04 20) bctr +.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\) +.*: (e9 82 80 38|38 80 82 e9) ld r12,-32712\(r2\) +.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 +.*: (4e 80 04 20|20 04 80 4e) bctr 0+310 <.*\.plt_call\.f3>: -.*: (18 00 41 f8|f8 41 00 18) std r2,24\(r1\) -.*: (28 80 82 e9|e9 82 80 28) ld r12,-32728\(r2\) -.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12 -.*: (20 04 80 4e|4e 80 04 20) bctr +.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\) +.*: (e9 82 80 28|28 80 82 e9) ld r12,-32728\(r2\) +.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 +.*: (4e 80 04 20|20 04 80 4e) bctr 0+320 <.*\.plt_call\.f2>: -.*: (18 00 41 f8|f8 41 00 18) std r2,24\(r1\) -.*: (30 80 82 e9|e9 82 80 30) ld r12,-32720\(r2\) -.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12 -.*: (20 04 80 4e|4e 80 04 20) bctr +.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\) +.*: (e9 82 80 30|30 80 82 e9) ld r12,-32720\(r2\) +.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 +.*: (4e 80 04 20|20 04 80 4e) bctr 0+330 <.*\.plt_call\.f1>: -.*: (18 00 41 f8|f8 41 00 18) std r2,24\(r1\) -.*: (40 80 82 e9|e9 82 80 40) ld r12,-32704\(r2\) -.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12 -.*: (20 04 80 4e|4e 80 04 20) bctr +.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\) +.*: (e9 82 80 40|40 80 82 e9) ld r12,-32704\(r2\) +.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 +.*: (4e 80 04 20|20 04 80 4e) bctr 0+340 : -.*: (02 00 4c 3c|3c 4c 00 02) addis r2,r12,2 -.*: (e0 81 42 38|38 42 81 e0) addi r2,r2,-32288 -.*: (a6 02 08 7c|7c 08 02 a6) mflr r0 -.*: (e1 ff 21 f8|f8 21 ff e1) stdu r1,-32\(r1\) -.*: (30 00 01 f8|f8 01 00 30) std r0,48\(r1\) -.*: (dd ff ff 4b|4b ff ff dd) bl .*\.plt_call\.f1> -.*: (08 80 62 e8|e8 62 80 08) ld r3,-32760\(r2\) -.*: (c5 ff ff 4b|4b ff ff c5) bl .*\.plt_call\.f2> -.*: (18 00 41 e8|e8 41 00 18) ld r2,24\(r1\) -.*: (10 80 62 e8|e8 62 80 10) ld r3,-32752\(r2\) -.*: (a9 ff ff 4b|4b ff ff a9) bl .*\.plt_call\.f3> -.*: (18 00 41 e8|e8 41 00 18) ld r2,24\(r1\) -.*: (91 ff ff 4b|4b ff ff 91) bl .*\.plt_call\.f4> -.*: (18 00 41 e8|e8 41 00 18) ld r2,24\(r1\) -.*: (30 00 01 e8|e8 01 00 30) ld r0,48\(r1\) -.*: (20 00 21 38|38 21 00 20) addi r1,r1,32 -.*: (a6 03 08 7c|7c 08 03 a6) mtlr r0 -.*: (20 00 80 4e|4e 80 00 20) blr -.*: (a0 01 01 00|00 00 00 00) .* -.*: (00 00 00 00|00 01 01 a0) .* +.*: (3c 4c 00 02|02 00 4c 3c) addis r2,r12,2 +.*: (38 42 82 c0|c0 82 42 38) addi r2,r2,-32064 +.*: (7c 08 02 a6|a6 02 08 7c) mflr r0 +.*: (f8 21 ff e1|e1 ff 21 f8) stdu r1,-32\(r1\) +.*: (f8 01 00 30|30 00 01 f8) std r0,48\(r1\) +.*: (4b ff ff dd|dd ff ff 4b) bl .*\.plt_call\.f1> +.*: (e8 62 80 08|08 80 62 e8) ld r3,-32760\(r2\) +.*: (4b ff ff c5|c5 ff ff 4b) bl .*\.plt_call\.f2> +.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\) +.*: (e8 62 80 10|10 80 62 e8) ld r3,-32752\(r2\) +.*: (4b ff ff a9|a9 ff ff 4b) bl .*\.plt_call\.f3> +.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\) +.*: (4b ff ff 91|91 ff ff 4b) bl .*\.plt_call\.f4> +.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\) +.*: (e8 01 00 30|30 00 01 e8) ld r0,48\(r1\) +.*: (38 21 00 20|20 00 21 38) addi r1,r1,32 +.*: (7c 08 03 a6|a6 03 08 7c) mtlr r0 +.*: (4e 80 00 20|20 00 80 4e) blr +.*: (00 00 00 00|80 02 01 00) .* +.*: (00 01 02 80|00 00 00 00) .* 0+390 <__glink_PLTresolve>: -.*: (a6 02 08 7c|7c 08 02 a6) mflr r0 -.*: (05 00 9f 42|42 9f 00 05) bcl .* -.*: (a6 02 68 7d|7d 68 02 a6) mflr r11 -.*: (f0 ff 4b e8|e8 4b ff f0) ld r2,-16\(r11\) -.*: (a6 03 08 7c|7c 08 03 a6) mtlr r0 -.*: (50 60 8b 7d|7d 8b 60 50) subf r12,r11,r12 -.*: (14 5a 62 7d|7d 62 5a 14) add r11,r2,r11 -.*: (d0 ff 0c 38|38 0c ff d0) addi r0,r12,-48 -.*: (00 00 8b e9|e9 8b 00 00) ld r12,0\(r11\) -.*: (82 f0 00 78|78 00 f0 82) rldicl r0,r0,62,2 -.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12 -.*: (08 00 6b e9|e9 6b 00 08) ld r11,8\(r11\) -.*: (20 04 80 4e|4e 80 04 20) bctr -.*: (00 00 00 60|60 00 00 00) nop +.*: (7c 08 02 a6|a6 02 08 7c) mflr r0 +.*: (42 9f 00 05|05 00 9f 42) bcl .* +.*: (7d 68 02 a6|a6 02 68 7d) mflr r11 +.*: (e8 4b ff f0|f0 ff 4b e8) ld r2,-16\(r11\) +.*: (7c 08 03 a6|a6 03 08 7c) mtlr r0 +.*: (7d 8b 60 50|50 60 8b 7d) subf r12,r11,r12 +.*: (7d 62 5a 14|14 5a 62 7d) add r11,r2,r11 +.*: (38 0c ff d0|d0 ff 0c 38) addi r0,r12,-48 +.*: (e9 8b 00 00|00 00 8b e9) ld r12,0\(r11\) +.*: (78 00 f0 82|82 f0 00 78) rldicl r0,r0,62,2 +.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 +.*: (e9 6b 00 08|08 00 6b e9) ld r11,8\(r11\) +.*: (4e 80 04 20|20 04 80 4e) bctr +.*: (60 00 00 00|00 00 00 60) nop .* : -.*: (c8 ff ff 4b|4b ff ff c8) b .* <__glink_PLTresolve> +.*: (4b ff ff c8|c8 ff ff 4b) b .* <__glink_PLTresolve> .* : -.*: (c4 ff ff 4b|4b ff ff c4) b .* <__glink_PLTresolve> +.*: (4b ff ff c4|c4 ff ff 4b) b .* <__glink_PLTresolve> .* : -.*: (c0 ff ff 4b|4b ff ff c0) b .* <__glink_PLTresolve> +.*: (4b ff ff c0|c0 ff ff 4b) b .* <__glink_PLTresolve> .* : -.*: (bc ff ff 4b|4b ff ff bc) b .* <__glink_PLTresolve> +.*: (4b ff ff bc|bc ff ff 4b) b .* <__glink_PLTresolve> diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.25.1/ld/testsuite/ld-powerpc/powerpc.exp --- binutils-2.25/ld/testsuite/ld-powerpc/powerpc.exp 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/powerpc.exp 2015-07-21 10:20:58.000000000 +0200 @@ -215,6 +215,8 @@ {tocopt4a.s tocopt4b.s} {{objdump -s tocopt4.d}} "tocopt4"} {"TOC opt5" "-melf64ppc" "" "-a64" {tocopt5.s} {{objdump -s tocopt5.d}} "tocopt5"} + {"TOC opt6" "-melf64ppc" "" "-a64" {tocopt6a.s tocopt6b.s tocopt6c.s} + {{objdump -d tocopt6.d}} "tocopt6"} {"ambig shared v1" "-shared -melf64ppc" "" "-a64" {funv1.s} {} "funv1.so"} {"ambig shared v2" "-shared -melf64ppc" "" "-a64" {funv2.s} {} "funv2.so"} } @@ -282,13 +284,18 @@ run_dump_test "ambiguousv2" run_dump_test "ambiguousv2b" run_dump_test "defsym" + run_dump_test "tlsld" } +run_dump_test "tlsld32" + if { [istarget "powerpc*-eabi*"] } { run_ld_link_tests $ppceabitests } run_dump_test "plt1" +run_dump_test "sdabase" +run_dump_test "sdabase2" run_dump_test "attr-gnu-4-00" run_dump_test "attr-gnu-4-01" @@ -318,3 +325,6 @@ run_dump_test "attr-gnu-12-21" run_dump_test "vle-multiseg-6" + +run_dump_test "ppc476-shared" +run_dump_test "ppc476-shared2" diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/ppc476-shared.d binutils-2.25.1/ld/testsuite/ld-powerpc/ppc476-shared.d --- binutils-2.25/ld/testsuite/ld-powerpc/ppc476-shared.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/ppc476-shared.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,48 @@ +#source: ppc476-shared.s +#as: -a32 +#ld: -melf32ppc -q -shared --ppc476-workaround -T ppc476-shared.lnk +#objdump: -dr +#target: powerpc*-*-* + +.*: file format .* + +Disassembly of section \.text: + +0000fffc <\.text>: + fffc: (48 03 00 04|04 00 03 48) b 40000 .* + 10000: (38 63 00 00|00 00 63 38) addi r3,r3,0 + 1000[02]: R_PPC_ADDR16_LO \.bss + \.\.\. + 1fffc: (48 02 00 14|14 00 02 48) b 40010 .* + 20000: (38 63 00 00|00 00 63 38) addi r3,r3,0 + 2000[02]: R_PPC_ADDR16_LO \.bss + \.\.\. + 2fffc: (48 01 00 24|24 00 01 48) b 40020 .* + 30000: (38 63 00 00|00 00 63 38) addi r3,r3,0 + 3000[02]: R_PPC_ADDR16_LO \.bss + \.\.\. + 3fff0: (42 9f 00 05|05 00 9f 42) bcl .* + 3fff4: (7d 28 02 a6|a6 02 28 7d) mflr r9 + 3fff8: (3d 29 00 00|00 00 29 3d) addis r9,r9,0 + 3fff[8a]: R_PPC_REL16_HA \.bss\+0x[46] + 3fffc: (48 00 00 34|34 00 00 48) b 40030 .* + 40000: (3c 60 00 00|00 00 60 3c) lis r3,0 + 4000[02]: R_PPC_ADDR16_HA \.bss + 40004: (4b fc ff fc|fc ff fc 4b) b 10000 .* + 40008: (48 00 00 02|02 00 00 48) ba 0 .* + 4000c: (48 00 00 02|02 00 00 48) ba 0 .* + 40010: (3c 60 00 00|00 00 60 3c) lis r3,0 + 4001[02]: R_PPC_ADDR16_HA \.bss + 40014: (4b fd ff ec|ec ff fd 4b) b 20000 .* + 40018: (48 00 00 02|02 00 00 48) ba 0 .* + 4001c: (48 00 00 02|02 00 00 48) ba 0 .* + 40020: (3c 60 00 00|00 00 60 3c) lis r3,0 + 4002[02]: R_PPC_ADDR16_HA \.bss + 40024: (4b fe ff dc|dc ff fe 4b) b 30000 .* + 40028: (48 00 00 02|02 00 00 48) ba 0 .* + 4002c: (48 00 00 02|02 00 00 48) ba 0 .* + 40030: (39 29 01 50|50 01 29 39) addi r9,r9,336 + 4003[02]: R_PPC_REL16_LO \.bss\+0x3[ce] + 40034: (4b ff ff cc|cc ff ff 4b) b 40000 .* + 40038: (48 00 00 02|02 00 00 48) ba 0 .* + 4003c: (48 00 00 02|02 00 00 48) ba 0 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/ppc476-shared.lnk binutils-2.25.1/ld/testsuite/ld-powerpc/ppc476-shared.lnk --- binutils-2.25/ld/testsuite/ld-powerpc/ppc476-shared.lnk 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/ppc476-shared.lnk 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,6 @@ +SECTIONS +{ + . = 0xfffc; + .text : { *(.text) } + .bss : { *(.bss) } +} diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/ppc476-shared.s binutils-2.25.1/ld/testsuite/ld-powerpc/ppc476-shared.s --- binutils-2.25/ld/testsuite/ld-powerpc/ppc476-shared.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/ppc476-shared.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,19 @@ + .text + lis 3,x@ha + addi 3,3,x@l + .org 0x10000 + lis 3,x@ha + addi 3,3,x@l + .org 0x20000 + lis 3,x@ha + addi 3,3,x@l + + .org 0x2fff4 + bcl 20,31,.+4 +0: + mflr 9 + addis 9,9,x-0b@ha + addi 9,9,x-0b@l + + .section .bss,"aw",@nobits +x: .space 4 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/ppc476-shared2.d binutils-2.25.1/ld/testsuite/ld-powerpc/ppc476-shared2.d --- binutils-2.25/ld/testsuite/ld-powerpc/ppc476-shared2.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/ppc476-shared2.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,16 @@ +#source: ppc476-shared.s +#as: -a32 +#ld: -melf32ppc -shared --ppc476-workaround -T ppc476-shared.lnk +#objdump: -R +#target: powerpc*-*-* + +.*: file format .* + +DYNAMIC RELOCATION RECORDS +OFFSET TYPE VALUE +0001000[02] R_PPC_ADDR16_LO \.text\+0x00040144 +0002000[02] R_PPC_ADDR16_LO \.text\+0x00040144 +0003000[02] R_PPC_ADDR16_LO \.text\+0x00040144 +0004000[02] R_PPC_ADDR16_HA \.text\+0x00040144 +0004001[02] R_PPC_ADDR16_HA \.text\+0x00040144 +0004002[02] R_PPC_ADDR16_HA \.text\+0x00040144 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/relbrlt.d binutils-2.25.1/ld/testsuite/ld-powerpc/relbrlt.d --- binutils-2.25/ld/testsuite/ld-powerpc/relbrlt.d 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/relbrlt.d 2015-07-21 10:20:58.000000000 +0200 @@ -22,7 +22,7 @@ \.\.\. [0-9a-f ]*<.*plt_branch.*>: -[0-9a-f ]*: (e9 82 80 00|00 80 82 e9) ld r12,-32768\(r2\) +[0-9a-f ]*: (e9 82 80 e8|e8 80 82 e9) ld r12,-32536\(r2\) [0-9a-f ]*: R_PPC64_TOC16_DS \*ABS\*\+0x157f00e8 [0-9a-f ]*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 [0-9a-f ]*: (4e 80 04 20|20 04 80 4e) bctr @@ -32,7 +32,7 @@ [0-9a-f ]*: R_PPC64_REL24 \*ABS\*\+0x137e00fc [0-9a-f ]*<.*plt_branch.*>: -[0-9a-f ]*: (e9 82 80 08|08 80 82 e9) ld r12,-32760\(r2\) +[0-9a-f ]*: (e9 82 80 f0|f0 80 82 e9) ld r12,-32528\(r2\) [0-9a-f ]*: R_PPC64_TOC16_DS \*ABS\*\+0x157f00f0 [0-9a-f ]*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 [0-9a-f ]*: (4e 80 04 20|20 04 80 4e) bctr diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/sdabase.d binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase.d --- binutils-2.25/ld/testsuite/ld-powerpc/sdabase.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,10 @@ +#source: sdabase.s +#as: -a32 +#ld: -melf32ppc -T sdabase.t +#objdump: -s +#target: powerpc*-*-* + +.*: file format .* + +Contents of section \.sdata: + 0400 (00008400|00840000) (00000400|00040000) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/sdabase.s binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase.s --- binutils-2.25/ld/testsuite/ld-powerpc/sdabase.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,9 @@ + .text + .globl _start +_start: + + .section .sdata,"aw",@progbits + .globl my_sdata +my_sdata: + .dc.a _SDA_BASE_ + .dc.a my_sdata diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/sdabase.t binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase.t --- binutils-2.25/ld/testsuite/ld-powerpc/sdabase.t 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase.t 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,6 @@ +SECTIONS +{ + .text 0x100 : { *(.text) } + .sdata 0x400 : { *(.sdata) } + /DISCARD/ : { *(*) } +} diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/sdabase2.d binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase2.d --- binutils-2.25/ld/testsuite/ld-powerpc/sdabase2.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase2.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,10 @@ +#source: sdabase.s +#as: -a32 +#ld: -melf32ppc -T sdabase2.t +#objdump: -s +#target: powerpc*-*-* + +.*: file format .* + +Contents of section \.sdata: + 0400 (00000400|00040000) (00000400|00040000) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/sdabase2.t binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase2.t --- binutils-2.25/ld/testsuite/ld-powerpc/sdabase2.t 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/sdabase2.t 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,6 @@ +SECTIONS +{ + .text 0x100 : { *(.text) } + .sdata 0x400 : { PROVIDE (_SDA_BASE_ = .); *(.sdata) } + /DISCARD/ : { *(*) } +} diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tls.g binutils-2.25.1/ld/testsuite/ld-powerpc/tls.g --- binutils-2.25/ld/testsuite/ld-powerpc/tls.g 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tls.g 2015-07-21 10:20:58.000000000 +0200 @@ -8,5 +8,5 @@ .* Contents of section \.got: - 100101f8 (00000000|f8810110) (100181f8|00000000) (ffffffff|1880ffff) (ffff8018|ffffffff) .* - 10010208 (ffffffff|5880ffff) (ffff8058|ffffffff) .* + 10010200 (00000000|00820110) (10018200|00000000) (ffffffff|1880ffff) (ffff8018|ffffffff) .* +.* (ffffffff|5880ffff) (ffff8058|ffffffff) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tls32.d binutils-2.25.1/ld/testsuite/ld-powerpc/tls32.d --- binutils-2.25/ld/testsuite/ld-powerpc/tls32.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tls32.d 2015-07-21 10:20:58.000000000 +0200 @@ -9,7 +9,11 @@ Disassembly of section \.text: -0+1800094 <_start>: +0+18000a0 <_start>: +.*: (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.* <_start\+0x4> +.*: (7f c8 02 a6|a6 02 c8 7f) mflr r30 +.*: (3f de 00 02|02 00 de 3f) addis r30,r30,2 +.*: (3b de 80 a0|a0 80 de 3b) addi r30,r30,-32608 .*: (3c 62 00 00|00 00 62 3c) addis r3,r2,0 .*: (38 63 90 3c|3c 90 63 38) addi r3,r3,-28612 .*: (3c 62 00 00|00 00 62 3c) addis r3,r2,0 @@ -39,12 +43,5 @@ .*: (3d 22 00 00|00 00 22 3d) addis r9,r2,0 .*: (a9 49 90 18|18 90 49 a9) lha r10,-28648\(r9\) -0+1800104 <__tls_get_addr>: +0+1800120 <__tls_get_addr>: .*: (4e 80 00 20|20 00 80 4e) blr -Disassembly of section \.got: - -0+1810128 <_GLOBAL_OFFSET_TABLE_-0x4>: -.*: (4e 80 00 21|21 00 80 4e) blrl - -0+181012c <_GLOBAL_OFFSET_TABLE_>: - \.\.\. diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tls32.g binutils-2.25.1/ld/testsuite/ld-powerpc/tls32.g --- binutils-2.25/ld/testsuite/ld-powerpc/tls32.g 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tls32.g 2015-07-21 10:20:58.000000000 +0200 @@ -8,4 +8,4 @@ .* Contents of section \.got: - 1810128 (4e800021|2100804e) 00000000 00000000 00000000 .* + 1810144 00000000 00000000 00000000 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tls32.s binutils-2.25.1/ld/testsuite/ld-powerpc/tls32.s --- binutils-2.25/ld/testsuite/ld-powerpc/tls32.s 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tls32.s 2015-07-21 10:20:58.000000000 +0200 @@ -19,8 +19,17 @@ le4: .long 0x6789abcd le5: .long 0x789abcde + .section ".got2","aw" +.LCTOC1 = .+32768 + .text _start: + bcl 20,31,0f +0: + mflr 30 + addis 30,30,.LCTOC1-0b@ha + addi 30,30,.LCTOC1-0b@l + #extern syms #GD addi 3,31,gd@got@tlsgd #R_PPC_GOT_TLSGD16 gd diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tls32.t binutils-2.25.1/ld/testsuite/ld-powerpc/tls32.t --- binutils-2.25/ld/testsuite/ld-powerpc/tls32.t 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tls32.t 2015-07-21 10:20:58.000000000 +0200 @@ -8,5 +8,5 @@ .* Contents of section \.tdata: - 1810108 (12345678|78563412) (23456789|89674523) (3456789a|9a785634) (456789ab|ab896745) .* - 1810118 (56789abc|bc9a7856) (6789abcd|cdab8967) (789abcde|debc9a78) (00c0ffee|eeffc000) .* + 1810124 (12345678|78563412) (23456789|89674523) (3456789a|9a785634) (456789ab|ab896745) .* + 1810134 (56789abc|bc9a7856) (6789abcd|cdab8967) (789abcde|debc9a78) (00c0ffee|eeffc000) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexe.d binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe.d --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexe.d 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe.d 2015-07-21 10:20:58.000000000 +0200 @@ -23,8 +23,8 @@ .* (7d 89 03 a6|a6 03 89 7d) mtctr r12 .* (e8 42 80 50|50 80 42 e8) ld r2,-32688\(r2\) .* (4e 80 04 21|21 04 80 4e) bctrl -.* (e9 61 00 20|20 00 61 e9) ld r11,32\(r1\) .* (e8 41 00 28|28 00 41 e8) ld r2,40\(r1\) +.* (e9 61 00 20|20 00 61 e9) ld r11,32\(r1\) .* (7d 68 03 a6|a6 03 68 7d) mtlr r11 .* (4e 80 00 20|20 00 80 4e) blr @@ -67,8 +67,8 @@ .* (e9 4d 90 2a|2a 90 4d e9) lwa r10,-28632\(r13\) .* (3d 2d 00 00|00 00 2d 3d) addis r9,r13,0 .* (a9 49 90 30|30 90 49 a9) lha r10,-28624\(r9\) -.* (00 00 00 00|18 02 01 00) .* -.* (00 01 02 18|00 00 00 00) .* +.* (00 00 00 00|e0 02 01 00) .* +.* (00 01 02 e0|00 00 00 00) .* .* <__glink_PLTresolve>: .* (7d 88 02 a6|a6 02 88 7d) mflr r12 .* (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexe.g binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe.g --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexe.g 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe.g 2015-07-21 10:20:58.000000000 +0200 @@ -7,6 +7,6 @@ .* Contents of section \.got: -.* (00000000|38860110) (10018638|00000000) (ffffffff|1880ffff) (ffff8018|ffffffff) .* + 10010700 (00000000|00870110) (10018700|00000000) (ffffffff|1880ffff) (ffff8018|ffffffff) .* .* 00000000 00000000 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexe.r binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe.r --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexe.r 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe.r 2015-07-21 10:20:58.000000000 +0200 @@ -21,7 +21,7 @@ +\[[ 0-9]+\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8 +\[[ 0-9]+\] \.dynamic +DYNAMIC .* 0+160 10 +WA +4 +0 +8 +\[[ 0-9]+\] \.opd .* - +\[[ 0-9]+\] \.got +PROGBITS .* 0+30 08 +WA +0 +0 +8 + +\[[ 0-9]+\] \.got +PROGBITS .* 0+30 08 +WA +0 +0 +256 +\[[ 0-9]+\] \.plt +.* +\[[ 0-9]+\] \.shstrtab +.* +\[[ 0-9]+\] \.symtab +.* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexe32.d binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe32.d --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexe32.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe32.d 2015-07-21 10:20:58.000000000 +0200 @@ -9,10 +9,14 @@ Disassembly of section \.text: .* <_start>: -.*: (80 7f ff f0|f0 ff 7f 80) lwz r3,-16\(r31\) +.*: (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.* <_start\+0x4> +.*: (7f c8 02 a6|a6 02 c8 7f) mflr r30 +.*: (3f de 00 02|02 00 de 3f) addis r30,r30,2 +.*: (3b de 81 18|18 81 de 3b) addi r30,r30,-32488 +.*: (80 7f ff f4|f4 ff 7f 80) lwz r3,-12\(r31\) .*: (7c 63 12 14|14 12 63 7c) add r3,r3,r2 -.*: (38 7f ff f4|f4 ff 7f 38) addi r3,r31,-12 -.*: (48 01 01 85|85 01 01 48) bl .*<__tls_get_addr_opt@plt> +.*: (38 7f ff f8|f8 ff 7f 38) addi r3,r31,-8 +.*: (48 00 00 65|65 00 00 48) bl .* <__tls_get_addr_opt@plt> .*: (3c 62 00 00|00 00 62 3c) addis r3,r2,0 .*: (38 63 90 1c|1c 90 63 38) addi r3,r3,-28644 .*: (3c 62 00 00|00 00 62 3c) addis r3,r2,0 @@ -37,11 +41,41 @@ .*: (a1 42 90 14|14 90 42 a1) lhz r10,-28652\(r2\) .*: (3d 22 00 00|00 00 22 3d) addis r9,r2,0 .*: (a9 49 90 18|18 90 49 a9) lha r10,-28648\(r9\) -Disassembly of section \.got: -.* <_GLOBAL_OFFSET_TABLE_-0x10>: - \.\.\. -.*: (4e 80 00 21|21 00 80 4e) blrl +.* <__tls_get_addr_opt@plt>: +.*: (81 63 00 00|00 00 63 81) lwz r11,0\(r3\) +.*: (81 83 00 04|04 00 83 81) lwz r12,4\(r3\) +.*: (7c 60 1b 78|78 1b 60 7c) mr r0,r3 +.*: (2c 0b 00 00|00 00 0b 2c) cmpwi r11,0 +.*: (7c 6c 12 14|14 12 6c 7c) add r3,r12,r2 +.*: (4d 82 00 20|20 00 82 4d) beqlr +.*: (7c 03 03 78|78 03 03 7c) mr r3,r0 +.*: (60 00 00 00|00 00 00 60) nop +.*: (3d 60 01 81|81 01 60 3d) lis r11,385 +.*: (81 6b 04 14|14 04 6b 81) lwz r11,1044\(r11\) +.*: (7d 69 03 a6|a6 03 69 7d) mtctr r11 +.*: (4e 80 04 20|20 04 80 4e) bctr -.* <_GLOBAL_OFFSET_TABLE_>: -.*: (01 81 02 b8|b8 02 81 01) 00 00 00 00 00 00 00 00 .* +.* <__glink>: +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop + +.* <__glink_PLTresolve>: +.*: (3d 80 01 81|81 01 80 3d) lis r12,385 +.*: (3d 6b fe 80|80 fe 6b 3d) addis r11,r11,-384 +.*: (80 0c 04 0c|0c 04 0c 80) lwz r0,1036\(r12\) +.*: (39 6b fd 20|20 fd 6b 39) addi r11,r11,-736 +.*: (7c 09 03 a6|a6 03 09 7c) mtctr r0 +.*: (7c 0b 5a 14|14 5a 0b 7c) add r0,r11,r11 +.*: (81 8c 04 10|10 04 8c 81) lwz r12,1040\(r12\) +.*: (7d 60 5a 14|14 5a 60 7d) add r11,r0,r11 +.*: (4e 80 04 20|20 04 80 4e) bctr +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexe32.g binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe32.g --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexe32.g 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe32.g 2015-07-21 10:20:58.000000000 +0200 @@ -7,5 +7,5 @@ .* Contents of section \.got: -.* 00000000 00000000 00000000 (4e800021|2100804e) .* -.* (018102b8|b8028101) 00000000 00000000 .* +.* 00000000 00000000 00000000 (0181034c|4c038101) .* +.* 00000000 00000000 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexe32.r binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe32.r --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexe32.r 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe32.r 2015-07-21 10:20:58.000000000 +0200 @@ -16,12 +16,12 @@ +\[[ 0-9]+\] \.dynstr +.* +\[[ 0-9]+\] \.rela\.dyn +.* +\[[ 0-9]+\] \.rela\.plt +.* - +\[[ 0-9]+\] \.text +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000070 00 +AX +0 +0 +1 + +\[[ 0-9]+\] \.text +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000100 00 +AX +0 +0 +16 +\[[ 0-9]+\] \.tdata +PROGBITS +[0-9a-f]+ [0-9a-f]+ 00001c 00 WAT +0 +0 +4 +\[[ 0-9]+\] \.tbss +NOBITS +[0-9a-f]+ [0-9a-f]+ 00001c 00 WAT +0 +0 +4 +\[[ 0-9]+\] \.dynamic +DYNAMIC +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 08 +WA +4 +0 +4 - +\[[ 0-9]+\] \.got +PROGBITS +[0-9a-f]+ [0-9a-f]+ 00001c 04 WAX +0 +0 +4 - +\[[ 0-9]+\] \.plt +NOBITS +.* + +\[[ 0-9]+\] \.got +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000018 04 +WA +0 +0 +4 + +\[[ 0-9]+\] \.plt +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000004 00 +WA +0 +0 +4 +\[[ 0-9]+\] \.shstrtab +STRTAB +.* +\[[ 0-9]+\] \.symtab +SYMTAB +.* +\[[ 0-9]+\] \.strtab +STRTAB +.* @@ -37,7 +37,7 @@ +INTERP +0x0000f4 0x018000f4 0x018000f4 0x00011 0x00011 R +0x1 +\[Requesting program interpreter: .*\] +LOAD .* R E 0x10000 - +LOAD .* RWE 0x10000 + +LOAD .* RW +0x10000 +DYNAMIC .* RW +0x4 +TLS .* 0x0001c 0x00038 R +0x4 @@ -67,7 +67,7 @@ .* NOTYPE +GLOBAL +DEFAULT +12 __end .* NOTYPE +GLOBAL +DEFAULT +12 __bss_start .* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr_opt -.* NOTYPE +GLOBAL +DEFAULT +11 _edata +.* NOTYPE +GLOBAL +DEFAULT +12 _edata .* NOTYPE +GLOBAL +DEFAULT +12 _end Symbol table '\.symtab' contains [0-9]+ entries: @@ -107,7 +107,7 @@ .* TLS +GLOBAL +DEFAULT +9 ld1 .* NOTYPE +GLOBAL +DEFAULT +12 __bss_start .* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr_opt -.* NOTYPE +GLOBAL +DEFAULT +11 _edata +.* NOTYPE +GLOBAL +DEFAULT +12 _edata .* NOTYPE +GLOBAL +DEFAULT +12 _end .* TLS +GLOBAL +DEFAULT +9 gd0 .* TLS +GLOBAL +DEFAULT +9 ie0 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexetoc.d binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexetoc.d --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexetoc.d 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexetoc.d 2015-07-21 10:20:58.000000000 +0200 @@ -23,8 +23,8 @@ .* (7d 89 03 a6|a6 03 89 7d) mtctr r12 .* (e8 42 80 78|78 80 42 e8) ld r2,-32648\(r2\) .* (4e 80 04 21|21 04 80 4e) bctrl -.* (e9 61 00 20|20 00 61 e9) ld r11,32\(r1\) .* (e8 41 00 28|28 00 41 e8) ld r2,40\(r1\) +.* (e9 61 00 20|20 00 61 e9) ld r11,32\(r1\) .* (7d 68 03 a6|a6 03 68 7d) mtlr r11 .* (4e 80 00 20|20 00 80 4e) blr @@ -51,8 +51,8 @@ .* (89 4d 90 60|60 90 4d 89) lbz r10,-28576\(r13\) .* (3d 2d 00 00|00 00 2d 3d) addis r9,r13,0 .* (99 49 90 68|68 90 49 99) stb r10,-28568\(r9\) -.* (00 00 00 00|40 02 01 00) .* -.* (00 01 02 40|00 00 00 00) .* +.* (00 00 00 00|68 02 01 00) .* +.* (00 01 02 68|00 00 00 00) .* .* <__glink_PLTresolve>: .* (7d 88 02 a6|a6 02 88 7d) mflr r12 .* (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexetoc.g binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexetoc.g --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexetoc.g 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexetoc.g 2015-07-21 10:20:58.000000000 +0200 @@ -7,7 +7,7 @@ .* Contents of section \.got: -.* (00000000|d8850110) (100185d8|00000000) 00000000 00000000 .* + 10010600 (00000000|00860110) (10018600|00000000) 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* .* 00000000 00000000 (00000000|01000000) (00000001|00000000) .* .* 00000000 00000000 (00000000|01000000) (00000001|00000000) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsexetoc.r binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexetoc.r --- binutils-2.25/ld/testsuite/ld-powerpc/tlsexetoc.r 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexetoc.r 2015-07-21 10:20:58.000000000 +0200 @@ -21,7 +21,7 @@ +\[[ 0-9]+\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8 +\[[ 0-9]+\] \.dynamic +DYNAMIC .* 0+160 10 +WA +4 +0 +8 +\[[ 0-9]+\] \.opd .* - +\[[ 0-9]+\] \.got +PROGBITS .* 0+58 08 +WA +0 +0 +8 + +\[[ 0-9]+\] \.got +PROGBITS .* 0+58 08 +WA +0 +0 +256 +\[[ 0-9]+\] \.plt +.* +\[[ 0-9]+\] \.shstrtab +.* +\[[ 0-9]+\] \.symtab +.* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsld.d binutils-2.25.1/ld/testsuite/ld-powerpc/tlsld.d --- binutils-2.25/ld/testsuite/ld-powerpc/tlsld.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsld.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,43 @@ +#source: tlsld.s +#as: -a64 +#ld: -melf64ppc +#objdump: -dr +#target: powerpc64*-*-* + +.*: file format .* + +Disassembly of section \.text: + +.*: +.* nop +.* addis r29,r13,0 +.* mr r3,r29 +.* nop +.* addi r3,r3,4096 +.* addis r3,r3,0 +.* ld r3,-32768\(r3\) +.* nop +.* addis r29,r13,0 +.* mr r3,r29 +.* nop +.* addi r3,r3,4096 +.* ld r3,-32768\(r3\) +.* nop +.* nop +.* nop +.* nop +.* addis r29,r13,0 +.* mr r3,r29 +.* nop +.* addi r3,r3,-28672 +.* ld r3,0\(r3\) +.* nop +.* nop +.* addis r29,r13,0 +.* mr r3,r29 +.* nop +.* addi r3,r3,-28672 +.* ld r3,0\(r3\) +.* nop +.* nop +.* nop diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsld.s binutils-2.25.1/ld/testsuite/ld-powerpc/tlsld.s --- binutils-2.25/ld/testsuite/ld-powerpc/tlsld.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsld.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,48 @@ + .section ".opd","aw",@progbits + .p2align 3 + .globl _start +_start: + .quad .L_start,.TOC.@tocbase,0 + + .text +.L_start: + addis 3,2,PrettyStackTraceHead@got@tlsld@ha + addi 29,3,PrettyStackTraceHead@got@tlsld@l + mr 3,29 + bl __tls_get_addr(PrettyStackTraceHead@tlsld) + nop + addis 3,3,PrettyStackTraceHead@dtprel@ha + ld 3,PrettyStackTraceHead@dtprel@l(3) + nop + + addi 29,2,PrettyStackTraceHead@got@tlsld + mr 3,29 + bl __tls_get_addr(PrettyStackTraceHead@tlsld) + nop + ld 3,PrettyStackTraceHead@dtprel(3) + nop + nop + nop + + addis 3,2,PrettyStackTraceHead@got@tlsgd@ha + addi 29,3,PrettyStackTraceHead@got@tlsgd@l + mr 3,29 + bl __tls_get_addr(PrettyStackTraceHead@tlsgd) + nop + ld 3,0(3) + nop + nop + + addi 29,2,PrettyStackTraceHead@got@tlsgd + mr 3,29 + bl __tls_get_addr(PrettyStackTraceHead@tlsgd) + nop + ld 3,0(3) + nop + nop + nop + + .section ".tbss","awT",@nobits + .align 3 +PrettyStackTraceHead: + .space 8 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsld32.d binutils-2.25.1/ld/testsuite/ld-powerpc/tlsld32.d --- binutils-2.25/ld/testsuite/ld-powerpc/tlsld32.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsld32.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,44 @@ +#source: tlsld32.s +#as: -a32 +#ld: -melf32ppc +#objdump: -dr +#target: powerpc*-*-* + +.*: file format .* + +Disassembly of section \.text: + +.*: +.* nop +.* addis r29,r2,0 +.* mr r3,r29 +.* addi r3,r3,4096 +.* addis r3,r3,0 +.* lwz r3,-32768\(r3\) +.* nop +.* nop +.* addis r29,r2,0 +.* mr r3,r29 +.* addi r3,r3,4096 +.* lwz r3,-32768\(r3\) +.* nop +.* nop +.* nop +.* nop +.* nop +.* addis r29,r2,0 +.* mr r3,r29 +.* addi r3,r3,-28672 +.* lwz r3,0\(r3\) +.* nop +.* nop +.* nop +.* addis r29,r2,0 +.* mr r3,r29 +.* addi r3,r3,-28672 +.* lwz r3,0\(r3\) +.* nop +.* nop +.* nop +.* nop +#pass diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsld32.s binutils-2.25.1/ld/testsuite/ld-powerpc/tlsld32.s --- binutils-2.25/ld/testsuite/ld-powerpc/tlsld32.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsld32.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,43 @@ + .text + .globl _start +_start: + addis 3,31,PrettyStackTraceHead@got@tlsld@ha + addi 29,3,PrettyStackTraceHead@got@tlsld@l + mr 3,29 + bl __tls_get_addr(PrettyStackTraceHead@tlsld) + addis 3,3,PrettyStackTraceHead@dtprel@ha + lwz 3,PrettyStackTraceHead@dtprel@l(3) + nop + nop + + addi 29,31,PrettyStackTraceHead@got@tlsld + mr 3,29 + bl __tls_get_addr(PrettyStackTraceHead@tlsld) + lwz 3,PrettyStackTraceHead@dtprel(3) + nop + nop + nop + nop + + addis 3,31,PrettyStackTraceHead@got@tlsgd@ha + addi 29,3,PrettyStackTraceHead@got@tlsgd@l + mr 3,29 + bl __tls_get_addr(PrettyStackTraceHead@tlsgd) + lwz 3,0(3) + nop + nop + nop + + addi 29,31,PrettyStackTraceHead@got@tlsgd + mr 3,29 + bl __tls_get_addr(PrettyStackTraceHead@tlsgd) + lwz 3,0(3) + nop + nop + nop + nop + + .section ".tbss","awT",@nobits + .align 2 +PrettyStackTraceHead: + .space 4 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsso.d binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso.d --- binutils-2.25/ld/testsuite/ld-powerpc/tlsso.d 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso.d 2015-07-21 10:20:58.000000000 +0200 @@ -57,8 +57,8 @@ .* (3d 2d 00 00|00 00 2d 3d) addis r9,r13,0 .* (a9 49 00 00|00 00 49 a9) lha r10,0\(r9\) .* (60 00 00 00|00 00 00 60) nop -.* (00 00 00 00|38 02 01 00) .* -.* (00 01 02 38|00 00 00 00) .* +.* (00 00 00 00|58 02 01 00) .* +.* (00 01 02 58|00 00 00 00) .* .* <__glink_PLTresolve>: .* (7d 88 02 a6|a6 02 88 7d) mflr r12 .* (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsso.g binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso.g --- binutils-2.25/ld/testsuite/ld-powerpc/tlsso.g 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso.g 2015-07-21 10:20:58.000000000 +0200 @@ -7,7 +7,7 @@ .* Contents of section \.got: - 107e0 (00000000|e0870100) (000187e0|00000000) 00000000 00000000 .* + 10800 (00000000|00880100) (00018800|00000000) 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsso.r binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso.r --- binutils-2.25/ld/testsuite/ld-powerpc/tlsso.r 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso.r 2015-07-21 10:20:58.000000000 +0200 @@ -47,7 +47,7 @@ Relocation section '\.rela\.dyn' at offset .* contains 18 entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend [0-9a-f ]+R_PPC64_RELATIVE +55c -[0-9a-f ]+R_PPC64_RELATIVE +187e0 +[0-9a-f ]+R_PPC64_RELATIVE +18800 [0-9a-f ]+R_PPC64_TPREL16 +0+60 le0 \+ 0 [0-9a-f ]+R_PPC64_TPREL16_HA +0+68 le1 \+ 0 [0-9a-f ]+R_PPC64_TPREL16_LO +0+68 le1 \+ 0 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsso32.d binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso32.d --- binutils-2.25/ld/testsuite/ld-powerpc/tlsso32.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso32.d 2015-07-21 10:20:58.000000000 +0200 @@ -9,39 +9,59 @@ Disassembly of section \.text: .* <_start>: -.*: (38 7f ff e0|e0 ff 7f 38) addi r3,r31,-32 +.*: (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.* <_start\+0x4> +.*: (7f c8 02 a6|a6 02 c8 7f) mflr r30 +.*: (3f de 00 02|02 00 de 3f) addis r30,r30,2 +.*: (3b de 80 e8|e8 80 de 3b) addi r30,r30,-32536 +.*: (38 7f ff e4|e4 ff 7f 38) addi r3,r31,-28 .*: (48 00 00 01|01 00 00 48) bl .* -.*: (38 7f ff f4|f4 ff 7f 38) addi r3,r31,-12 +.*: (38 7f ff f8|f8 ff 7f 38) addi r3,r31,-8 .*: (48 00 00 01|01 00 00 48) bl .* -.*: (38 7f ff e8|e8 ff 7f 38) addi r3,r31,-24 -.*: (48 01 01 95|95 01 01 48) bl .*<__tls_get_addr@plt> -.*: (38 7f ff f4|f4 ff 7f 38) addi r3,r31,-12 -.*: (48 01 01 8d|8d 01 01 48) bl .*<__tls_get_addr@plt> +.*: (38 7f ff ec|ec ff 7f 38) addi r3,r31,-20 +.*: (48 00 00 5d|5d 00 00 48) bl .*<0+8000\.got2\.plt_pic32\.__tls_get_addr> +.*: (38 7f ff f8|f8 ff 7f 38) addi r3,r31,-8 +.*: (48 00 00 55|55 00 00 48) bl .*<0+8000\.got2\.plt_pic32\.__tls_get_addr> .*: (39 23 80 20|20 80 23 39) addi r9,r3,-32736 .*: (3d 23 00 00|00 00 23 3d) addis r9,r3,0 .*: (81 49 80 24|24 80 49 81) lwz r10,-32732\(r9\) -.*: (81 3f ff f0|f0 ff 3f 81) lwz r9,-16\(r31\) +.*: (81 3f ff f4|f4 ff 3f 81) lwz r9,-12\(r31\) .*: (7d 49 12 2e|2e 12 49 7d) lhzx r10,r9,r2 .*: (89 42 00 00|00 00 42 89) lbz r10,0\(r2\) .*: (3d 22 00 00|00 00 22 3d) addis r9,r2,0 .*: (99 49 00 00|00 00 49 99) stb r10,0\(r9\) -.*: (38 7e ff d8|d8 ff 7e 38) addi r3,r30,-40 +.*: (38 7e ff dc|dc ff 7e 38) addi r3,r30,-36 .*: (48 00 00 01|01 00 00 48) bl .* -.*: (38 7e ff f4|f4 ff 7e 38) addi r3,r30,-12 +.*: (38 7e ff f8|f8 ff 7e 38) addi r3,r30,-8 .*: (48 00 00 01|01 00 00 48) bl .* .*: (91 43 80 04|04 80 43 91) stw r10,-32764\(r3\) .*: (3d 23 00 00|00 00 23 3d) addis r9,r3,0 .*: (91 49 80 08|08 80 49 91) stw r10,-32760\(r9\) -.*: (81 3e ff f0|f0 ff 3e 81) lwz r9,-16\(r30\) +.*: (81 3e ff f4|f4 ff 3e 81) lwz r9,-12\(r30\) .*: (7d 49 13 2e|2e 13 49 7d) sthx r10,r9,r2 .*: (a1 42 00 00|00 00 42 a1) lhz r10,0\(r2\) .*: (3d 22 00 00|00 00 22 3d) addis r9,r2,0 .*: (a9 49 00 00|00 00 49 a9) lha r10,0\(r9\) -Disassembly of section \.got: -.* <_GLOBAL_OFFSET_TABLE_-0x28>: -#... -.*: (4e 80 00 21|21 00 80 4e) blrl -.* <_GLOBAL_OFFSET_TABLE_>: -.*: (00 01 03 ec|ec 03 01 00) .* -#pass +.* <00008000.got2.plt_pic32.__tls_get_addr>: +.*: (81 7e 80 d8|d8 80 7e 81) lwz r11,-32552\(r30\) +.*: (7d 69 03 a6|a6 03 69 7d) mtctr r11 +.*: (4e 80 04 20|20 04 80 4e) bctr +.*: (60 00 00 00|00 00 00 60) nop + +.* <__glink>: +.*: (3d 6b 00 00|00 00 6b 3d) addis r11,r11,0 +.*: (7c 08 02 a6|a6 02 08 7c) mflr r0 +.*: (42 9f 00 05|05 00 9f 42) bcl .* <__glink\+0xc> +.*: (39 6b 00 0c|0c 00 6b 39) addi r11,r11,12 +.*: (7d 88 02 a6|a6 02 88 7d) mflr r12 +.*: (7c 08 03 a6|a6 03 08 7c) mtlr r0 +.*: (7d 6c 58 50|50 58 6c 7d) subf r11,r12,r11 +.*: (3d 8c 00 01|01 00 8c 3d) addis r12,r12,1 +.*: (80 0c 01 20|20 01 0c 80) lwz r0,288\(r12\) +.*: (81 8c 01 24|24 01 8c 81) lwz r12,292\(r12\) +.*: (7c 09 03 a6|a6 03 09 7c) mtctr r0 +.*: (7c 0b 5a 14|14 5a 0b 7c) add r0,r11,r11 +.*: (7d 60 5a 14|14 5a 60 7d) add r11,r0,r11 +.*: (4e 80 04 20|20 04 80 4e) bctr +.*: (60 00 00 00|00 00 00 60) nop +.*: (60 00 00 00|00 00 00 60) nop diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsso32.g binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso32.g --- binutils-2.25/ld/testsuite/ld-powerpc/tlsso32.g 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso32.g 2015-07-21 10:20:58.000000000 +0200 @@ -9,5 +9,4 @@ Contents of section \.got: .* 00000000 00000000 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* -.* 00000000 (4e800021|2100804e) (000103ec|ec030100) 00000000 .* -.* 00000000 .* +.* 00000000 (0001044c|4c040100) 00000000 00000000 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlsso32.r binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso32.r --- binutils-2.25/ld/testsuite/ld-powerpc/tlsso32.r 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso32.r 2015-07-21 10:20:58.000000000 +0200 @@ -14,12 +14,12 @@ +\[[ 0-9]+\] \.dynstr +.* +\[[ 0-9]+\] \.rela\.dyn +.* +\[[ 0-9]+\] \.rela\.plt +.* - +\[[ 0-9]+\] \.text +PROGBITS .* 0+70 0+ +AX +0 +0 +1 + +\[[ 0-9]+\] \.text +PROGBITS .* 0+d0 0+ +AX +0 +0 +16 +\[[ 0-9]+\] \.tdata +PROGBITS .* 0+1c 0+ WAT +0 +0 +4 +\[[ 0-9]+\] \.tbss +NOBITS .* 0+1c 0+ WAT +0 +0 +4 +\[[ 0-9]+\] \.dynamic +DYNAMIC .* 08 +WA +3 +0 +4 - +\[[ 0-9]+\] \.got +PROGBITS .* 0+34 04 WAX +0 +0 +4 - +\[[ 0-9]+\] \.plt +.* + +\[[ 0-9]+\] \.got +PROGBITS .* 0+30 04 +WA +0 +0 +4 + +\[[ 0-9]+\] \.plt +PROGBITS .* 0+4 00 +WA +0 +0 +4 +\[[ 0-9]+\] \.shstrtab +.* +\[[ 0-9]+\] \.symtab +.* +\[[ 0-9]+\] \.strtab +.* @@ -32,7 +32,7 @@ Program Headers: +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align +LOAD .* R E 0x10000 - +LOAD .* RWE 0x10000 + +LOAD .* RW +0x10000 +DYNAMIC .* RW +0x4 +TLS .* 0x0+1c 0x0+38 R +0x4 @@ -52,9 +52,9 @@ [0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0 [0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0 [0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0 -[0-9a-f ]+R_PPC_TPREL16 +0+103d0 +\.tdata \+ 103e4 -[0-9a-f ]+R_PPC_TPREL16_HA +0+103d0 +\.tdata \+ 103e8 -[0-9a-f ]+R_PPC_TPREL16_LO +0+103d0 +\.tdata \+ 103e8 +[0-9a-f ]+R_PPC_TPREL16 +0+10430 +\.tdata \+ 10444 +[0-9a-f ]+R_PPC_TPREL16_HA +0+10430 +\.tdata \+ 10448 +[0-9a-f ]+R_PPC_TPREL16_LO +0+10430 +\.tdata \+ 10448 [0-9a-f ]+R_PPC_DTPMOD32 +0 [0-9a-f ]+R_PPC_DTPREL32 +0 [0-9a-f ]+R_PPC_DTPMOD32 +0 @@ -84,7 +84,7 @@ .* TLS +GLOBAL +DEFAULT +8 ld2 .* TLS +GLOBAL +DEFAULT +8 ld1 .* NOTYPE +GLOBAL +DEFAULT +11 __bss_start -.* NOTYPE +GLOBAL +DEFAULT +10 _edata +.* NOTYPE +GLOBAL +DEFAULT +11 _edata .* NOTYPE +GLOBAL +DEFAULT +11 _end .* TLS +GLOBAL +DEFAULT +8 gd0 .* TLS +GLOBAL +DEFAULT +8 ie0 @@ -113,6 +113,9 @@ .* TLS +LOCAL +DEFAULT +7 le5 .* FILE +LOCAL +DEFAULT +ABS .* .* OBJECT +LOCAL +DEFAULT +9 _DYNAMIC +.* NOTYPE +LOCAL +DEFAULT +6 0+8000\.got2\.plt_pic32\.__tls_get_addr +.* NOTYPE +LOCAL +DEFAULT +6 __glink_PLTresolve +.* NOTYPE +LOCAL +DEFAULT +6 __glink .* OBJECT +LOCAL +DEFAULT +10 _GLOBAL_OFFSET_TABLE_ .* TLS +GLOBAL +DEFAULT +UND gd .* TLS +GLOBAL +DEFAULT +8 le0 @@ -125,7 +128,7 @@ .* TLS +GLOBAL +DEFAULT +8 ld2 .* TLS +GLOBAL +DEFAULT +8 ld1 .* NOTYPE +GLOBAL +DEFAULT +11 __bss_start -.* NOTYPE +GLOBAL +DEFAULT +10 _edata +.* NOTYPE +GLOBAL +DEFAULT +11 _edata .* NOTYPE +GLOBAL +DEFAULT +11 _end .* TLS +GLOBAL +DEFAULT +8 gd0 .* TLS +GLOBAL +DEFAULT +8 ie0 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlstoc.g binutils-2.25.1/ld/testsuite/ld-powerpc/tlstoc.g --- binutils-2.25/ld/testsuite/ld-powerpc/tlstoc.g 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlstoc.g 2015-07-21 10:20:58.000000000 +0200 @@ -8,8 +8,8 @@ .* Contents of section \.got: - 100101b8 (00000000|01000000) (00000001|00000000) 00000000 00000000 .* - 100101c8 (00000000|01000000) (00000001|00000000) 00000000 00000000 .* - 100101d8 (00000000|01000000) (00000001|00000000) 00000000 00000000 .* - 100101e8 (00000000|01000000) (00000001|00000000) 00000000 00000000 .* - 100101f8 (ffffffff|6080ffff) (ffff8060|ffffffff) 00000000 00000000 .* + 10010200 (00000000|01000000) (00000001|00000000) 00000000 00000000 .* +.* (00000000|01000000) (00000001|00000000) 00000000 00000000 .* +.* (00000000|01000000) (00000001|00000000) 00000000 00000000 .* +.* (00000000|01000000) (00000001|00000000) 00000000 00000000 .* +.* (ffffffff|6080ffff) (ffff8060|ffffffff) 00000000 00000000 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlstocso.d binutils-2.25.1/ld/testsuite/ld-powerpc/tlstocso.d --- binutils-2.25/ld/testsuite/ld-powerpc/tlstocso.d 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlstocso.d 2015-07-21 10:20:58.000000000 +0200 @@ -41,8 +41,8 @@ .* (3d 2d 00 00|00 00 2d 3d) addis r9,r13,0 .* (99 49 00 00|00 00 49 99) stb r10,0\(r9\) .* (60 00 00 00|00 00 00 60) nop -.* (00 00 00 00|30 02 01 00) .* -.* (00 01 02 30|00 00 00 00) .* +.* (00 00 00 00|10 03 01 00) .* +.* (00 01 03 10|00 00 00 00) .* .* <__glink_PLTresolve>: .* (7d 88 02 a6|a6 02 88 7d) mflr r12 .* (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlstocso.g binutils-2.25.1/ld/testsuite/ld-powerpc/tlstocso.g --- binutils-2.25/ld/testsuite/ld-powerpc/tlstocso.g 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlstocso.g 2015-07-21 10:20:58.000000000 +0200 @@ -7,7 +7,7 @@ .* Contents of section \.got: - 10720 (00000000|20870100) (00018720|00000000) 00000000 00000000 .* + 10800 (00000000|00880100) (00018800|00000000) 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* .* 00000000 00000000 00000000 00000000 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tlstocso.r binutils-2.25.1/ld/testsuite/ld-powerpc/tlstocso.r --- binutils-2.25/ld/testsuite/ld-powerpc/tlstocso.r 2013-11-18 09:40:15.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlstocso.r 2015-07-21 10:20:58.000000000 +0200 @@ -47,7 +47,7 @@ Relocation section '\.rela\.dyn' at offset .* contains 13 entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend [0-9a-f ]+R_PPC64_RELATIVE +4dc -[0-9a-f ]+R_PPC64_RELATIVE +18720 +[0-9a-f ]+R_PPC64_RELATIVE +18800 [0-9a-f ]+R_PPC64_TPREL16 +0+60 le0 \+ 0 [0-9a-f ]+R_PPC64_TPREL16_HA +0+68 le1 \+ 0 [0-9a-f ]+R_PPC64_TPREL16_LO +0+68 le1 \+ 0 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt.d binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt.d --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt.d 2015-07-21 10:20:58.000000000 +0200 @@ -7,8 +7,8 @@ 100000d0 (3d220000|0000223d) (39298033|33802939) (3c820000|0000823c) (38a48008|0880a438) .* 100000e0 (e8c50000|0000c5e8) (3fa00000|0000a03f) (3bbd8010|1080bd3b) (7c62e82a|2ae8627c) .* Contents of section \.got: - 100100f0 (00000000|f0800110) (100180f0|00000000) (00000000|24010110) (10010124|00000000) .* - 10010100 (00000000|25010110) (10010125|00000000) (00000000|20010110) (10010120|00000000) .* - 10010110 (00000000|21010110) (10010121|00000000) (00000000|22010110) (10010122|00000000) .* + 10010100 (00000000|00810110) (10018100|00000000) (00000000|34010110) (10010134|00000000) .* + 10010110 (00000000|35010110) (10010135|00000000) (00000000|30010110) (10010130|00000000) .* + 10010120 (00000000|31010110) (10010131|00000000) (00000000|32010110) (10010132|00000000) .* Contents of section \.sdata: - 10010120 01020304 0506 .* + 10010130 01020304 0506 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt2.d binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt2.d --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt2.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt2.d 2015-07-21 10:20:58.000000000 +0200 @@ -2,4 +2,4 @@ .*: file format .* Contents of section \.text: - 100000b0 (3d22effe|feef223d) (39297f4a|4a7f2939) .* + 100000b0 (3d22effe|feef223d) (39297f02|027f2939) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt3.d binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt3.d --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt3.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt3.d 2015-07-21 10:20:58.000000000 +0200 @@ -2,4 +2,4 @@ .*: file format .* Contents of section \.text: - 100000b0 (3d22effe|feef223d) (39297f4a|4a7f2939) .* + 100000b0 (3d22effe|feef223d) (39297f02|027f2939) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt4.d binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt4.d --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt4.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt4.d 2015-07-21 10:20:58.000000000 +0200 @@ -4,4 +4,4 @@ Contents of section \.text: 100000b0 (e9298000|008029e9) .* Contents of section \.got: - 100100b8 (00000000|02000000) (00000002|00000000) .* + 10010100 (00000000|02000000) (00000002|00000000) .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt5.d binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt5.d --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt5.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt5.d 2015-07-21 10:20:58.000000000 +0200 @@ -6,8 +6,8 @@ 100000c0 (e8c50000|0000c5e8) (60000000|00000060) (3922802b|2b802239) (60000000|00000060) .* 100000d0 (38a28008|0880a238) (e8c50000|0000c5e8) .* Contents of section \.got: - 100100d8 (00000000|d8800110) (100180d8|00000000) (00000000|04010110) (10010104|00000000) .* - 100100e8 (00000000|05010110) (10010105|00000000) (00000000|00010110) (10010100|00000000) .* - 100100f8 (00000000|01010110) (10010101|00000000) .* + 10010100 (00000000|00810110) (10018100|00000000) (00000000|2c010110) (1001012c|00000000) .* + 10010110 (00000000|2d010110) (1001012d|00000000) (00000000|28010110) (10010128|00000000) .* + 10010120 (00000000|29010110) (10010129|00000000) .* Contents of section \.sdata: - 10010100 01020304 0506 .* + 10010128 01020304 0506 .* diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt6-inc.s binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6-inc.s --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt6-inc.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6-inc.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,86 @@ + .macro start, sym + .type \sym, @function + .pushsection .opd, "aw" +\sym: .quad .L.\sym, .TOC.@tocbase, 0 + .popsection +.L.\sym: + mflr 0 + std 31, -8(1) + std 0, 16(1) + stdu 1, -128(1) + mr 31, 1 + .endm + + + .macro end, sym + addi 1,31,128 + ld 0, 16(1) + mtlr 0 + ld 31, -8(1) + blr + .size \sym, . - .L.\sym + .endm + + + .macro forward, from, to + start \from + bl \to + nop + end \from + .endm + + + .macro usegot, sym + .pushsection .data +\sym\@: .quad \@ + .popsection + .pushsection .toc, "aw" +.LT\@: .tc \sym\@[TC], \sym\@ + .popsection + ld 3,.LT\@@toc(2) + .endm + + + .macro in123 + .pushsection .toc, "aw" +.LThello: + .tc hello[TC],hello + .popsection + + .pushsection .rodata +hello: .asciz "Hello, world!\n" + .popsection + + .pushsection .text.in123, "axG", @progbits, in123, comdat + .weak in123 + start in123 + ld 3, .LThello@toc(2) + #bl printf + nop + end in123 + .popsection + .endm + + + .macro in23 + .pushsection .text + forward local, in123 + .popsection + + .pushsection .text.in23, "axG", @progbits, in23, comdat + .weak in23 + forward in23, local + .popsection + .endm + + + .macro gobblegot, sym + .pushsection .text + .globl \sym + start \sym + .rept 5000 + usegot a + .endr + end \sym + .popsection + .endm diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt6.d binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6.d --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt6.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,12 @@ +#... +.* bl .*<.*long_branch_r2off\.f1> +.* ld *r2,40\(r1\) +.* bl .*<.*long_branch_r2off\.f2> +.* ld *r2,40\(r1\) +.* bl .*<\.f3> +.* nop +.* bl .*<.*long_branch_r2off\.g2> +.* ld *r2,40\(r1\) +.* bl .*<.*long_branch_r2off\.in23> +.* ld *r2,40\(r1\) +#pass diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt6a.s binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6a.s --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt6a.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6a.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,3 @@ + .include "tocopt6-inc.s" + in123 + gobblegot f1 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt6b.s binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6b.s --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt6b.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6b.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,8 @@ + .include "tocopt6-inc.s" + in123 + in23 + gobblegot f2 + + .section .text + .globl g2 + forward g2, in23 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/tocopt6c.s binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6c.s --- binutils-2.25/ld/testsuite/ld-powerpc/tocopt6c.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/tocopt6c.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,20 @@ + .include "tocopt6-inc.s" + in123 + in23 + gobblegot f3 + + .section .text + .globl main + start main + bl f1 + nop + bl f2 + nop + bl f3 + nop + bl g2 + nop + bl in23 + nop + li 3, 0 + end main diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/vxworks-relax-2.rd binutils-2.25.1/ld/testsuite/ld-powerpc/vxworks-relax-2.rd --- binutils-2.25/ld/testsuite/ld-powerpc/vxworks-relax-2.rd 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/vxworks-relax-2.rd 2015-07-21 10:20:58.000000000 +0200 @@ -1,10 +1,10 @@ Relocation section '.rela.text' at offset 0x[0-9a-f]+ contains 8 entries: Offset +Info +Type +Sym.Value +Sym. Name \+ Addend -0+16 +[0-9a-f]+ R_PPC_ADDR16_HA +0+ +.text \+ 4000034 -0+1a +[0-9a-f]+ R_PPC_ADDR16_LO +0+ +.text \+ 4000034 0+6 +[0-9a-f]+ R_PPC_ADDR16_HA +0+ +.text \+ 4000034 0+a +[0-9a-f]+ R_PPC_ADDR16_LO +0+ +.text \+ 4000034 +0+16 +[0-9a-f]+ R_PPC_ADDR16_HA +0+ +.text \+ 4000034 +0+1a +[0-9a-f]+ R_PPC_ADDR16_LO +0+ +.text \+ 4000034 0+26 +[0-9a-f]+ R_PPC_ADDR16_HA +0+ +undefined \+ 0 0+2a +[0-9a-f]+ R_PPC_ADDR16_LO +0+ +undefined \+ 0 0+400003e +[0-9a-f]+ R_PPC_ADDR16_HA +0+ +_start \+ 0 diff -ruN binutils-2.25/ld/testsuite/ld-powerpc/vxworks-relax.rd binutils-2.25.1/ld/testsuite/ld-powerpc/vxworks-relax.rd --- binutils-2.25/ld/testsuite/ld-powerpc/vxworks-relax.rd 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-powerpc/vxworks-relax.rd 2015-07-21 10:20:58.000000000 +0200 @@ -1,9 +1,9 @@ Relocation section '.rela.text' at offset .* contains 6 entries: Offset Info Type Sym.Value Sym. Name \+ Addend -00080012 .* R_PPC_ADDR16_HA 00080000 .text \+ 4000020 -00080016 .* R_PPC_ADDR16_LO 00080000 .text \+ 4000020 00080006 .* R_PPC_ADDR16_HA 00080000 .text \+ 4000020 0008000a .* R_PPC_ADDR16_LO 00080000 .text \+ 4000020 +00080012 .* R_PPC_ADDR16_HA 00080000 .text \+ 4000020 +00080016 .* R_PPC_ADDR16_LO 00080000 .text \+ 4000020 0408002a .* R_PPC_ADDR16_HA 00080000 _start \+ 0 0408002e .* R_PPC_ADDR16_LO 00080000 _start \+ 0 diff -ruN binutils-2.25/ld/testsuite/ld-scripts/overlay-size.d binutils-2.25.1/ld/testsuite/ld-scripts/overlay-size.d --- binutils-2.25/ld/testsuite/ld-scripts/overlay-size.d 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-scripts/overlay-size.d 2015-07-21 10:20:58.000000000 +0200 @@ -1,6 +1,7 @@ # ld: -T overlay-size.t -Map tmpdir/overlay-size.map # name: overlay size # objdump: --headers +# map: overlay-size-map.d # xfail: rx-*-* # FAILS on the RX because the linker has to set LMA == VMA for the # Renesas loader. diff -ruN binutils-2.25/ld/testsuite/ld-scripts/overlay-size.exp binutils-2.25.1/ld/testsuite/ld-scripts/overlay-size.exp --- binutils-2.25/ld/testsuite/ld-scripts/overlay-size.exp 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-scripts/overlay-size.exp 2015-07-21 10:20:58.000000000 +0200 @@ -23,12 +23,3 @@ } run_dump_test overlay-size - -set testname "overlay size (map check)" - -if [regexp_diff "tmpdir/overlay-size.map" \ - "$srcdir/$subdir/overlay-size-map.d"] { - fail $testname -} else { - pass $testname -} diff -ruN binutils-2.25/ld/testsuite/ld-scripts/provide-4-map.d binutils-2.25.1/ld/testsuite/ld-scripts/provide-4-map.d --- binutils-2.25/ld/testsuite/ld-scripts/provide-4-map.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-scripts/provide-4-map.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,13 @@ +#... +Linker script and memory map +#... + \[!provide\] +PROVIDE \(foo, 0x1\) + \[!provide\] +PROVIDE \(bar, 0x2\) + 0x0+3 +PROVIDE \(baz, 0x3\) +#... + 0x0+2000 +foo + \[!provide\] +PROVIDE \(loc1, ALIGN \(\., 0x10\)\) + 0x0+2010 +PROVIDE \(loc2, ALIGN \(\., 0x10\)\) + \[!provide\] +PROVIDE \(loc3, \(loc1 \+ 0x20\)\) + 0x0+2030 +loc4 = \(loc2 \+ 0x20\) +#... diff -ruN binutils-2.25/ld/testsuite/ld-scripts/provide-4.d binutils-2.25.1/ld/testsuite/ld-scripts/provide-4.d --- binutils-2.25/ld/testsuite/ld-scripts/provide-4.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-scripts/provide-4.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,9 @@ +#source: provide-2.s +#ld: -T provide-4.t +#PROG: nm +#map: provide-4-map.d +#... +0+3 A baz +0+2000 D foo +0+2010 D loc2 +0+2030 A loc4 diff -ruN binutils-2.25/ld/testsuite/ld-scripts/provide-4.t binutils-2.25.1/ld/testsuite/ld-scripts/provide-4.t --- binutils-2.25/ld/testsuite/ld-scripts/provide-4.t 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-scripts/provide-4.t 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,16 @@ +SECTIONS +{ + PROVIDE (foo = 1); + PROVIDE (bar = 2); + PROVIDE (baz = 3); + .data 0x2000 : + { + *(.data) + + PROVIDE (loc1 = ALIGN (., 0x10)); + PROVIDE (loc2 = ALIGN (., 0x10)); + } + + PROVIDE (loc3 = loc1 + 0x20); + loc4 = loc2 + 0x20; +} diff -ruN binutils-2.25/ld/testsuite/ld-scripts/provide-5-map.d binutils-2.25.1/ld/testsuite/ld-scripts/provide-5-map.d --- binutils-2.25/ld/testsuite/ld-scripts/provide-5-map.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-scripts/provide-5-map.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,6 @@ +#... +Linker script and memory map +#... + 0x0+10 +foo = 0x10 + \[!provide\] +PROVIDE \(foo, bar\) +#... diff -ruN binutils-2.25/ld/testsuite/ld-scripts/provide-5.d binutils-2.25.1/ld/testsuite/ld-scripts/provide-5.d --- binutils-2.25/ld/testsuite/ld-scripts/provide-5.d 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-scripts/provide-5.d 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,6 @@ +#source: provide-5.s +#ld: -T provide-5.t +#PROG: nm +#map: provide-5-map.d +#... +0+10 A foo diff -ruN binutils-2.25/ld/testsuite/ld-scripts/provide-5.s binutils-2.25.1/ld/testsuite/ld-scripts/provide-5.s --- binutils-2.25/ld/testsuite/ld-scripts/provide-5.s 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-scripts/provide-5.s 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,4 @@ + .data + .global baz +baz: + .word 0 diff -ruN binutils-2.25/ld/testsuite/ld-scripts/provide-5.t binutils-2.25.1/ld/testsuite/ld-scripts/provide-5.t --- binutils-2.25/ld/testsuite/ld-scripts/provide-5.t 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-scripts/provide-5.t 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,10 @@ +SECTIONS +{ + foo = 0x10; + PROVIDE (foo = bar); + + .data 0x1000 : + { + *(.data) + } +} diff -ruN binutils-2.25/ld/testsuite/ld-scripts/provide.exp binutils-2.25.1/ld/testsuite/ld-scripts/provide.exp --- binutils-2.25/ld/testsuite/ld-scripts/provide.exp 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/ld/testsuite/ld-scripts/provide.exp 2015-07-21 10:20:58.000000000 +0200 @@ -40,5 +40,7 @@ run_dump_test provide-2 setup_xfail *-*-* run_dump_test provide-3 +run_dump_test provide-4 +run_dump_test provide-5 set LDFLAGS "$saved_LDFLAGS" diff -ruN binutils-2.25/ld/testsuite/ld-sh/sh64/reldl32.rd binutils-2.25.1/ld/testsuite/ld-sh/sh64/reldl32.rd --- binutils-2.25/ld/testsuite/ld-sh/sh64/reldl32.rd 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-sh/sh64/reldl32.rd 2015-07-21 10:20:58.000000000 +0200 @@ -12,10 +12,10 @@ 00000028 +0+21f6 R_SH_IMM_LOW16 +00000000 +file1text5 +\+ 8 0000002c +0+2df6 R_SH_IMM_LOW16 +0000000c +file1data2 +\+ 30 00000030 +0+2df6 R_SH_IMM_LOW16 +0000000c +file1data2 +\+ 0 -0000003c +0+42f6 R_SH_IMM_LOW16 +00000000 +unresolved7 +\+ 0 -00000040 +0+27f6 R_SH_IMM_LOW16 +00000000 +unresolved1 +\+ 0 00000034 +0+35f8 R_SH_IMM_MEDLOW16 +00000000 +file2data4 +\+ 10 00000038 +0+35f6 R_SH_IMM_LOW16 +00000000 +file2data4 +\+ 10 +0000003c +0+42f6 R_SH_IMM_LOW16 +00000000 +unresolved7 +\+ 0 +00000040 +0+27f6 R_SH_IMM_LOW16 +00000000 +unresolved1 +\+ 0 00000068 +0+08f6 R_SH_IMM_LOW16 +00000064 +file2text1 +\+ 0 0000006c +0+24f6 R_SH_IMM_LOW16 +00000124 +file2data2 +\+ 0 00000070 +0+23f6 R_SH_IMM_LOW16 +00000010 +file1text3 +\+ 0 diff -ruN binutils-2.25/ld/testsuite/ld-sh/sh64/reldl64.rd binutils-2.25.1/ld/testsuite/ld-sh/sh64/reldl64.rd --- binutils-2.25/ld/testsuite/ld-sh/sh64/reldl64.rd 2013-11-04 16:33:40.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-sh/sh64/reldl64.rd 2015-07-21 10:20:58.000000000 +0200 @@ -12,12 +12,12 @@ 0+28 +0+21000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text5[ ]+\+ 8 0+2c +0+2d000000f6 R_SH_IMM_LOW16[ ]+0+c +file1data2[ ]+\+ 30 0+30 +0+2d000000f6 R_SH_IMM_LOW16[ ]+0+c +file1data2[ ]+\+ 0 -0+44 +0+42000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved7[ ]+\+ 0 -0+48 +0+27000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved1[ ]+\+ 0 0+34 +0+35000000fc R_SH_IMM_HI16[ ]+0+ +file2data4[ ]+\+ 10 0+38 +0+35000000fa R_SH_IMM_MEDHI16[ ]+0+ +file2data4[ ]+\+ 10 0+3c +0+35000000f8 R_SH_IMM_MEDLOW16[ ]+0+ +file2data4[ ]+\+ 10 0+40 +0+35000000f6 R_SH_IMM_LOW16[ ]+0+ +file2data4[ ]+\+ 10 +0+44 +0+42000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved7[ ]+\+ 0 +0+48 +0+27000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved1[ ]+\+ 0 0+70 +0+08000000f6 R_SH_IMM_LOW16[ ]+0+6c +file2text1[ ]+\+ 0 0+74 +0+24000000f6 R_SH_IMM_LOW16[ ]+0+124 +file2data2[ ]+\+ 0 0+78 +0+23000000f6 R_SH_IMM_LOW16[ ]+0+10 +file1text3[ ]+\+ 0 diff -ruN binutils-2.25/ld/testsuite/ld-x86-64/pr17689.out binutils-2.25.1/ld/testsuite/ld-x86-64/pr17689.out --- binutils-2.25/ld/testsuite/ld-x86-64/pr17689.out 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-x86-64/pr17689.out 2015-07-21 10:20:58.000000000 +0200 @@ -1 +1,2 @@ PASS +PASS diff -ruN binutils-2.25/ld/testsuite/ld-x86-64/pr17689b.S binutils-2.25.1/ld/testsuite/ld-x86-64/pr17689b.S --- binutils-2.25/ld/testsuite/ld-x86-64/pr17689b.S 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-x86-64/pr17689b.S 2015-07-21 10:20:58.000000000 +0200 @@ -5,8 +5,18 @@ subq $8, %rsp movq bar_alias(%rip), %rdi call foo@PLT + movq ptr(%rip), %rax + movq (%rax), %rdi + call foo@PLT xorl %eax, %eax addq $8, %rsp ret .size main, .-main + .globl ptr + .section .data.rel,"aw",@progbits + .align 8 + .type ptr, @object + .size ptr, 8 +ptr: + .quad bar_alias .section .note.GNU-stack,"",@progbits diff -ruN binutils-2.25/ld/testsuite/ld-x86-64/pr17827.rd binutils-2.25.1/ld/testsuite/ld-x86-64/pr17827.rd --- binutils-2.25/ld/testsuite/ld-x86-64/pr17827.rd 1970-01-01 01:00:00.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-x86-64/pr17827.rd 2015-07-21 10:20:58.000000000 +0200 @@ -0,0 +1,4 @@ +#failif +#... +[0-9a-f ]+R_X86_64_NONE.* +#... diff -ruN binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.25.1/ld/testsuite/ld-x86-64/x86-64.exp --- binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/ld-x86-64/x86-64.exp 2015-07-21 10:20:58.000000000 +0200 @@ -373,6 +373,14 @@ {{readelf {-Wr} pr17689.rd}} \ "pr17689" \ ] \ + [list \ + "Build pr17827 with PIE without -fPIE" \ + "tmpdir/pr17689.so -pie" \ + "" \ + { pr17689b.S } \ + {{readelf {-Wr} pr17827.rd}} \ + "pr17827" \ + ] \ ] run_ld_link_exec_tests [] [list \ diff -ruN binutils-2.25/ld/testsuite/lib/ld-lib.exp binutils-2.25.1/ld/testsuite/lib/ld-lib.exp --- binutils-2.25/ld/testsuite/lib/ld-lib.exp 2014-11-04 10:54:41.000000000 +0100 +++ binutils-2.25.1/ld/testsuite/lib/ld-lib.exp 2015-07-21 10:20:58.000000000 +0200 @@ -554,6 +554,14 @@ # both "error" and "warning". Multiple "warning" directives # append to the expected linker warning message. # +# map: FILE +# Adding this option will cause the linker to generate a linker +# map file, using the -Map=MAPFILE command line option. If +# there is no -Map=MAPFILE in the 'ld: FLAGS' then one will be +# added to the linker command line. The contents of the +# generated MAPFILE are then compared against the regexp lines +# in FILE using `regexp_diff' (see below for details). +# # Each option may occur at most once unless otherwise mentioned. # # After the option lines come regexp lines. `run_dump_test' calls @@ -606,6 +614,7 @@ set opts(warning) {} set opts(objcopy_linked_file) {} set opts(objcopy_objects) {} + set opts(map) {} foreach i $opt_array { set opt_name [lindex $i 0] @@ -859,6 +868,20 @@ set cmd "$LD $LDFLAGS -L$srcdir/$subdir \ $opts(ld) -o $objfile $objfiles $opts(ld_after_inputfiles)" + # If needed then check for, or add a -Map option. + set mapfile "" + if { $opts(map) != "" } then { + if { [regexp -- "-Map=(\[^ \]+)" $cmd all mapfile] } then { + # Found existing mapfile option + verbose -log "Existing mapfile '$mapfile' found" + } else { + # No mapfile option. + set mapfile "tmpdir/dump.map" + verbose -log "Adding mapfile '$mapfile'" + set cmd "$cmd -Map=$mapfile" + } + } + send_log "$cmd\n" set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] "" "/dev/null" "ld.tmp"] remote_upload host "ld.tmp" @@ -907,6 +930,17 @@ return } } + + if { $opts(map) != "" } then { + # Check the map file matches. + set map_pattern_file $srcdir/$subdir/$opts(map) + verbose -log "Compare '$mapfile' against '$map_pattern_file'" + if { [regexp_diff $mapfile $map_pattern_file] } then { + fail "$testname (map file check)" + } else { + pass "$testname (map file check)" + } + } } else { set objfile "tmpdir/dump0.o" } diff -ruN binutils-2.25/md5.sum binutils-2.25.1/md5.sum --- binutils-2.25/md5.sum 2014-12-23 15:38:46.000000000 +0100 +++ binutils-2.25.1/md5.sum 2015-07-21 15:46:11.000000000 +0200 @@ -25,13 +25,13 @@ c6e5287559a8060fe05ba3ffdc1d0eaf bfd/aout32.c 8f43340b6170d3ad5c41638199e2824e bfd/aout64.c 0497dea968d6c8dc3e4c2923ee9c7746 bfd/aoutf1.h -badde7fd156b3346e2bfd9ea3267b17d bfd/aoutx.h -c6f421fe16810b60aa26382b69ed97a7 bfd/archive.c -0f629e6b002f185e739d292ec213da85 bfd/archive64.c +38a8b229e265eed18c721590140a3ffa bfd/aoutx.h +5ee255aa50bf49a640595ffb85cd65fa bfd/archive.c +e8c7f5e9379fe803c9bedc6b31cfe303 bfd/archive64.c 30e707c105781c3402c1c56657cc8eee bfd/archures.c f18b0f725e0e2a80f5df630b2b7f34c0 bfd/armnetbsd.c -bb50d4a2069d1b1ea1bfbb11737fcba4 bfd/bfd-in.h -2691b00d4077636921b0667cf0e4bbb6 bfd/bfd-in2.h +6238b1a8244001a85a5731d0b5b447d6 bfd/bfd-in.h +5ce9d861b1392fde73ab0a520dffdc88 bfd/bfd-in2.h 9f71443a0a916df6f288ee9560b8153e bfd/bfd.c c568566973d74bf48051b632f6ebe467 bfd/bfd.m4 2515056d6b9a884f5c26b851d617b693 bfd/bfdio.c @@ -41,7 +41,7 @@ 0e37a0cf283dc8f53fb9dace349251bf bfd/cache.c cc82beffc71ad1ac3a4cf313f8f8bf11 bfd/cf-i386lynx.c 95a014a6fc416a2504cfa7b26ab82263 bfd/cf-sparclynx.c -920fa280112c29080d17ca522d585c52 bfd/ChangeLog +b2a6a0b62785570381d718e77d1d9696 bfd/ChangeLog 6474afde93f8e964e3d6dddffde3c41e bfd/ChangeLog-0001 48097790cbee8800147ba96a6dd07fc8 bfd/ChangeLog-0203 7d710529ca3fafb2bb57132df24957e3 bfd/ChangeLog-2004 @@ -64,41 +64,41 @@ 54bf68b3aca32f721a0e216361ab8848 bfd/coff-arm.c 00ddd0a23f68c3b65fd6ecfadd31095e bfd/coff-aux.c 24be9e546c97d7be98b8107311f36f74 bfd/coff-go32.c -ecccd0ca7d595a03a528b96de3386cdf bfd/coff-h8300.c -59ad3a35032ee1d2f0e9f137b4cee28e bfd/coff-h8500.c +29eb489c9f3da426413aba339c2c54d1 bfd/coff-h8300.c +a681711ade340e257d06133abadb72be bfd/coff-h8500.c 4929f72ba0f2a8e1d0f49ba317d808d4 bfd/coff-i386.c -c4273189169e37ecd107a964c697a0b5 bfd/coff-i860.c +5df7518c01f9b8af86cbb40f34e519ea bfd/coff-i860.c a96cf3a4758c096851bd1f39320db8c9 bfd/coff-i960.c 6c519f3159048ecdf6947472a47bf5d6 bfd/coff-ia64.c -1559ea0eeb5cae3b07fc72a73d097155 bfd/coff-m68k.c +c7076450341451994f103013c48456c5 bfd/coff-m68k.c 1be1bfbdd9458c8d70a28ef5c93fb71a bfd/coff-m88k.c -8ba0321c380f3f12447c8f0452bf27c8 bfd/coff-mcore.c +966e809a4a7e0bf1774b3c2855b8f9c2 bfd/coff-mcore.c 1e84139d7481abdefd4b40bb16c438fd bfd/coff-mips.c d26182ef093103c225f3f30d8ed3a579 bfd/coff-ppc.c 204e01b702baa98ccad7c4216046c748 bfd/coff-rs6000.c a678bf77656e6254b09f97330a7ac052 bfd/coff-sh.c -6b684f66f0dfd0b5e88faeef0b38c21e bfd/coff-sparc.c +8592cd74d500a69895175d30fd2252cc bfd/coff-sparc.c aa346a87e976e4d1e7b1bbf50206a4c0 bfd/coff-stgo32.c 06f0b7ce9d1041620d7068b47cc6f487 bfd/coff-svm68k.c -b0c713d34a01ff620866b5ef7aef5e23 bfd/coff-tic30.c +861c0025b8eb1c697ffaab1f3d3cc5b8 bfd/coff-tic30.c 780f429e7ee05c982d7de025add058aa bfd/coff-tic4x.c 2f9d09fa4618747a3a2e9b4f372e53aa bfd/coff-tic54x.c de6868d5413e283df74c45d7e3f67532 bfd/coff-tic80.c 06a49ccda6dfb3f2bb8c62072a7a0704 bfd/coff-u68k.c -cf9fccc2e0c89d744adbc8334152cf92 bfd/coff-w65.c -da5216b4f8d30e1e16fdb44988b1504e bfd/coff-we32k.c -6ad6bb731c2b5d885b56e4dce262083e bfd/coff-x86_64.c -f584b50f5c4eb6743d8c40656e54385c bfd/coff-z80.c -55247e030c856d9d7b877ab31fb16ada bfd/coff-z8k.c +b9eb2a803601173329270145b048d9b0 bfd/coff-w65.c +f2487b8eb93c25557523479d854b4708 bfd/coff-we32k.c +f1c54178e0852ff3997534bc4f5ce084 bfd/coff-x86_64.c +1cec06aa1635c0b5631e8024e6b7311a bfd/coff-z80.c +cb436cae3651bf3cc99b782d893c0f1b bfd/coff-z8k.c ae2a87eb57febdf01f3e6e4f74234478 bfd/coff64-rs6000.c -771741552615169147cf7d11b371d311 bfd/coffcode.h -2fca6094374f2ea8ee054d778f10a735 bfd/coffgen.c -8ff579753a314531e275dd85ec57fd77 bfd/cofflink.c +486e370e7d4a9ec2860ff650a12c576e bfd/coffcode.h +a02a728d2fecaf94b4b6eabf7c1b8776 bfd/coffgen.c +3746542388fecc5cbea578f0dad77623 bfd/cofflink.c 6dccb1408b57d79fa72eb71ccac6f1cb bfd/coffswap.h -0ecfc1713af97d89035c470f18ab30f5 bfd/compress.c +8069fc141e9079cd4c5ac60e77e584f2 bfd/compress.c 048184acd3715b68698bea0f8889e566 bfd/config.bfd df2292e3438ad762bfca9650514c99e4 bfd/config.in -5bef35addf3de554f173ad1aba4c0347 bfd/configure +cfbb75783dbdf4b8981864165f58bc56 bfd/configure 33bb60565fe15b20b8275426ea9e4160 bfd/configure.ac 254d3fd7620c6c22fd39a134f51c3cf4 bfd/configure.com 1f438b9237f06031d0170cae62284abf bfd/configure.host @@ -155,7 +155,7 @@ 71c6402c8325842ec18f5e13b9226ab5 bfd/cpu-mt.c 9d320c5e8f9e22854b36b525636d157b bfd/cpu-nds32.c e7f97564931434714c18851819ceea26 bfd/cpu-nios2.c -ef63cb1f180b1668256239b6583d193a bfd/cpu-ns32k.c +e56f68395f62986e73f3a4de79e087f4 bfd/cpu-ns32k.c 865db29150b17abb85db5adaa8d0987c bfd/cpu-or1k.c e1cc54a23bf2fe2bc2274880217a228a bfd/cpu-pdp11.c fe5576a4944835c9721653bedfa794b7 bfd/cpu-pj.c @@ -199,10 +199,10 @@ 7edf511939deb638e8291f264c4249e1 bfd/doc/bfdio.texi 67d314c0d9b3e8b1431840a134eb08a9 bfd/doc/bfdsumm.texi 077f55390067f48303d5e1ffaaf7d760 bfd/doc/bfdt.texi -9ea2f0b73af567b2b442570b1e5bee4a bfd/doc/bfdver.texi +a21451c2cf2f7d0a0ae48941e6e93648 bfd/doc/bfdver.texi 236e856bb13ee47adc5d7d253037640d bfd/doc/bfdwin.texi d9f7fec3dee69a6c3084e6d4cfd88371 bfd/doc/cache.texi -ad0d228d0743e9074168316d07399eb5 bfd/doc/ChangeLog +127fd631ff1e71b93e4d646d72693b7a bfd/doc/ChangeLog a11231531c5c3cd6e7babf06426a657e bfd/doc/ChangeLog-9103 2e6d5ba48feff80437e9cc54c707d034 bfd/doc/chew.c 94d5f956ab010ebf90bfddbfc71d5d80 bfd/doc/coffcode.texi @@ -217,8 +217,8 @@ 37ba364fb34b96a1dbb55b0f6f612432 bfd/doc/init.texi 0fc22c68d543f8dc7cc4548a3fad3557 bfd/doc/libbfd.texi b0bc392e3b3bfff71aaa7c8636f16b91 bfd/doc/linker.texi -5b895f9b96e315703b490f99fdcf04fa bfd/doc/Makefile.am -5da890d35fc491b39e31a09ffb028a1f bfd/doc/Makefile.in +a5a410988eb4a1a76e192633164a8fc8 bfd/doc/Makefile.am +c59a3c73e507d35a8fa6288d9a7414e3 bfd/doc/Makefile.in eaec38b5c99281c9169bb99f97323524 bfd/doc/makefile.vms 84a99eb217f66a88f8897fbca35b0d10 bfd/doc/mmo.texi 6a1a507e85b4d8cee41c3defa9d24e6a bfd/doc/opncls.texi @@ -228,143 +228,143 @@ 2b2af4fc0532d1286cd9293d8bda2f1d bfd/doc/syms.texi f1fb54143bc97e83e3776149a1cf3020 bfd/doc/targets.texi d4bb356bab86351d248a92a2e01d4416 bfd/dwarf1.c -251095bf8c5755170bbcd939750479aa bfd/dwarf2.c -c4aeb1424b1b791c18431b91f2f557ba bfd/ecoff.c +353f4c65f5b29a0cbc5778a9523ca728 bfd/dwarf2.c +d801a3dd7361e1c886823d6b0265b8d4 bfd/ecoff.c d7a6ae90a11b40151f40be524c51c8a9 bfd/ecofflink.c e888cc7bb30deb306c5efdb07d3836b0 bfd/ecoffswap.h -1254894f1a862211c761114d868f312f bfd/elf-attrs.c -7d7ef51bd0ef8871566f9f4557ef3228 bfd/elf-bfd.h +b9c0d98cf16ed171224bed5a11cf78e9 bfd/elf-attrs.c +7b5b3b1bc326e77e7235a464fedcd5ee bfd/elf-bfd.h e781a97040935db73cbfcc7edf69f8a1 bfd/elf-eh-frame.c -53e0ec4a5ea828101c9d1cb650bae56c bfd/elf-hppa.h +40ae4df1b35f1adf3b837f392766f002 bfd/elf-hppa.h 49bae45ea7a920304a44d511175e869a bfd/elf-ifunc.c 4c902ee478776fd6f05d00849cf32e1c bfd/elf-linux-psinfo.h -758d7cd8d9759295e2adcc440dab748f bfd/elf-m10200.c -d3069a4c6000b7559c65b85b1126750a bfd/elf-m10300.c +9d43a75c6bb65bd56ccb1d33adb4de2c bfd/elf-m10200.c +c718fc4d20375e9ff665a550bde36aaa bfd/elf-m10300.c 1eff7072e2e2a8d0f005e459d56a1490 bfd/elf-nacl.c 2dacb3f764ec0da07eca21ba400e3b27 bfd/elf-nacl.h -e18a585d7095bacc1df635eb94b666e4 bfd/elf-s390-common.c +da7ea9051702ce63443895cd05a62ef7 bfd/elf-s390-common.c 705a20d73bbc43b1ae99639a96a56dab bfd/elf-strtab.c e55c56e3dfab4d813d034f1fc59d7587 bfd/elf-vxworks.c 34f8651dde23277ff04222c8151a2aa8 bfd/elf-vxworks.h -35d71182649f95d541f58d7ef9468702 bfd/elf.c +62599943e2bfc0f743194695387adbc0 bfd/elf.c 04142551d48e0d854e1d86cdf573a3d3 bfd/elf32-am33lin.c -6a50bf29307db22c164498f841bdce01 bfd/elf32-arc.c -df91a67fe5482fcd42518a260ff59eef bfd/elf32-arm.c -8834a6ef7c599dec2d2c23cf02b38342 bfd/elf32-avr.c +0fbaf1e496a0931d468d00ee0bfe5189 bfd/elf32-arc.c +c8ef984c980ddf6fdc0b3fbb2f86ada7 bfd/elf32-arm.c +718a455ed76c465f19dbff6d6a5fd5ee bfd/elf32-avr.c 33abaebe2c77f45b44244424897e8a49 bfd/elf32-avr.h -d494d6a05de869e680efa84f09adfa51 bfd/elf32-bfin.c -b42a73d6bf4e281c773e6d586db82f73 bfd/elf32-cr16.c -3342fdabc19f294e40aef0882e633b3b bfd/elf32-cr16c.c -5cb40a9894567110874208dc2b8437f4 bfd/elf32-cris.c -4d54f0c2f29926fa52e5fe0362409dbc bfd/elf32-crx.c -7e7b090a5928427ef4e0159d3dd6a391 bfd/elf32-d10v.c -021960f1a420aab1146a49333c43f294 bfd/elf32-d30v.c -97517f30b7c5c12c03b1d3767b67b6ac bfd/elf32-dlx.c -a52fa5556d06c2ed2345c5007f29b2f0 bfd/elf32-epiphany.c -8a9a21022fdd2a579a8c81cb6a7c7d05 bfd/elf32-fr30.c -95dd217cd836ab0341cb6b1190c6fd88 bfd/elf32-frv.c +a610a041a55bab000999bd9261f89959 bfd/elf32-bfin.c +2ca9b9dc8a47fb583c5ccc2a060717b3 bfd/elf32-cr16.c +345bb1058214947fc21fe731235b4125 bfd/elf32-cr16c.c +52a6f7a016d8f160aef25ae526eacc68 bfd/elf32-cris.c +7229b0b7b3489eb9506a3e25d7809e36 bfd/elf32-crx.c +64a27d3c4ae7802c7b8e712a91138a2a bfd/elf32-d10v.c +b3da6ac2d87397f9082af9b8b748ff25 bfd/elf32-d30v.c +fb75953ba80546b56975d2b3f53d8856 bfd/elf32-dlx.c +defe3bbdcae93ff0181d29c9ddb6b78e bfd/elf32-epiphany.c +52059a3c8cdd498ab1918caeebf7168b bfd/elf32-fr30.c +041db9edd29f40555e040c886c79de8e bfd/elf32-frv.c 12424296e11cc79bbbd18ebce90ed9b8 bfd/elf32-gen.c -9402b4fe3a5712b57c49b658f006ba48 bfd/elf32-h8300.c -abfdd4d1883f06dbd6a0ee23e487784b bfd/elf32-hppa.c +6e1230f538178f44e60a0fb8ad211967 bfd/elf32-h8300.c +0a7b57d049cb638ede485d2af5d6c145 bfd/elf32-hppa.c 6479b616dc5e1fe62100ddbd1c7b23cf bfd/elf32-hppa.h -d7c394385c2ff10f751001a71e461c35 bfd/elf32-i370.c -2d4391e5d4451b5f39ab018137ccb258 bfd/elf32-i386.c -9a6253917f5598d1fb9c23f5f1608420 bfd/elf32-i860.c -6d07faa21771e10aede140bfcbb6b37a bfd/elf32-i960.c -8b2738f09752bec8b11c00cf1391d0ca bfd/elf32-ip2k.c -6b6d191aa33da770fde385fee4d7c4c6 bfd/elf32-iq2000.c -76e9e0eca4a05f913e4817ae59a3013e bfd/elf32-lm32.c -67bbbe1a5d7fae950002333d392bc824 bfd/elf32-m32c.c -663c15c6d8658faf6c093ec48a5eaf8e bfd/elf32-m32r.c -159d6440189d5cccd22561a52f9eac2b bfd/elf32-m68hc11.c -fd0189ac304cfd28714e33ae09d9df39 bfd/elf32-m68hc12.c +bbf559043be8855b4f3e9c5bd10cb28c bfd/elf32-i370.c +3d1eda04d4172db609ee9499cf5ccf54 bfd/elf32-i386.c +109be927b55882658a6cdad6b45bf88c bfd/elf32-i860.c +1c5d4d98218f734806f09aa772b7fff0 bfd/elf32-i960.c +5184356f27aa8ae177f071b056b624dc bfd/elf32-ip2k.c +7ddd42949c191a5e04dc169a66f1bde3 bfd/elf32-iq2000.c +5f43369ed3d1829623d9a3fbaedeb4fd bfd/elf32-lm32.c +ee4fffe5df4a8071402b898a5e52b350 bfd/elf32-m32c.c +41f86f3128d496266ad6cf4afa93f993 bfd/elf32-m32r.c +28b7a247c750d7df97e433db7cb00e03 bfd/elf32-m68hc11.c +5519a2492f09a9177f5ce5507170c968 bfd/elf32-m68hc12.c 0a1b5bbd3272e8e914827151661b1454 bfd/elf32-m68hc1x.c 7efc677b8a07715ad931bc6bbaf425e1 bfd/elf32-m68hc1x.h -437e0da9ba83c34442516b87ffdac158 bfd/elf32-m68k.c +f336e157820b333fb9f908c3c1982575 bfd/elf32-m68k.c f32fda123700eb80c48c77600b1aca59 bfd/elf32-m88k.c -5abe92d66143151571bb69771562e2c3 bfd/elf32-mcore.c -ff232ff93c75d4a0b1447a3ff71cc673 bfd/elf32-mep.c -9cbb596881ec5d67fb16a1305b3cf780 bfd/elf32-metag.c +5fafe848974321a1ed51a4ab9dd74a46 bfd/elf32-mcore.c +0388c38f8ed475edfd6ea1f955756f73 bfd/elf32-mep.c +131c78ff011c052149d417876a7b2156 bfd/elf32-metag.c 03befbcfa647e5bf1e238d1d549ee379 bfd/elf32-metag.h -9bbcb83422cdb28fda82b4d81cfa0a85 bfd/elf32-microblaze.c -044329adefb76bfdbe24d07a8b12c6ac bfd/elf32-mips.c -a0f079662350fa556a05c3fbdc7a650f bfd/elf32-moxie.c -076a83b605aafedaacddab891e009519 bfd/elf32-msp430.c -596b380a3e4f92901d863b7489287366 bfd/elf32-mt.c -25197e531e98e43be48769d1428003cb bfd/elf32-nds32.c +74ffc77a5d529b90d4e75bba061200c0 bfd/elf32-microblaze.c +21dfdb3e0fe8b90a9a8e93090d9394bc bfd/elf32-mips.c +f37ee61bd56c142ff1d6580c0c72cd67 bfd/elf32-moxie.c +cab36ffdf55f042ae78deb6f380f1f47 bfd/elf32-msp430.c +c9a54cb9e2179e2e24424c60fa070357 bfd/elf32-mt.c +09146cd43f47e0eadfb3c4e4d095ad1c bfd/elf32-nds32.c d33f6819924b519087a96963f26f6ec6 bfd/elf32-nds32.h -df125c7aadcf4aafbae9e840c0451673 bfd/elf32-nios2.c +9745154d2fedcf8d71b808ca0d517b9d bfd/elf32-nios2.c 0f234db2eea37feae7f3ee333d2335bc bfd/elf32-nios2.h -7a8a49bc1aa7eb26d7f58479a6faae45 bfd/elf32-or1k.c -9c301f580ef9a7988f888bf785e674d9 bfd/elf32-pj.c -29829157d29bb704661f23b1496cf63c bfd/elf32-ppc.c +3358c75bc72bb896318da65fbc4adb09 bfd/elf32-or1k.c +6044c1c285fb5becbbc718b1ffc8646f bfd/elf32-pj.c +1aae931ed1df3aba9ef7707651d5d3b9 bfd/elf32-ppc.c 704c53da501407c8fd227149b73c4cbb bfd/elf32-ppc.h -864fb47e32faa99554a53b32ba1fa346 bfd/elf32-rl78.c -b5ae97b9928e825ade9f487d778f5aef bfd/elf32-rx.c +7694e5119c62e1f400a9933e7c2548ce bfd/elf32-rl78.c +cc36e08e7a157c7b96c0e656090cb341 bfd/elf32-rx.c 2b4ce2d08808520d0cfca8c7f501e376 bfd/elf32-rx.h -f71de5aab4dd35ed7ed82985f32f61c9 bfd/elf32-s390.c -a25e839d450ab7f63e03c70a029220b3 bfd/elf32-score.c +871e4124d77106045042acf22f4c4f47 bfd/elf32-s390.c +7aff7e3f4435b57c1d272f0c9ed26f08 bfd/elf32-score.c 7418dfa396e594a0595a508c44d8f043 bfd/elf32-score.h -b9a5e402c6edaa0ee14d491a40093878 bfd/elf32-score7.c -db31bfb1de8d8bfe220b2f8f4783c20e bfd/elf32-sh-relocs.h +fad4de369aeab53f5aaab8b9cbff477f bfd/elf32-score7.c +21e41a049573ea105115fc90d8799c47 bfd/elf32-sh-relocs.h 2976e35f14298e7fdbe14450d8d24105 bfd/elf32-sh-symbian.c -62568bb59157b4f2ec3cb93370554a93 bfd/elf32-sh.c +cdd1eb807706e92a70e47c5d642f8203 bfd/elf32-sh.c 92c4670b31ddb3755f58313a0ccb95b1 bfd/elf32-sh64-com.c 37f1611145416ba2f57eef453732bd96 bfd/elf32-sh64.c 0c039c7c80c29ac672b45e01bdc36cdc bfd/elf32-sh64.h 99e44d3fd19820cdd3b4872f9da8ce2e bfd/elf32-sparc.c -262092dea323141c6c7d4ff27678eff1 bfd/elf32-spu.c +ba5569c52b42935f46a0cb35f9e473bc bfd/elf32-spu.c 0c81af53251105f09e3f998cce2a96c7 bfd/elf32-spu.h -e247046e463db332e5fdc00344d52863 bfd/elf32-tic6x.c +d03ab33219de1f7f64ba8dd1177f877a bfd/elf32-tic6x.c da1a900924f17b31b1b29c8aba398589 bfd/elf32-tic6x.h 0c67c9cd0a1e5c3902c2d85acb48a05b bfd/elf32-tilegx.c 986a59519feaaaa00f504752090d904d bfd/elf32-tilegx.h -8a9e9bf4ef6a3eb1bcbc3d8de129392c bfd/elf32-tilepro.c +86d415f55a15e8fa98f42862b2a3ed72 bfd/elf32-tilepro.c 2fdee0a4cafeb78e5001de80d27f267e bfd/elf32-tilepro.h -a209219b50594b8b06a707162c906305 bfd/elf32-v850.c -3014f9fbb0023c1af779794bb0eeaa3d bfd/elf32-vax.c -4dbb831a522a7b8445f87893c6aa7562 bfd/elf32-xc16x.c -6cd41419b05302045ab90e48250c2ff2 bfd/elf32-xgate.c +d39c5bc7e39dae8e971e222466b9c347 bfd/elf32-v850.c +c52586e9ac767e712d44f4ec6bf534c3 bfd/elf32-vax.c +05dd6b929e79fe4e00b69a3fcc475a55 bfd/elf32-xc16x.c +68c17cf0679b1bb83f0443e5217ba552 bfd/elf32-xgate.c 7192c2f73cdada6ae2a11d51a668f787 bfd/elf32-xgate.h -0fbe0f9dfb8558dacdbfdf08a63faab6 bfd/elf32-xstormy16.c -e006d02f00aad12a6b5859616292e8c5 bfd/elf32-xtensa.c +f438a423e78d116472ed0aa2f40a9408 bfd/elf32-xstormy16.c +f799f27319488e378ced8d0d96763a64 bfd/elf32-xtensa.c acbf956bf05808266e20bc25bfb89eac bfd/elf32.c -8a0dee6f1a1996a542a1d7acdae4755a bfd/elf64-alpha.c +1332eb07128a350c6f0e506871b02e46 bfd/elf64-alpha.c 0801b2c3785e80a1ebd8e3d99c829c27 bfd/elf64-gen.c 7aafe7c8f1672dec819ad6f0da6b42b1 bfd/elf64-hppa.c 3a5c8132f6bb473a39fade0b6219c33d bfd/elf64-hppa.h 04b317ed5dfea7135e5f04d6a97ec6bc bfd/elf64-ia64-vms.c -c5a5d1de043a6f4bb12db146d80ec903 bfd/elf64-mips.c -fe34d72ca9481cfdd356baa9b2dd681b bfd/elf64-mmix.c -02bd76d9b64ec53a2c30fc212fd5e2fa bfd/elf64-ppc.c +edcd7f9743d987f0320cbac85b6c3e3c bfd/elf64-mips.c +4b52f6a2f92cdc0f5fb9c2fffc560570 bfd/elf64-mmix.c +e9ad87c30a2b8f0fbd292b003d4ef2c5 bfd/elf64-ppc.c 79b215969a8dccb92e2471c67484cefd bfd/elf64-ppc.h -00e1e759536b4b6ff7953c6a12fda3ca bfd/elf64-s390.c -df210d3e6932524c0622a0ae09927c3f bfd/elf64-sh64.c -b91fd86dff940893eeb57b0029e17532 bfd/elf64-sparc.c +a96e0c70ffd43a0f21254edf6c97d302 bfd/elf64-s390.c +53f53145987a8662f28bacfc9e98ec50 bfd/elf64-sh64.c +8aa01ab35010df93b95e7565d4384ee5 bfd/elf64-sparc.c 63337d2bf871bd712f1800894528b387 bfd/elf64-tilegx.c 7ead2a9b7f6a05e12eb4df9909d6505c bfd/elf64-tilegx.h -3b884e5df73b11410b24c87cabf8cea4 bfd/elf64-x86-64.c +c0839172fdd7e73864ce909e1a90ae41 bfd/elf64-x86-64.c 9733473f26d36ff6b49a5780892f8ad3 bfd/elf64.c -0b3482bc51441158de373feb92dc409d bfd/elfcode.h +7af951e69d5edf8b43ce27fc0291cf96 bfd/elfcode.h bfa18f25e96f50e0c4413b181721a430 bfd/elfcore.h -1b2440e6d7dbe4f637230181a3c38635 bfd/elflink.c -99ec567794cc4a9eeac0a0fe1fd319c8 bfd/elfn32-mips.c -81e91c537100d4d5795e9817071c976e bfd/elfnn-aarch64.c +3ada7c70c1bd014ec2c94301168d6903 bfd/elflink.c +21d5b3258ef404b1624fff3ba29bb2b0 bfd/elfn32-mips.c +e4419a2fcde6417970acaafd42c2a761 bfd/elfnn-aarch64.c 7c904347e14b112eaab2b643faec8010 bfd/elfnn-ia64.c -67e0761a51a4c361526630ac3dc9ad18 bfd/elfxx-aarch64.c +2f8a8e57c64d5bf5bf25cbf56250b09a bfd/elfxx-aarch64.c 0fc3a70b320b3f54613771068e040f73 bfd/elfxx-aarch64.h -b48a63ef90223a0e4cf4ffa5b46093f1 bfd/elfxx-ia64.c +82b56483ab24b0eb909892900c1519d1 bfd/elfxx-ia64.c 7e5491161116484fc74fcdf15a83acc0 bfd/elfxx-ia64.h -9b8d041234b761d5af044a46a37d2813 bfd/elfxx-mips.c -629e0862127ea3b7e4b5c77cf750e6fe bfd/elfxx-mips.h -c50ae516f0ee892cbafb5f7f5520c99d bfd/elfxx-sparc.c +2d2e8aa962a447ffa76338ff9afd470f bfd/elfxx-mips.c +59ad2659fd5853073b40882c6a4d3685 bfd/elfxx-mips.h +3c202b94a4f5b7c0151f4021b42ca1d0 bfd/elfxx-sparc.c 2bb4a667a849ed919133e357de01b9cd bfd/elfxx-sparc.h -83444aa93a946c59d4e5944b5238c6c4 bfd/elfxx-target.h -91e58d1f46f0ab62e37277329d7109b2 bfd/elfxx-tilegx.c +6b0f72eaa2cca7b1986b250a3f136d12 bfd/elfxx-target.h +31a16e14a9e9a4d0427a8c8f2f2a08af bfd/elfxx-tilegx.c c191ee10b2a77b07098dfb973de16440 bfd/elfxx-tilegx.h 7d74f443197ce6fe6366713ba187ede5 bfd/epoc-pe-arm.c c84eaab8764cedf54064ee42ba6f87a2 bfd/epoc-pei-arm.c -f150cad8fcf95ca30d0abb7c82ce4f10 bfd/format.c +2a386075bdaf72903710b3626972442c bfd/format.c fe226ef468cf632488528db2a5c2b2cf bfd/freebsd.h 83bc78f1448af059e24090ecb21604cd bfd/gen-aout.c a63573f7c52ddff90146b446b649b704 bfd/genlink.h @@ -412,24 +412,24 @@ 72fa9370e9b641d27c2fffea912a9c1a bfd/i386msdos.c 7e0701059d221006fc7568c4a879d986 bfd/i386netbsd.c 7b1007473318bb6829f5750dd4a20999 bfd/i386os9k.c -497e6557397c0f5e084c501b4c0d8887 bfd/ieee.c +4790b9734a4c50a25a9db9cf6f3991fb bfd/ieee.c 9c02c4fe84d01c23cce8c7177946b2f9 bfd/ihex.c b0b7de8f7ff1d745641df38e6cb443b3 bfd/init.c 8abbb386f059117970d1eadb65e6f691 bfd/irix-core.c beed8ca65d385d8214f7e5db6397b54a bfd/libaout.h -094a08ec26a6b3cec9a2059b8e860e58 bfd/libbfd-in.h -a85cb0082a4308c94b7fc31bac20a0ef bfd/libbfd.c -469dc0dd4fca3b297d54176ae4e983bf bfd/libbfd.h +8aebad77bf6e508845ec10d779bde7ac bfd/libbfd-in.h +933e107a25bcf1516e970a6f784c5a7b bfd/libbfd.c +b24db025e41ed2d3c645bcc834e7ab5a bfd/libbfd.h 9141c710509e0b48b8f0a801870dfa4b bfd/libcoff-in.h ba1c0e286488b49d8b6465c6a2887bfb bfd/libcoff.h 4bc44c54e071c64a594f203340a03a7c bfd/libecoff.h e12800f0045a4197616d0041489f9dce bfd/libhppa.h -ed311fd0940cb8c486efc733c9c093bc bfd/libieee.h +f14eeefa7ffbcca59f835dcd52c7fe51 bfd/libieee.h 2cb8634b465bcebfd8efea76ca8a7cc0 bfd/libnlm.h 66fb0ce604dc24f66c579bcf071efa53 bfd/liboasys.h 9a014124df4cdd08d7f8e9b9612646c6 bfd/libpei.h 4c63a20bb145d3396158a0d7f02201de bfd/libxcoff.h -cf00f853d275150f8db184b067064ee4 bfd/linker.c +503cd59089e8f06471f6aeb4f7f925f0 bfd/linker.c 430306a2dd7573f63fe545c62e9d8156 bfd/lynx-core.c 79ccd6a602131c7ce092bf7050852865 bfd/m68k4knetbsd.c 279495950e3555ac06d1d4be86bb6157 bfd/m68klinux.c @@ -439,7 +439,7 @@ f3f743a80b2932ea4b4599e3a7bbe64e bfd/mach-o-i386.c a12aaa174b16d94936d891c1ab503ee6 bfd/mach-o-target.c 099a27033fa57f933321c4d6836b0406 bfd/mach-o-x86-64.c -29852051444b3b3d4e92c4ad2335bee2 bfd/mach-o.c +be94bd9df2356c0696dd1983bca532a3 bfd/mach-o.c c778aaae41570dc34896322b5919e061 bfd/mach-o.h 24a55081e78136febaf75efe08dd5dcf bfd/MAINTAINERS 5d49eaa4e84d041222acd88e6e397097 bfd/Makefile.am @@ -457,7 +457,7 @@ f6bb987f292a709f61009434746560d1 bfd/nlm32-alpha.c 101732087803415acab4c9265cf8a84a bfd/nlm32-i386.c c629b9cebe2fa00c150ddd6d83b477f6 bfd/nlm32-ppc.c -a6f6754e465207fd9972bd46440b4e99 bfd/nlm32-sparc.c +6c455984d737c0d993076fd026c590d2 bfd/nlm32-sparc.c d99743f7eda4a23bafda1226cccf6686 bfd/nlm32.c 654f8ef68f44faeb27cbf17a8987b75f bfd/nlm64.c 8c8f1843b74619970483491da2e69eac bfd/nlmcode.h @@ -465,15 +465,15 @@ bc2e06614e745fcf07223e5dbe98af54 bfd/ns32k.h e480f8eae002f3e48e6c1905258d6af6 bfd/ns32knetbsd.c dac318232e8f6887eb2152e78effeaf0 bfd/oasys.c -31d2b5da349d8625cd4760353a42cdd1 bfd/opncls.c +7115c0feaebead735c2bd0bac63a47f3 bfd/opncls.c 7f1f404637f80a5f52a038704af4624a bfd/osf-core.c e046fc16adbae8a29223cc6ee35da389 bfd/pc532-mach.c -bbeb25e360c382ef161907d7633afc22 bfd/pdp11.c +4b10e2fc9c09d640deeb20333b884341 bfd/pdp11.c d6b8885491f8279425a05439b441e772 bfd/pe-arm-wince.c 61f7c25bc6e41603172760cae43ff713 bfd/pe-arm.c 70b5922d2b786f8740c08197b03e58ca bfd/pe-i386.c 1a979c2044829bdb687c2685f8b57aa9 bfd/pe-mcore.c -5cddaf37a688252293aae1a28c71a6c6 bfd/pe-mips.c +d8512c525e1b758865d72a9b2ed5359e bfd/pe-mips.c 7892ceb7f585b77b0aa24ef99e8977ac bfd/pe-ppc.c a6949b9438481ab21d6bc9a78f817bfc bfd/pe-sh.c 9db72f93170e2593c6c9e2336146fc6d bfd/pe-x86_64.c @@ -488,9 +488,9 @@ 293a729f5b60758763efc11b901299a1 bfd/pei-mips.c 3b61254df8714ad9b1844424982ae6a8 bfd/pei-ppc.c a3467605fb885484ac9e88375adf1bc7 bfd/pei-sh.c -e8c58c69f0664679cad123c93211826d bfd/pei-x86_64.c -ba9612fd4c99ede2a511a71717725c26 bfd/peicode.h -4a6b61f95080c5a186fd604e4b4ef05f bfd/peXXigen.c +402a42804fe4cbce2935f7587549c12e bfd/pei-x86_64.c +1c2bfcc897b9a3de8b72d10820ca7f34 bfd/peicode.h +a06afa3f32e7e615de95becc61322f07 bfd/peXXigen.c 75219538b67f1f494bc8ab93e39669a6 bfd/plugin.c 02dd276fa2732bafa9edffab3fe9fc96 bfd/plugin.h e0337cfc0e993d7cad566892e5e76393 bfd/po/bfd.pot @@ -529,7 +529,7 @@ 21c0c5b9a76c0f9076142b190eacbc00 bfd/ppcboot.c 2a34d7807c217c5fcc36157987e27699 bfd/ptrace-core.c 25071622a4aad7b37755278aa50587e4 bfd/README -706edaed5b0c26c3526232fc09340009 bfd/reloc.c +a85b2b39b3417be23186cd52c1b6dc8c bfd/reloc.c 1ec1cc8567a842a8b2c9bc1ca372feba bfd/reloc16.c ec0c5470b3df3ceac23db76f7c2d33e6 bfd/riscix.c 85c97c0d62c9ff29718e5d4833f1b0a7 bfd/rs6000-core.c @@ -546,34 +546,34 @@ 1082374b2a08fd2a76f9c5b73f80b41d bfd/stabs.c 1ded054093de910d9786c62bc4fe8cc6 bfd/stamp-h.in 468c899e7205438853313fb39094b0bb bfd/sunos.c -4630663952064bc529ce0e1cfd863b45 bfd/syms.c +f0d60ed65ab590f0c5847e1919774b00 bfd/syms.c 89caca0ad4ec8f5ec9964f60d24e9f28 bfd/sysdep.h 0cb78526f326ac9209d8066934c928f5 bfd/targets.c 53357a9b87dd158b90cf790c316fd438 bfd/targmatch.sed -6741f48e5dd9a76ae57504c64dffb2a1 bfd/tekhex.c +0f23cdfb709c8c5689db12ebdd6fdbbd bfd/tekhex.c 4640d34db24b6dd2fc12d4fe49595b68 bfd/TODO ea9331b0972ecb963bde5b7d87b0ad37 bfd/trad-core.c 7ef761ea297aa2c5f8709d25821bdd05 bfd/vax1knetbsd.c 2ae798341fd5beaf78047c0ab733cd57 bfd/vaxbsd.c c5af137cddbe4a9e26073928381be385 bfd/vaxnetbsd.c 2ea162a9d6fdf82e7c10306371095fe4 bfd/verilog.c -3b0ed6dcd0ead728a28a34780f1782b8 bfd/versados.c -feef07104755af72eaa105d6f87f0669 bfd/version.h -ef165f45fb007f2a11ae3d72a7212357 bfd/version.m4 -1be8825f7e953a1e6a480aa95486a9bf bfd/vms-alpha.c +205f27cdd0559edc48a3e6e2c3eac12c bfd/versados.c +a97718207b43ed6b3228d7e43fcd3684 bfd/version.h +dff6f303b70f9259441dd01c0b1304cc bfd/version.m4 +7ddefb93ec34aff6126a5e43773cb892 bfd/vms-alpha.c cf6e73070b23b7b2e52f5637506b22af bfd/vms-lib.c 1e566ca336130d9bd099942429d64b4d bfd/vms-misc.c e92d3a30f679cbb58cc58a8a0740708e bfd/vms.h 31bffac82331fa9b51900dc527a54d3c bfd/warning.m4 -cc3c219ba1650ba7d093a2d58c376488 bfd/xcofflink.c +1093ced10f85f06dcd7696fee820880f bfd/xcofflink.c 0141d9270db10783fd7e9df8b5fe48db bfd/xsym.c ff56c4e2722b1826c5bc0b9eeb133d37 bfd/xsym.h 153edd64e4712b3a0cb79847ab7e80f6 bfd/xtensa-isa.c 3dbe3a01c7c545db5aa3beb56777f7d1 bfd/xtensa-modules.c bf8744cdc68cbd134717087cf08e0f50 binutils/.gitignore 147e5f5808cf173c8f2099fff5941202 binutils/aclocal.m4 -61f885710ac36e674e5c44deca3636b3 binutils/addr2line.c -6eeceb683f1d0acc896ffaff7248a560 binutils/ar.c +41c0b61512892959da5f2720274bd644 binutils/addr2line.c +bd79dc8a05a31b41bd2c05b3760eeb89 binutils/ar.c 0ac2225647438914b035625d55896a27 binutils/arlex.c cea49e8ad76030eb70f39377f28b4f7e binutils/arlex.l 05bb928e674cac455960258b05494d98 binutils/arparse.c @@ -589,8 +589,8 @@ 5d2f00d0c00f1abb4224749f4202b317 binutils/BRANCHES f4e66f7b099cd75b9f6401375d61fe67 binutils/bucomm.c f1545639db3d2554f527c86354f5c187 binutils/bucomm.h -f55110f2eb5305d8a05da59c80393f50 binutils/budbg.h -7c9712aff1a4c5539c92a3cd02f76291 binutils/ChangeLog +487314230fa9349eff01661d0aac7cff binutils/budbg.h +657dc953e149304ebae3e918a588cfda binutils/ChangeLog cd19eaa8aa273aa4d61d7349e18c3389 binutils/ChangeLog-0001 4dd4f6db448208624501492aaaa8ab38 binutils/ChangeLog-0203 9f7cd70e402801d73a0ca89c1d3f3c54 binutils/ChangeLog-2004 @@ -605,15 +605,15 @@ a772ed439a2155615a476b9391604cc0 binutils/ChangeLog-2013 327b22f42304c37a85ebf08765a083da binutils/ChangeLog-9197 d93f4b8b246d5c55c84ad1d8c777573d binutils/ChangeLog-9899 -ef819d477ff9b53e32963d345310768c binutils/coffdump.c -0d5ed114ce68c44bd9c041129486c465 binutils/coffgrok.c -2886d52c0badd6655d971c5884283aee binutils/coffgrok.h -577a89101bb1395997f50dfb3452b2c8 binutils/config.in -b170b39daeb17138eb577d22b2c1f134 binutils/configure -ec5debd472d2684576d45421e7ae3678 binutils/configure.ac +3962087896a7b3bf1bc0dcd65fad3e37 binutils/coffdump.c +3195eb84d7b0c53a182cda474c0e8976 binutils/coffgrok.c +527649c0f92547c5db651a8a47d6d4cf binutils/coffgrok.h +7d60982d51c4dee9c202801a48bf151b binutils/config.in +a924f8bb3dbf1c9de45dcec62c122114 binutils/configure +8387bfdbe2b12e5b0003b7faf4a8c420 binutils/configure.ac 04bce094f37e3473bee4555f1b4e346c binutils/configure.com 15892249c8ef58af549650ec59782c96 binutils/configure.tgt -a10f65c28b6367d7cb4bf33b452c5933 binutils/cxxfilt.c +28f39b2fef4b288c4a313ac0ab8069ae binutils/cxxfilt.c aa0be016248e7310c58f672106c6a6b4 binutils/debug.c e763b2ee0b49ba82d90f4df21a5fbdbd binutils/debug.h 4f130def06055ae69961b54b71944555 binutils/deflex.c @@ -622,7 +622,7 @@ 02f28dec235603e12d4ab2c75cccfd61 binutils/defparse.h 37c5c42f381f30a922f45e0a8c0b7db6 binutils/defparse.y cec602aa7e8925e06a658a3060d42c1b binutils/dep-in.sed -4ba8fe957f394be797f7ef978d23c106 binutils/dlltool.c +1160b9e4c0ab8910a5163b4c4d5c8518 binutils/dlltool.c f009e0382ae04fd5287334b7db8429c4 binutils/dlltool.h ba70ff3930430548db73bf44a8a2716b binutils/dllwrap.c 86dfab833e066b5d9840818c39ffd472 binutils/doc/addr2line.1 @@ -647,10 +647,10 @@ 9131343228fb2617704a40a425ff9146 binutils/doc/windmc.1 779786f39778720b42cb7f5f1987f1b1 binutils/doc/windres.1 101beaf6a0b83f94db91d518badfebd7 binutils/dwarf-mode.el -453a9eb80429bedb0a2aa2c27041e04f binutils/dwarf.c -b5e6a8ac0a4e8e48d1fb29954bc208c0 binutils/dwarf.h -1dc0a9a1b39e63ced313d13476bb8e56 binutils/elfcomm.c -b6dd42da81359d8f6e8453af94374faa binutils/elfcomm.h +6e5d7033beab5d72d3a2cecacc3ee5e0 binutils/dwarf.c +c0abb97e482423cfc068cdaf7ae91d09 binutils/dwarf.h +f37a6dee77b262bedff6d34168502910 binutils/elfcomm.c +91fef68a558de5f0adae8657a5af48c6 binutils/elfcomm.h e552f7cd89a7ef29909a2206c5373a16 binutils/elfedit.c bee56c99009f977b3d9fcac196f79035 binutils/embedspu.sh 3b4988d0e6794aad689e3e2b1d3cac51 binutils/emul_aix.c @@ -670,16 +670,16 @@ 7af9650d3e7769c4321e6d2a0257d5f4 binutils/mcparse.h c73dccdf349e77c88f18febf20da7f4a binutils/mcparse.y 6248e29f50e63c010b7261d7eb68dce0 binutils/NEWS -a5733b410a3207b916bc912104b1e8cb binutils/nlmconv.c +cbe55fe6bd76e04157429faf5d86a38f binutils/nlmconv.c 9d44faf5b066421324f0ed2076466804 binutils/nlmconv.h 878de64a024ee7531ce237b4d568c539 binutils/nlmheader.c 178a00c2b360235b0ad5ccee4eaf2212 binutils/nlmheader.h b128ca2d04811e1c967d952233aec287 binutils/nlmheader.y -64d0535231d884615035deca9557845b binutils/nm.c +8a0a118eb25c0d0b57337806d1ba3756 binutils/nm.c a479d4ae7bee87d41fc2b337e587a983 binutils/not-ranlib.c 2a4d22a5bd5cdb8a0c783c504b70abb4 binutils/not-strip.c -c449512d4207749f3f847f86baad11bd binutils/objcopy.c -57d03ee815693de4c76a98f87c5d6633 binutils/objdump.c +35ff6cead86d21813c2d38bf59ec936e binutils/objcopy.c +7803f5c48be21ef8c8cf01c8b593763a binutils/objdump.c 6e48918ed5717d726ffd696e9563c4ee binutils/objdump.h c1053e5983f2f61e3237340199221f45 binutils/od-macho.c b39906cbe2836beb9eab79b02d344770 binutils/od-xcoff.c @@ -726,29 +726,29 @@ 42b95da2812ee22e0a980fd9c96d7a1b binutils/po/zh_CN.po d66dc645567221704d9a96af2951ec0f binutils/po/zh_TW.gmo fc31799334330cf7596de77081fcc3dd binutils/po/zh_TW.po -916ad260ae34a4d72f02e1135124ad30 binutils/prdbg.c +76730beea22f67ebb601e96929560c0a binutils/prdbg.c 5da8ded44fca8d5e856c0795eafa93bf binutils/ranlib.sh 1d1deae0cc6819f4eda980d2a837fc81 binutils/rclex.c -dfcd02977afcebd72b663fa94a854107 binutils/rcparse.c +cf9ddee516e6f3b025db5ad59765386b binutils/rcparse.c 849ed75102cf3463fd4e1557f4466cda binutils/rcparse.h -a22958d4e28da7752eae7c19fe1b2d09 binutils/rcparse.y +17ba11b12bcc456b92e4fe7690e806b6 binutils/rcparse.y 2df7d2efebeda2725dc6fbd9090ef883 binutils/rdcoff.c 8745212d77b1905d92c3b3b2327fdeb3 binutils/rddbg.c -f27e26bf6943a20da6be3502c68802fd binutils/readelf.c +22af7a913439b2eee48344e36ba8507d binutils/readelf.c a32be76a526539dfaa0bd794f2c68d8b binutils/README b379b7455266028e35123354a64db8ee binutils/rename.c a9b126e4e3bdffa700aee02eb3d70e66 binutils/resbin.c -5131d831abef5324383f3f277003acbf binutils/rescoff.c -a52ae131846019d675086883d5b0e893 binutils/resrc.c +17bf339c32b9d3a45f80d2cdef1dec8b binutils/rescoff.c +d4a926e2e1e7ec4a404ab7a32916cf98 binutils/resrc.c eb1a9853443e3ac1e6a87f911a097c9b binutils/resres.c e3a50a80e79013746bd1eff79497e231 binutils/sanity.sh -d7e5138db8f73bd6aa62129627a09bed binutils/size.c -6dafc0497beab4ff2bb7b2b16d5be09a binutils/srconv.c +4c449610d66f0ab0080f7f9f526d2dd2 binutils/size.c +24bf0727b2f7cda6a977f9723bd8d0e6 binutils/srconv.c 8d7ff62bd2bad1a78696ce4177e61120 binutils/stabs.c 1ded054093de910d9786c62bc4fe8cc6 binutils/stamp-h.in -09755202fff96617218bd855743ec021 binutils/strings.c +9b7e90784cb6201d51cc71ce62123a02 binutils/strings.c aed5cee1b4029fbb8fa168d22e87a003 binutils/sysdep.h -b51e4307f701c1477f3910f87eb2b9d9 binutils/sysdump.c +82ee732634250c1d4aee96fcc51d3ef5 binutils/sysdump.c ed86a52ee28b3e3c0866694570cf24e5 binutils/sysinfo.c c3e16b5b96457e7b67e2ff09c8434b4f binutils/sysinfo.h 55caded176a7c598726d5d62c2be6ef8 binutils/sysinfo.y @@ -764,7 +764,8 @@ 24eb345e58fdf80d67e58d68e5bf387a binutils/testsuite/binutils-all/alias-2.def aa7cb333b47f17c932b8e0a902de43ba binutils/testsuite/binutils-all/alias.def 230a8d41b86f72379af551a437f89f0e binutils/testsuite/binutils-all/ar.exp -463b9cb1ab1bd01732368acdfedae407 binutils/testsuite/binutils-all/arm/objdump.exp +20c9078eec0525a52a02d8a0e9716784 binutils/testsuite/binutils-all/arm/objdump.exp +43beb1a606d1911f807c8247d324e1b1 binutils/testsuite/binutils-all/arm/rvct_symbol.s e4d6bc1d9f91e3dd9fc1bdc748097b83 binutils/testsuite/binutils-all/arm/simple.s ce88dbe8fe34d243dc53bd29ad39ad51 binutils/testsuite/binutils-all/arm/thumb2-cond.s 31f1ab262a725ee4b65abd3dfc5d16d0 binutils/testsuite/binutils-all/bfin/objdump.exp @@ -835,7 +836,7 @@ b927028610ff158db85dc571c26027e0 binutils/testsuite/binutils-all/nm-elf-1.s 53a35e014abd68ec549e4fa5d6224c40 binutils/testsuite/binutils-all/nm.exp 871cfc4074a74627f70db8b5d65ce372 binutils/testsuite/binutils-all/note-1.d -a271793aa41effd98268b2054a54e5f9 binutils/testsuite/binutils-all/objcopy.exp +0332f7266e0529413a86b3a9c9c6352b binutils/testsuite/binutils-all/objcopy.exp 1ac014587043d5959c10fc48dde9d6a0 binutils/testsuite/binutils-all/objdump.exp fd4b0cd07b3cf6a6c47fe8becb569314 binutils/testsuite/binutils-all/objdump.s 06585af7823877e59ab67e245c1af5c5 binutils/testsuite/binutils-all/objdump.W @@ -855,6 +856,7 @@ f86023dc52b70a8dab8f7bc3707c1f7b binutils/testsuite/binutils-all/size.exp 24f2423955980928aff6f7d49222501b binutils/testsuite/binutils-all/strip-1.d 7043daad3006d23ac1b2718b624df374 binutils/testsuite/binutils-all/strip-10.d +b0fec70116ce9cd0a9005296f9abd033 binutils/testsuite/binutils-all/strip-11.d 32197d82e15c9a7194a618fd4cf233f5 binutils/testsuite/binutils-all/strip-2.d 49554fd7afc43d2d6c15acce229338c9 binutils/testsuite/binutils-all/strip-3.d 841a6ca30c94c31c68f61b3ad2036a14 binutils/testsuite/binutils-all/strip-4.d @@ -947,7 +949,7 @@ b9a07403f64b9025988c5cea07f8caa7 binutils/testsuite/binutils-all/x86-64/compressed-1b.d 679d0d2573a41bef8d2ef648a986704a binutils/testsuite/binutils-all/x86-64/compressed-1c.d af4e49698d699e04231b6fc10acd0c1b binutils/testsuite/binutils-all/x86-64/x86-64.exp -9d60bc6e035c22ac384dd3e29f39b892 binutils/testsuite/ChangeLog +3d69cb98f270b05470d0cccf5ec731bd binutils/testsuite/ChangeLog de5c1ea13b9c755566331e8cb382b2d1 binutils/testsuite/ChangeLog-0411 bf0ea0640752ce55976e88633c107ad4 binutils/testsuite/ChangeLog-9303 106d81480e3ee3f16f5eee7cdee07b58 binutils/testsuite/config/default.exp @@ -958,9 +960,9 @@ 8cdc912f30c752f2291624b4406cee5e binutils/unwind-ia64.h 52104b5ba1af01995333bdf6dd776d06 binutils/version.c 82715d2db2ed0c9d173287e03ae41230 binutils/windint.h -323ca21f42d698773a8061b697054a02 binutils/windmc.c +bdc0fedd82282299e3c2e0bb78fa36ea binutils/windmc.c db9934c18494f8364020d1267a0a4716 binutils/windmc.h -6e00f016bbf66355126687643f4e3f94 binutils/windres.c +7537f459f758cd86d28bf93588cd1844 binutils/windres.c cf24a03866e7b7bfa760c35da872b12d binutils/windres.h cf35b59d1ade68027f86d682c9035e02 binutils/winduni.c 5c748a0470ba3c07af7c4d3da15e5e42 binutils/winduni.h @@ -1139,7 +1141,7 @@ ac192e9aa5e9f7921d0c57e385c9e6bf gas/bit_fix.h 8087a8859ad455ee147bc64ddd5b7de8 gas/cgen.c 2dec0b93063b65e550d2249e9ea8f6a4 gas/cgen.h -efc718e33e3c9dab752d85af95d311fe gas/ChangeLog +c3a5262a1a116528b430606850b463fc gas/ChangeLog 0d061093e74e74909ca9642f6d461c63 gas/ChangeLog-0001 39da59e7e8e3c3bce29730ab9337f21e gas/ChangeLog-0203 d2da9287ff389ddf7925fae5e8ce27a3 gas/ChangeLog-2004 @@ -1199,13 +1201,13 @@ b283daa7d789f6a6145783abdc9c62e3 gas/config/rl78-parse.y b1e7469d19a21c608ec035788026989a gas/config/rx-defs.h b5632d471fd8ea5cc90509d3d5b6ab6e gas/config/rx-parse.y -1e54770fe35b48e09b0de81f74facc11 gas/config/tc-aarch64.c +91ffd0b60f1e022c5b3b932ee7a6cddb gas/config/tc-aarch64.c 49bc5b9792463144179d4c98ae0b2ddb gas/config/tc-aarch64.h f0c177235bdfa030a9488d5dafd815c6 gas/config/tc-alpha.c 2829e0630bd2c83eb71174b59bb2f130 gas/config/tc-alpha.h 8335a31dcb2c469f20c888ab093cac36 gas/config/tc-arc.c ab6f04a7a8732bb40ab4f398acbe4c9f gas/config/tc-arc.h -d17068fd6e0a31055ac88eba294d664a gas/config/tc-arm.c +386483f8822678c5f73d7959934c4011 gas/config/tc-arm.c 1dda0450fcc77450c94993943bd399da gas/config/tc-arm.h 8f2f6a15adb5d029237093a7d4b2dae6 gas/config/tc-avr.c 45487607f1c714be2c8e7452834c1f9f gas/config/tc-avr.h @@ -1238,7 +1240,7 @@ b48a169d1fdf60b5ca73056a8fed26b2 gas/config/tc-i370.c 7c4b59c7c82c21cf6ae5ec85bb764d50 gas/config/tc-i370.h 81bec2f9d173f04c19f2f70fa494a080 gas/config/tc-i386-intel.c -c9cc9797c145a4fbbb1ab791c745b4c5 gas/config/tc-i386.c +fe2b5c41f818f2020c13e52a9c1b85cf gas/config/tc-i386.c e9a7b02e36629027b71e83a61bfef29f gas/config/tc-i386.h 2617184a74905a0411f673b991e2e271 gas/config/tc-i860.c 4b65439f5b35e7c7f10b0238cfd07843 gas/config/tc-i860.h @@ -1263,7 +1265,7 @@ 327620ff9cc7041f4e45eeed784ac160 gas/config/tc-m68k.h 7ca317d1176caf931f536dcd26735487 gas/config/tc-mcore.c 929b211273daa1c79b8e8dd4ac0beb63 gas/config/tc-mcore.h -ed01bc4d163e16ccf94c25ba4c6c9eed gas/config/tc-mep.c +96ee8ec9585f68fbc84ba3ec5599b03a gas/config/tc-mep.c bea71106a40fab43eca0a7c8a7b7461b gas/config/tc-mep.h 6b682679f3b8092812467b317ddf8676 gas/config/tc-metag.c 5dde14b04e4c0470b1bc5bd5a2212516 gas/config/tc-metag.h @@ -1295,8 +1297,8 @@ ddc9537b0fd3508db9bab340295ab804 gas/config/tc-pdp11.h 0957bd01610c501ab87621d57034ecaf gas/config/tc-pj.c fe8b817412d5f1b900719447538785b0 gas/config/tc-pj.h -4f3aed1736cc9fd989e0304750aa7651 gas/config/tc-ppc.c -f7d2de105275d84b0401798e95f20b1e gas/config/tc-ppc.h +1e36af204669aaeb965de661263ce15a gas/config/tc-ppc.c +2c67202505023f36fc8118ca5f479bca gas/config/tc-ppc.h 0e2e3f229f70f02b99e46e1daface605 gas/config/tc-rl78.c 1919c893e5e51d0032bf6a73d9fc9164 gas/config/tc-rl78.h 4d68d3489c02179f688e3a698a5b2c15 gas/config/tc-rx.c @@ -1343,6 +1345,7 @@ 2e947f2fb828976661937e26009a0392 gas/config/tc-z8k.c 7a1855ae3c643cfa4b79d68a145cd691 gas/config/tc-z8k.h 1df0ffe37faa1981fea76ed250324256 gas/config/te-386bsd.h +5d0c0beb1e6b3fee366186e4b57e9bf6 gas/config/te-aix.h ca602cef5824067b1a889abfd661c395 gas/config/te-aix5.h 3f7165bd54573933c4c220c3a8b15977 gas/config/te-armeabi.h 2e509c7f7147ffce9de2a91de10e4560 gas/config/te-armfbsdeabi.h @@ -1392,24 +1395,24 @@ 581522b2f3740d3c3fe896a7c4a71755 gas/config/xtensa-relax.c 2892938fd4ebb69dca17e035b0751a41 gas/config/xtensa-relax.h 7720f9458cab694950b9ab86118f0e0e gas/config.in -6e05c3396c4b7f006b70bab4052c86a3 gas/configure +cf665bb33c55359bd536f13e3eec5aea gas/configure c492200034fd75b7f6326147f937779b gas/configure.ac 0309df9f429860bdefe6e8f349c34ce8 gas/configure.com -78961fd695416db3120a45be7e78f491 gas/configure.tgt +d01af2ffd697e674300208a13e7927ba gas/configure.tgt c05c37f7e5bb3b7fa82865c3ac4486cc gas/CONTRIBUTORS d32239bcb673463ab874e80d47fae504 gas/COPYING 221989df4a5c3655198e9f5d83037f79 gas/debug.c 36285069bae7f4dca379829241710bd4 gas/dep-in.sed 493d0a073e616a2af9cd3205d637e313 gas/depend.c 75ec14e3335eba5ad10e29af54a705d7 gas/doc/all.texi -88b1da8bf54f388c334bfa0cc0155f7b gas/doc/as.1 -cb118c1cfb25826198cca6a4e6e44429 gas/doc/as.info +aa9665e88dabc57b1ce2e9a5017e7b2a gas/doc/as.1 +7cf89dca8207651e89515d59fad03759 gas/doc/as.info e94e1569327d0b109b8772a53223d2cb gas/doc/as.texinfo 75ec14e3335eba5ad10e29af54a705d7 gas/doc/asconfig.texi -4d3cc5cd3fbbd2d0d056db7221bfce6e gas/doc/c-aarch64.texi +ce6bf65d22cb68fe5e545d0347aff052 gas/doc/c-aarch64.texi ac8f5e0da2cf6e7e8ba7670ac0aa7a49 gas/doc/c-alpha.texi 3e9220b340cd24eec1ef6f8dd95df376 gas/doc/c-arc.texi -a48213c5edf443c3a2ddf6d8aee24fc7 gas/doc/c-arm.texi +1b6fd18a6e524865e5ca647cb8ebf0ea gas/doc/c-arm.texi 25baa4949e3d2bf83b609e1e737a3643 gas/doc/c-avr.texi 5a1843f7bb68d4d63e3ccef74dc5d895 gas/doc/c-bfin.texi c3ba83319da946783b0bb4128f42a61f gas/doc/c-cr16.texi @@ -1441,7 +1444,7 @@ ea69594f7789e6b76c4c72e9d6e0eba5 gas/doc/c-ns32k.texi 3302ed4be190b0dc43154eb9120234ff gas/doc/c-pdp11.texi f7d33c136fe0954ce425aeb9c159adc8 gas/doc/c-pj.texi -e9632f94c78c659d9367fb1a9a5a0253 gas/doc/c-ppc.texi +9f3b8b905386f3e4a8fd3659ba64ca95 gas/doc/c-ppc.texi e8aa533487c42ae7f0944a7f279a8e85 gas/doc/c-rl78.texi 0ffaf056c149cea27d95669939dfd310 gas/doc/c-rx.texi f124d253f250c3cbb67b028cedf45cf0 gas/doc/c-s390.texi @@ -1534,7 +1537,7 @@ 39462aa2819407ab236aa02d57ea5a53 gas/po/tr.po 7931bf6ad8d22e8fc085d3bcc7a0f9b5 gas/po/uk.gmo d6b5e9931eb44f62afc74cd772256348 gas/po/uk.po -102b80849c3cf000cd033fbb0c3d39c7 gas/read.c +2243f72258dfdcc943c178b5b5ebaa20 gas/read.c cf845c4381d1f0c08fd6cd7b4c92e9fe gas/read.h a6aab0f3824b85c6444f6d41965d488d gas/README 6ae353d09cf4b0ba5715966e92e52425 gas/remap.c @@ -1552,7 +1555,7 @@ 7f74f81e6165d66bab1936a6611cff54 gas/symbols.c 56bfe486901f671aa50d9014b37b9ba0 gas/symbols.h ae63ac9081d9a4d5692e497fc945b0ba gas/tc.h -5accbe2647c1ad30bb28fc3a9bbb131a gas/testsuite/ChangeLog +55f0d11408e226a6a29b0900c0d13ae4 gas/testsuite/ChangeLog 14fc7b3609d295401d73a8ed4b4d45fa gas/testsuite/ChangeLog-2004 63be8f223de1fb2204bbcea923f61fc0 gas/testsuite/ChangeLog-2005 62131108df2db595f5ed0f2daf6d3c3f gas/testsuite/ChangeLog-2006 @@ -1592,6 +1595,8 @@ 0ea2583d78fe6b14a68205c342a33e0a gas/testsuite/gas/aarch64/bitfield-bfm.s 33544f4561fc0ad5df8f011ad7eeaf1c gas/testsuite/gas/aarch64/bitfield-dump d955277ede99f7fd49b86a370b4cfb43 gas/testsuite/gas/aarch64/bitfield-no-aliases.d +8a8c97e0429b8c17fb5d28b8e2e8868f gas/testsuite/gas/aarch64/codealign.d +12393add61d786a58cf317b638148a39 gas/testsuite/gas/aarch64/codealign.s d860371968614ac1d626359ff3a78b49 gas/testsuite/gas/aarch64/crc32.d 34819ab91b422f3dd83765ce5a555246 gas/testsuite/gas/aarch64/crc32.s 49eb0c210d2f721cf1031260f3090b67 gas/testsuite/gas/aarch64/crypto.d @@ -1637,9 +1642,9 @@ 58a7afcf24aacc7a2a55ed28f0e236bd gas/testsuite/gas/aarch64/ldst-reg-pair.s a2712975af4c171bac28276a143097e3 gas/testsuite/gas/aarch64/ldst-reg-reg-offset.d 05fde9c1846a10e0df0bc11ddfa72111 gas/testsuite/gas/aarch64/ldst-reg-reg-offset.s -97facac99aa440cdb06cfdcb85ddf454 gas/testsuite/gas/aarch64/ldst-reg-uns-imm.d +1af20bb1ef59c1f3d81838898b75e77f gas/testsuite/gas/aarch64/ldst-reg-uns-imm.d dda821fd0069569a48665bd2c1f5a53b gas/testsuite/gas/aarch64/ldst-reg-uns-imm.s -cfd19e1eeafcccbec4191400c8853cb3 gas/testsuite/gas/aarch64/ldst-reg-unscaled-imm.d +b4e37af79b5fc55259ef53e2ece41b7d gas/testsuite/gas/aarch64/ldst-reg-unscaled-imm.d 59606c96917f5fcb0c549a963117dd34 gas/testsuite/gas/aarch64/ldst-reg-unscaled-imm.s 36c86be1babe604d1e18f4ea5f4f557e gas/testsuite/gas/aarch64/legacy_reg_names.d f56bafc0c06219faffed22ba07f76caf gas/testsuite/gas/aarch64/legacy_reg_names.l @@ -1659,6 +1664,10 @@ be96c2b122842bbc0707e6e1c6b1ac9d gas/testsuite/gas/aarch64/mapping3.s 254b30b95a07f5e9c372c99ba6c9fdb8 gas/testsuite/gas/aarch64/mapping4.d 87f3e53a18241b91aa9f2cd87a9a20a5 gas/testsuite/gas/aarch64/mapping4.s +5194d3e78d8281a4d2320f5d6961427f gas/testsuite/gas/aarch64/mapping_5.d +d31948e29c5706fdb3f6406b0ff47d95 gas/testsuite/gas/aarch64/mapping_5.s +1acf733b7081eb58efda6379682bb997 gas/testsuite/gas/aarch64/mapping_6.d +51f433cb1628e0d1f2a3b41bcac67a1c gas/testsuite/gas/aarch64/mapping_6.s 0be46d0c85fc05c260349fd10e1e5a1b gas/testsuite/gas/aarch64/mov-no-aliases.d 4898dcbffb383f36489a680a131a3c51 gas/testsuite/gas/aarch64/mov.d 35e79e49529a4dafb96e98fec509f1f9 gas/testsuite/gas/aarch64/mov.s @@ -1685,7 +1694,7 @@ 0f0275d4a1fa8dadd8346515a8b9ee9c gas/testsuite/gas/aarch64/programmer-friendly.s d979534f8dca03862c96739e0b6dd8b2 gas/testsuite/gas/aarch64/reloc-data.d c2ee0791b782a32f52937517df3abd7c gas/testsuite/gas/aarch64/reloc-data.s -4fbfcd4933e3886b5369fdf0bfe726df gas/testsuite/gas/aarch64/reloc-insn.d +99d0c8158e5fbbdf3b4b929d03adc46e gas/testsuite/gas/aarch64/reloc-insn.d ba1a7dc42541dc6346b729e9df9f0132 gas/testsuite/gas/aarch64/reloc-insn.s e5837d08f358b92d6ce333bb3efbd0b1 gas/testsuite/gas/aarch64/rm-simd-ext.d ad4b93bdc726fefd21817b7df26b3cdd gas/testsuite/gas/aarch64/rm-simd-ext.l @@ -1696,8 +1705,8 @@ 60b64c7edb217922102bbe657f4e67dc gas/testsuite/gas/aarch64/symbol.s 821f6c2d335ee2aaf24f5e507d4b567e gas/testsuite/gas/aarch64/sysreg-1.d ec72d8b8be3b0168b98472de265029d5 gas/testsuite/gas/aarch64/sysreg-1.s -81b4d9cd14ce15ba05a8e00fb88683ef gas/testsuite/gas/aarch64/sysreg.d -8f973b227c8360b1d4e87b47e44743d6 gas/testsuite/gas/aarch64/sysreg.s +bb21db40c59b5b116a4c8fce09e923f2 gas/testsuite/gas/aarch64/sysreg.d +b6b028265998323f7995edfa8610790f gas/testsuite/gas/aarch64/sysreg.s 7a6424343fe8ae2d71aa557cace416f6 gas/testsuite/gas/aarch64/system.d 22f53e9df3f0d47e6d41f2bf0b26c0ca gas/testsuite/gas/aarch64/system.s d2687472c1f44457e59f85a853173355 gas/testsuite/gas/aarch64/tbz_1.d @@ -2558,7 +2567,7 @@ 1bb657941d8a16de4a3ecb380ed02f5a gas/testsuite/gas/arm/thumb2_str-bad.s ce1314887d7ca97a8a8d4fa11b32c712 gas/testsuite/gas/arm/thumb2_vpool.d 5ad79db931a40d196b78f1d1d4c12184 gas/testsuite/gas/arm/thumb2_vpool.s -e71e0745a575fff80a6034ea1f4b8a15 gas/testsuite/gas/arm/thumb2_vpool_be.d +a1c7143971ebda5a1a293b78131d0eeb gas/testsuite/gas/arm/thumb2_vpool_be.d 849e27901453411fc8ab7b777333405c gas/testsuite/gas/arm/thumb32.d d6f66f3a5102da2886dedc0f5c80466b gas/testsuite/gas/arm/thumb32.l 1b167318a23bed564ad214ea778ff25e gas/testsuite/gas/arm/thumb32.s @@ -2570,11 +2579,11 @@ 7e0e60be4eec0eaf688f4ebded3519a1 gas/testsuite/gas/arm/thumbv6k.s 0ae6d6f5f99f95ee07412df57889d2a0 gas/testsuite/gas/arm/thumbver.d 5c7522af774e96f8d855d83a62490d55 gas/testsuite/gas/arm/thumbver.s -9d0943617b5b1f1d0df8672b6348dbf1 gas/testsuite/gas/arm/tls.d -7645c96c57962ba8a6f43ee029d84b7b gas/testsuite/gas/arm/tls.s +ba2e867162363678025c0fb679461271 gas/testsuite/gas/arm/tls.d +e8ae2dd5c8db8d2c51bb669cd672c5c2 gas/testsuite/gas/arm/tls.s 83daaae25c1c59a430e25610b85a87c1 gas/testsuite/gas/arm/tls_vxworks.d -32b888decbf605f7ecd6938967bda766 gas/testsuite/gas/arm/ual-vcmp.d -959e65c806d57471b3870c114671c5e8 gas/testsuite/gas/arm/ual-vcmp.s +6473a6d8d91cd9c2112be80a254ae2f8 gas/testsuite/gas/arm/ual-vcmp.d +0f751fd0c980c4a147e57939a31d50c8 gas/testsuite/gas/arm/ual-vcmp.s d1e300f92da9d4539d51b9b83fe3cc04 gas/testsuite/gas/arm/udf-bad.d 4f3dfde406841b6b8106efd58328ced2 gas/testsuite/gas/arm/udf-bad.l e8fa992da6d6d4218afdcbd8a96db3a0 gas/testsuite/gas/arm/udf-bad.s @@ -2595,7 +2604,7 @@ 33454a43477691a1b3493e7053287e4b gas/testsuite/gas/arm/v4bx.d 3328cf20fd05dff9c4dc40267c5c783d gas/testsuite/gas/arm/v4bx.s 5ff3643b88b23fd474cfdf3cc64de4fa gas/testsuite/gas/arm/vcmp-zero-bad.d -cf47a8a2a86f756cbda63dadff649c55 gas/testsuite/gas/arm/vcmp-zero-bad.l +c1a99bf9028c1a1204c37cde1e6fe0a5 gas/testsuite/gas/arm/vcmp-zero-bad.l d784ccb64fbb8a771629379f5d7c1bce gas/testsuite/gas/arm/vcmp-zero-bad.s adb88ddc0d65aa2cfb5c13fb798b445c gas/testsuite/gas/arm/vcvt-bad.d 58498e913f66247e663bc80ec46b7848 gas/testsuite/gas/arm/vcvt-bad.l @@ -2644,7 +2653,7 @@ d53650f58020c4cfb2ea155c3c67d92e gas/testsuite/gas/arm/vfpv3xd.s d165e5459f4312028b86455bb232dd23 gas/testsuite/gas/arm/vldconst.d 8083b2de3b1052b9d11b640741e5eaa9 gas/testsuite/gas/arm/vldconst.s -bcc6554f9575f0d7125f8159be82fc4a gas/testsuite/gas/arm/vldconst_be.d +6403341a9a0198890c33b88d96c49f98 gas/testsuite/gas/arm/vldconst_be.d 35e731ac30c173d5fa873f68e522b748 gas/testsuite/gas/arm/vldm-arm.d 770d8810f2fbaa102502be7bb07713e6 gas/testsuite/gas/arm/vldm-thumb-bad.d dec93ea68b2858b13a7467aeb183e5ae gas/testsuite/gas/arm/vldm-thumb-bad.l @@ -3995,7 +4004,7 @@ 774139bfa6f1f89617568c8eabd7da81 gas/testsuite/gas/i386/hlebad.l 513556f26a0aedd8f86611a105d215a1 gas/testsuite/gas/i386/hlebad.s c42f10e9f4ecdddcbd48ea204dec710b gas/testsuite/gas/i386/i386.d -8110bfffd1191e3ad38729aefed62a32 gas/testsuite/gas/i386/i386.exp +710a2625c50261014dcc11ff13923afd gas/testsuite/gas/i386/i386.exp 8eb567b76b592760d5316213b76a6d85 gas/testsuite/gas/i386/i386.s 0c804ba116de81860c5b4592ac701919 gas/testsuite/gas/i386/ifunc-2.l f5d8fb713f7aa9f005521f9da7af1b08 gas/testsuite/gas/i386/ifunc-2.s @@ -4090,18 +4099,17 @@ 9e634631cd34df405fd8be627b1b88d8 gas/testsuite/gas/i386/ilp32/x86-64-mem.d 703fabc67572478eb6db8a13bd74e916 gas/testsuite/gas/i386/ilp32/x86-64-movbe-intel.d 49b0f7443931b77dff720c925308a19f gas/testsuite/gas/i386/ilp32/x86-64-movbe.d -bb0449f417c6ca0ded618da016ae2209 gas/testsuite/gas/i386/ilp32/x86-64-nops-1-core2.d -d27a265d3f9343ac86560289681486ed gas/testsuite/gas/i386/ilp32/x86-64-nops-1-k8.d -380ada0d285e32e6ccb5df432b49430e gas/testsuite/gas/i386/ilp32/x86-64-nops-1-nocona.d +697c1feefcfe84884fca76b921b0e54e gas/testsuite/gas/i386/ilp32/x86-64-nops-1-core2.d +10c312eb048ce835908c5fe7cffb7a11 gas/testsuite/gas/i386/ilp32/x86-64-nops-1-k8.d fc252e86b680bcaaf1a05091eb822545 gas/testsuite/gas/i386/ilp32/x86-64-nops-1-pentium.d -a9f52ef194852552c09f31c6e04a249d gas/testsuite/gas/i386/ilp32/x86-64-nops-1.d -64905f6d13c87f463694b858cd45a99a gas/testsuite/gas/i386/ilp32/x86-64-nops-2.d -c35c579bd5b361e2609044bf07313a74 gas/testsuite/gas/i386/ilp32/x86-64-nops-3.d -bee9e6d513b12c5a1884c643f97c7f42 gas/testsuite/gas/i386/ilp32/x86-64-nops-4-core2.d -4c19e1081706fe9d4f358757e2d05e41 gas/testsuite/gas/i386/ilp32/x86-64-nops-4-k8.d -9adfa6d243238ca1f4f0769e00b1332f gas/testsuite/gas/i386/ilp32/x86-64-nops-4.d -1d965e69ca347dee04dd2e7156e0322e gas/testsuite/gas/i386/ilp32/x86-64-nops-5-k8.d -b3a8347a227511b180cb598f5e37d8c6 gas/testsuite/gas/i386/ilp32/x86-64-nops-5.d +4f4a8ba08e38cd6a377495c0d5f58992 gas/testsuite/gas/i386/ilp32/x86-64-nops-1.d +9d7601e8a1caafac41547d7c08b4a687 gas/testsuite/gas/i386/ilp32/x86-64-nops-2.d +9a7467365f921500762f35e5fce96b4b gas/testsuite/gas/i386/ilp32/x86-64-nops-3.d +6fb1f98025582dabfe08d51c5e420213 gas/testsuite/gas/i386/ilp32/x86-64-nops-4-core2.d +a8c463e6a51f0abbec1fd179f38b2351 gas/testsuite/gas/i386/ilp32/x86-64-nops-4-k8.d +697a048898d561ac7dfac7652b083ee9 gas/testsuite/gas/i386/ilp32/x86-64-nops-4.d +08a3581287cae378297f04c41cd2a0d4 gas/testsuite/gas/i386/ilp32/x86-64-nops-5-k8.d +445807379ec6d4f1d6c382a83633fb0f gas/testsuite/gas/i386/ilp32/x86-64-nops-5.d 6d4cfe69c08575e111b99d11b84a2c1a gas/testsuite/gas/i386/ilp32/x86-64-nops.d df16126acfb56e9c8bfb55cd8828611e gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval-intel.d 4259b1cae34a4f696c010cb2a4d87e81 gas/testsuite/gas/i386/ilp32/x86-64-opcode-inval.d @@ -4253,17 +4261,11 @@ 6dbfb50008d6f3fce14f55d98ccb5277 gas/testsuite/gas/i386/no87-2.s c211c30a2ca8c8af5dfb9de9ed947b54 gas/testsuite/gas/i386/no87.l 40ffeadf079c8c28a36f6efcc580d508 gas/testsuite/gas/i386/no87.s -2104665d17640a64efe7b5881e419f6f gas/testsuite/gas/i386/nops-1-bdver1.d -79324c17d7a317bdeb38558fdef17d65 gas/testsuite/gas/i386/nops-1-bdver2.d -4686dc2cc0d989976a6b75fb02e1a8c3 gas/testsuite/gas/i386/nops-1-bdver3.d -523f9937674a39c27fe7bdfa78eeb1eb gas/testsuite/gas/i386/nops-1-bdver4.d -c3d731f54b6522463c09087f059450a2 gas/testsuite/gas/i386/nops-1-btver1.d -c91a5d4fa9b2094e83d28441b8f7a911 gas/testsuite/gas/i386/nops-1-btver2.d -8c3779ecb2e793f0d3fc90816c3fb973 gas/testsuite/gas/i386/nops-1-core2.d +81699264e061fd8e037af65e29cda64f gas/testsuite/gas/i386/nops-1-core2.d 1b6d99fa9f483ca4a983e086c3bfbd86 gas/testsuite/gas/i386/nops-1-i386-i686.d 390ea68aac15a2de94c241b84fd60d83 gas/testsuite/gas/i386/nops-1-i386.d 180fb5dfeedfebbed76b3ce02867a7ed gas/testsuite/gas/i386/nops-1-i686.d -5c837a002b3c88949c904d1b3b43b25d gas/testsuite/gas/i386/nops-1-k8.d +9a6ea6ed8b42b8d66aece9dd5edf9a16 gas/testsuite/gas/i386/nops-1-k8.d 08f3d5ceb9530c9068f2e0fa74f75834 gas/testsuite/gas/i386/nops-1.d 025026ce822ca51940d7d32199a1ac49 gas/testsuite/gas/i386/nops-1.s fc008c47b628e4419701c15a6c1a7663 gas/testsuite/gas/i386/nops-2-core2.d @@ -4278,11 +4280,11 @@ 0e0158a3a5deb5ae71501c21a65576b5 gas/testsuite/gas/i386/nops-4-i686.d 1b4aa6eb8ab48e67516865f2bb1d3b8c gas/testsuite/gas/i386/nops-4.d 0398244609681bda2062cb83cda985ad gas/testsuite/gas/i386/nops-4.s -27c2b9da28f85d92779a65622be88634 gas/testsuite/gas/i386/nops-4a-i686.d -0938826b5bbd2c97dd95f442fb6de03b gas/testsuite/gas/i386/nops-5-i686.d -d2c22f2d68f517a25f1aab9605e6404a gas/testsuite/gas/i386/nops-5.d +67cd23d22cfad408bf42837814f15607 gas/testsuite/gas/i386/nops-4a-i686.d +ab3184cfc33738a31bce45a75d4fbab0 gas/testsuite/gas/i386/nops-5-i686.d +48ac4c706a69285a82703ef9b1ce8413 gas/testsuite/gas/i386/nops-5.d 8d916471b35b3710cce5fb2721841320 gas/testsuite/gas/i386/nops-5.s -ff3c1c93f90d9087be51e53d4025ed66 gas/testsuite/gas/i386/nops-6.d +10cd69ba3b66deea9516c12512f0614c gas/testsuite/gas/i386/nops-6.d 4615c74bcbd0f731edbd5bae47389ff0 gas/testsuite/gas/i386/nops-6.s f305326740aef160835b675eb472c96d gas/testsuite/gas/i386/nops.d 08482f95a4891e796cee516ac18a6e1b gas/testsuite/gas/i386/nops.s @@ -4721,25 +4723,18 @@ 196831448d56b0fb4ac7f9666cfe847e gas/testsuite/gas/i386/x86-64-mpx-inval-2.s ac41a4cf7cdea700af58d9479fe8da34 gas/testsuite/gas/i386/x86-64-mpx.d 8c84fec095841fcff85b08b3cfe696cd gas/testsuite/gas/i386/x86-64-mpx.s -fd10486938952d90b3d194faf5d7c9f6 gas/testsuite/gas/i386/x86-64-nops-1-bdver1.d -4a83154b9dc3a825c1783412e06cbc7b gas/testsuite/gas/i386/x86-64-nops-1-bdver2.d -1d421ea2289efbbbd7caeb43b638de00 gas/testsuite/gas/i386/x86-64-nops-1-bdver3.d -9a82602978b6ef68b1fb04e805ede057 gas/testsuite/gas/i386/x86-64-nops-1-bdver4.d -dc118c9c901306016284f16431c34596 gas/testsuite/gas/i386/x86-64-nops-1-btver1.d -ec4fb5658ccfdbd666a01852a6013d10 gas/testsuite/gas/i386/x86-64-nops-1-btver2.d -ad20c3f613a2bbcb2cb56534679a2385 gas/testsuite/gas/i386/x86-64-nops-1-core2.d -be9a92508caf4807e340ecc1c8b50290 gas/testsuite/gas/i386/x86-64-nops-1-g64.d -3cc072985433b4982a88772dd6bf139a gas/testsuite/gas/i386/x86-64-nops-1-k8.d -7444cdbe36403129534f2cfd9d2c4c8f gas/testsuite/gas/i386/x86-64-nops-1-nocona.d +97dad9ee444b9741be18f12f9d4b022e gas/testsuite/gas/i386/x86-64-nops-1-core2.d +9981427de850e3fa58e2588bbb98c698 gas/testsuite/gas/i386/x86-64-nops-1-g64.d +0ccc628589ee23b1eaef8e60204bb87e gas/testsuite/gas/i386/x86-64-nops-1-k8.d b216e15f6699624ab094d8fb795b3cfb gas/testsuite/gas/i386/x86-64-nops-1-pentium.d -df5666127e61a13333c16b43f0bd84d9 gas/testsuite/gas/i386/x86-64-nops-1.d -db2b93d40cc676025aab8cdc942ace19 gas/testsuite/gas/i386/x86-64-nops-2.d -006f29fbdfb810336dc1effce604f084 gas/testsuite/gas/i386/x86-64-nops-3.d -949d4a3df6f8de098a27109e0e7cd27f gas/testsuite/gas/i386/x86-64-nops-4-core2.d -9cef0e02c0747da2fb7231aeb2178020 gas/testsuite/gas/i386/x86-64-nops-4-k8.d -aaf369f93d6280fbc76e63a55135f8fd gas/testsuite/gas/i386/x86-64-nops-4.d -e9407511923951b67cdada688de8e24d gas/testsuite/gas/i386/x86-64-nops-5-k8.d -0384eea15dc9a0281997cbfce8b2b67b gas/testsuite/gas/i386/x86-64-nops-5.d +dd39950b9e286a787bdef54c4885bf97 gas/testsuite/gas/i386/x86-64-nops-1.d +9119bb8f7f42b7498c5741fcd906fa2a gas/testsuite/gas/i386/x86-64-nops-2.d +b25a55ef3c23512a3a5fe74e86e9395f gas/testsuite/gas/i386/x86-64-nops-3.d +2e44106b451b5742da6f3026b68a619b gas/testsuite/gas/i386/x86-64-nops-4-core2.d +0d2fca78868ad5ecd1db4068f5594eb9 gas/testsuite/gas/i386/x86-64-nops-4-k8.d +42f2759004b35b70922cf1e28174d86a gas/testsuite/gas/i386/x86-64-nops-4.d +e05628b96be6d5929b6c2989c9102e1b gas/testsuite/gas/i386/x86-64-nops-5-k8.d +6a8dff2fbac96e30ec7a1eb2ba538701 gas/testsuite/gas/i386/x86-64-nops-5.d 432b7b13a5d0648295040d635d7ec150 gas/testsuite/gas/i386/x86-64-nops.d e3e901b07c73edce9977f85c554a99bc gas/testsuite/gas/i386/x86-64-nops.s 41de16a767ee52fe8c4b2a6079f3a334 gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d @@ -7224,10 +7219,10 @@ f3a7124485548781ba12a81c18199e29 gas/testsuite/gas/pj/ops.d 308d2177ed3b3b087d977e46c924fc0c gas/testsuite/gas/pj/ops.s e7ed97679f470fff72fd186812df729e gas/testsuite/gas/pj/pj.exp -2f926e61406a181b360615f9e4b0e041 gas/testsuite/gas/ppc/476.d +fc75cad64df1fb9bb9938f8de560e08c gas/testsuite/gas/ppc/476.d 412bf1f1f461a8a3a5c9ae44b9170c11 gas/testsuite/gas/ppc/476.s -80cd9efcb2ca1d517448c51c616f0ac3 gas/testsuite/gas/ppc/a2.d -40b929e09f5e004eed999586a35e3e8f gas/testsuite/gas/ppc/a2.s +38437af1fd2ccbc26005f505e4164173 gas/testsuite/gas/ppc/a2.d +96106ef146c635a8368c7a3f552ef5c3 gas/testsuite/gas/ppc/a2.s a5aa162177e46e8232990c1a7b381c6b gas/testsuite/gas/ppc/aix.exp 1144f1624f81b2bf57bc44af8e76f9bb gas/testsuite/gas/ppc/align.s ab3c6a1d0aca76e63d73bb4d7eb80035 gas/testsuite/gas/ppc/altivec.d @@ -7248,8 +7243,8 @@ 144fe63958860bc4f47e29e6d334f7de gas/testsuite/gas/ppc/astest2_64.s ab9460ac82b2b4fd0dea6c677ac3f9ea gas/testsuite/gas/ppc/astest64.d 7b85234004920f7134df77e2f1931c13 gas/testsuite/gas/ppc/astest64.s -aeda5ef6a0bfa16b72ca550846264961 gas/testsuite/gas/ppc/booke.d -301a298420403442610c793c171efe78 gas/testsuite/gas/ppc/booke.s +9ee26310dfb58ee82ebcd809d8c15ff4 gas/testsuite/gas/ppc/booke.d +b0ab5867186f2e53b5ca19b6be54b980 gas/testsuite/gas/ppc/booke.s b965e2e9b08bb26c920ddbca2d3ceae3 gas/testsuite/gas/ppc/booke_xcoff.d 2a6d0fd8f30dbe6f0a2ee6e441b5073f gas/testsuite/gas/ppc/booke_xcoff.s 7e717575c44458a8dd4e4b3401e1969c gas/testsuite/gas/ppc/cell.d @@ -7264,8 +7259,8 @@ 9a8c8131d1ed55f1cd6b12d65d85cbd6 gas/testsuite/gas/ppc/e500mc64_nop.s 080c25802390b93a937c4ae51e987ef8 gas/testsuite/gas/ppc/e5500_nop.d 5f620ed105babe239107fc41ad0d8a23 gas/testsuite/gas/ppc/e5500_nop.s -02ffbffd031f49321e1988cf48feab05 gas/testsuite/gas/ppc/e6500.d -547029b0c2e9ab3d6f1fe5a403f1b054 gas/testsuite/gas/ppc/e6500.s +d3f53fff4f7c570021491b49ab148540 gas/testsuite/gas/ppc/e6500.d +87d9410da421f3d28b4f77e98b1a1819 gas/testsuite/gas/ppc/e6500.s 6b6ae59b02126346f587dee99ce91aff gas/testsuite/gas/ppc/e6500_nop.d 61faf5b217455918b14b543f1d6d642f gas/testsuite/gas/ppc/e6500_nop.s 05271d9cdd13ebcebd7662d04285d5af gas/testsuite/gas/ppc/generate.sh @@ -7273,15 +7268,15 @@ 96ffb92680f06d60c9e88e76cc87ce3a gas/testsuite/gas/ppc/htm.s e28e6e26070c12f3bfaeb13ce5675805 gas/testsuite/gas/ppc/machine.d ff408fd5be06ddf91987583d7e49c157 gas/testsuite/gas/ppc/machine.s -1bf7d691dda2ec7a686a4bb33f17ead5 gas/testsuite/gas/ppc/power4.d -89783108f43381d1f22de7caed738f5e gas/testsuite/gas/ppc/power4.s +95b2830bf9a8994e65efa5798f179cb6 gas/testsuite/gas/ppc/power4.d +035f819d73fdfb377b32617041382663 gas/testsuite/gas/ppc/power4.s 59eefe371047c86245b32d74b6d415b2 gas/testsuite/gas/ppc/power4_32.d 8586b8880a3b51d9144b813c20a3b5a5 gas/testsuite/gas/ppc/power4_32.s -33424a4148f784d1fca14dbae64e218c gas/testsuite/gas/ppc/power6.d -18e3139998f662308c1424430d107d20 gas/testsuite/gas/ppc/power6.s -bc7536daf73aba1eff02bfd193227349 gas/testsuite/gas/ppc/power7.d -69fbb8ac7d2dcf0d4d5c00a182522010 gas/testsuite/gas/ppc/power7.s -cd5f4e2d9b00cabca72284843202674d gas/testsuite/gas/ppc/power8.d +ed12ef8ffe70539471f63d02be4de271 gas/testsuite/gas/ppc/power6.d +833480592e5f0d95f79a7a02c267425a gas/testsuite/gas/ppc/power6.s +8a1b60fd5a1edbec9e399c7c6dbdbf03 gas/testsuite/gas/ppc/power7.d +5ad9be7f8dfb14e3364f158aca1842f0 gas/testsuite/gas/ppc/power7.s +f5f3beb9aa51ee9f013f8c20ad02f261 gas/testsuite/gas/ppc/power8.d 8bca87267888c59fcdada329ce9b321f gas/testsuite/gas/ppc/power8.s c092333a943e0c67260a8563f29b4196 gas/testsuite/gas/ppc/ppc.exp 63ce88434d7ceaf53a3ff02a72eb4d62 gas/testsuite/gas/ppc/ppc750ps.d @@ -7309,7 +7304,7 @@ 7d26a371daee8844b9a874ea29f62b16 gas/testsuite/gas/ppc/textalign-xcoff-001.d b60a4ad89a80b60d95fc5d73ec5e02d9 gas/testsuite/gas/ppc/textalign-xcoff-001.s b0f0a0f307149b00c01eb907197dd91e gas/testsuite/gas/ppc/textalign-xcoff-002.d -ed003455d8fc75a9ee77f704170d4dc4 gas/testsuite/gas/ppc/titan.d +e7de1e4b2ba2575938af0721d219d58e gas/testsuite/gas/ppc/titan.d 190834467f187984b601591709c32cf2 gas/testsuite/gas/ppc/titan.s 1c55327bd14f3f86d06574d33eb2e0d2 gas/testsuite/gas/ppc/vle-reloc.d 00fd3e9d2f074e71f94b6b678d151373 gas/testsuite/gas/ppc/vle-reloc.s @@ -8496,14 +8491,14 @@ 2ed281f5d22becf7aba5e37328311b76 gold/attributes.h bfd621891d42fcab8b54efdccc8fff84 gold/binary.cc d0897386cd62d9aa44cdaf86a51f5b45 gold/binary.h -7c065d343299dd9c1279a546d970c55c gold/ChangeLog +6a02bb1c247ca460c717b722e5640b35 gold/ChangeLog c59dfb208b35b89c368089a3eaca893a gold/common.cc 0101f6a7153745cafef2bac8065e7d7f gold/common.h 10c6afeab2feaa242e2a6c6b74c8ff97 gold/compressed_output.cc 6e1bbe2b6e8d1514f43a872949c82014 gold/compressed_output.h 6d76eb0f8d1da8f212bc273d2d0cfbd2 gold/config.in -a1a4ae6c809f9e1cce51d87d863a1376 gold/configure -a8826220fbbc82f60b61b4de44b46759 gold/configure.ac +f6982597ca6dd87adc200273be88edf3 gold/configure +da43d0072b836f0a73e4a5c9fff89c67 gold/configure.ac 0cd9a6591cb7b2d554215c22601ec9d8 gold/configure.tgt 2969c6277b2d2f7cdaffc4bbe48c8a10 gold/copy-relocs.cc f92453e89c6fe27c3136834f0d5b29e9 gold/copy-relocs.h @@ -8585,7 +8580,7 @@ d010ddbcd0812f7e55ccd011c9a624a7 gold/po/POTFILES.in 29f956061df261171fc66842ab353a79 gold/po/vi.gmo eb76828f28c11714067e009aa7ba4efe gold/po/vi.po -a39d14d0d4372dcb8b4d713412d3afb3 gold/powerpc.cc +5064b89218e7226611ea8798bf134a8c gold/powerpc.cc 7fa7cc44576ed0ded0afc67262ca8f46 gold/pread.c 0c16cfcd4d38078f9824774fe18c13ed gold/README d3597ac72874595490aea535118f95b5 gold/readsyms.cc @@ -8593,7 +8588,7 @@ 7f9802c4be010e5c6f4f9b8dbf33b982 gold/reduced_debug_output.cc c147c4399815bf442e5e35ace7a3775d gold/reduced_debug_output.h 6346d322d9c7d3e8827954cbc7802fe1 gold/reloc-types.h -d56c3b6f0b7d0669309685fc0a078daa gold/reloc.cc +1bb973ec8c2be913597bd1d70558f28e gold/reloc.cc 7c6b39b9d70550c77db63fd8f8b00785 gold/reloc.h 7b7f5078970a979c838cb7ef2d69cc03 gold/resolve.cc 03494262e7c717f93c11b2568a97bf23 gold/script-c.h @@ -8621,17 +8616,17 @@ 4c155f3e2d74bfaaee87bf34c5f9370a gold/testsuite/arm_attr_merge_7a.s 8383d587d80276d4b6a8dd6bab556839 gold/testsuite/arm_attr_merge_7b.s e347b22d67c811662c5d61834f924831 gold/testsuite/arm_bl_in_range.s -4b002882f3ce289d3e92d29404bd773b gold/testsuite/arm_bl_out_of_range.s +477b6e6ec9e8e0b979271e5655ad3f11 gold/testsuite/arm_bl_out_of_range.s d352819030062f617ed35561780d5f0c gold/testsuite/arm_branch_in_range.sh e6e7907e6214a57075f9a4a420adc433 gold/testsuite/arm_branch_out_of_range.sh 685e01eba78dd609e7eefe71b72ee2cd gold/testsuite/arm_branch_range.t 1eeacb65bbea38f8e26f860e4a88648c gold/testsuite/arm_cortex_a8.sh -652d0cde19d3d66a1725d54fc2a5b91c gold/testsuite/arm_cortex_a8_b.s -7f068ed6006aa356331a5aebfcb2b4fc gold/testsuite/arm_cortex_a8_b_cond.s +a214b5320d16156209607ae683f25d22 gold/testsuite/arm_cortex_a8_b.s +eab49865278f511552f0937bfd8752b0 gold/testsuite/arm_cortex_a8_b_cond.s d94bd04b915e0260ae7f85bd883faf67 gold/testsuite/arm_cortex_a8_b_local.s -3aa21fc062ab2dffd7db4d368bf0a907 gold/testsuite/arm_cortex_a8_bl.s -40ddb04f944f422900dccd988911d365 gold/testsuite/arm_cortex_a8_blx.s -f8361e5ebf0488807385746412b86a21 gold/testsuite/arm_cortex_a8_local.s +84972e51fec5c503224adf5d4f198712 gold/testsuite/arm_cortex_a8_bl.s +5bfcc45fb7cc2853e23406d54fa5af2c gold/testsuite/arm_cortex_a8_blx.s +bca503ad1c63cfff98725067d2ee8f30 gold/testsuite/arm_cortex_a8_local.s 1dbff22390a0dd9f90d8b32a0947f0e8 gold/testsuite/arm_cortex_a8_local_reloc.s da039fb6e3cfff44470add06057545b9 gold/testsuite/arm_exidx_test.s 2d4b3ea413f322e54c56579c571b5da1 gold/testsuite/arm_exidx_test.sh @@ -8645,13 +8640,13 @@ 166bbac133d83d0c3247d767355c562c gold/testsuite/arm_farcall_thumb_thumb.sh e0c37a2fccb6d4aeea259944dd0507e9 gold/testsuite/arm_fix_1176.s 3890ac5cef6c0a8f86e8805de194ed20 gold/testsuite/arm_fix_1176.sh -863a1a2ed16aabfcf03175997f5861a2 gold/testsuite/arm_fix_v4bx.s +5417a01dde50030e6e6d7b84923f835e gold/testsuite/arm_fix_v4bx.s d7306477f7dfef3c69d9c8269866a0b9 gold/testsuite/arm_fix_v4bx.sh 8c177688e29dbba293d61890595593bd gold/testsuite/arm_thm_jump11.s d03cdf0c632cca362692de43206aab3d gold/testsuite/arm_thm_jump11.t b1d476427b02fb14b51fac920bae98ea gold/testsuite/arm_thm_jump8.s ec264a9fb94a950a6745f94323e3d234 gold/testsuite/arm_thm_jump8.t -9c97f80983fba914f9dea285bb54c38f gold/testsuite/arm_unaligned_reloc.s +1eb0b8a99566b2d7e4dfac81065c1602 gold/testsuite/arm_unaligned_reloc.s f4a4f5ceaf68822f4a196723dec6b21e gold/testsuite/arm_unaligned_reloc.sh c82eb5a33e5e673f8ec0f2cf0b442729 gold/testsuite/basic_test.cc 3b0f70d2cd5589a910279456f68336df gold/testsuite/binary.in @@ -8780,8 +8775,8 @@ dbbf8a1e229567bc92fb87eca77458a0 gold/testsuite/large.c 17a82689d62f98379e97199e3dac0564 gold/testsuite/large_symbol_alignment.cc e5ca0d90620ff91646d0ff77127a0c0b gold/testsuite/leb128_unittest.cc -ede530eac32a63154a24599e7f50c059 gold/testsuite/Makefile.am -b71f99375fa068fba4d637a744ea1920 gold/testsuite/Makefile.in +99495f9387025dbd43a82518366ec0f4 gold/testsuite/Makefile.am +18248e2f9f3dde1be08d8ecf9d313e1f gold/testsuite/Makefile.in cfd7e2b6d13f93610826fc91fa13f6cb gold/testsuite/many_sections_test.cc 583bee06b7ae8e1ebd4785762bb24bf8 gold/testsuite/memory_test.s 06acacbbb42106c10ac28bf17cf9738b gold/testsuite/memory_test.sh @@ -8870,6 +8865,12 @@ 519c8104a43ce535996d4e2a1e1f24e8 gold/testsuite/split_i386_3.s 99f5475ec63903df570d418a0b08c728 gold/testsuite/split_i386_4.s 77b0a399acc870bc90a5338a92e2a599 gold/testsuite/split_i386_n.s +3ae0fd91c645ff4625f871ebfe364c61 gold/testsuite/split_x32.sh +ff4887f14f36e30d716906110267a32a gold/testsuite/split_x32_1.s +763b71fd9641d4b4f46f442b3e1f4b62 gold/testsuite/split_x32_2.s +686b45dd80510978b8f8cd429fb941d6 gold/testsuite/split_x32_3.s +69cc3def841fa9f0858e48921585761b gold/testsuite/split_x32_4.s +6a4ef24da82fc299d8eacfbafd04039d gold/testsuite/split_x32_n.s bc3354ec73f1d00b89b227aae4f828ae gold/testsuite/split_x86_64.sh f63fdcb4a6e54aa57f88de09c817b52f gold/testsuite/split_x86_64_1.s b60c470795e496998f11ece6956a2002 gold/testsuite/split_x86_64_2.s @@ -8897,10 +8898,10 @@ 8d1487f38fdc3ec89a4d52e9a53590c3 gold/testsuite/thin_archive_test_4.cc d1f6e294cfdde57d4bf3b90ce7637047 gold/testsuite/thumb2_branch_range.t 9362c778a05845384fe2994a2892e9e4 gold/testsuite/thumb_bl_in_range.s -c3f11553ea12931497c562c3864aa594 gold/testsuite/thumb_bl_out_of_range.s -c8ea5705d6e982f8268f8f9a4137c150 gold/testsuite/thumb_bl_out_of_range_local.s +69c8e6c387299abf37793e79d6ca14e6 gold/testsuite/thumb_bl_out_of_range.s +153a5891035cc588a868342b506dce5e gold/testsuite/thumb_bl_out_of_range_local.s 7d6754aa40903fb37d2b2624a193417d gold/testsuite/thumb_blx_in_range.s -f94fc31d77082d754091a1f272948813 gold/testsuite/thumb_blx_out_of_range.s +398e5ab186677a9763c77001efda20ba gold/testsuite/thumb_blx_out_of_range.s 5ada774943b3cda10488b1a5518b1854 gold/testsuite/thumb_branch_range.t f5ed0bb1c43f222b129183b995a32c0c gold/testsuite/tls_test.cc e423e1c4c85834e8b9dbfdc4c1604090 gold/testsuite/tls_test.h @@ -8975,7 +8976,7 @@ 41f403f6bd233edb650f5f1a800750c7 gold/workqueue-threads.cc 9a68640bd24fe07e9eaf5f304c540284 gold/workqueue.cc 90592e2a2618acf88602a9bb84d5dfb9 gold/workqueue.h -8c99dc03ffadaa3270918b83ff47e5a2 gold/x86_64.cc +373287d3b9396dbb3beab3f7b3bd2d27 gold/x86_64.cc 1af155665631041e785b64322cf93231 gold/yyscript.y b167dc5dcf583c07feecea0f8003e647 gprof/.gdbinit 8257446e682118e49bf3006a90c44bd9 gprof/.gitignore @@ -8996,7 +8997,7 @@ 5f9d4a6124a8ca1bfeff99e93cf908ed gprof/cg_dfn.h 91242c9af4c8c149382b57e3b806c4dd gprof/cg_print.c ce4b616d308438040ed56fc1f32ecfb7 gprof/cg_print.h -b4b24ed71eb0b4488350db31c67b9d07 gprof/ChangeLog +b710946599762e2540827596c987630d gprof/ChangeLog d149d32bac72dc2dc9b0a9651fe79fc2 gprof/ChangeLog-2004 7194210d043fb295952589cd0d654c08 gprof/ChangeLog-2005 764eb6920c4791760476927b164773a6 gprof/ChangeLog-2006 @@ -9009,7 +9010,7 @@ eb188751078b137176ed4f481859d77b gprof/ChangeLog-2013 7d36670d64d7d95b8a9394f0025afcb1 gprof/ChangeLog-9203 745ff1b458c66a2bdcc3d275761355c9 gprof/config.texi -887edc16de550754140d0930f3481edc gprof/configure +a45eb8bb324b451be7eec5c2a4c18027 gprof/configure a752efc6cf0c064e1fca3b4c7f7ee6ad gprof/configure.ac 547237189928cd82694b9c736e7666c0 gprof/corefile.c 0d24999189feb18a3bd929c5e8f994f4 gprof/corefile.h @@ -9122,14 +9123,14 @@ 3127ef7581bc8375f7e249add35338c6 include/aout/stab.def 8b1e67769da44055d07ce15a6dbff7be include/aout/stab_gnu.h 0e4d645144a6b155c7268eaa4f86c477 include/aout/sun4.h -f0eff70cff2eb0ec6daa38d5a893c818 include/bfdlink.h +923a711a1676039a356f9146fb90a7ba include/bfdlink.h ac3cd3ff30986db276cbeafdb203e07a include/binary-io.h 282c2aff59e6b1494efa4c9c93a437b2 include/bout.h d4d5aa8de81ad5820ee79693e8688f96 include/cgen/basic-modes.h 8b85f974a0e459a61dedabeba84944fa include/cgen/basic-ops.h c1fb049f8e113b084d6ba9dc0aef882a include/cgen/bitset.h a14f6d5db342e17b117a3881237b062f include/cgen/ChangeLog -22fc46ff96ad68bcae743f282e23bf1d include/ChangeLog +f75d748da16ccfcd7bce0e195056c610 include/ChangeLog 41879305404d3b06773b10ab3fa44539 include/ChangeLog-9103 661f87a28d7234f2cfebc416efe53507 include/coff/alpha.h 182422410d8aeaeb5c6090f94ecce765 include/coff/apollo.h @@ -9176,7 +9177,7 @@ 9978bc7c653be560039964154fc5cb41 include/demangle.h 5a03c081a4bd45612d211831e4aaa9aa include/dis-asm.h 476370ccdf72d8d25a784987e839c970 include/dwarf2.def -398fdcbb0c95dc90e2898e20960804f9 include/dwarf2.h +136dd117991029e924df8dda6cc6c4f9 include/dwarf2.h 7e968442c6c0231dfe2def312758e765 include/dyn-string.h 7210e1e8f73f639d55f74897bcb9cca2 include/elf/aarch64.h 77670189a62e567760623b831390c876 include/elf/alpha.h @@ -9184,7 +9185,7 @@ 1a46edc7ac37fe532a1f6bab4bee6132 include/elf/arm.h 8ca2e471d2b583e538b51394416701f1 include/elf/avr.h c5be8be465f1c8cb7f9d6c5b376e675e include/elf/bfin.h -ca878f31e2e24239b509825efc9d21bd include/elf/ChangeLog +f9fc7d8b88be94e7633bcb65b70fac8a include/elf/ChangeLog 4a26c010ce1159365c425f0df730a09d include/elf/ChangeLog-9103 06be5566f7eb0da8661056b574d556ec include/elf/common.h 3bb335db9f6925392b2f6a99d34c98ec include/elf/cr16.h @@ -9206,7 +9207,7 @@ 0621d1cddf6ca138f6dd24b12856ea8f include/elf/i860.h 7811b3487fb6433a7e69a4d7aabc338e include/elf/i960.h 934f87f00fc39c85b5e568244153f379 include/elf/ia64.h -7d7a3930b7b388e9ac3d5796fa4ccfcf include/elf/internal.h +dbd6ce1d72c21b00f190f8a03e2b3bf5 include/elf/internal.h 0cfca972a6f4c73a66a402188ae87f0d include/elf/ip2k.h 322369cb7084ba472ac1a6dd920e7e22 include/elf/iq2000.h b2f5be3b18a75bf74b063029b98cd7cb include/elf/lm32.h @@ -9314,7 +9315,7 @@ 5e2132b8077a0c83c30d3ab72fe98b8f include/opcode/avr.h 8e1d69957b0d3171ee4490a6e0332a34 include/opcode/bfin.h 2badf1fc2de214da0bf6f38960b31965 include/opcode/cgen.h -9b08106e1fb7ed54d8d631773ffaa97c include/opcode/ChangeLog +123e6fb4fff42d2d2e9d6a6d60ee456f include/opcode/ChangeLog a342d85fea1e2696d1608befe2530137 include/opcode/ChangeLog-9103 9ef019db254a13ee7c88da7518ef6832 include/opcode/convex.h 6f80df3758c245008fe42202792b013a include/opcode/cr16.h @@ -9348,7 +9349,7 @@ 682b3c7e174e0ea4183c0f67a702e2ac include/opcode/pdp11.h 6c2893a091a8f7d95b5d13fe149a6cb0 include/opcode/pj.h 79dad4ae548887133d5438cfae27f865 include/opcode/pn.h -76a0dad9e7733be9556d2aa3cede9c79 include/opcode/ppc.h +9e6fca09ad6048c37588015fcb72b91f include/opcode/ppc.h c7b48e43dfd994205d5a3d67ab43458b include/opcode/pyr.h 8d929614d9974ad307b5468b85f722bd include/opcode/rl78.h 88a349efa8d6ec2af07e3e52d80c576a include/opcode/rx.h @@ -9471,7 +9472,7 @@ 76ca170a525d5b84d90f0478fe788931 intl/VERSION da73aad6396daa6072d443c12133ee0f ld/.gitignore 80c55f071409c7062c5059105eafe078 ld/aclocal.m4 -c4c8f9ef708804802e30524547f9c4df ld/ChangeLog +f4fc640748f74c3cbaa0371c39479b16 ld/ChangeLog b4ea35b18cd631b1a84c4d66b5fbf17f ld/ChangeLog-0001 cb83c58e2db10afdd1e6f57b2ab02d1a ld/ChangeLog-0203 b5f4cdda418187b6e6b1e8aa32b22c11 ld/ChangeLog-2004 @@ -9488,7 +9489,7 @@ 59217f22ee78753701ad3d51e4e0b0e2 ld/ChangeLog-9899 291ecfdbe9512d76bed718ae8d9bb8df ld/config.in 6ac15cbc72043253c52823ac798429c0 ld/configdoc.texi -78862c4778e57ff22ef2d63c26e7d566 ld/configure +2714b738dc07d56145f3cef9bc70f3ed ld/configure 3b9c78701b556d4afabdc5551822dc3b ld/configure.ac ed92e0ef3c50ef36d7acbdc152c8027c ld/configure.host babe7b18b02b7e023cbd273d6a9d1a44 ld/configure.tgt @@ -9673,7 +9674,7 @@ 5b2cfd0917902083166727b03fbd07c2 ld/emulparams/elf64ltsmip.sh 072aac14506526ff6444c9d7eb6efe0f ld/emulparams/elf64ltsmip_fbsd.sh 5b79366aa223913e714e04f4303594fc ld/emulparams/elf64mmix.sh -31a5674966f82da25cb4da4f626e5dfc ld/emulparams/elf64ppc.sh +8c0d6913657c63d21f516f76858d0051 ld/emulparams/elf64ppc.sh a2fc5b636ea0e4e9da40a1d5c4f3efdc ld/emulparams/elf64ppc_fbsd.sh 979f06e478c520b86b19445df789b8ab ld/emulparams/elf64rdos.sh 3d954a1f264b8bd59f164d274f847b3c ld/emulparams/elf64tilegx.sh @@ -9855,7 +9856,7 @@ 8ff8aa94056fe0874c49829f9f396b80 ld/emultempl/cr16elf.em e30cb154f5832e2e71223c821477b531 ld/emultempl/crxelf.em 55d8154d5b5c1994d828c1258db530d4 ld/emultempl/elf-generic.em -b60eb175cd1d6528d08d80a307661052 ld/emultempl/elf32.em +148b4ac86e14f1853d0d8763c14e229d ld/emultempl/elf32.em 01e2fdaa695babbfcb67617a0f7390d7 ld/emultempl/epiphanyelf_4x4.em b83d006d821f9a34b7c8b7ab09a22dd4 ld/emultempl/genelf.em b1c50df8d720d55496c342c45436e2ba ld/emultempl/generic.em @@ -9882,7 +9883,7 @@ d2f37975fbda38bb21f3afb41531270c ld/emultempl/pe.em edb2ee395ddf9fd2021d66996290f6e8 ld/emultempl/pep.em 9927c7fd59a774011dd64b00de748e70 ld/emultempl/ppc32elf.em -75eb281bfddc41ec419a1ae40ff9c66f ld/emultempl/ppc64elf.em +5c2634e7f848a817231fee69363b928b ld/emultempl/ppc64elf.em 0354c5999cae886e17ad1b169140507a ld/emultempl/README 535deeadc0c3b5ba24d7c2b02ef92883 ld/emultempl/rxelf.em 78bb4ca8362c91a3b6ca54303e024213 ld/emultempl/scoreelf.em @@ -9917,21 +9918,21 @@ 9cbd342caf474051157fd235cc72da17 ld/ldctor.h 252813d16e9f06cb0f0a1d14008293c6 ld/ldemul.c 0060bc3f20b38e4adce9583ed1a91974 ld/ldemul.h -cbd7e000a808832ac3e2dde5325582bb ld/ldexp.c -37d93f1d1f94580da3c77b9b913829d0 ld/ldexp.h +4bf19390f257ed254e1575b3edda7b08 ld/ldexp.c +eea87197ab33362b6eb1573dfa6039f3 ld/ldexp.h dd3c3f16032e7f780abb5a6f56f9d827 ld/ldfile.c aaee99adbc2eb9331e29b1ce44dad1e4 ld/ldfile.h 9b07d69abd3eaf5ae542002b2475bb03 ld/ldgram.c 667f18456cb54b262fbae41ee07d8515 ld/ldgram.h 1068ddd6e565c9eceac9d4ca01a592a1 ld/ldgram.y 5edd2efe5338f63e2bee0eef19c70206 ld/ldint.texinfo -ebdd16787ad5bdc77a8ebe498fd597c5 ld/ldlang.c -f57d113388ab7ed51e8cccc441617e6f ld/ldlang.h +8fe4f4bd00b285b30eb8288dfc9bf48f ld/ldlang.c +aed163f4ec4acf901a86230e104f2bc4 ld/ldlang.h 169589135ac013245f5b52f69108c6c7 ld/ldlex-wrapper.c 04624f0552ff51d0bb2943974da1e019 ld/ldlex.c 8cbe773ee51e2e6c1e1c11285148a390 ld/ldlex.h 51ea672e3c304ee08cb87d30dd85692a ld/ldlex.l -92561e9734c17cef6450a3808beae21a ld/ldmain.c +937025284ff7837f34be4ce37bf8b84b ld/ldmain.c 430d6a9b86186dd2fc59a2f0660d3006 ld/ldmain.h 0b631e8e56861d72fcae50c113b88dec ld/ldmisc.c bfb72fda8538985fae57a5ac3df8ea61 ld/ldmisc.h @@ -10079,7 +10080,7 @@ 1ded054093de910d9786c62bc4fe8cc6 ld/stamp-h.in 281f8c85273d2ed6c13e4c892a8a56b7 ld/sysdep.h ebf3d87aafa7e7ae6efb05965e5d4ddb ld/testplug.c -19737e2d82e2e413a627d83a3857b4d1 ld/testsuite/ChangeLog +4b53750862038eb873e80ca229992dc8 ld/testsuite/ChangeLog 4ad0891478a03aecf68a87677ea1bec2 ld/testsuite/ChangeLog-2004 28919f3b134108767a4ddc928d1a3b57 ld/testsuite/ChangeLog-2005 22cc89a4117eb02e4c2ec5144037c2a2 ld/testsuite/ChangeLog-2006 @@ -10092,11 +10093,13 @@ aea65142d427d164de50f4c05458acb6 ld/testsuite/ChangeLog-2013 cc4e72840b3138e245aac354e9eda342 ld/testsuite/ChangeLog-9303 cd418ff5d223590f2d53cefc0ac54ec7 ld/testsuite/config/default.exp -ece534a687bf7ad98b3173b519a5e99e ld/testsuite/ld-aarch64/aarch64-elf.exp +fe701201a886d5fbe577c76f60a92692 ld/testsuite/ld-aarch64/aarch64-elf.exp ee05d23f722a952993a04bb0b5be2841 ld/testsuite/ld-aarch64/aarch64.ld 6e220b77ea1a7210374865f197cc0091 ld/testsuite/ld-aarch64/copy-reloc-exe.s 0bb06bd1458a67cf0614fa07108fa0f3 ld/testsuite/ld-aarch64/copy-reloc-so.s ba5ec3e4d883b0605c09e2fdb893381e ld/testsuite/ld-aarch64/copy-reloc.d +e5a7db0342b232a6bacf3fecad379a26 ld/testsuite/ld-aarch64/dt_textrel.d +764bbf86bb7c83de74b718162c84333c ld/testsuite/ld-aarch64/dt_textrel.s c1132d71e957b4a565cc4e05d23c233a ld/testsuite/ld-aarch64/eh-frame-bar.s c0ee771714bb718a76f54d3829d4ec32 ld/testsuite/ld-aarch64/eh-frame-foo.s ae50f721ba7099d896b82111efe6e5c9 ld/testsuite/ld-aarch64/eh-frame.d @@ -10184,6 +10187,7 @@ a8bb1a6d44b0808bef173865cb9743c6 ld/testsuite/ld-aarch64/farcall-b-none-function.s b334f693ff3da5145bdfa900fd430dce ld/testsuite/ld-aarch64/farcall-b.d f3b6f9c3640700cee33ba8b945a177fd ld/testsuite/ld-aarch64/farcall-b.s +1793faadce0d76d5de5790d0c44fe372 ld/testsuite/ld-aarch64/farcall-back-be.d 76769f48bf14e8e2f0c48c3d28ddfd86 ld/testsuite/ld-aarch64/farcall-back.d b274b868ecd8ae890edaf948cf96fbb2 ld/testsuite/ld-aarch64/farcall-back.s e0b7029e7724d6ee52622a62e2a0a8ba ld/testsuite/ld-aarch64/farcall-bl-none-function.d @@ -10288,8 +10292,13 @@ 7f2d3a148879ff384e08750a419c78dc ld/testsuite/ld-aarch64/limit-bl.d 46235617945c84944e380a7586b0160d ld/testsuite/ld-aarch64/limit-bl.s 39876a2290c9372e046a5012d183e562 ld/testsuite/ld-aarch64/local-addend-r.d +bb36deb49222b2822ba988ed42e075c3 ld/testsuite/ld-aarch64/pcrel.s +ba5e259f7df761d18e6ec67b521b8b26 ld/testsuite/ld-aarch64/pcrel_pic_defined_local.d +f0d8c96dc54facd72b47b5ba92b7a74a ld/testsuite/ld-aarch64/pcrel_pic_undefined.d d3a909b5302287c8e928826dc3e4f58c ld/testsuite/ld-aarch64/relasz.d 789d5164ffeb4605a3f56903538fcfbd ld/testsuite/ld-aarch64/relasz.s +be2f39300bc123b9c825813c2eed9569 ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d +797365fd8f423c08c359d0bd5922677e ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s 59fde84cefba1ebc23baa357addee843 ld/testsuite/ld-aarch64/relocs.ld 2c3b2280783e2d581bbffb9b3cafa9ff ld/testsuite/ld-aarch64/tls-desc-ie.d f819d40341e92ff24fb6871dbaed78b1 ld/testsuite/ld-aarch64/tls-desc-ie.s @@ -10636,7 +10645,7 @@ bd6ff6c8b8345b9de2adb0577eb465ef ld/testsuite/ld-arm/ifunc-1.gd dc103f34e4dd020596269e3fcbd16751 ld/testsuite/ld-arm/ifunc-1.rd 0d4de4218e3ca91dc988e8e6b1e3ef20 ld/testsuite/ld-arm/ifunc-1.s -f3c9563800aabc99941f94743d0ecfec ld/testsuite/ld-arm/ifunc-10.dd +567408270733ed5df1e238d475e87a26 ld/testsuite/ld-arm/ifunc-10.dd cd32556b17a54ef4d2d4f37ec518d06d ld/testsuite/ld-arm/ifunc-10.gd 0494c06eeb2dac556c5f489089760eb8 ld/testsuite/ld-arm/ifunc-10.rd 476d1fd97b14dfc080a90d893793b963 ld/testsuite/ld-arm/ifunc-10.s @@ -10668,7 +10677,7 @@ d653b95a1c89a2c53e6648d1cf1466e1 ld/testsuite/ld-arm/ifunc-17.gd ea8ae2712e5a4954126394a32ecba58b ld/testsuite/ld-arm/ifunc-17.rd b8da88870cbdfaa6f830e79cbc04519e ld/testsuite/ld-arm/ifunc-17.s -8b0bd081030ed64dea9147f83177ab65 ld/testsuite/ld-arm/ifunc-2.dd +70ee2c34aaa14008647a3a04d7b6ef26 ld/testsuite/ld-arm/ifunc-2.dd 5bd81c3bc199de0c50676480edfa3e48 ld/testsuite/ld-arm/ifunc-2.gd 367aad733880e6c27d540aa6a06c28fc ld/testsuite/ld-arm/ifunc-2.rd ffe494ca12faae825c0c61d3cb152ab2 ld/testsuite/ld-arm/ifunc-2.s @@ -11024,15 +11033,15 @@ b9f4c772858366872f8725bab1f38a94 ld/testsuite/ld-cris/tls-err-65.d df2f4c172fbf7f7cb669fe49f1ccceee ld/testsuite/ld-cris/tls-err-67.d 2b7b5d592cce606b75e3080ce6aef07c ld/testsuite/ld-cris/tls-err-77.d -ddb28af215c73ce07ecbc3e01c0c2caf ld/testsuite/ld-cris/tls-gc-68.d -7606ca5bc48e3d57e211e5a02b4e6670 ld/testsuite/ld-cris/tls-gc-69.d -b25468279bf5a81112240c3f946f9217 ld/testsuite/ld-cris/tls-gc-70.d -1b6dd8d4e6526816d6020336b12dc538 ld/testsuite/ld-cris/tls-gc-71.d +ac410a64fd7b5e13da512ed3a25d02b9 ld/testsuite/ld-cris/tls-gc-68.d +14825ecf334e0b503359fb399741e4e6 ld/testsuite/ld-cris/tls-gc-69.d +4d9d71f495daace2bdf0d0f6b2ea14e6 ld/testsuite/ld-cris/tls-gc-70.d +f4515144de7d45b2250dacff5e2f73b7 ld/testsuite/ld-cris/tls-gc-71.d 1d334e4fd0ce9bb55b12f88888b5a502 ld/testsuite/ld-cris/tls-gc-71.s -a76da92d5f3faa5608690c8d88601bc4 ld/testsuite/ld-cris/tls-gc-75.d -70c6172ca8703fb5aa8a26b807e6b0d6 ld/testsuite/ld-cris/tls-gc-76.d +f2fcad311be7eda1dd219b8042440f1a ld/testsuite/ld-cris/tls-gc-75.d +cebcf1f76815eafa2f601c0395490717 ld/testsuite/ld-cris/tls-gc-76.d 77931d8d14cb883d864cf6f6eeb28aeb ld/testsuite/ld-cris/tls-gc-76.s -0e76d0a7a7d567a9eee2acb0e64a092d ld/testsuite/ld-cris/tls-gc-79.d +30dab77ed12969ec0695bd3dd129e151 ld/testsuite/ld-cris/tls-gc-79.d 9dbcc4e2aa2a2bfadcc47e3aabb4821d ld/testsuite/ld-cris/tls-gd-1.d a2271e5313c908cec57856570e5ce4ec ld/testsuite/ld-cris/tls-gd-1.s bcc014751d82a34435b277d6d103e0d1 ld/testsuite/ld-cris/tls-gd-1h.d @@ -11242,7 +11251,7 @@ d127dfb9d3bee4b01447fd7973244ac2 ld/testsuite/ld-elf/audit.rd 5201888d2abb62612325556e633e001d ld/testsuite/ld-elf/begin.c 500602556f86e18553ceb755366463be ld/testsuite/ld-elf/beginwarn.c -85460716c55aaa5e25ab1c1fabc130ff ld/testsuite/ld-elf/binutils.exp +693bbfc86f4e46be621e066c1631cf84 ld/testsuite/ld-elf/binutils.exp a6aedd8bc02f2ef4f1bfe6294658eed1 ld/testsuite/ld-elf/comm-data.exp 01434a55e9ca8ed7b55a17320786e89f ld/testsuite/ld-elf/comm-data1.s 133b1110a91e3c50c6b9ebc5c8c79b23 ld/testsuite/ld-elf/comm-data1.sd @@ -11368,6 +11377,8 @@ 76a20654ee65488dea99f04f2245411f ld/testsuite/ld-elf/end.c 09ad7a4b25e4d3a09e491665034b9e42 ld/testsuite/ld-elf/endhidden.c cd3620335344d83a9021beb69e1c5148 ld/testsuite/ld-elf/endprotected.c +5a5437db9d8116969195d93371fbcf03 ld/testsuite/ld-elf/endsym.d +5850d2598e92b3ac03773a882a84503f ld/testsuite/ld-elf/endsym.s 59246f6884adfabbbe61ae1c97c9ec61 ld/testsuite/ld-elf/exclude.exp 1cd4e62a9fc5452a45960a19f3e1f006 ld/testsuite/ld-elf/exclude1.s 8226b1db9eb7e3f6257547fba8c4f6a2 ld/testsuite/ld-elf/exclude2.s @@ -11410,6 +11421,7 @@ 510c4d04dc923cad4559b6b75b818241 ld/testsuite/ld-elf/frame.exp 849fea883bafed1cbcbaebbe323e7783 ld/testsuite/ld-elf/frame.s f5eb79eb13454634e50e29bfcf9127c8 ld/testsuite/ld-elf/func1.c +40dadc4124e56bdb402d4fd07200b825 ld/testsuite/ld-elf/gap.s 72b96e4690e57ce362de641c1028ed12 ld/testsuite/ld-elf/global1.d 9da140bd70d86d27e1665f193f8a3160 ld/testsuite/ld-elf/group.ld fcb51a6220feca1189a38776f6277c75 ld/testsuite/ld-elf/group1.d @@ -12037,7 +12049,7 @@ 85ab28f4724252ded44ac75dd341709b ld/testsuite/ld-gc/pr13683.c 39bac8ae2e2abb7baee8cc9bb30ac665 ld/testsuite/ld-gc/pr13683.d 9139ce012dcbe5d5908e89f783dbff85 ld/testsuite/ld-gc/pr14265.c -f7f5702fdd2a60cb63ef7f5ad9f41fa7 ld/testsuite/ld-gc/pr14265.d +e5275a2831b009ec4705c5a6dc94c4d1 ld/testsuite/ld-gc/pr14265.d 3a1aada6f56ecb4a74368dc5c5cb2c40 ld/testsuite/ld-gc/pr14265.t eb2a45ee4817c95552d969d128e983d4 ld/testsuite/ld-gc/start.d d4b6668928d4109f8367ed06994cd9bd ld/testsuite/ld-gc/start.s @@ -13112,9 +13124,9 @@ 538c648f35ef9b9744f3451d4b634614 ld/testsuite/ld-mmix/b-widec3.s 22bc37ab999f7c1e75d4d1fb96fef20c ld/testsuite/ld-mmix/bpo-1.d 727b1769bece675574da8a7fe3fd7c78 ld/testsuite/ld-mmix/bpo-1.s -4d4ef80f24e61c0ccec171ab2813138c ld/testsuite/ld-mmix/bpo-10.d +499800fc4017f59d092891232d8aa0e5 ld/testsuite/ld-mmix/bpo-10.d 7806bfb4f80d0b995147abaef5043324 ld/testsuite/ld-mmix/bpo-10.s -09f2645a6a23da60dbdd7e987ff57441 ld/testsuite/ld-mmix/bpo-11.d +39a159636696f4b6695fc4322bb7746b ld/testsuite/ld-mmix/bpo-11.d 6ffe6aa6c222b341fd60298d70f6c096 ld/testsuite/ld-mmix/bpo-11.s 77b4f4eb49346620239ae760d080a897 ld/testsuite/ld-mmix/bpo-12.d 8de7a3ef3b7bd942d63c83ee837ab9ef ld/testsuite/ld-mmix/bpo-12m.d @@ -13864,9 +13876,9 @@ 009520053b00386d1173f3988c55d192 ld/testsuite/ld-powerpc/aix-weak-3b.ex e9279b52fb9ad49703e8c667bc97c2f6 ld/testsuite/ld-powerpc/aix-weak-3b.s 9850a1784b25a8eba7ffb4ecc9cdaadd ld/testsuite/ld-powerpc/aix52.exp -3bc29cac594ddbfdaa7170dc4a922ede ld/testsuite/ld-powerpc/ambiguousv1.d -3b62fbebaff60fb47a703cb2784490b5 ld/testsuite/ld-powerpc/ambiguousv1b.d -2f7fea50ef07575d377c25f8ad0b9b53 ld/testsuite/ld-powerpc/ambiguousv2.d +4a7c775698c74b99b8aa8829e7728049 ld/testsuite/ld-powerpc/ambiguousv1.d +305c4bf80925fba57af0f8a6b532345d ld/testsuite/ld-powerpc/ambiguousv1b.d +d8bc241f81db00fa916318e42bfa0df0 ld/testsuite/ld-powerpc/ambiguousv2.d 63522d774f9563836e07f7478cb0f5a5 ld/testsuite/ld-powerpc/ambiguousv2b.d 03bcf97f77d5ceabf183e111263b7391 ld/testsuite/ld-powerpc/apuinfo-nul.rd 519a83f6661f4e92b4f1cd2404e97f90 ld/testsuite/ld-powerpc/apuinfo-nul.s @@ -13910,15 +13922,15 @@ 7c19ff4820069ee6b10040038b621ead ld/testsuite/ld-powerpc/attr-gnu-8-23.d 786fb2f305ce54b247bea7cdfc29b5a9 ld/testsuite/ld-powerpc/attr-gnu-8-3.s 39d9306ef744cdecdf7376c38241d3fc ld/testsuite/ld-powerpc/attr-gnu-8-31.d -174005f0769a4c228b9ec49acb21a9a1 ld/testsuite/ld-powerpc/defsym.d +73d0aa7e54f47e31d21d5d8c1eaa5a98 ld/testsuite/ld-powerpc/defsym.d 7620104bad7a2b27971dbddb20280fcf ld/testsuite/ld-powerpc/defsym.s 2985dc5bc10e239b1d354bc6eb64f9dc ld/testsuite/ld-powerpc/elfv2-2a.s a3596c323322bd3283429e841d5a5656 ld/testsuite/ld-powerpc/elfv2-2b.s -ef4fdfe10930e009b53494b7157dc610 ld/testsuite/ld-powerpc/elfv2-2exe.d +bd20b0957a12fe7e37821ca8dea8f03e ld/testsuite/ld-powerpc/elfv2-2exe.d 337fa91698ae9d363f11931f83d90034 ld/testsuite/ld-powerpc/elfv2-2so.d db6a0be88e02c47b094433d9c02c16b2 ld/testsuite/ld-powerpc/elfv2.s -9250ea8887590eb13017d4f8865031a0 ld/testsuite/ld-powerpc/elfv2exe.d -3d30aec925d5effa2ca72193ea602283 ld/testsuite/ld-powerpc/elfv2so.d +0e4cac244f13d1c68518b61233343b02 ld/testsuite/ld-powerpc/elfv2exe.d +fe2b7813c8831e16ae0c637d70cf6021 ld/testsuite/ld-powerpc/elfv2so.d e7994f836bd762495bc9a659680b35f6 ld/testsuite/ld-powerpc/export-class.exp 55978e55350e4b426a99e492e6b4e529 ld/testsuite/ld-powerpc/funref.s 54dcf37fab32cb0fcb42f6a1005f1576 ld/testsuite/ld-powerpc/funref2.s @@ -13931,14 +13943,23 @@ c3407f7dd750c46beeed846038ac2c4f ld/testsuite/ld-powerpc/powerpc-32-export-class.xd 61b50869f045e30c21cd3430d97b63c0 ld/testsuite/ld-powerpc/powerpc-64-export-class.rd c4fb672b12a30041fe72cdf7cc9c21b5 ld/testsuite/ld-powerpc/powerpc-64-export-class.xd -eeb4d4cfd594cf07ce73add3d1595da9 ld/testsuite/ld-powerpc/powerpc.exp +2faf52ac032b8dff01074b2a5cd891f5 ld/testsuite/ld-powerpc/powerpc.exp +314b6221726085da3a08e21232e5886c ld/testsuite/ld-powerpc/ppc476-shared.d +56f0d050f5f885874e6abb403123a22b ld/testsuite/ld-powerpc/ppc476-shared.lnk +900b658f364355886b9103a9e7144807 ld/testsuite/ld-powerpc/ppc476-shared.s +ac66b2d8a82fb5a8f43b6650c07036ff ld/testsuite/ld-powerpc/ppc476-shared2.d 28194ee58721b06c5d73c7cf30d23dec ld/testsuite/ld-powerpc/relax.d fb7e959e27d0729bfa5e91a3d4c082a7 ld/testsuite/ld-powerpc/relax.s 0c2c31ae50fa0723f0ed159e29f0997b ld/testsuite/ld-powerpc/relaxr.d -c504fd2ff9e89aa60973240cb8dd15e8 ld/testsuite/ld-powerpc/relbrlt.d +baf36b4a6d52fdeeb79e0185c8a72926 ld/testsuite/ld-powerpc/relbrlt.d fed89963c6094ee31776b29c918d6a24 ld/testsuite/ld-powerpc/relbrlt.s d0c078412690065f88a1d02ceafdeccf ld/testsuite/ld-powerpc/reloc.d 53652025c67e058e17ee2f5b68f62577 ld/testsuite/ld-powerpc/reloc.s +f01fc563af81f10013f3812b5cff93be ld/testsuite/ld-powerpc/sdabase.d +8b223da79eb460930bd0a52ea4b58012 ld/testsuite/ld-powerpc/sdabase.s +686d841b58d2bacec64ce0b5cccbd344 ld/testsuite/ld-powerpc/sdabase.t +ace5d622ab5a629ad8742ac8adf5e894 ld/testsuite/ld-powerpc/sdabase2.d +7378af5f8377e81f2ce8c781c9a60603 ld/testsuite/ld-powerpc/sdabase2.t f5f7024bb3113c629d9d74bbe9d48285 ld/testsuite/ld-powerpc/sdadyn.d b11b5807e7a6fa381d608f06a71e0bb1 ld/testsuite/ld-powerpc/sdadyn.s 4291ceef5a9a5101e6b9694d18484709 ld/testsuite/ld-powerpc/sdalib.s @@ -13948,25 +13969,29 @@ 495885b7a4b9c45d264ac690a0196b22 ld/testsuite/ld-powerpc/symtocbase-2.s 03614a46d8add983aa8f785c4a6b76aa ld/testsuite/ld-powerpc/symtocbase.d 414145436c32a2d209fed110fea15881 ld/testsuite/ld-powerpc/tls.d -8248f7d3da9f5cb966cefb0990b02dae ld/testsuite/ld-powerpc/tls.g +15ffeecea54fefafbda8610514bfc7cb ld/testsuite/ld-powerpc/tls.g 1a99df58863d1e91a47ba9f16ba5eba7 ld/testsuite/ld-powerpc/tls.s 872d4c40cb5b45f04a9788356522d599 ld/testsuite/ld-powerpc/tls.t -5c4dd51008c996d5cf4453f20b50d5ca ld/testsuite/ld-powerpc/tls32.d -6d51c8ef3b7a912879015772c368d93c ld/testsuite/ld-powerpc/tls32.g -bea8413d63541a8a7dbdc303790f9127 ld/testsuite/ld-powerpc/tls32.s -d263d076d8e38227367a0b7c6e0e9a2a ld/testsuite/ld-powerpc/tls32.t -57a8c268c5255cf366afd7aedae2bcd0 ld/testsuite/ld-powerpc/tlsexe.d -1aad9308da4d75b796a80c98f923e060 ld/testsuite/ld-powerpc/tlsexe.g -703a4b4db2df2d07578f91a3ccacf614 ld/testsuite/ld-powerpc/tlsexe.r +84d681031d7966ba52190536dc8af44b ld/testsuite/ld-powerpc/tls32.d +4f1d059fd6c74f43c5e8d81138f1c7a6 ld/testsuite/ld-powerpc/tls32.g +4be01f64e6bdc206797b1b4d8b492dbd ld/testsuite/ld-powerpc/tls32.s +cfef6d60f250fffb43490bf0c199daa1 ld/testsuite/ld-powerpc/tls32.t +4cd74f84e969a26a2f7f281a9a0c5ba2 ld/testsuite/ld-powerpc/tlsexe.d +f697b614fd60542d8357139b2e00023a ld/testsuite/ld-powerpc/tlsexe.g +6a6252a1d68fadb987e0859de93e8aa0 ld/testsuite/ld-powerpc/tlsexe.r 3135bb5b3b04514e4f0738ac83f92342 ld/testsuite/ld-powerpc/tlsexe.t -6c056fee1c0f3867ed0327b0087fc12a ld/testsuite/ld-powerpc/tlsexe32.d -4bce94f6598e069749aecee1e533112e ld/testsuite/ld-powerpc/tlsexe32.g -7229097dbbe6006d8d3174ef9e1f98fb ld/testsuite/ld-powerpc/tlsexe32.r +26449171d163fd9b6782d80ca74afeab ld/testsuite/ld-powerpc/tlsexe32.d +d1a7aec2fce265fd2576879611cc51d8 ld/testsuite/ld-powerpc/tlsexe32.g +b605ec4019fc8d921bfe86a437dd4e6c ld/testsuite/ld-powerpc/tlsexe32.r 5a3a440a24c3c65afd0970e207bb8622 ld/testsuite/ld-powerpc/tlsexe32.t -e72a92b9cbeadebcadbdf376fcf60f7f ld/testsuite/ld-powerpc/tlsexetoc.d -44af4f52f5d2645a49d89679e510deb7 ld/testsuite/ld-powerpc/tlsexetoc.g -a375761db8edf94dbd80381d5855afe2 ld/testsuite/ld-powerpc/tlsexetoc.r +9814e17adbefaf34de7c80d7165e2a55 ld/testsuite/ld-powerpc/tlsexetoc.d +6752837dbc5ec8e550d8888af02be761 ld/testsuite/ld-powerpc/tlsexetoc.g +3769030dc57176907669c9309052a6ca ld/testsuite/ld-powerpc/tlsexetoc.r 6dffc7e51939dd9dd64493f11173c060 ld/testsuite/ld-powerpc/tlsexetoc.t +fc0fd5691449a90da4732b9caf6526ef ld/testsuite/ld-powerpc/tlsld.d +4d051300e3ae6b8412a9ec3e4519f72b ld/testsuite/ld-powerpc/tlsld.s +7f0494c2e5bf12ca08fea43599072550 ld/testsuite/ld-powerpc/tlsld32.d +c81a2dcbb132f0163ca3cacc7066842f ld/testsuite/ld-powerpc/tlsld32.s 9a42b93947f1b17acefde9b84ece4632 ld/testsuite/ld-powerpc/tlslib.s a6dccb915f964db461b164a90787e0aa ld/testsuite/ld-powerpc/tlslib32.s 18a601b4c2a95381a06271728aec2dc6 ld/testsuite/ld-powerpc/tlsmark.d @@ -13989,35 +14014,40 @@ f3f4d3a1dd2ecf6f44b5bc3333d2d79f ld/testsuite/ld-powerpc/tlsopt4.s 823b9ecb42faee6c48324c601428c5b2 ld/testsuite/ld-powerpc/tlsopt4_32.d 9f34854a67102932713ec55fc2f3f3c6 ld/testsuite/ld-powerpc/tlsopt4_32.s -5066c41907116af4062f65a201351848 ld/testsuite/ld-powerpc/tlsso.d -bbff1da51b43f9d46bca6ef7dbd15ae1 ld/testsuite/ld-powerpc/tlsso.g -cedccb66aba3849f3f838dfb4bd1c894 ld/testsuite/ld-powerpc/tlsso.r +183bfe5972cb075419991eec73cb0d7b ld/testsuite/ld-powerpc/tlsso.d +05de0c8954b316f7c85a6729b51be605 ld/testsuite/ld-powerpc/tlsso.g +7fc5de25603098c7088bb4f295775403 ld/testsuite/ld-powerpc/tlsso.r 63d12f6691ec0a7fbafbffcc93d83c8e ld/testsuite/ld-powerpc/tlsso.t -9dd2d70979c27211e242b1cca257aacd ld/testsuite/ld-powerpc/tlsso32.d -3daa5d17b017344ff2c9f7d472111609 ld/testsuite/ld-powerpc/tlsso32.g -53af81ef021835dc54d959cf33f6e64c ld/testsuite/ld-powerpc/tlsso32.r +9a55c1f1b164b40252feed6da3e69ed3 ld/testsuite/ld-powerpc/tlsso32.d +87ec133144d478bcf14fada7ac571234 ld/testsuite/ld-powerpc/tlsso32.g +9b78e7b5749896480385b8f5f972aae6 ld/testsuite/ld-powerpc/tlsso32.r b33f85b9adcc3beb02ccd352c9763e79 ld/testsuite/ld-powerpc/tlsso32.t 51934d92f7fd363d3e169874cf6cf37a ld/testsuite/ld-powerpc/tlstoc.d -554153469c4c120df648de41a22c7c9c ld/testsuite/ld-powerpc/tlstoc.g +569425f4af3ac6456ea1d703da6827c4 ld/testsuite/ld-powerpc/tlstoc.g 506d39e221f83a89e8c3ffd20f259ffc ld/testsuite/ld-powerpc/tlstoc.s 64cedf5659fcc2f0dfe9108bee2a4b77 ld/testsuite/ld-powerpc/tlstoc.t -c4e039a478a3d096a6528bb5e5b8306b ld/testsuite/ld-powerpc/tlstocso.d -de3e3e1b195c299c16a238f5d9016ed6 ld/testsuite/ld-powerpc/tlstocso.g -38872733a45b646f51a4bf11be76bb73 ld/testsuite/ld-powerpc/tlstocso.r +e0baa3f3279efbb9bf0ce69ad3e2a386 ld/testsuite/ld-powerpc/tlstocso.d +cd815eba208eba78f8ae2c2d5ec6b4ef ld/testsuite/ld-powerpc/tlstocso.g +359198561810e10d3406e51e68b3676c ld/testsuite/ld-powerpc/tlstocso.r a352b6b7bbeb8ffbfa429512fa97f22d ld/testsuite/ld-powerpc/tlstocso.t -ce8998a8a28d23681fe5f0860cd786fa ld/testsuite/ld-powerpc/tocopt.d +376f24c1a1dfa79f420135b73a915660 ld/testsuite/ld-powerpc/tocopt.d 4a3a80e034c2d88eafbf1deb1bc71d0c ld/testsuite/ld-powerpc/tocopt.out 6bb54eb5b47043ad92883d4858f7def2 ld/testsuite/ld-powerpc/tocopt.s -a9ca7ed78bef88690fa64d2ce624038a ld/testsuite/ld-powerpc/tocopt2.d +956cf1391869b11b9cc7516a4f7eaa6a ld/testsuite/ld-powerpc/tocopt2.d 03ec73a6aa0f52943bef08d648f2cefb ld/testsuite/ld-powerpc/tocopt2.out b6ea6463608234d456d35f3cc9c372a9 ld/testsuite/ld-powerpc/tocopt2.s -a9ca7ed78bef88690fa64d2ce624038a ld/testsuite/ld-powerpc/tocopt3.d +956cf1391869b11b9cc7516a4f7eaa6a ld/testsuite/ld-powerpc/tocopt3.d 33e083640e64441f7c796d89634b81e7 ld/testsuite/ld-powerpc/tocopt3.s -db3659e340b5aaae0f0db2f4298ca9fb ld/testsuite/ld-powerpc/tocopt4.d +cd15134aa0392f4ee73c0920a0a99b2c ld/testsuite/ld-powerpc/tocopt4.d 702b412d8c6002e9efbe7b9760029306 ld/testsuite/ld-powerpc/tocopt4a.s a807e3ff17c2c9d22ae7d46cf7ccbb4c ld/testsuite/ld-powerpc/tocopt4b.s -07751b34b51bb5aa4c72ea0242f0bec2 ld/testsuite/ld-powerpc/tocopt5.d +e936017735891cb4212a605addbb6c71 ld/testsuite/ld-powerpc/tocopt5.d 7c769079034dfee8d28d7d7292311d4e ld/testsuite/ld-powerpc/tocopt5.s +2c04bba041a70224eaa4e79638369f2d ld/testsuite/ld-powerpc/tocopt6-inc.s +776429d51734331c1008d570e711e458 ld/testsuite/ld-powerpc/tocopt6.d +020a5a4c0a20934b4e4a0ea775438ec1 ld/testsuite/ld-powerpc/tocopt6a.s +8a3907b54b7542b96da00307c98aeade ld/testsuite/ld-powerpc/tocopt6b.s +9e1ecae14438200a18bbc6362b1a55a0 ld/testsuite/ld-powerpc/tocopt6c.s e0ff02a392580c8c35bb3d4b64f8554c ld/testsuite/ld-powerpc/vle-multiseg-1.d d175fb5ebf6d91d3b1a27c75d35025ed ld/testsuite/ld-powerpc/vle-multiseg-1.ld fb3e50bc7a668bb817a134558ea26236 ld/testsuite/ld-powerpc/vle-multiseg-2.d @@ -14045,9 +14075,9 @@ f8d51601748be06dce91b576f2d415f4 ld/testsuite/ld-powerpc/vle-reloc-def-2.s c864a6c392a10da127a35ae2de3edb82 ld/testsuite/ld-powerpc/vle-reloc-def-3.s f2c0304e95418abe595f014afbf12ec7 ld/testsuite/ld-powerpc/vle.ld -76428e986071608d5986d2a457b22713 ld/testsuite/ld-powerpc/vxworks-relax-2.rd +411cb7d65e2f46dd3fafadb7d9f3e1cb ld/testsuite/ld-powerpc/vxworks-relax-2.rd 756b1282ce6a23e3b07addc9a54392ab ld/testsuite/ld-powerpc/vxworks-relax-2.s -06c73eb78255fc30f392d92b99ae19af ld/testsuite/ld-powerpc/vxworks-relax.rd +43d02450bde6f1513ff0a3ad6c64d957 ld/testsuite/ld-powerpc/vxworks-relax.rd a5e5962ef075b6977f71f32a74dcbd72 ld/testsuite/ld-powerpc/vxworks-relax.s dabafb6400d1624b1bf5d0e7599ceb2c ld/testsuite/ld-powerpc/vxworks1-lib.dd acca061d87c83f585ea88472d89d554d ld/testsuite/ld-powerpc/vxworks1-lib.nd @@ -14209,8 +14239,8 @@ ee9133459395cc83547a90f71607a2e7 ld/testsuite/ld-scripts/map-address.t 38b10c0ac2168cabc2e2136b06641345 ld/testsuite/ld-scripts/memory.t 69f8c2a613c10d3d7240ba41dce31d86 ld/testsuite/ld-scripts/overlay-size-map.d -c13d85cd086921f0c99d9096753d5b59 ld/testsuite/ld-scripts/overlay-size.d -d7e3b9d81e31d30a907f8fd950a7bd09 ld/testsuite/ld-scripts/overlay-size.exp +88806b20417a8a82d7e89aacc608b673 ld/testsuite/ld-scripts/overlay-size.d +9596044ea3006504f9473bacccedb21f ld/testsuite/ld-scripts/overlay-size.exp 2b01a21989d86f594965069b9db1a687 ld/testsuite/ld-scripts/overlay-size.s a1290471124d9e2d415fc74221e8df87 ld/testsuite/ld-scripts/overlay-size.t 061aefcd4926102f0d2c68b23ae690be ld/testsuite/ld-scripts/phdrs.exp @@ -14239,7 +14269,14 @@ 0f2e46274037262a991b96738b30a16e ld/testsuite/ld-scripts/provide-3.d 252d36bfea703ce0d2506e236f2f3db3 ld/testsuite/ld-scripts/provide-3.s f78db69d068819fd77beecf6ee3b91b0 ld/testsuite/ld-scripts/provide-3.t -b0bc6dfeca1592e801f2c0edbfd8d50f ld/testsuite/ld-scripts/provide.exp +b721b66f9bf6491792d6334a2e749d07 ld/testsuite/ld-scripts/provide-4-map.d +f2269ff7bc464bf731b937a86311ba74 ld/testsuite/ld-scripts/provide-4.d +f4bcde661b167dbde67a5266f068c92a ld/testsuite/ld-scripts/provide-4.t +1fc986ffafb2d9b155f920463651b105 ld/testsuite/ld-scripts/provide-5-map.d +dbd77f269302a76458ee6f6c4b8874da ld/testsuite/ld-scripts/provide-5.d +44cadf28dda3efe0161cba93ff576fdd ld/testsuite/ld-scripts/provide-5.s +c653dfb611f0da6f1652769a62e5bdb5 ld/testsuite/ld-scripts/provide-5.t +3783780edca7467026b27906705af0b2 ld/testsuite/ld-scripts/provide.exp e045c39e3370cceacca80e4fcbd730e6 ld/testsuite/ld-scripts/region-alias-1.d fb6c05c867db1b969daca1d830f3bb17 ld/testsuite/ld-scripts/region-alias-1.t 05422347ebfb3de87aeb5aed35c47e54 ld/testsuite/ld-scripts/region-alias-2.d @@ -14503,8 +14540,8 @@ a2dffd9f6049f25cbf6c6daf57da3672 ld/testsuite/ld-sh/sh64/relax4.s 428b3202ce30a114bbb92ece7d8fcc86 ld/testsuite/ld-sh/sh64/reldl-1.s 861e2f1ff73cc48552826aa5b007ccf8 ld/testsuite/ld-sh/sh64/reldl-2.s -7bbce83842ce15d9355f8134c959aaa7 ld/testsuite/ld-sh/sh64/reldl32.rd -991f96b93383296bd226439a5a17f01a ld/testsuite/ld-sh/sh64/reldl64.rd +951d571bf11c6788e087d38a81e11b65 ld/testsuite/ld-sh/sh64/reldl32.rd +66a1e2b7dfcfc4a97b78f78766c54252 ld/testsuite/ld-sh/sh64/reldl64.rd eb41ebcd5a0459e825565ebea554ff6a ld/testsuite/ld-sh/sh64/relfail.exp dcb15c3eaafdd677a4bed69b52d8fd20 ld/testsuite/ld-sh/sh64/relfail.s 4a9f958e1de298410352eacfc2790042 ld/testsuite/ld-sh/sh64/sh64-1.s @@ -15292,10 +15329,11 @@ a182f4611991e7559caae36341990f5d ld/testsuite/ld-x86-64/pr14215.s cbedb64b466bbcc30a560dfddeae1c23 ld/testsuite/ld-x86-64/pr17306a.s 6f0eb272f77f105dd7bb87f5211a2b59 ld/testsuite/ld-x86-64/pr17306b.s -32c0be4fb7f3030bf9c74c0a836d4f2e ld/testsuite/ld-x86-64/pr17689.out +4e9f0f9a3df7bdda5881395173098d20 ld/testsuite/ld-x86-64/pr17689.out 19c47284cb7c4f1f4d01b12e2c93d348 ld/testsuite/ld-x86-64/pr17689.rd 1b0d3fd7245e74be4b1922a898497a48 ld/testsuite/ld-x86-64/pr17689a.c -6080a81066bb6d3cd22e995d4b772144 ld/testsuite/ld-x86-64/pr17689b.S +951949f01bf9f686730ec329d1bb47c8 ld/testsuite/ld-x86-64/pr17689b.S +327fdd83e3fd979c0307677a0bb2148f ld/testsuite/ld-x86-64/pr17827.rd 5a16c8b33f7fc14a778a75390211d675 ld/testsuite/ld-x86-64/protected1.d 72464b10c9ddf08d601e6e1981160a76 ld/testsuite/ld-x86-64/protected1.s 799b5e6cfeb966e6f8ab5e471149673f ld/testsuite/ld-x86-64/protected2-k1om.d @@ -15393,7 +15431,7 @@ c784c72aed13e9bd4e0d0df3e07f36d1 ld/testsuite/ld-x86-64/x86-64-64-export-class.rd e928d6484bf8b938f70b05730fc41ec8 ld/testsuite/ld-x86-64/x86-64-x32-export-class.rd 6c5efb94140f6bea6d1e05ddd22d9ce3 ld/testsuite/ld-x86-64/x86-64-x32.rd -3489db58671632a679af6e3502622ab5 ld/testsuite/ld-x86-64/x86-64.exp +62066cb531ce5cbdd34d5fccb6b9d14d ld/testsuite/ld-x86-64/x86-64.exp 6f577583952be3de543260d5fb8bbb16 ld/testsuite/ld-xc16x/absrel.d 3998ca79d045f299d12bbd0cf1e6205f ld/testsuite/ld-xc16x/absrel.s 01a0b5ff12180f56fd3e59aca1729442 ld/testsuite/ld-xc16x/offset.d @@ -15430,7 +15468,7 @@ 4708405ca88b87cf00e84d231c449689 ld/testsuite/ld-xtensa/tlspic1.s 74dc12cdbe5ac4b2c634e5dc8b770127 ld/testsuite/ld-xtensa/tlspic2.s 619713df108d17cb874abb13fd5ac43a ld/testsuite/ld-xtensa/xtensa.exp -f7781177271ebd48a37466b9c99cb9d7 ld/testsuite/lib/ld-lib.exp +833e67f5540afdd6f0a0f2e65b27aea6 ld/testsuite/lib/ld-lib.exp 01627b664c7e61ab5dc202bb72913e0a ld/TODO 99c2e5e712b990ee07be10f53e41f3fb libiberty/.gitignore a23c6974fb1adf6977b5f5454c430bf0 libiberty/_doprnt.c @@ -15601,17 +15639,17 @@ 766574f467c38d27fc7604ca8eb6734c mkinstalldirs f1fff2ea196cbf6fe4634bc3edc5af4d move-if-change ef6602b963f2a903ab9c81134c6b8d29 opcodes/.gitignore -cd440190ed780c9a4f67d8b9acf57a4c opcodes/aarch64-asm-2.c +353495e07bad00c54cc54eeb142d9147 opcodes/aarch64-asm-2.c e08ebb81e8db55b7b5266a0e21bdd974 opcodes/aarch64-asm.c 26c8875d9ebaaef9e21fb2f0c414ddab opcodes/aarch64-asm.h -4c6822262c85e2dd1bd57c72f0765aa1 opcodes/aarch64-dis-2.c +1b5d2f247ad07553384c6fb2845bcdad opcodes/aarch64-dis-2.c d16de4cb75244d8dd0c8876a36fa42a3 opcodes/aarch64-dis.c 37685174001f43f1813eb87ba7f6bf9f opcodes/aarch64-dis.h 10ae25203b34f3208f2402eb4febf9d9 opcodes/aarch64-gen.c -a24bb7b69c4727e05208dba37b53853b opcodes/aarch64-opc-2.c -4236342718dc47229d88d03336831c1b opcodes/aarch64-opc.c +7d98615bf9dcad414917b4f7cb78f3d9 opcodes/aarch64-opc-2.c +2da67580f8bf947a1b2a949ca522d885 opcodes/aarch64-opc.c 9ae3e987e23312d3a0085bb75cbfcae4 opcodes/aarch64-opc.h -c8a49db537d75177e4725f0e69b5bf6b opcodes/aarch64-tbl.h +db5b6781f9d1876222738ce0e33fdca0 opcodes/aarch64-tbl.h 8a252acfc473d85effd618c461d2156e opcodes/aclocal.m4 c273c316008b271ac58bb830fe889e87 opcodes/alpha-dis.c cd81de5f70742a118ced64084b6d0a09 opcodes/alpha-opc.c @@ -15620,7 +15658,7 @@ 2a6cfec0dfd3fd13f133ff7d1aaee4b8 opcodes/arc-ext.c 8d0c9ef29f256605b405157926db4203 opcodes/arc-ext.h f27f308ec867fe5c4347d61a7b98fe43 opcodes/arc-opc.c -5ac2a2e77339ce73245f2aa9e8c105b4 opcodes/arm-dis.c +da4a1d1e01adfa0e69e208143d3de2de opcodes/arm-dis.c e4ebaeecc94ea524660490efdfb79328 opcodes/avr-dis.c 2d2761b3e840403ac5f0217745b2c67c opcodes/bfin-dis.c d43e386f57856360b0b0551f069c72aa opcodes/cgen-asm.c @@ -15631,7 +15669,7 @@ c492a0bc0a71b11bb83603e06db82ff7 opcodes/cgen-ibld.in 2a7eebcf7247ef7e7b0a67d7d7d110f9 opcodes/cgen-opc.c 453b6d0b433dfbb4d1f294ddac3f38e5 opcodes/cgen.sh -e096a07df5b7908d37136b86d587f8a8 opcodes/ChangeLog +e9f263de1d1957f29195461c74c1706b opcodes/ChangeLog 58e924c52c2bfeef23d22c4f482edcfc opcodes/ChangeLog-0001 7d7d28737ff404f709104accbd7b7926 opcodes/ChangeLog-0203 1718b45c678a851d089ec7c4edaa9906 opcodes/ChangeLog-2004 @@ -15647,7 +15685,7 @@ 2adb7cb7865ac91208f5f94fc4d9f397 opcodes/ChangeLog-9297 b192ee206cc807dd92ffe541cb819d6f opcodes/ChangeLog-9899 82f85f5946700d6818256ee0b9c5ecc9 opcodes/config.in -4f933e6c081bfa1190fe273ebfa8c534 opcodes/configure +3f5d29b63ed663ef0b7f01e9732bd2c1 opcodes/configure 798123844d9c08a4423867997ffbddc5 opcodes/configure.ac 1b35ab31e8672ede7e4b76a2df3f9003 opcodes/configure.com 11532df0bfab90f1bb29f05d40dfca00 opcodes/cr16-dis.c @@ -15859,8 +15897,8 @@ c9cccef32687be7638d956b71f9f56e0 opcodes/po/vi.po 6e7ae21e20fe177fba4c9c7fe8afa55a opcodes/po/zh_CN.gmo 0928658424d3439f5dcaa21464ac43b6 opcodes/po/zh_CN.po -40fbaebec4d48c143981efa7cdb1fce0 opcodes/ppc-dis.c -1d606313e16794f69449ca2f0c6bda4a opcodes/ppc-opc.c +0dd4430a808520e225c79705dd5740bb opcodes/ppc-dis.c +8917e7d3850a6e063299dcc87ce7e814 opcodes/ppc-opc.c 92e43eb4aee5b3195f0c4a0f98e90415 opcodes/rl78-decode.c e39ce8c9adea284d14e7bb1501e83779 opcodes/rl78-decode.opc 3b3c870edd30ec8dbde6526f261a36a7 opcodes/rl78-dis.c diff -ruN binutils-2.25/opcodes/ChangeLog binutils-2.25.1/opcodes/ChangeLog --- binutils-2.25/opcodes/ChangeLog 2014-12-23 15:22:07.000000000 +0100 +++ binutils-2.25.1/opcodes/ChangeLog 2015-07-21 15:42:57.000000000 +0200 @@ -1,3 +1,99 @@ +2015-07-21 Tristan Gingold + + * configure: Regenerate. + +2015-07-10 Alan Modra + + Apply from master + 2015-07-03 Alan Modra + * ppc-opc.c (PPC750, PPC7450, PPC860): Define using PPC_OPCODE_*. + * ppc-dis.c (ppc_opts): Add 821, 850 and 860 entries. Add + PPC_OPCODE_7450 to 7450 entry. Add PPC_OPCODE_750 to 750cl entry. + + 2015-06-22 Peter Bergner + * ppc-opc.c (insert_ls): Test for invalid LS operands. + (insert_esync): New function. + (LS, WC): Use insert_ls. + (ESYNC): Use insert_esync. + + 2015-06-19 Peter Bergner + * ppc-dis.h (skip_optional_operands): Use ppc_optional_operand_value. + * ppc-opc.c (FXM4): Add non-zero optional value. + (TBR): Likewise. + (SXL): Likewise. + (insert_fxm): Handle new default operand value. + (extract_fxm): Likewise. + (insert_tbr): Likewise. + (extract_tbr): Likewise. + + 2015-06-12 Peter Bergner + * ppc-opc.c: Add comment accidentally removed by old commit. + (MTMSRD_L): Delete. + + 2015-06-04 Peter Bergner + * ppc-opc.c: (powerpc_opcodes) : New extended mnemonic. + + 2015-03-25 Anton Blanchard + * ppc-dis.c (disassemble_init_powerpc): Only initialise + powerpc_opcd_indices and vle_opcd_indices once. + + 2015-03-25 Anton Blanchard + * ppc-opc.c (powerpc_opcodes): Add slbfee. + +2015-06-16 Matthew Wahab + + Applied from master + 2015-06-16 Matthew Wahab + + * aarch64-opc.c (aarch64_sys_regs): Add "id_mmfr4_el1". + +2015-05-14 Peter Bergner + + Applied from master. + 2015-05-14 Peter Bergner + + * ppc-opc.c (IH) New define. + (powerpc_opcodes) : Do not enable for POWER7. + : Add RS operand for POWER7. + : Add IH operand for POWER6. + +2015-05-07 Renlin Li + + Applied from master. + 2015-03-10 Renlin Li + + * aarch64-tbl.h (aarch64_opcode_table): Remove strub, ldurb, ldursb, + stur, ldur, sturh, ldurh, ldursh, ldursw, prfum F_HAS_ALIAS flag and + related alias. + * aarch64-asm-2.c: Regenerate. + * aarch64-dis-2.c: Likewise. + * aarch64-opc-2.c: Likewise. + +2015-04-28 Peter Bergner + + Applied from master. + 2015-04-27 Peter Bergner + + * ppc-opc.c (DCBT_EO): New define. + (powerpc_opcodes) : Enable for POWER8 and later. + : Likewise. + : Likewise. + : Likewise. + : Do not enable for POWER7 and later. + : Likewise. + : Default to the two operand form of the instruction for all + "old" cpus. For "new" cpus, use the operand ordering that matches + whether the cpu is server or embedded. + : Likewise. + +2015-03-11 Jiong Wang + + * arm-dis.c (arm_symbol_is_valid): Skip ARM private symbols. + +2014-12-23 Tristan Gingold + + * configure: Regenerate. + 2014-12-23 Tristan Gingold * configure: Regenerate. diff -ruN binutils-2.25/opcodes/aarch64-asm-2.c binutils-2.25.1/opcodes/aarch64-asm-2.c --- binutils-2.25/opcodes/aarch64-asm-2.c 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/opcodes/aarch64-asm-2.c 2015-07-21 10:20:58.000000000 +0200 @@ -155,224 +155,188 @@ case 595: /* ror */ value = 594; /* --> extr. */ break; - case 695: /* strb */ - value = 693; /* --> sturb. */ + case 746: /* bic */ + value = 745; /* --> and. */ break; - case 696: /* ldrb */ - value = 694; /* --> ldurb. */ + case 748: /* mov */ + value = 747; /* --> orr. */ break; - case 698: /* ldrsb */ - value = 697; /* --> ldursb. */ + case 751: /* tst */ + value = 750; /* --> ands. */ break; - case 701: /* str */ - value = 699; /* --> stur. */ + case 756: /* uxtw */ + case 755: /* mov */ + value = 754; /* --> orr. */ break; - case 702: /* ldr */ - value = 700; /* --> ldur. */ + case 758: /* mvn */ + value = 757; /* --> orn. */ break; - case 705: /* strh */ - value = 703; /* --> sturh. */ + case 762: /* tst */ + value = 761; /* --> ands. */ break; - case 706: /* ldrh */ - value = 704; /* --> ldurh. */ + case 888: /* staddb */ + value = 792; /* --> ldaddb. */ break; - case 708: /* ldrsh */ - value = 707; /* --> ldursh. */ + case 889: /* staddh */ + value = 793; /* --> ldaddh. */ break; - case 711: /* str */ - value = 709; /* --> stur. */ + case 890: /* stadd */ + value = 794; /* --> ldadd. */ break; - case 712: /* ldr */ - value = 710; /* --> ldur. */ + case 891: /* staddlb */ + value = 796; /* --> ldaddlb. */ break; - case 714: /* ldrsw */ - value = 713; /* --> ldursw. */ + case 892: /* staddlh */ + value = 799; /* --> ldaddlh. */ break; - case 716: /* prfm */ - value = 715; /* --> prfum. */ + case 893: /* staddl */ + value = 802; /* --> ldaddl. */ break; - case 758: /* bic */ - value = 757; /* --> and. */ + case 894: /* stclrb */ + value = 804; /* --> ldclrb. */ break; - case 760: /* mov */ - value = 759; /* --> orr. */ + case 895: /* stclrh */ + value = 805; /* --> ldclrh. */ break; - case 763: /* tst */ - value = 762; /* --> ands. */ + case 896: /* stclr */ + value = 806; /* --> ldclr. */ break; - case 768: /* uxtw */ - case 767: /* mov */ - value = 766; /* --> orr. */ + case 897: /* stclrlb */ + value = 808; /* --> ldclrlb. */ break; - case 770: /* mvn */ - value = 769; /* --> orn. */ + case 898: /* stclrlh */ + value = 811; /* --> ldclrlh. */ break; - case 774: /* tst */ - value = 773; /* --> ands. */ + case 899: /* stclrl */ + value = 814; /* --> ldclrl. */ break; - case 900: /* staddb */ - value = 804; /* --> ldaddb. */ + case 900: /* steorb */ + value = 816; /* --> ldeorb. */ break; - case 901: /* staddh */ - value = 805; /* --> ldaddh. */ + case 901: /* steorh */ + value = 817; /* --> ldeorh. */ break; - case 902: /* stadd */ - value = 806; /* --> ldadd. */ + case 902: /* steor */ + value = 818; /* --> ldeor. */ break; - case 903: /* staddlb */ - value = 808; /* --> ldaddlb. */ + case 903: /* steorlb */ + value = 820; /* --> ldeorlb. */ break; - case 904: /* staddlh */ - value = 811; /* --> ldaddlh. */ + case 904: /* steorlh */ + value = 823; /* --> ldeorlh. */ break; - case 905: /* staddl */ - value = 814; /* --> ldaddl. */ + case 905: /* steorl */ + value = 826; /* --> ldeorl. */ break; - case 906: /* stclrb */ - value = 816; /* --> ldclrb. */ + case 906: /* stsetb */ + value = 828; /* --> ldsetb. */ break; - case 907: /* stclrh */ - value = 817; /* --> ldclrh. */ + case 907: /* stseth */ + value = 829; /* --> ldseth. */ break; - case 908: /* stclr */ - value = 818; /* --> ldclr. */ + case 908: /* stset */ + value = 830; /* --> ldset. */ break; - case 909: /* stclrlb */ - value = 820; /* --> ldclrlb. */ + case 909: /* stsetlb */ + value = 832; /* --> ldsetlb. */ break; - case 910: /* stclrlh */ - value = 823; /* --> ldclrlh. */ + case 910: /* stsetlh */ + value = 835; /* --> ldsetlh. */ break; - case 911: /* stclrl */ - value = 826; /* --> ldclrl. */ + case 911: /* stsetl */ + value = 838; /* --> ldsetl. */ break; - case 912: /* steorb */ - value = 828; /* --> ldeorb. */ + case 912: /* stsmaxb */ + value = 840; /* --> ldsmaxb. */ break; - case 913: /* steorh */ - value = 829; /* --> ldeorh. */ + case 913: /* stsmaxh */ + value = 841; /* --> ldsmaxh. */ break; - case 914: /* steor */ - value = 830; /* --> ldeor. */ + case 914: /* stsmax */ + value = 842; /* --> ldsmax. */ break; - case 915: /* steorlb */ - value = 832; /* --> ldeorlb. */ + case 915: /* stsmaxlb */ + value = 844; /* --> ldsmaxlb. */ break; - case 916: /* steorlh */ - value = 835; /* --> ldeorlh. */ + case 916: /* stsmaxlh */ + value = 847; /* --> ldsmaxlh. */ break; - case 917: /* steorl */ - value = 838; /* --> ldeorl. */ + case 917: /* stsmaxl */ + value = 850; /* --> ldsmaxl. */ break; - case 918: /* stsetb */ - value = 840; /* --> ldsetb. */ + case 918: /* stsminb */ + value = 852; /* --> ldsminb. */ break; - case 919: /* stseth */ - value = 841; /* --> ldseth. */ + case 919: /* stsminh */ + value = 853; /* --> ldsminh. */ break; - case 920: /* stset */ - value = 842; /* --> ldset. */ + case 920: /* stsmin */ + value = 854; /* --> ldsmin. */ break; - case 921: /* stsetlb */ - value = 844; /* --> ldsetlb. */ + case 921: /* stsminlb */ + value = 856; /* --> ldsminlb. */ break; - case 922: /* stsetlh */ - value = 847; /* --> ldsetlh. */ + case 922: /* stsminlh */ + value = 859; /* --> ldsminlh. */ break; - case 923: /* stsetl */ - value = 850; /* --> ldsetl. */ + case 923: /* stsminl */ + value = 862; /* --> ldsminl. */ break; - case 924: /* stsmaxb */ - value = 852; /* --> ldsmaxb. */ + case 924: /* stumaxb */ + value = 864; /* --> ldumaxb. */ break; - case 925: /* stsmaxh */ - value = 853; /* --> ldsmaxh. */ + case 925: /* stumaxh */ + value = 865; /* --> ldumaxh. */ break; - case 926: /* stsmax */ - value = 854; /* --> ldsmax. */ + case 926: /* stumax */ + value = 866; /* --> ldumax. */ break; - case 927: /* stsmaxlb */ - value = 856; /* --> ldsmaxlb. */ + case 927: /* stumaxlb */ + value = 868; /* --> ldumaxlb. */ break; - case 928: /* stsmaxlh */ - value = 859; /* --> ldsmaxlh. */ + case 928: /* stumaxlh */ + value = 871; /* --> ldumaxlh. */ break; - case 929: /* stsmaxl */ - value = 862; /* --> ldsmaxl. */ + case 929: /* stumaxl */ + value = 874; /* --> ldumaxl. */ break; - case 930: /* stsminb */ - value = 864; /* --> ldsminb. */ + case 930: /* stuminb */ + value = 876; /* --> lduminb. */ break; - case 931: /* stsminh */ - value = 865; /* --> ldsminh. */ + case 931: /* stuminh */ + value = 877; /* --> lduminh. */ break; - case 932: /* stsmin */ - value = 866; /* --> ldsmin. */ + case 932: /* stumin */ + value = 878; /* --> ldumin. */ break; - case 933: /* stsminlb */ - value = 868; /* --> ldsminlb. */ + case 933: /* stuminlb */ + value = 880; /* --> lduminlb. */ break; - case 934: /* stsminlh */ - value = 871; /* --> ldsminlh. */ + case 934: /* stuminlh */ + value = 883; /* --> lduminlh. */ break; - case 935: /* stsminl */ - value = 874; /* --> ldsminl. */ + case 935: /* stuminl */ + value = 886; /* --> lduminl. */ break; - case 936: /* stumaxb */ - value = 876; /* --> ldumaxb. */ + case 937: /* mov */ + value = 936; /* --> movn. */ break; - case 937: /* stumaxh */ - value = 877; /* --> ldumaxh. */ + case 939: /* mov */ + value = 938; /* --> movz. */ break; - case 938: /* stumax */ - value = 878; /* --> ldumax. */ + case 950: /* sevl */ + case 949: /* sev */ + case 948: /* wfi */ + case 947: /* wfe */ + case 946: /* yield */ + case 945: /* nop */ + value = 944; /* --> hint. */ break; - case 939: /* stumaxlb */ - value = 880; /* --> ldumaxlb. */ - break; - case 940: /* stumaxlh */ - value = 883; /* --> ldumaxlh. */ - break; - case 941: /* stumaxl */ - value = 886; /* --> ldumaxl. */ - break; - case 942: /* stuminb */ - value = 888; /* --> lduminb. */ - break; - case 943: /* stuminh */ - value = 889; /* --> lduminh. */ - break; - case 944: /* stumin */ - value = 890; /* --> ldumin. */ - break; - case 945: /* stuminlb */ - value = 892; /* --> lduminlb. */ - break; - case 946: /* stuminlh */ - value = 895; /* --> lduminlh. */ - break; - case 947: /* stuminl */ - value = 898; /* --> lduminl. */ - break; - case 949: /* mov */ - value = 948; /* --> movn. */ - break; - case 951: /* mov */ - value = 950; /* --> movz. */ - break; - case 962: /* sevl */ - case 961: /* sev */ - case 960: /* wfi */ - case 959: /* wfe */ - case 958: /* yield */ - case 957: /* nop */ - value = 956; /* --> hint. */ - break; - case 971: /* tlbi */ - case 970: /* ic */ - case 969: /* dc */ - case 968: /* at */ - value = 967; /* --> sys. */ + case 959: /* tlbi */ + case 958: /* ic */ + case 957: /* dc */ + case 956: /* at */ + value = 955; /* --> sys. */ break; default: return NULL; } diff -ruN binutils-2.25/opcodes/aarch64-dis-2.c binutils-2.25.1/opcodes/aarch64-dis-2.c --- binutils-2.25/opcodes/aarch64-dis-2.c 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/opcodes/aarch64-dis-2.c 2015-07-21 10:20:58.000000000 +0200 @@ -40,7 +40,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxxx0000xxx0 adr. */ - return 953; + return 941; } else { @@ -48,7 +48,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxxx0000xxx1 adrp. */ - return 954; + return 942; } } else @@ -115,7 +115,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx000x0010000 stxrb. */ - return 717; + return 705; } else { @@ -123,7 +123,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx000x0010010 stxrh. */ - return 723; + return 711; } } else @@ -132,7 +132,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx000x00100x1 stxr. */ - return 729; + return 717; } } else @@ -143,7 +143,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx100x00100x0 casp. */ - return 788; + return 776; } else { @@ -151,7 +151,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx100x00100x1 stxp. */ - return 731; + return 719; } } } @@ -167,7 +167,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx000x0010000 stlxrb. */ - return 718; + return 706; } else { @@ -175,7 +175,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx000x0010010 stlxrh. */ - return 724; + return 712; } } else @@ -184,7 +184,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx000x00100x1 stlxr. */ - return 730; + return 718; } } else @@ -195,7 +195,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx100x00100x0 caspl. */ - return 790; + return 778; } else { @@ -203,7 +203,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx100x00100x1 stlxp. */ - return 732; + return 720; } } } @@ -214,7 +214,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx00x00101xx stnp. */ - return 739; + return 727; } } else @@ -231,7 +231,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxxx01x0010000 casb. */ - return 776; + return 764; } else { @@ -239,7 +239,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxxx01x0010010 cash. */ - return 777; + return 765; } } else @@ -248,7 +248,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxxx01x00100x1 cas. */ - return 778; + return 766; } } else @@ -263,7 +263,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx001x0010000 stlrb. */ - return 721; + return 709; } else { @@ -271,7 +271,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx001x0010010 stlrh. */ - return 727; + return 715; } } else @@ -280,7 +280,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx001x00100x1 stlr. */ - return 737; + return 725; } } else @@ -293,7 +293,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx101x0010000 caslb. */ - return 780; + return 768; } else { @@ -301,7 +301,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx101x0010010 caslh. */ - return 783; + return 771; } } else @@ -310,7 +310,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx101x00100x1 casl. */ - return 786; + return 774; } } } @@ -321,7 +321,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx01x00101xx stp. */ - return 748; + return 736; } } } @@ -343,7 +343,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx010x0010000 ldxrb. */ - return 719; + return 707; } else { @@ -351,7 +351,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx010x0010010 ldxrh. */ - return 725; + return 713; } } else @@ -360,7 +360,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx010x00100x1 ldxr. */ - return 733; + return 721; } } else @@ -371,7 +371,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx110x00100x0 caspa. */ - return 789; + return 777; } else { @@ -379,7 +379,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxx110x00100x1 ldxp. */ - return 735; + return 723; } } } @@ -395,7 +395,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx010x0010000 ldaxrb. */ - return 720; + return 708; } else { @@ -403,7 +403,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx010x0010010 ldaxrh. */ - return 726; + return 714; } } else @@ -412,7 +412,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx010x00100x1 ldaxr. */ - return 734; + return 722; } } else @@ -423,7 +423,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx110x00100x0 caspal. */ - return 791; + return 779; } else { @@ -431,7 +431,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx110x00100x1 ldaxp. */ - return 736; + return 724; } } } @@ -444,7 +444,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx10x001010x ldnp. */ - return 740; + return 728; } else { @@ -452,7 +452,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx10x001011x ldpsw. */ - return 747; + return 735; } } } @@ -470,7 +470,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxxx11x0010000 casab. */ - return 779; + return 767; } else { @@ -478,7 +478,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxxx11x0010010 casah. */ - return 782; + return 770; } } else @@ -487,7 +487,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx0xxxxxx11x00100x1 casa. */ - return 785; + return 773; } } else @@ -502,7 +502,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx011x0010000 ldarb. */ - return 722; + return 710; } else { @@ -510,7 +510,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx011x0010010 ldarh. */ - return 728; + return 716; } } else @@ -519,7 +519,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx011x00100x1 ldar. */ - return 738; + return 726; } } else @@ -532,7 +532,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx111x0010000 casalb. */ - return 781; + return 769; } else { @@ -540,7 +540,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx111x0010010 casalh. */ - return 784; + return 772; } } else @@ -549,7 +549,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxx1xxxxx111x00100x1 casal. */ - return 787; + return 775; } } } @@ -562,7 +562,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx11x001010x ldp. */ - return 749; + return 737; } else { @@ -570,7 +570,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx11x001011x ldpsw. */ - return 752; + return 740; } } } @@ -588,7 +588,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxxx000110x0 ldr. */ - return 753; + return 741; } else { @@ -598,7 +598,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxxx00011001 ldrsw. */ - return 755; + return 743; } else { @@ -606,7 +606,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxxx00011011 prfm. */ - return 756; + return 744; } } } @@ -638,7 +638,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxx00000011110 sturh. */ - return 703; + return 698; } } else @@ -647,7 +647,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxx000000111x1 stur. */ - return 709; + return 701; } } else @@ -668,7 +668,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxx01000011110 ldurh. */ - return 704; + return 699; } } else @@ -677,7 +677,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxx010000111x1 ldur. */ - return 710; + return 702; } } } @@ -691,7 +691,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxx0x100011100 ldursb. */ - return 697; + return 695; } else { @@ -699,7 +699,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxx0x100011101 ldursw. */ - return 713; + return 703; } } else @@ -710,7 +710,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxx0x100011110 ldursh. */ - return 707; + return 700; } else { @@ -718,7 +718,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxx0x100011111 prfum. */ - return 715; + return 704; } } } @@ -745,7 +745,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx10000011100 ldaddb. */ - return 804; + return 792; } else { @@ -753,7 +753,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx10000011110 ldaddh. */ - return 805; + return 793; } } else @@ -762,7 +762,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx100000111x1 ldadd. */ - return 806; + return 794; } } else @@ -775,7 +775,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx10100011100 ldaddab. */ - return 807; + return 795; } else { @@ -783,7 +783,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx10100011110 ldaddah. */ - return 810; + return 798; } } else @@ -792,7 +792,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx101000111x1 ldadda. */ - return 813; + return 801; } } } @@ -808,7 +808,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx11000011100 ldaddlb. */ - return 808; + return 796; } else { @@ -816,7 +816,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx11000011110 ldaddlh. */ - return 811; + return 799; } } else @@ -825,7 +825,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx110000111x1 ldaddl. */ - return 814; + return 802; } } else @@ -838,7 +838,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx11100011100 ldaddalb. */ - return 809; + return 797; } else { @@ -846,7 +846,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx11100011110 ldaddalh. */ - return 812; + return 800; } } else @@ -855,7 +855,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000000xxxxx111000111x1 ldaddal. */ - return 815; + return 803; } } } @@ -874,7 +874,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx10000011100 swpb. */ - return 792; + return 780; } else { @@ -882,7 +882,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx10000011110 swph. */ - return 793; + return 781; } } else @@ -891,7 +891,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx100000111x1 swp. */ - return 794; + return 782; } } else @@ -904,7 +904,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx10100011100 swpab. */ - return 795; + return 783; } else { @@ -912,7 +912,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx10100011110 swpah. */ - return 798; + return 786; } } else @@ -921,7 +921,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx101000111x1 swpa. */ - return 801; + return 789; } } } @@ -937,7 +937,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx11000011100 swplb. */ - return 796; + return 784; } else { @@ -945,7 +945,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx11000011110 swplh. */ - return 799; + return 787; } } else @@ -954,7 +954,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx110000111x1 swpl. */ - return 802; + return 790; } } else @@ -967,7 +967,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx11100011100 swpalb. */ - return 797; + return 785; } else { @@ -975,7 +975,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx11100011110 swpalh. */ - return 800; + return 788; } } else @@ -984,7 +984,7 @@ 10987654321098765432109876543210 xxxxxxxxxx000001xxxxx111000111x1 swpal. */ - return 803; + return 791; } } } @@ -1004,7 +1004,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx10000011100 ldsmaxb. */ - return 852; + return 840; } else { @@ -1012,7 +1012,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx10000011110 ldsmaxh. */ - return 853; + return 841; } } else @@ -1021,7 +1021,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx100000111x1 ldsmax. */ - return 854; + return 842; } } else @@ -1034,7 +1034,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx10100011100 ldsmaxab. */ - return 855; + return 843; } else { @@ -1042,7 +1042,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx10100011110 ldsmaxah. */ - return 858; + return 846; } } else @@ -1051,7 +1051,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx101000111x1 ldsmaxa. */ - return 861; + return 849; } } } @@ -1067,7 +1067,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx11000011100 ldsmaxlb. */ - return 856; + return 844; } else { @@ -1075,7 +1075,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx11000011110 ldsmaxlh. */ - return 859; + return 847; } } else @@ -1084,7 +1084,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx110000111x1 ldsmaxl. */ - return 862; + return 850; } } else @@ -1097,7 +1097,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx11100011100 ldsmaxalb. */ - return 857; + return 845; } else { @@ -1105,7 +1105,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx11100011110 ldsmaxalh. */ - return 860; + return 848; } } else @@ -1114,7 +1114,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00001xxxxxx111000111x1 ldsmaxal. */ - return 863; + return 851; } } } @@ -1136,7 +1136,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx10000011100 ldeorb. */ - return 828; + return 816; } else { @@ -1144,7 +1144,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx10000011110 ldeorh. */ - return 829; + return 817; } } else @@ -1153,7 +1153,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx100000111x1 ldeor. */ - return 830; + return 818; } } else @@ -1166,7 +1166,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx10100011100 ldeorab. */ - return 831; + return 819; } else { @@ -1174,7 +1174,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx10100011110 ldeorah. */ - return 834; + return 822; } } else @@ -1183,7 +1183,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx101000111x1 ldeora. */ - return 837; + return 825; } } } @@ -1199,7 +1199,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx11000011100 ldeorlb. */ - return 832; + return 820; } else { @@ -1207,7 +1207,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx11000011110 ldeorlh. */ - return 835; + return 823; } } else @@ -1216,7 +1216,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx110000111x1 ldeorl. */ - return 838; + return 826; } } else @@ -1229,7 +1229,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx11100011100 ldeoralb. */ - return 833; + return 821; } else { @@ -1237,7 +1237,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx11100011110 ldeoralh. */ - return 836; + return 824; } } else @@ -1246,7 +1246,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00010xxxxxx111000111x1 ldeoral. */ - return 839; + return 827; } } } @@ -1265,7 +1265,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx10000011100 ldumaxb. */ - return 876; + return 864; } else { @@ -1273,7 +1273,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx10000011110 ldumaxh. */ - return 877; + return 865; } } else @@ -1282,7 +1282,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx100000111x1 ldumax. */ - return 878; + return 866; } } else @@ -1295,7 +1295,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx10100011100 ldumaxab. */ - return 879; + return 867; } else { @@ -1303,7 +1303,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx10100011110 ldumaxah. */ - return 882; + return 870; } } else @@ -1312,7 +1312,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx101000111x1 ldumaxa. */ - return 885; + return 873; } } } @@ -1328,7 +1328,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx11000011100 ldumaxlb. */ - return 880; + return 868; } else { @@ -1336,7 +1336,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx11000011110 ldumaxlh. */ - return 883; + return 871; } } else @@ -1345,7 +1345,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx110000111x1 ldumaxl. */ - return 886; + return 874; } } else @@ -1358,7 +1358,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx11100011100 ldumaxalb. */ - return 881; + return 869; } else { @@ -1366,7 +1366,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx11100011110 ldumaxalh. */ - return 884; + return 872; } } else @@ -1375,7 +1375,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00011xxxxxx111000111x1 ldumaxal. */ - return 887; + return 875; } } } @@ -1400,7 +1400,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx10000011100 ldclrb. */ - return 816; + return 804; } else { @@ -1408,7 +1408,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx10000011110 ldclrh. */ - return 817; + return 805; } } else @@ -1417,7 +1417,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx100000111x1 ldclr. */ - return 818; + return 806; } } else @@ -1430,7 +1430,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx10100011100 ldclrab. */ - return 819; + return 807; } else { @@ -1438,7 +1438,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx10100011110 ldclrah. */ - return 822; + return 810; } } else @@ -1447,7 +1447,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx101000111x1 ldclra. */ - return 825; + return 813; } } } @@ -1463,7 +1463,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx11000011100 ldclrlb. */ - return 820; + return 808; } else { @@ -1471,7 +1471,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx11000011110 ldclrlh. */ - return 823; + return 811; } } else @@ -1480,7 +1480,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx110000111x1 ldclrl. */ - return 826; + return 814; } } else @@ -1493,7 +1493,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx11100011100 ldclralb. */ - return 821; + return 809; } else { @@ -1501,7 +1501,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx11100011110 ldclralh. */ - return 824; + return 812; } } else @@ -1510,7 +1510,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00100xxxxxx111000111x1 ldclral. */ - return 827; + return 815; } } } @@ -1529,7 +1529,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx10000011100 ldsminb. */ - return 864; + return 852; } else { @@ -1537,7 +1537,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx10000011110 ldsminh. */ - return 865; + return 853; } } else @@ -1546,7 +1546,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx100000111x1 ldsmin. */ - return 866; + return 854; } } else @@ -1559,7 +1559,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx10100011100 ldsminab. */ - return 867; + return 855; } else { @@ -1567,7 +1567,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx10100011110 ldsminah. */ - return 870; + return 858; } } else @@ -1576,7 +1576,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx101000111x1 ldsmina. */ - return 873; + return 861; } } } @@ -1592,7 +1592,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx11000011100 ldsminlb. */ - return 868; + return 856; } else { @@ -1600,7 +1600,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx11000011110 ldsminlh. */ - return 871; + return 859; } } else @@ -1609,7 +1609,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx110000111x1 ldsminl. */ - return 874; + return 862; } } else @@ -1622,7 +1622,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx11100011100 ldsminalb. */ - return 869; + return 857; } else { @@ -1630,7 +1630,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx11100011110 ldsminalh. */ - return 872; + return 860; } } else @@ -1639,7 +1639,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00101xxxxxx111000111x1 ldsminal. */ - return 875; + return 863; } } } @@ -1661,7 +1661,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx10000011100 ldsetb. */ - return 840; + return 828; } else { @@ -1669,7 +1669,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx10000011110 ldseth. */ - return 841; + return 829; } } else @@ -1678,7 +1678,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx100000111x1 ldset. */ - return 842; + return 830; } } else @@ -1691,7 +1691,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx10100011100 ldsetab. */ - return 843; + return 831; } else { @@ -1699,7 +1699,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx10100011110 ldsetah. */ - return 846; + return 834; } } else @@ -1708,7 +1708,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx101000111x1 ldseta. */ - return 849; + return 837; } } } @@ -1724,7 +1724,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx11000011100 ldsetlb. */ - return 844; + return 832; } else { @@ -1732,7 +1732,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx11000011110 ldsetlh. */ - return 847; + return 835; } } else @@ -1741,7 +1741,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx110000111x1 ldsetl. */ - return 850; + return 838; } } else @@ -1754,7 +1754,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx11100011100 ldsetalb. */ - return 845; + return 833; } else { @@ -1762,7 +1762,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx11100011110 ldsetalh. */ - return 848; + return 836; } } else @@ -1771,7 +1771,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00110xxxxxx111000111x1 ldsetal. */ - return 851; + return 839; } } } @@ -1790,7 +1790,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx10000011100 lduminb. */ - return 888; + return 876; } else { @@ -1798,7 +1798,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx10000011110 lduminh. */ - return 889; + return 877; } } else @@ -1807,7 +1807,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx100000111x1 ldumin. */ - return 890; + return 878; } } else @@ -1820,7 +1820,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx10100011100 lduminab. */ - return 891; + return 879; } else { @@ -1828,7 +1828,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx10100011110 lduminah. */ - return 894; + return 882; } } else @@ -1837,7 +1837,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx101000111x1 ldumina. */ - return 897; + return 885; } } } @@ -1853,7 +1853,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx11000011100 lduminlb. */ - return 892; + return 880; } else { @@ -1861,7 +1861,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx11000011110 lduminlh. */ - return 895; + return 883; } } else @@ -1870,7 +1870,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx110000111x1 lduminl. */ - return 898; + return 886; } } else @@ -1883,7 +1883,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx11100011100 lduminalb. */ - return 893; + return 881; } else { @@ -1891,7 +1891,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx11100011110 lduminalh. */ - return 896; + return 884; } } else @@ -1900,7 +1900,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00111xxxxxx111000111x1 lduminal. */ - return 899; + return 887; } } } @@ -2340,7 +2340,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxx00100x00x and. */ - return 757; + return 745; } else { @@ -2348,7 +2348,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxx00100x01x eor. */ - return 761; + return 749; } } else @@ -2359,7 +2359,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxx00100x10x orr. */ - return 759; + return 747; } else { @@ -2367,7 +2367,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxx00100x11x ands. */ - return 762; + return 750; } } } @@ -2381,7 +2381,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxx10100x00x movn. */ - return 948; + return 936; } else { @@ -2389,7 +2389,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxx10100x01x movz. */ - return 950; + return 938; } } else @@ -2398,7 +2398,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxx10100x1xx movk. */ - return 952; + return 940; } } } @@ -2416,7 +2416,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx0xx0101000x and. */ - return 764; + return 752; } else { @@ -2424,7 +2424,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx0xx0101001x eor. */ - return 771; + return 759; } } else @@ -2435,7 +2435,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx0xx0101010x orr. */ - return 766; + return 754; } else { @@ -2443,7 +2443,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx0xx0101011x ands. */ - return 773; + return 761; } } } @@ -2818,7 +2818,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx1xx0101x00x bic. */ - return 765; + return 753; } else { @@ -2826,7 +2826,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx1xx0101x01x eon. */ - return 772; + return 760; } } else @@ -2837,7 +2837,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx1xx0101x10x orn. */ - return 769; + return 757; } else { @@ -2845,7 +2845,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx1xx0101x11x bics. */ - return 775; + return 763; } } } @@ -3256,7 +3256,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx0xx1x10x01x msr. */ - return 955; + return 943; } else { @@ -3264,7 +3264,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxx1xx1x10x01x sysl. */ - return 973; + return 961; } } } @@ -3287,7 +3287,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxxx0110x1xx tbz. */ - return 975; + return 963; } } else @@ -3306,7 +3306,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxxx1110x1xx tbnz. */ - return 976; + return 964; } } } @@ -3337,7 +3337,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx00001101xx stnp. */ - return 741; + return 729; } } else @@ -3389,7 +3389,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx00101101xx stp. */ - return 745; + return 733; } } } @@ -3453,7 +3453,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx01x01101xx stp. */ - return 750; + return 738; } } } @@ -3477,7 +3477,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx10001101xx ldnp. */ - return 742; + return 730; } } else @@ -3529,7 +3529,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx10101101xx ldp. */ - return 746; + return 734; } } } @@ -3593,7 +3593,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxx11x01101xx ldp. */ - return 751; + return 739; } } } @@ -3608,7 +3608,7 @@ 10987654321098765432109876543210 xxxxxxxxxxxxxxxxxxxxxxxx001110xx ldr. */ - return 754; + return 742; } else { @@ -3622,7 +3622,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxxx0x001111xx stur. */ - return 699; + return 696; } else { @@ -3630,7 +3630,7 @@ 10987654321098765432109876543210 xxxxxxxxxx00xxxxxxxxxx1x001111xx ldur. */ - return 700; + return 697; } } else @@ -8707,20 +8707,20 @@ int value; switch (key) { - case 739: value = 743; break; /* stnp --> stp. */ - case 743: return NULL; /* stp --> NULL. */ - case 740: value = 744; break; /* ldnp --> ldp. */ - case 744: return NULL; /* ldp --> NULL. */ - case 955: value = 956; break; /* msr --> hint. */ - case 956: value = 963; break; /* hint --> clrex. */ - case 963: value = 964; break; /* clrex --> dsb. */ - case 964: value = 965; break; /* dsb --> dmb. */ - case 965: value = 966; break; /* dmb --> isb. */ - case 966: value = 967; break; /* isb --> sys. */ - case 967: value = 972; break; /* sys --> msr. */ - case 972: return NULL; /* msr --> NULL. */ - case 973: value = 974; break; /* sysl --> mrs. */ - case 974: return NULL; /* mrs --> NULL. */ + case 727: value = 731; break; /* stnp --> stp. */ + case 731: return NULL; /* stp --> NULL. */ + case 728: value = 732; break; /* ldnp --> ldp. */ + case 732: return NULL; /* ldp --> NULL. */ + case 943: value = 944; break; /* msr --> hint. */ + case 944: value = 951; break; /* hint --> clrex. */ + case 951: value = 952; break; /* clrex --> dsb. */ + case 952: value = 953; break; /* dsb --> dmb. */ + case 953: value = 954; break; /* dmb --> isb. */ + case 954: value = 955; break; /* isb --> sys. */ + case 955: value = 960; break; /* sys --> msr. */ + case 960: return NULL; /* msr --> NULL. */ + case 961: value = 962; break; /* sysl --> mrs. */ + case 962: return NULL; /* mrs --> NULL. */ case 355: value = 356; break; /* st4 --> st1. */ case 356: value = 357; break; /* st1 --> st2. */ case 357: value = 358; break; /* st2 --> st3. */ @@ -8843,76 +8843,64 @@ case 581: value = 582; break; /* umaddl --> umull. */ case 583: value = 584; break; /* umsubl --> umnegl. */ case 594: value = 595; break; /* extr --> ror. */ - case 693: value = 695; break; /* sturb --> strb. */ - case 694: value = 696; break; /* ldurb --> ldrb. */ - case 697: value = 698; break; /* ldursb --> ldrsb. */ - case 699: value = 701; break; /* stur --> str. */ - case 700: value = 702; break; /* ldur --> ldr. */ - case 703: value = 705; break; /* sturh --> strh. */ - case 704: value = 706; break; /* ldurh --> ldrh. */ - case 707: value = 708; break; /* ldursh --> ldrsh. */ - case 709: value = 711; break; /* stur --> str. */ - case 710: value = 712; break; /* ldur --> ldr. */ - case 713: value = 714; break; /* ldursw --> ldrsw. */ - case 715: value = 716; break; /* prfum --> prfm. */ - case 757: value = 758; break; /* and --> bic. */ - case 759: value = 760; break; /* orr --> mov. */ - case 762: value = 763; break; /* ands --> tst. */ - case 766: value = 768; break; /* orr --> uxtw. */ - case 769: value = 770; break; /* orn --> mvn. */ - case 773: value = 774; break; /* ands --> tst. */ - case 804: value = 900; break; /* ldaddb --> staddb. */ - case 805: value = 901; break; /* ldaddh --> staddh. */ - case 806: value = 902; break; /* ldadd --> stadd. */ - case 808: value = 903; break; /* ldaddlb --> staddlb. */ - case 811: value = 904; break; /* ldaddlh --> staddlh. */ - case 814: value = 905; break; /* ldaddl --> staddl. */ - case 816: value = 906; break; /* ldclrb --> stclrb. */ - case 817: value = 907; break; /* ldclrh --> stclrh. */ - case 818: value = 908; break; /* ldclr --> stclr. */ - case 820: value = 909; break; /* ldclrlb --> stclrlb. */ - case 823: value = 910; break; /* ldclrlh --> stclrlh. */ - case 826: value = 911; break; /* ldclrl --> stclrl. */ - case 828: value = 912; break; /* ldeorb --> steorb. */ - case 829: value = 913; break; /* ldeorh --> steorh. */ - case 830: value = 914; break; /* ldeor --> steor. */ - case 832: value = 915; break; /* ldeorlb --> steorlb. */ - case 835: value = 916; break; /* ldeorlh --> steorlh. */ - case 838: value = 917; break; /* ldeorl --> steorl. */ - case 840: value = 918; break; /* ldsetb --> stsetb. */ - case 841: value = 919; break; /* ldseth --> stseth. */ - case 842: value = 920; break; /* ldset --> stset. */ - case 844: value = 921; break; /* ldsetlb --> stsetlb. */ - case 847: value = 922; break; /* ldsetlh --> stsetlh. */ - case 850: value = 923; break; /* ldsetl --> stsetl. */ - case 852: value = 924; break; /* ldsmaxb --> stsmaxb. */ - case 853: value = 925; break; /* ldsmaxh --> stsmaxh. */ - case 854: value = 926; break; /* ldsmax --> stsmax. */ - case 856: value = 927; break; /* ldsmaxlb --> stsmaxlb. */ - case 859: value = 928; break; /* ldsmaxlh --> stsmaxlh. */ - case 862: value = 929; break; /* ldsmaxl --> stsmaxl. */ - case 864: value = 930; break; /* ldsminb --> stsminb. */ - case 865: value = 931; break; /* ldsminh --> stsminh. */ - case 866: value = 932; break; /* ldsmin --> stsmin. */ - case 868: value = 933; break; /* ldsminlb --> stsminlb. */ - case 871: value = 934; break; /* ldsminlh --> stsminlh. */ - case 874: value = 935; break; /* ldsminl --> stsminl. */ - case 876: value = 936; break; /* ldumaxb --> stumaxb. */ - case 877: value = 937; break; /* ldumaxh --> stumaxh. */ - case 878: value = 938; break; /* ldumax --> stumax. */ - case 880: value = 939; break; /* ldumaxlb --> stumaxlb. */ - case 883: value = 940; break; /* ldumaxlh --> stumaxlh. */ - case 886: value = 941; break; /* ldumaxl --> stumaxl. */ - case 888: value = 942; break; /* lduminb --> stuminb. */ - case 889: value = 943; break; /* lduminh --> stuminh. */ - case 890: value = 944; break; /* ldumin --> stumin. */ - case 892: value = 945; break; /* lduminlb --> stuminlb. */ - case 895: value = 946; break; /* lduminlh --> stuminlh. */ - case 898: value = 947; break; /* lduminl --> stuminl. */ - case 948: value = 949; break; /* movn --> mov. */ - case 950: value = 951; break; /* movz --> mov. */ - case 956: value = 962; break; /* hint --> sevl. */ - case 967: value = 971; break; /* sys --> tlbi. */ + case 745: value = 746; break; /* and --> bic. */ + case 747: value = 748; break; /* orr --> mov. */ + case 750: value = 751; break; /* ands --> tst. */ + case 754: value = 756; break; /* orr --> uxtw. */ + case 757: value = 758; break; /* orn --> mvn. */ + case 761: value = 762; break; /* ands --> tst. */ + case 792: value = 888; break; /* ldaddb --> staddb. */ + case 793: value = 889; break; /* ldaddh --> staddh. */ + case 794: value = 890; break; /* ldadd --> stadd. */ + case 796: value = 891; break; /* ldaddlb --> staddlb. */ + case 799: value = 892; break; /* ldaddlh --> staddlh. */ + case 802: value = 893; break; /* ldaddl --> staddl. */ + case 804: value = 894; break; /* ldclrb --> stclrb. */ + case 805: value = 895; break; /* ldclrh --> stclrh. */ + case 806: value = 896; break; /* ldclr --> stclr. */ + case 808: value = 897; break; /* ldclrlb --> stclrlb. */ + case 811: value = 898; break; /* ldclrlh --> stclrlh. */ + case 814: value = 899; break; /* ldclrl --> stclrl. */ + case 816: value = 900; break; /* ldeorb --> steorb. */ + case 817: value = 901; break; /* ldeorh --> steorh. */ + case 818: value = 902; break; /* ldeor --> steor. */ + case 820: value = 903; break; /* ldeorlb --> steorlb. */ + case 823: value = 904; break; /* ldeorlh --> steorlh. */ + case 826: value = 905; break; /* ldeorl --> steorl. */ + case 828: value = 906; break; /* ldsetb --> stsetb. */ + case 829: value = 907; break; /* ldseth --> stseth. */ + case 830: value = 908; break; /* ldset --> stset. */ + case 832: value = 909; break; /* ldsetlb --> stsetlb. */ + case 835: value = 910; break; /* ldsetlh --> stsetlh. */ + case 838: value = 911; break; /* ldsetl --> stsetl. */ + case 840: value = 912; break; /* ldsmaxb --> stsmaxb. */ + case 841: value = 913; break; /* ldsmaxh --> stsmaxh. */ + case 842: value = 914; break; /* ldsmax --> stsmax. */ + case 844: value = 915; break; /* ldsmaxlb --> stsmaxlb. */ + case 847: value = 916; break; /* ldsmaxlh --> stsmaxlh. */ + case 850: value = 917; break; /* ldsmaxl --> stsmaxl. */ + case 852: value = 918; break; /* ldsminb --> stsminb. */ + case 853: value = 919; break; /* ldsminh --> stsminh. */ + case 854: value = 920; break; /* ldsmin --> stsmin. */ + case 856: value = 921; break; /* ldsminlb --> stsminlb. */ + case 859: value = 922; break; /* ldsminlh --> stsminlh. */ + case 862: value = 923; break; /* ldsminl --> stsminl. */ + case 864: value = 924; break; /* ldumaxb --> stumaxb. */ + case 865: value = 925; break; /* ldumaxh --> stumaxh. */ + case 866: value = 926; break; /* ldumax --> stumax. */ + case 868: value = 927; break; /* ldumaxlb --> stumaxlb. */ + case 871: value = 928; break; /* ldumaxlh --> stumaxlh. */ + case 874: value = 929; break; /* ldumaxl --> stumaxl. */ + case 876: value = 930; break; /* lduminb --> stuminb. */ + case 877: value = 931; break; /* lduminh --> stuminh. */ + case 878: value = 932; break; /* ldumin --> stumin. */ + case 880: value = 933; break; /* lduminlb --> stuminlb. */ + case 883: value = 934; break; /* lduminlh --> stuminlh. */ + case 886: value = 935; break; /* lduminl --> stuminl. */ + case 936: value = 937; break; /* movn --> mov. */ + case 938: value = 939; break; /* movz --> mov. */ + case 944: value = 950; break; /* hint --> sevl. */ + case 955: value = 959; break; /* sys --> tlbi. */ default: return NULL; } @@ -8941,15 +8929,15 @@ case 505: value = 504; break; /* ubfx --> ubfiz. */ case 527: value = 526; break; /* cset --> cinc. */ case 530: value = 529; break; /* csetm --> cinv. */ - case 768: value = 767; break; /* uxtw --> mov. */ - case 962: value = 961; break; /* sevl --> sev. */ - case 961: value = 960; break; /* sev --> wfi. */ - case 960: value = 959; break; /* wfi --> wfe. */ - case 959: value = 958; break; /* wfe --> yield. */ - case 958: value = 957; break; /* yield --> nop. */ - case 971: value = 970; break; /* tlbi --> ic. */ - case 970: value = 969; break; /* ic --> dc. */ - case 969: value = 968; break; /* dc --> at. */ + case 756: value = 755; break; /* uxtw --> mov. */ + case 950: value = 949; break; /* sevl --> sev. */ + case 949: value = 948; break; /* sev --> wfi. */ + case 948: value = 947; break; /* wfi --> wfe. */ + case 947: value = 946; break; /* wfe --> yield. */ + case 946: value = 945; break; /* yield --> nop. */ + case 959: value = 958; break; /* tlbi --> ic. */ + case 958: value = 957; break; /* ic --> dc. */ + case 957: value = 956; break; /* dc --> at. */ default: return NULL; } diff -ruN binutils-2.25/opcodes/aarch64-opc-2.c binutils-2.25.1/opcodes/aarch64-opc-2.c --- binutils-2.25/opcodes/aarch64-opc-2.c 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/opcodes/aarch64-opc-2.c 2015-07-21 10:20:58.000000000 +0200 @@ -135,34 +135,34 @@ 671, 693, 694, + 695, + 698, + 699, + 700, + 701, + 702, + 696, 697, 703, 704, - 707, - 709, - 710, - 699, - 700, - 713, - 715, - 753, - 754, - 755, - 756, + 741, + 742, + 743, + 744, 12, 510, 511, - 948, - 950, - 952, - 760, - 951, - 949, + 936, + 938, + 940, + 748, + 939, + 937, 259, 499, 509, 508, - 758, + 746, 505, 502, 495, @@ -171,7 +171,7 @@ 504, 506, 507, - 768, + 756, 526, 529, 532, diff -ruN binutils-2.25/opcodes/aarch64-opc.c binutils-2.25.1/opcodes/aarch64-opc.c --- binutils-2.25/opcodes/aarch64-opc.c 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/opcodes/aarch64-opc.c 2015-07-21 10:20:58.000000000 +0200 @@ -2765,6 +2765,7 @@ { "id_mmfr1_el1", CPENC(3,0,C0,C1,5), 0 }, /* RO */ { "id_mmfr2_el1", CPENC(3,0,C0,C1,6), 0 }, /* RO */ { "id_mmfr3_el1", CPENC(3,0,C0,C1,7), 0 }, /* RO */ + { "id_mmfr4_el1", CPENC(3,0,C0,C2,6), 0 }, /* RO */ { "id_isar0_el1", CPENC(3,0,C0,C2,0), 0 }, /* RO */ { "id_isar1_el1", CPENC(3,0,C0,C2,1), 0 }, /* RO */ { "id_isar2_el1", CPENC(3,0,C0,C2,2), 0 }, /* RO */ diff -ruN binutils-2.25/opcodes/aarch64-tbl.h binutils-2.25.1/opcodes/aarch64-tbl.h --- binutils-2.25/opcodes/aarch64-tbl.h 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/opcodes/aarch64-tbl.h 2015-07-21 10:20:58.000000000 +0200 @@ -1982,30 +1982,18 @@ {"ldtr", 0xb8400800, 0xbfe00c00, ldst_unpriv, 0, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R, F_GPRSIZE_IN_Q}, {"ldtrsw", 0xb8800800, 0xffe00c00, ldst_unpriv, 0, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_X32, 0}, /* Load/store register (unscaled immediate). */ - {"sturb", 0x38000000, 0xffe00c00, ldst_unscaled, OP_STURB, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_W8, F_HAS_ALIAS}, - {"ldurb", 0x38400000, 0xffe00c00, ldst_unscaled, OP_LDURB, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_W8, F_HAS_ALIAS}, - {"strb", 0x38000000, 0xffe00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_W8, F_ALIAS}, - {"ldrb", 0x38400000, 0xffe00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_W8, F_ALIAS}, - {"ldursb", 0x38800000, 0xffa00c00, ldst_unscaled, OP_LDURSB, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R8, F_HAS_ALIAS | F_LDS_SIZE}, - {"ldrsb", 0x38800000, 0xffa00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_R8, F_ALIAS | F_LDS_SIZE}, - {"stur", 0x3c000000, 0x3f600c00, ldst_unscaled, OP_STURV, CORE, OP2 (Ft, ADDR_SIMM9), QL_LDST_FP, F_HAS_ALIAS}, - {"ldur", 0x3c400000, 0x3f600c00, ldst_unscaled, OP_LDURV, CORE, OP2 (Ft, ADDR_SIMM9), QL_LDST_FP, F_HAS_ALIAS}, - {"str", 0x3c000000, 0x3f600c00, ldst_unscaled, 0, CORE, OP2 (Ft, ADDR_SIMM9_2), QL_LDST_FP, F_ALIAS}, - {"ldr", 0x3c400000, 0x3f600c00, ldst_unscaled, 0, CORE, OP2 (Ft, ADDR_SIMM9_2), QL_LDST_FP, F_ALIAS}, - {"sturh", 0x78000000, 0xffe00c00, ldst_unscaled, OP_STURH, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_W16, F_HAS_ALIAS}, - {"ldurh", 0x78400000, 0xffe00c00, ldst_unscaled, OP_LDURH, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_W16, F_HAS_ALIAS}, - {"strh", 0x78000000, 0xffe00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_W16, F_ALIAS}, - {"ldrh", 0x78400000, 0xffe00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_W16, F_ALIAS}, - {"ldursh", 0x78800000, 0xffa00c00, ldst_unscaled, OP_LDURSH, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R16, F_HAS_ALIAS | F_LDS_SIZE}, - {"ldrsh", 0x78800000, 0xffa00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_R16, F_ALIAS | F_LDS_SIZE}, - {"stur", 0xb8000000, 0xbfe00c00, ldst_unscaled, OP_STUR, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R, F_HAS_ALIAS | F_GPRSIZE_IN_Q}, - {"ldur", 0xb8400000, 0xbfe00c00, ldst_unscaled, OP_LDUR, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R, F_HAS_ALIAS | F_GPRSIZE_IN_Q}, - {"str", 0xb8000000, 0xbfe00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_R, F_ALIAS | F_GPRSIZE_IN_Q}, - {"ldr", 0xb8400000, 0xbfe00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_R, F_ALIAS | F_GPRSIZE_IN_Q}, - {"ldursw", 0xb8800000, 0xffe00c00, ldst_unscaled, OP_LDURSW, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_X32, F_HAS_ALIAS}, - {"ldrsw", 0xb8800000, 0xffe00c00, ldst_unscaled, 0, CORE, OP2 (Rt, ADDR_SIMM9_2), QL_LDST_X32, F_ALIAS}, - {"prfum", 0xf8800000, 0xffe00c00, ldst_unscaled, OP_PRFUM, CORE, OP2 (PRFOP, ADDR_SIMM9), QL_LDST_PRFM, F_HAS_ALIAS}, - {"prfm", 0xf8800000, 0xffe00c00, ldst_unscaled, 0, CORE, OP2 (PRFOP, ADDR_SIMM9_2), QL_LDST_PRFM, F_ALIAS}, + {"sturb", 0x38000000, 0xffe00c00, ldst_unscaled, OP_STURB, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_W8, 0}, + {"ldurb", 0x38400000, 0xffe00c00, ldst_unscaled, OP_LDURB, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_W8, 0}, + {"ldursb", 0x38800000, 0xffa00c00, ldst_unscaled, OP_LDURSB, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R8, F_LDS_SIZE}, + {"stur", 0x3c000000, 0x3f600c00, ldst_unscaled, OP_STURV, CORE, OP2 (Ft, ADDR_SIMM9), QL_LDST_FP, 0}, + {"ldur", 0x3c400000, 0x3f600c00, ldst_unscaled, OP_LDURV, CORE, OP2 (Ft, ADDR_SIMM9), QL_LDST_FP, 0}, + {"sturh", 0x78000000, 0xffe00c00, ldst_unscaled, OP_STURH, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_W16, 0}, + {"ldurh", 0x78400000, 0xffe00c00, ldst_unscaled, OP_LDURH, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_W16, 0}, + {"ldursh", 0x78800000, 0xffa00c00, ldst_unscaled, OP_LDURSH, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R16, F_LDS_SIZE}, + {"stur", 0xb8000000, 0xbfe00c00, ldst_unscaled, OP_STUR, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R, F_GPRSIZE_IN_Q}, + {"ldur", 0xb8400000, 0xbfe00c00, ldst_unscaled, OP_LDUR, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_R, F_GPRSIZE_IN_Q}, + {"ldursw", 0xb8800000, 0xffe00c00, ldst_unscaled, OP_LDURSW, CORE, OP2 (Rt, ADDR_SIMM9), QL_LDST_X32, 0}, + {"prfum", 0xf8800000, 0xffe00c00, ldst_unscaled, OP_PRFUM, CORE, OP2 (PRFOP, ADDR_SIMM9), QL_LDST_PRFM, 0}, /* Load/store exclusive. */ {"stxrb", 0x8007c00, 0xffe08000, ldstexcl, 0, CORE, OP3 (Rs, Rt, ADDR_SIMPLE), QL_W2_LDST_EXC, 0}, {"stlxrb", 0x800fc00, 0xffe08000, ldstexcl, 0, CORE, OP3 (Rs, Rt, ADDR_SIMPLE), QL_W2_LDST_EXC, 0}, diff -ruN binutils-2.25/opcodes/arm-dis.c binutils-2.25.1/opcodes/arm-dis.c --- binutils-2.25/opcodes/arm-dis.c 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/opcodes/arm-dis.c 2015-07-21 10:20:58.000000000 +0200 @@ -4558,7 +4558,10 @@ } /* Disallow mapping symbols ($a, $b, $d, $t etc) from - being displayed in symbol relative addresses. */ + being displayed in symbol relative addresses. + + Also disallow private symbol, with __tagsym$$ prefix, + from ARM RVCT toolchain being displayed. */ bfd_boolean arm_symbol_is_valid (asymbol * sym, @@ -4571,7 +4574,7 @@ name = bfd_asymbol_name (sym); - return (name && *name != '$'); + return (name && *name != '$' && strncmp (name, "__tagsym$$", 10)); } /* Parse an individual disassembler option. */ diff -ruN binutils-2.25/opcodes/configure binutils-2.25.1/opcodes/configure --- binutils-2.25/opcodes/configure 2014-12-23 15:22:07.000000000 +0100 +++ binutils-2.25.1/opcodes/configure 2015-07-21 15:42:57.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for opcodes 2.25. +# Generated by GNU Autoconf 2.64 for opcodes 2.25.1. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -556,8 +556,8 @@ # Identity of this package. PACKAGE_NAME='opcodes' PACKAGE_TARNAME='opcodes' -PACKAGE_VERSION='2.25' -PACKAGE_STRING='opcodes 2.25' +PACKAGE_VERSION='2.25.1' +PACKAGE_STRING='opcodes 2.25.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1319,7 +1319,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opcodes 2.25 to adapt to many kinds of systems. +\`configure' configures opcodes 2.25.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1390,7 +1390,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opcodes 2.25:";; + short | recursive ) echo "Configuration of opcodes 2.25.1:";; esac cat <<\_ACEOF @@ -1497,7 +1497,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opcodes configure 2.25 +opcodes configure 2.25.1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -1907,7 +1907,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opcodes $as_me 2.25, which was +It was created by opcodes $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -3715,7 +3715,7 @@ # Define the identity of the package. PACKAGE='opcodes' - VERSION='2.25' + VERSION='2.25.1' cat >>confdefs.h <<_ACEOF @@ -13209,7 +13209,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opcodes $as_me 2.25, which was +This file was extended by opcodes $as_me 2.25.1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13273,7 +13273,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -opcodes config.status 2.25 +opcodes config.status 2.25.1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -ruN binutils-2.25/opcodes/ppc-dis.c binutils-2.25.1/opcodes/ppc-dis.c --- binutils-2.25/opcodes/ppc-dis.c 2014-10-14 09:32:04.000000000 +0200 +++ binutils-2.25.1/opcodes/ppc-dis.c 2015-07-21 10:20:58.000000000 +0200 @@ -76,12 +76,18 @@ 0 }, { "7410", (PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC), 0 }, - { "7450", (PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC), + { "7450", (PPC_OPCODE_PPC | PPC_OPCODE_7450 | PPC_OPCODE_ALTIVEC), 0 }, { "7455", (PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC), 0 }, - { "750cl", (PPC_OPCODE_PPC | PPC_OPCODE_PPCPS) + { "750cl", (PPC_OPCODE_PPC | PPC_OPCODE_750 | PPC_OPCODE_PPCPS) , 0 }, + { "821", (PPC_OPCODE_PPC | PPC_OPCODE_860), + 0 }, + { "850", (PPC_OPCODE_PPC | PPC_OPCODE_860), + 0 }, + { "860", (PPC_OPCODE_PPC | PPC_OPCODE_860), + 0 }, { "a2", (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_CACHELCK | PPC_OPCODE_64 | PPC_OPCODE_A2), @@ -341,37 +347,41 @@ int i; unsigned short last; - i = powerpc_num_opcodes; - while (--i >= 0) + if (powerpc_opcd_indices[PPC_OPCD_SEGS] == 0) { - unsigned op = PPC_OP (powerpc_opcodes[i].opcode); - powerpc_opcd_indices[op] = i; - } + i = powerpc_num_opcodes; + while (--i >= 0) + { + unsigned op = PPC_OP (powerpc_opcodes[i].opcode); - last = powerpc_num_opcodes; - for (i = PPC_OPCD_SEGS; i > 0; --i) - { - if (powerpc_opcd_indices[i] == 0) - powerpc_opcd_indices[i] = last; - last = powerpc_opcd_indices[i]; - } + powerpc_opcd_indices[op] = i; + } - i = vle_num_opcodes; - while (--i >= 0) - { - unsigned op = VLE_OP (vle_opcodes[i].opcode, vle_opcodes[i].mask); - unsigned seg = VLE_OP_TO_SEG (op); + last = powerpc_num_opcodes; + for (i = PPC_OPCD_SEGS; i > 0; --i) + { + if (powerpc_opcd_indices[i] == 0) + powerpc_opcd_indices[i] = last; + last = powerpc_opcd_indices[i]; + } - vle_opcd_indices[seg] = i; - } + i = vle_num_opcodes; + while (--i >= 0) + { + unsigned op = VLE_OP (vle_opcodes[i].opcode, vle_opcodes[i].mask); + unsigned seg = VLE_OP_TO_SEG (op); - last = vle_num_opcodes; - for (i = VLE_OPCD_SEGS; i > 0; --i) - { - if (vle_opcd_indices[i] == 0) - vle_opcd_indices[i] = last; - last = vle_opcd_indices[i]; + vle_opcd_indices[seg] = i; + } + + last = vle_num_opcodes; + for (i = VLE_OPCD_SEGS; i > 0; --i) + { + if (vle_opcd_indices[i] == 0) + vle_opcd_indices[i] = last; + last = vle_opcd_indices[i]; + } } if (info->arch == bfd_arch_powerpc) @@ -448,7 +458,8 @@ operand = &powerpc_operands[*opindex]; if ((operand->flags & PPC_OPERAND_NEXT) != 0 || ((operand->flags & PPC_OPERAND_OPTIONAL) != 0 - && operand_value_powerpc (operand, insn, dialect) != 0)) + && operand_value_powerpc (operand, insn, dialect) != + ppc_optional_operand_value (operand))) return 0; } diff -ruN binutils-2.25/opcodes/ppc-opc.c binutils-2.25.1/opcodes/ppc-opc.c --- binutils-2.25/opcodes/ppc-opc.c 2014-12-23 09:47:10.000000000 +0100 +++ binutils-2.25.1/opcodes/ppc-opc.c 2015-07-21 10:20:58.000000000 +0200 @@ -53,6 +53,7 @@ static long extract_bo (unsigned long, ppc_cpu_t, int *); static unsigned long insert_boe (unsigned long, long, ppc_cpu_t, const char **); static long extract_boe (unsigned long, ppc_cpu_t, int *); +static unsigned long insert_esync (unsigned long, long, ppc_cpu_t, const char **); static unsigned long insert_fxm (unsigned long, long, ppc_cpu_t, const char **); static long extract_fxm (unsigned long, ppc_cpu_t, int *); static unsigned long insert_li20 (unsigned long, long, ppc_cpu_t, const char **); @@ -382,10 +383,12 @@ /* Power4 version for mfcr. */ #define FXM4 FXM + 1 - { 0xff, 12, insert_fxm, extract_fxm, PPC_OPERAND_OPTIONAL }, + { 0xff, 12, insert_fxm, extract_fxm, PPC_OPERAND_OPTIONAL | PPC_OPERAND_OPTIONAL_VALUE}, + /* If the FXM4 operand is ommitted, use the sentinel value -1. */ + { -1, -1, NULL, NULL, 0}, /* The IMM20 field in an LI instruction. */ -#define IMM20 FXM4 + 1 +#define IMM20 FXM4 + 2 { 0xfffff, PPC_OPSHIFT_INV, insert_li20, extract_li20, PPC_OPERAND_SIGNED}, /* The L field in a D or X form instruction. */ @@ -415,7 +418,7 @@ /* The LS or WC field in an X (sync or wait) form instruction. */ #define LS LIA + 1 #define WC LS - { 0x3, 21, NULL, NULL, PPC_OPERAND_OPTIONAL }, + { 0x3, 21, insert_ls, NULL, PPC_OPERAND_OPTIONAL }, /* The ME field in an M form instruction. */ #define ME LS + 1 @@ -633,7 +636,7 @@ /* The ESYNC field in an X (sync) form instruction. */ #define ESYNC STRM + 1 - { 0xf, 16, insert_ls, NULL, PPC_OPERAND_OPTIONAL }, + { 0xf, 16, insert_esync, NULL, PPC_OPERAND_OPTIONAL }, /* The SV field in a POWER SC form instruction. */ #define SV ESYNC + 1 @@ -642,10 +645,12 @@ /* The TBR field in an XFX form instruction. This is like the SPR field, but it is optional. */ #define TBR SV + 1 - { 0x3ff, 11, insert_tbr, extract_tbr, PPC_OPERAND_OPTIONAL }, + { 0x3ff, 11, insert_tbr, extract_tbr, PPC_OPERAND_OPTIONAL | PPC_OPERAND_OPTIONAL_VALUE}, + /* If the TBR operand is ommitted, use the value 268. */ + { -1, 268, NULL, NULL, 0}, /* The TO field in a D or X form instruction. */ -#define TO TBR + 1 +#define TO TBR + 2 #define DUI TO #define TO_MASK (0x1f << 21) { 0x1f, 21, NULL, NULL, 0 }, @@ -747,12 +752,12 @@ #define PSD PSQM + 1 { 0xfff, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED }, + /* The L field in an mtmsrd or A form instruction or W in an X form. */ #define A_L PSD + 1 #define W A_L -#define MTMSRD_L W { 0x1, 16, NULL, NULL, PPC_OPERAND_OPTIONAL }, -#define RMC MTMSRD_L + 1 +#define RMC A_L + 1 { 0x3, 9, NULL, NULL, 0 }, #define R RMC + 1 @@ -766,10 +771,12 @@ /* The S field in a XL form instruction. */ #define SXL S + 1 - { 0x1, 11, NULL, NULL, PPC_OPERAND_OPTIONAL }, + { 0x1, 11, NULL, NULL, PPC_OPERAND_OPTIONAL | PPC_OPERAND_OPTIONAL_VALUE}, + /* If the SXL operand is ommitted, use the value 1. */ + { -1, 1, NULL, NULL, 0}, /* SH field starting at bit position 16. */ -#define SH16 SXL + 1 +#define SH16 SXL + 2 /* The DCM and DGM fields in a Z form instruction. */ #define DCM SH16 #define DGM DCM @@ -866,6 +873,9 @@ #define ERAT_T UIM + 1 { 0x7, 21, NULL, NULL, 0 }, + +#define IH ERAT_T + 1 + { 0x7, 21, NULL, NULL, PPC_OPERAND_OPTIONAL }, }; const unsigned int num_powerpc_operands = (sizeof (powerpc_operands) @@ -1281,19 +1291,13 @@ } } - /* If the optional field on mfcr is missing that means we want to use - the old form of the instruction that moves the whole cr. In that - case we'll have VALUE zero. There doesn't seem to be a way to - distinguish this from the case where someone writes mfcr %r3,0. */ - else if (value == 0) - ; - /* If only one bit of the FXM field is set, we can use the new form of the instruction, which is faster. Unlike the Power4 branch hint encoding, this is not backward compatible. Do not generate the new form unless -mpower4 has been given, or -many and the two operand form of mfcr was used. */ - else if ((value & -value) == value + else if (value > 0 + && (value & -value) == value && ((dialect & PPC_OPCODE_POWER4) != 0 || ((dialect & PPC_OPCODE_ANY) != 0 && (insn & (0x3ff << 1)) == 19 << 1))) @@ -1302,7 +1306,10 @@ /* Any other value on mfcr is an error. */ else if ((insn & (0x3ff << 1)) == 19 << 1) { - *errmsg = _("ignoring invalid mfcr mask"); + /* A value of -1 means we used the one operand form of + mfcr which is valid. */ + if (value != -1) + *errmsg = _("ignoring invalid mfcr mask"); value = 0; } @@ -1329,6 +1336,8 @@ { if (mask != 0) *invalid = 1; + else + mask = -1; } return mask; @@ -1357,17 +1366,40 @@ | (insn & 0x7ff); } -/* The LS field in a sync instruction that accepts 2 operands - Values 2 and 3 are reserved, - must be treated as 0 for future compatibility - Values 0 and 1 can be accepted, if field ESYNC is zero - Otherwise L = complement of ESYNC-bit2 (1<<18) */ +/* The 2-bit L field in a SYNC or WC field in a WAIT instruction. + For SYNC, some L values are reserved: + * Value 3 is reserved on newer server cpus. + * Values 2 and 3 are reserved on all other cpus. */ static unsigned long insert_ls (unsigned long insn, long value, - ppc_cpu_t dialect ATTRIBUTE_UNUSED, - const char **errmsg ATTRIBUTE_UNUSED) + ppc_cpu_t dialect, + const char **errmsg) +{ + /* For SYNC, some L values are illegal. */ + if (((insn >> 1) & 0x3ff) == 598) + { + long max_lvalue = (dialect & PPC_OPCODE_POWER4) ? 2 : 1; + if (value > max_lvalue) + { + *errmsg = _("illegal L operand value"); + return insn; + } + } + + return insn | ((value & 0x3) << 21); +} + +/* The 4-bit E field in a sync instruction that accepts 2 operands. + If ESYNC is non-zero, then the L field must be either 0 or 1 and + the complement of ESYNC-bit2. */ + +static unsigned long +insert_esync (unsigned long insn, + long value, + ppc_cpu_t dialect ATTRIBUTE_UNUSED, + const char **errmsg) { unsigned long ls; @@ -1375,12 +1407,15 @@ if (value == 0) { if (ls > 1) - return insn & ~(0x3 << 21); + *errmsg = _("illegal L operand value"); return insn; } - if ((value & 0x2) != 0) - return (insn & ~(0x3 << 21)) | ((value & 0xf) << 16); - return (insn & ~(0x3 << 21)) | (0x1 << 21) | ((value & 0xf) << 16); + + if ((ls & ~0x1) + || (((value >> 1) & 0x1) ^ ls) == 0) + *errmsg = _("incompatible L operand value"); + + return insn | ((value & 0xf) << 16); } /* The MB and ME fields in an M form instruction expressed as a single @@ -1865,12 +1900,7 @@ } /* The TBR field in an XFX instruction. This is just like SPR, but it - is optional. When TBR is omitted, it must be inserted as 268 (the - magic number of the TB register). These functions treat 0 - (indicating an omitted optional operand) as 268. This means that - ``mftb 4,0'' is not handled correctly. This does not matter very - much, since the architecture manual does not define mftb as - accepting any values other than 268 or 269. */ + is optional. */ static unsigned long insert_tbr (unsigned long insn, @@ -1878,8 +1908,6 @@ ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg) { - if (value == 0) - value = 268; if (value != 268 && value != 269) *errmsg = _("invalid tbr number"); return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6); @@ -1895,8 +1923,6 @@ ret = ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0); if (ret != 268 && ret != 269) *invalid = 1; - if (ret == 268) - ret = 0; return ret; } @@ -2025,6 +2051,7 @@ *invalid = 1; return (value) ? 1 : 0; } + /* The VLESIMM field in an I16A form instruction. This is split. */ static unsigned long @@ -2720,9 +2747,9 @@ #define PPC440 PPC_OPCODE_440 #define PPC464 PPC440 #define PPC476 PPC_OPCODE_476 -#define PPC750 PPC -#define PPC7450 PPC -#define PPC860 PPC +#define PPC750 PPC_OPCODE_750 +#define PPC7450 PPC_OPCODE_7450 +#define PPC860 PPC_OPCODE_860 #define PPCPS PPC_OPCODE_PPCPS #define PPCVEC PPC_OPCODE_ALTIVEC #define PPCVEC2 PPC_OPCODE_ALTIVEC2 @@ -2756,6 +2783,12 @@ #define E6500 PPC_OPCODE_E6500 #define PPCVLE PPC_OPCODE_VLE #define PPCHTM PPC_OPCODE_HTM +/* The list of embedded processors that use the embedded operand ordering + for the 3 operand dcbt and dcbtst instructions. */ +#define DCBT_EO (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_476 \ + | PPC_OPCODE_A2 | PPC_OPCODE_VLE) + + /* The opcode table. @@ -4463,7 +4496,7 @@ {"mfvrd", X(31,51)|1, XX1RB_MASK|1, PPCVSX2, PPCNONE, {RA, VS}}, {"eratilx", X(31,51), X_MASK, PPCA2, PPCNONE, {ERAT_T, RA, RB}}, -{"lbarx", X(31,52), XEH_MASK, POWER7|PPCVLE, PPCNONE, {RT, RA0, RB, EH}}, +{"lbarx", X(31,52), XEH_MASK, POWER8|PPCVLE, PPCNONE, {RT, RA0, RB, EH}}, {"ldux", X(31,53), X_MASK, PPC64|PPCVLE, PPCNONE, {RT, RAL, RB}}, @@ -4478,9 +4511,9 @@ {"andc", XRC(31,60,0), X_MASK, COM|PPCVLE, PPCNONE, {RA, RS, RB}}, {"andc.", XRC(31,60,1), X_MASK, COM|PPCVLE, PPCNONE, {RA, RS, RB}}, -{"waitrsv", X(31,62)|(1<<21), 0xffffffff, POWER7|E500MC|PPCA2, PPCNONE, {0}}, -{"waitimpl", X(31,62)|(2<<21), 0xffffffff, POWER7|E500MC|PPCA2, PPCNONE, {0}}, -{"wait", X(31,62), XWC_MASK, POWER7|E500MC|PPCA2|PPCVLE, PPCNONE, {WC}}, +{"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, PPCNONE, {0}}, +{"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, PPCNONE, {0}}, +{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|PPCVLE, PPCNONE, {WC}}, {"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2|PPCVLE, PPCNONE, {RA0, RB}}, @@ -4543,7 +4576,7 @@ {"mfvrwz", X(31,115)|1, XX1RB_MASK|1, PPCVSX2, PPCNONE, {RA, VS}}, {"mfvsrwz", X(31,115), XX1RB_MASK, PPCVSX2, PPCNONE, {RA, XS6}}, -{"lharx", X(31,116), XEH_MASK, POWER7|PPCVLE, PPCNONE, {RT, RA0, RB, EH}}, +{"lharx", X(31,116), XEH_MASK, POWER8|PPCVLE, PPCNONE, {RT, RA0, RB, EH}}, {"clf", X(31,118), XTO_MASK, POWER, PPCNONE, {RA, RB}}, @@ -4711,9 +4744,10 @@ {"mtvsrwz", X(31,243), XX1RB_MASK, PPCVSX2, PPCNONE, {XT6, RA}}, {"dcbtstt", XRT(31,246,0x10), XRT_MASK, POWER7, PPCNONE, {RA0, RB}}, -{"dcbtst", X(31,246), X_MASK, POWER4, PPCNONE, {RA0, RB, CT}}, -{"dcbtst", X(31,246), X_MASK, PPC|PPCVLE, POWER4, {CT, RA0, RB}}, - +{"dcbtst", X(31,246), X_MASK, POWER4, DCBT_EO, {RA0, RB, CT}}, +{"dcbtst", X(31,246), X_MASK, DCBT_EO, PPCNONE, {CT, RA0, RB}}, +{"dcbtst", X(31,246), X_MASK, PPC, POWER4|DCBT_EO, {RA0, RB}}, + {"stbux", X(31,247), X_MASK, COM|PPCVLE, PPCNONE, {RS, RAS, RB}}, {"slliq", XRC(31,248,0), X_MASK, M601, PPCNONE, {RA, RS, SH}}, @@ -4753,9 +4787,10 @@ {"lscbx.", XRC(31,277,1), X_MASK, M601, PPCNONE, {RT, RA, RB}}, {"dcbtt", XRT(31,278,0x10), XRT_MASK, POWER7, PPCNONE, {RA0, RB}}, -{"dcbt", X(31,278), X_MASK, POWER4, PPCNONE, {RA0, RB, CT}}, -{"dcbt", X(31,278), X_MASK, PPC|PPCVLE, POWER4, {CT, RA0, RB}}, - +{"dcbt", X(31,278), X_MASK, POWER4, DCBT_EO, {RA0, RB, CT}}, +{"dcbt", X(31,278), X_MASK, DCBT_EO, PPCNONE, {CT, RA0, RB}}, +{"dcbt", X(31,278), X_MASK, PPC, POWER4|DCBT_EO, {RA0, RB}}, + {"lhzx", X(31,279), X_MASK, COM|PPCVLE, PPCNONE, {RT, RA0, RB}}, {"cdtbcd", X(31,282), XRB_MASK, POWER6, PPCNONE, {RA, RS}}, @@ -4772,7 +4807,8 @@ {"mfbhrbe", X(31,302), X_MASK, POWER8, PPCNONE, {RT, BHRBE}}, -{"tlbie", X(31,306), XRTLRA_MASK, PPC, TITAN, {RB, L}}, +{"tlbie", X(31,306), XRA_MASK, POWER7, TITAN, {RB, RS}}, +{"tlbie", X(31,306), XRTLRA_MASK, PPC, POWER7|TITAN, {RB, L}}, {"tlbi", X(31,306), XRT_MASK, POWER, PPCNONE, {RA0, RB}}, {"eciwx", X(31,310), X_MASK, PPC, TITAN, {RT, RA0, RB}}, @@ -5364,7 +5400,8 @@ {"icbtlse", X(31,494), X_MASK, PPCCHLK, E500MC, {CT, RA, RB}}, -{"slbia", X(31,498), 0xffffffff, PPC64, PPCNONE, {0}}, +{"slbia", X(31,498), 0xff1fffff, POWER6, PPCNONE, {IH}}, +{"slbia", X(31,498), 0xffffffff, PPC64, POWER6, {0}}, {"cli", X(31,502), XRB_MASK, POWER, PPCNONE, {RT, RA}}, @@ -5452,6 +5489,7 @@ {"lswi", X(31,597), X_MASK, PPCCOM|PPCVLE, E500|E500MC, {RT, RAX, NBI}}, {"lsi", X(31,597), X_MASK, PWRCOM, PPCNONE, {RT, RA0, NB}}, +{"hwsync", XSYNC(31,598,0), 0xffffffff, POWER4, BOOKE|PPC476, {0}}, {"lwsync", XSYNC(31,598,1), 0xffffffff, PPC, E500, {0}}, {"ptesync", XSYNC(31,598,2), 0xffffffff, PPC64, PPCNONE, {0}}, {"sync", X(31,598), XSYNCLE_MASK,E6500, PPCNONE, {LS, ESYNC}}, @@ -5531,7 +5569,7 @@ {"tendall.", XRC(31,686,1)|(1<<25), XRTRARB_MASK, PPCHTM, PPCNONE, {0}}, {"tend.", XRC(31,686,1), XRTARARB_MASK, PPCHTM, PPCNONE, {HTM_A}}, -{"stbcx.", XRC(31,694,1), X_MASK, POWER7, PPCNONE, {RS, RA0, RB}}, +{"stbcx.", XRC(31,694,1), X_MASK, POWER8, PPCNONE, {RS, RA0, RB}}, {"stfsux", X(31,695), X_MASK, COM, PPCEFS, {FRS, RAS, RB}}, @@ -5561,7 +5599,7 @@ {"stswi", X(31,725), X_MASK, PPCCOM|PPCVLE, E500|E500MC, {RS, RA0, NB}}, {"stsi", X(31,725), X_MASK, PWRCOM, PPCNONE, {RS, RA0, NB}}, -{"sthcx.", XRC(31,726,1), X_MASK, POWER7, PPCNONE, {RS, RA0, RB}}, +{"sthcx.", XRC(31,726,1), X_MASK, POWER8, PPCNONE, {RS, RA0, RB}}, {"stfdx", X(31,727), X_MASK, COM, PPCEFS, {FRS, RA0, RB}}, @@ -5795,6 +5833,8 @@ {"tlbwelo", XTLB(31,978,1), XTLB_MASK, PPC403, PPCNONE, {RT, RA}}, {"tlbwe", X(31,978), X_MASK, PPC403|BOOKE|PPCA2|PPC476, PPCNONE, {RSO, RAOPT, SHO}}, +{"slbfee.", XRC(31,979,1), XRA_MASK, POWER6, PPCNONE, {RT, RB}}, + {"stbcix", X(31,981), X_MASK, POWER6, PPCNONE, {RS, RA0, RB}}, {"icbi", X(31,982), XRT_MASK, PPC|PPCVLE, PPCNONE, {RA0, RB}},