aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorMatthew Fortune <matthew.fortune@imgtec.com>2014-07-29 11:27:59 +0100
committerMatthew Fortune <matthew.fortune@imgtec.com>2014-07-29 11:27:59 +0100
commit351cdf24d223290b15fa991e5052ec9e9bd1e284 (patch)
treede4c8ba7c7c1f74323befdb6fca0873a4da678d5 /ld
parent7e09a22367934a6d53f79d8b01135832b80ab246 (diff)
downloadgdb-351cdf24d223290b15fa991e5052ec9e9bd1e284.zip
gdb-351cdf24d223290b15fa991e5052ec9e9bd1e284.tar.gz
gdb-351cdf24d223290b15fa991e5052ec9e9bd1e284.tar.bz2
[MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions
Specification: https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking include/ * elf/mips.h (PT_MIPS_ABIFLAGS, SHT_MIPS_ABIFLAGS): Define. (Val_GNU_MIPS_ABI_FP_OLD_64): Rename from Val_GNU_MIPS_ABI_FP_64. (Val_GNU_MIPS_ABI_FP_64): Redefine. (Val_GNU_MIPS_ABI_FP_XX): Define. (Elf_External_ABIFlags_v0, Elf_Internal_ABIFlags_v0): New structures. (AFL_REG_NONE, AFL_REG_32, AFL_REG_64, AFL_REG_128): Define. (AFL_ASE_DSP, AFL_ASE_DSPR2, AFL_ASE_EVA, AFL_ASE_MCU): Likewise. (AFL_ASE_MDMX, AFL_ASE_MIPS3D, AFL_ASE_MT, AFL_ASE_SMARTMIPS): Likewise. (AFL_ASE_VIRT, AFL_ASE_MSA, AFL_ASE_MIPS16): Likewise. (AFL_ASE_MICROMIPS, AFL_ASE_XPA): Likewise. (AFL_EXT_XLR, AFL_EXT_OCTEON2, AFL_EXT_OCTEONP): Likewise. (AFL_EXT_LOONGSON_3A, AFL_EXT_OCTEON, AFL_EXT_5900): Likewise. (AFL_EXT_4650, AFL_EXT_4010, AFL_EXT_4100, AFL_EXT_3900): Likewise. (AFL_EXT_10000, AFL_EXT_SB1, AFL_EXT_4111, AFL_EXT_4120): Likewise. (AFL_EXT_5400, AFL_EXT_5500, AFL_EXT_LOONGSON_2E): Likewise. (AFL_EXT_LOONGSON_2F): Likewise. (bfd_mips_elf_swap_abiflags_v0_in): Prototype. (bfd_mips_elf_swap_abiflags_v0_out): Likewise. (bfd_mips_isa_ext): Likewise. bfd/ * elfxx-mips.c (ABI_O32_P, MIPS_ELF_ABIFLAGS_SECTION_NAME_P): New macro. (mips_elf_obj_tdata): Add abiflags and abiflags_valid fields. (bfd_mips_elf_swap_abiflags_v0_in): New function. (bfd_mips_elf_swap_abiflags_v0_out): Likewise. (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_ABIFLAGS. (_bfd_mips_elf_fake_sections): Likewise. (_bfd_mips_elf_always_size_sections): Handle .MIPS.abiflags. (_bfd_mips_elf_additional_program_headers): Account for new PT_MIPS_ABIFLAGS program header. (_bfd_mips_elf_modify_segment_map): Create PT_MIPS_ABIFLAGS segment and associate with .MIPS.abiflags. (_bfd_mips_elf_gc_mark_extra_sections): New function. (bfd_mips_isa_ext, update_mips_abiflags_isa): New static function. (infer_mips_abiflags): Likewise. (_bfd_mips_elf_final_link): Handle .MIPS.abiflags. (mips_32bit_flags_p): Moved higher. (mips_elf_merge_obj_attributes, _bfd_mips_fp_abi_string): Error checking for FP ABIs. (_bfd_mips_elf_merge_private_bfd_data): Restructure and add abiflags checks. Check EF_MIPS_FP64 flag consistency. (print_mips_ases, print_mips_isa_ext): New static function. (print_mips_fp_abi_value, get_mips_reg_size): Likewise. (_bfd_mips_elf_print_private_bfd_data): Display abiflags data. (_bfd_mips_post_process_headers): Set EI_ABIVERSION = 3 for Val_GNU_MIPS_ABI_FP_64 or Val_GNU_MIPS_ABI_FP_64A. * elfxx-mips.h (_bfd_mips_elf_gc_mark_extra_sections): New prototype. * elf32-mips.c (elf_backend_gc_mark_extra_sections): Implement. * elfn32-mips.c (elf_backend_gc_mark_extra_sections): Implement. * elf64-mips.c (elf_backend_gc_mark_extra_sections): Implement. binutils/ * readelf.c (get_mips_segment_type): Display name for PT_MIPS_ABIFLAGS. (get_mips_section_type_name): Display name for SHT_MIPS_ABIFLAGS. (display_mips_gnu_attribute): Abstracted fp abi printing to... (print_mips_fp_abi_value): New static function. Handle new FP ABIs. (print_mips_ases, print_mips_isa_ext): New static functions. (get_mips_reg_size): Likewise. (process_mips_specific): Display abiflags data. elfcpp/ * elfcpp.h (PT_MIPS_ABIFLAGS): New program header type. gas/ * config/tc-mips.c (mips_flags_frag): New static global. (struct mips_set_options): Add oddspreg field. (file_mips_opts, mips_opts): Initialize oddspreg. (ISA_HAS_ODD_SINGLE_FPR): Add CPU argument and update for R5900 and Loongson-3a. (enum options, md_longopts, md_parse_option): Add -mfpxx, -modd-spreg and -mno-odd-spreg options. (md_begin): Create .MIPS.abiflags section. (fpabi_incompatible_with, fpabi_requires): New static function. (check_fpabi): Likewise. (mips_check_options): Handle fp=xx and oddspreg restrictions. (file_mips_check_options): Set oddspreg by default for fp=xx. (mips_oddfpreg_ok): Re-write function. (check_regno): Check odd numbered registers regardless of FPR size. For fp != 32 use as_bad instead of as_warn. (match_float_constant): Rewrite check regarding FP register width. Add support for generating constants when MXHC1 is present. Handle fp=xx to comply with the ABI. (macro): Update M_LI_DD similarly to match_float_constant. Generate MTHC1 when available. Check that correct code can be generated for fp=xx and fp=64 ABIs. (parse_code_option, s_mipsset): Add fp=xx, oddspreg and nooddspreg options. (mips_convert_ase_flags): New static function. (mips_elf_final_processing): Use fpabi == Val_GNU_MIPS_ABI_FP_OLD_64 to determine when to add the EF_MIPS_FP64 flag. Populate the .MIPS.abiflags section. (md_mips_end): Update .gnu_attribute based on command line and .module as applicable. Use check_fpabi to ensure .gnu.attribute and command line/.module options are consistent. * doc/as.texinfo: Add missing -mgp64/-mfp64 options and document new -mfpxx, -modd-spreg and -mno-odd-spreg options. * doc/c-mips.texi: Document -mfpxx, -modd-spreg, -mno-odd-spreg, gnu_attribute values and FP ABIs. ld/ * emulparams/elf32bmip.sh: Add .MIPS.abiflags. * emulparams/elf32bmipn32-defs.sh: Likewise. * emulparams/elf64bmip-defs.sh: Likewise. opcodes/ * micromips-opc.c (COD, LCD) New macros. (cfc1, ctc1): Remove FP_S attribute. (dmfc1, mfc1, mfhc1): Add LCD attribute. (dmtc1, mtc1, mthc1): Add COD attribute. * mips-opc.c (cfc1, cftc1, ctc, cttc1): Remove FP_S attribute. binutils/testsuite/ * binutils-all/readelf.s: Account for .MIPS.abiflags and .gnu.attributes. * binutils-all/readelf.ss-tmips: Likewise. * binutils-all/strip-3.d: Likewise. gas/testsuite/ * gas/mips/attr-gnu-4-0.d: New. * gas/mips/attr-gnu-4-0.s: Likewise. * gas/mips/attr-gnu-4-1-mfp32.l: Likewise. * gas/mips/attr-gnu-4-1-mfp32.s: Likewise. * gas/mips/attr-gnu-4-1-mfp64.l: Likewise. * gas/mips/attr-gnu-4-1-mfp64.s: Likewise. * gas/mips/attr-gnu-4-1-mfpxx.s: Likewise. * gas/mips/attr-gnu-4-1-msingle-float.l: Likewise. * gas/mips/attr-gnu-4-1-msingle-float.s: Likewise. * gas/mips/attr-gnu-4-1-msoft-float.l: Likewise. * gas/mips/attr-gnu-4-1-msoft-float.s: Likewise. * gas/mips/attr-gnu-4-1.d: Likewise. * gas/mips/attr-gnu-4-1.s: Likewise. * gas/mips/attr-gnu-4-2-mdouble-float.l: Likewise. * gas/mips/attr-gnu-4-2-mdouble-float.s: Likewise. * gas/mips/attr-gnu-4-2-msoft-float.l: Likewise. * gas/mips/attr-gnu-4-2-msoft-float.s: Likewise. * gas/mips/attr-gnu-4-2.d: Likewise. * gas/mips/attr-gnu-4-2.s: Likewise. * gas/mips/attr-gnu-4-3-mhard-float.l: Likewise. * gas/mips/attr-gnu-4-3-mhard-float.s: Likewise. * gas/mips/attr-gnu-4-3.d: Likewise. * gas/mips/attr-gnu-4-3.s: Likewise. * gas/mips/attr-gnu-4-4.l: Likewise. * gas/mips/attr-gnu-4-4.s: Likewise. * gas/mips/attr-gnu-4-5-64.l: Likewise. * gas/mips/attr-gnu-4-5-64.s: Likewise. * gas/mips/attr-gnu-4-5.d: Likewise. * gas/mips/attr-gnu-4-5.l: Likewise. * gas/mips/attr-gnu-4-5.s: Likewise. * gas/mips/attr-gnu-4-6-64.l: Likewise. * gas/mips/attr-gnu-4-6-64.s: Likewise. * gas/mips/attr-gnu-4-6.d: Likewise. * gas/mips/attr-gnu-4-6.l: Likewise. * gas/mips/attr-gnu-4-6.s: Likewise. * gas/mips/attr-gnu-4-6-msingle-float.l: Likewise. * gas/mips/attr-gnu-4-6-msingle-float.s: Likewise. * gas/mips/attr-gnu-4-6-msoft-float.l: Likewise. * gas/mips/attr-gnu-4-6-msoft-float.s: Likewise. * gas/mips/attr-gnu-4-6-noodd.l: Likewise. * gas/mips/attr-gnu-4-6-noodd.s: Likewise. * gas/mips/attr-gnu-4-7-64.l: Likewise. * gas/mips/attr-gnu-4-7-64.s: Likewise. * gas/mips/attr-gnu-4-7-msingle-float.l: Likewise. * gas/mips/attr-gnu-4-7-msingle-float.s: Likewise. * gas/mips/attr-gnu-4-7-msoft-float.l: Likewise. * gas/mips/attr-gnu-4-7-msoft-float.s: Likewise. * gas/mips/attr-gnu-4-7-odd.l: Likewise. * gas/mips/attr-gnu-4-7-odd.s: Likewise. * gas/mips/attr-gnu-4-7.d: Likewise. * gas/mips/attr-gnu-4-7.l: Likewise. * gas/mips/attr-gnu-4-7.s: Likewise. * gas/mips/attr-none-double.d: Likewise. * gas/mips/attr-none-o32-fp64.d: Likewise. * gas/mips/attr-none-o32-fp64-nooddspreg.d * gas/mips/attr-none-o32-fpxx.d: Likewise. * gas/mips/attr-none-single-float.d: Likewise. * gas/mips/attr-none-soft-float.d: Likewise. * gas/mips/elf_arch_mips32r3.d: Likewise. * gas/mips/elf_arch_mips32r5.d: Likewise. * gas/mips/elf_arch_mips64r3.d: Likewise. * gas/mips/elf_arch_mips64r5.d: Likewise. * gas/mips/li-d.d: Likewise. * gas/mips/li-d.s: Likewise. * gas/mips/module-check-warn.l: Likewise. * gas/mips/module-check-warn.s: Likewise. * gas/mips/module-check.d: Likewise. * gas/mips/module-check.s: Likewise. * gas/mips/module-mfp32.d: Likewise. * gas/mips/module-mfp32.s: Likewise. * gas/mips/module-mfp64.d: Likewise. * gas/mips/module-mfp64.s: Likewise. * gas/mips/module-mfp64-noodd.d: Likewise. * gas/mips/module-mfp64-noodd.s: Likewise. * gas/mips/module-mfpxx.d: Likewise. * gas/mips/module-mfpxx.s: Likewise. * gas/mips/module-msingle-float.d: Likewise. * gas/mips/module-msingle-float.s: Likewise. * gas/mips/module-msoft-float.d: Likewise. * gas/mips/module-msoft-float.s: Likewise. * gas/mips/module-set-mfpxx.d: Likewise. * gas/mips/module-set-mfpxx.s: Likewise. * gas/mips/fpxx-oddfpreg.d: Likewise. * gas/mips/fpxx-oddfpreg.l: Likewise. * gas/mips/fpxx-oddfpreg.s: Likewise. * gas/mips/no-odd-spreg.d: Likewise. * gas/mips/odd-spreg.d: Likewise. * gas/elf/section2.e-mips: Adjust expected output. * gas/mips/attr-gnu-abi-fp-1.d: Likewise. * gas/mips/attr-gnu-abi-msa-1.d: Likewise. * gas/mips/call-nonpic-1.d: Likewise. * gas/mips/elf_arch_mips1.d: Likewise. * gas/mips/elf_arch_mips2.d: Likewise. * gas/mips/elf_arch_mips3.d: Likewise. * gas/mips/elf_arch_mips32.d: Likewise. * gas/mips/elf_arch_mips32r2.d: Likewise. * gas/mips/elf_arch_mips4.d: Likewise. * gas/mips/elf_arch_mips5.d: Likewise. * gas/mips/elf_arch_mips64.d: Likewise. * gas/mips/elf_arch_mips64r2.d: Likewise. * gas/mips/elf_ase_micromips-2.d: Likewise. * gas/mips/elf_ase_micromips.d: Likewise. * gas/mips/elf_ase_mips16-2.d: Likewise. * gas/mips/elf_ase_mips16.d: Likewise. * gas/mips/module-defer-warn1.d: Likewise. * gas/mips/module-override.d: Likewise. * gas/mips/n32-consec.d: Likewise. * gas/mips/nan-2008-1.d: Likewise. * gas/mips/nan-2008-2.d: Likewise. * gas/mips/nan-2008-3.d: Likewise. * gas/mips/nan-2008-4.d: Likewise. * gas/mips/nan-legacy-1.d: Likewise. * gas/mips/nan-legacy-2.d: Likewise. * gas/mips/nan-legacy-3.d: Likewise. * gas/mips/nan-legacy-4.d: Likewise. * gas/mips/nan-legacy-5.d: Likewise. * gas/mips/tmips16-e.d: Likewise. * gas/mips/tmips16-f.d: Likewise. * gas/mips/tmipsel16-e.d: Likewise. * gas/mips/tmipsel16-f.d: Likewise. * gas/testsuite/gas/mips/mips.exp: Add new tests. ld/testsuite/ * ld-mips-elf/abiflags-strip1-ph.d: New. * ld-mips-elf/abiflags-strip2-ph.d: Likewise. * ld-mips-elf/abiflags-strip3-ph.d: Likewise. * ld-mips-elf/abiflags-strip4-ph.d: Likewise. * ld-mips-elf/abiflags-strip5-ph.d: Likewise. * ld-mips-elf/abiflags-strip6-ph.d: Likewise. * ld-mips-elf/abiflags-strip7-ph.d: Likewise. * ld-mips-elf/abiflags-strip8-ph.d: Likewise. * ld-mips-elf/abiflags-strip9-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-0-n32-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-0-n64-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-0-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-06.d: Likewise. * ld-mips-elf/attr-gnu-4-07.d: Likewise. * ld-mips-elf/attr-gnu-4-08.d: Likewise. * ld-mips-elf/attr-gnu-4-1-n32-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-1-n64-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-1-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-16.d: Likewise. * ld-mips-elf/attr-gnu-4-17.d: Likewise. * ld-mips-elf/attr-gnu-4-18.d: Likewise. * ld-mips-elf/attr-gnu-4-2-n32-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-2-n64-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-2-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-26.d: Likewise. * ld-mips-elf/attr-gnu-4-27.d: Likewise. * ld-mips-elf/attr-gnu-4-28.d: Likewise. * ld-mips-elf/attr-gnu-4-3-n32-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-3-n64-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-3-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-36.d: Likewise. * ld-mips-elf/attr-gnu-4-37.d: Likewise. * ld-mips-elf/attr-gnu-4-38.d: Likewise. * ld-mips-elf/attr-gnu-4-4-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-46.d: Likewise. * ld-mips-elf/attr-gnu-4-47.d: Likewise. * ld-mips-elf/attr-gnu-4-48.d: Likewise. * ld-mips-elf/attr-gnu-4-5-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-50.d: Likewise. * ld-mips-elf/attr-gnu-4-52.d: Likewise. * ld-mips-elf/attr-gnu-4-53.d: Likewise. * ld-mips-elf/attr-gnu-4-54.d: Likewise. * ld-mips-elf/attr-gnu-4-55.d: Likewise. * ld-mips-elf/attr-gnu-4-56.d: Likewise. * ld-mips-elf/attr-gnu-4-57.d: Likewise. * ld-mips-elf/attr-gnu-4-58.d: Likewise. * ld-mips-elf/attr-gnu-4-6-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-6.s: Likewise. * ld-mips-elf/attr-gnu-4-60.d: Likewise. * ld-mips-elf/attr-gnu-4-61.d: Likewise. * ld-mips-elf/attr-gnu-4-62.d: Likewise. * ld-mips-elf/attr-gnu-4-63.d: Likewise. * ld-mips-elf/attr-gnu-4-64.d: Likewise. * ld-mips-elf/attr-gnu-4-65.d: Likewise. * ld-mips-elf/attr-gnu-4-66.d: Likewise. * ld-mips-elf/attr-gnu-4-67.d: Likewise. * ld-mips-elf/attr-gnu-4-68.d: Likewise. * ld-mips-elf/attr-gnu-4-7-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-7.s: Likewise. * ld-mips-elf/attr-gnu-4-70.d: Likewise. * ld-mips-elf/attr-gnu-4-71.d: Likewise. * ld-mips-elf/attr-gnu-4-72.d: Likewise. * ld-mips-elf/attr-gnu-4-73.d: Likewise. * ld-mips-elf/attr-gnu-4-74.d: Likewise. * ld-mips-elf/attr-gnu-4-75.d: Likewise. * ld-mips-elf/attr-gnu-4-76.d: Likewise. * ld-mips-elf/attr-gnu-4-77.d: Likewise. * ld-mips-elf/attr-gnu-4-78.d: Likewise. * ld-mips-elf/attr-gnu-4-8.s: Likewise. * ld-mips-elf/attr-gnu-4-81.d: Likewise. * ld-mips-elf/empty.s: Likewise. * ld-mips-elf/attr-gnu-4-00.d: Adjust expected output. * ld-mips-elf/attr-gnu-4-01.d: Likewise. * ld-mips-elf/attr-gnu-4-02.d: Likewise. * ld-mips-elf/attr-gnu-4-03.d: Likewise. * ld-mips-elf/attr-gnu-4-04.d: Likewise. * ld-mips-elf/attr-gnu-4-05.d: Likewise. * ld-mips-elf/attr-gnu-4-10.d: Likewise. * ld-mips-elf/attr-gnu-4-11.d: Likewise. * ld-mips-elf/attr-gnu-4-14.d: Likewise. * ld-mips-elf/attr-gnu-4-15.d: Likewise. * ld-mips-elf/attr-gnu-4-2.s: Likewise. * ld-mips-elf/attr-gnu-4-20.d: Likewise. * ld-mips-elf/attr-gnu-4-22.d: Likewise. * ld-mips-elf/attr-gnu-4-24.d: Likewise. * ld-mips-elf/attr-gnu-4-25.d: Likewise. * ld-mips-elf/attr-gnu-4-3.s: Likewise. * ld-mips-elf/attr-gnu-4-30.d: Likewise. * ld-mips-elf/attr-gnu-4-33.d: Likewise. * ld-mips-elf/attr-gnu-4-34.d: Likewise. * ld-mips-elf/attr-gnu-4-35.d: Likewise. * ld-mips-elf/attr-gnu-4-40.d: Likewise. * ld-mips-elf/attr-gnu-4-41.d: Likewise. * ld-mips-elf/attr-gnu-4-42.d: Likewise. * ld-mips-elf/attr-gnu-4-43.d: Likewise. * ld-mips-elf/attr-gnu-4-44.d: Likewise. * ld-mips-elf/attr-gnu-4-45.d: Likewise. * ld-mips-elf/attr-gnu-4-5.s: Likewise. * ld-mips-elf/attr-gnu-4-51.d: Likewise. * ld-mips-elf/attr-gnu-8-00.d: Likewise. * ld-mips-elf/attr-gnu-8-01.d: Likewise. * ld-mips-elf/attr-gnu-8-02.d: Likewise. * ld-mips-elf/attr-gnu-8-10.d: Likewise. * ld-mips-elf/attr-gnu-8-11.d: Likewise. * ld-mips-elf/attr-gnu-8-20.d: Likewise. * ld-mips-elf/attr-gnu-8-22.d: Likewise. * ld-mips-elf/jalx-2.dd: Likewise. * ld-mips-elf/mips16-pic-1.gd: Likewise. * ld-mips-elf/mips16-pic-2.gd: Likewise. * ld-mips-elf/mips16-pic-3.gd: Likewise. * ld-mips-elf/mips16-pic-4a.gd: Likewise. * ld-mips-elf/multi-got-no-shared.d: Likewise. * ld-mips-elf/nan-2008.d: Likewise. * ld-mips-elf/nan-legacy.d: Rework test. * ld-mips-elf/pic-and-nonpic-3a.gd: Likewise. * ld-mips-elf/pic-and-nonpic-3b.gd: Likewise. * ld-mips-elf/pic-and-nonpic-5b.gd: Likewise. * ld-mips-elf/pic-and-nonpic-6.ld: Likewise. * ld-mips-elf/rel32-n32.d: Likewise. * ld-mips-elf/rel32-o32.d: Likewise. * ld-mips-elf/rel64.d: Likewise. * ld-mips-elf/tls-multi-got-1.r: Likewise. * ld-elf/group.ld: Discard .MIPS.abiflags and .gnu.attributes. * ld-elf/orphan-region.ld: Likewise. * ld-elf/orphan.ld: Likewise. * ld-mips-elf/compressed-plt-1.ld: Likewise. * ld-mips-elf/dyn-sec64.ld: Likewise. * ld-mips-elf/got-dump-1.ld: Likewise. * ld-mips-elf/got-dump-2.ld: Likewise. * ld-mips-elf/got-page-1.ld: Likewise. * ld-mips-elf/mips-dyn.ld: Likewise. * ld-mips-elf/mips-lib.ld: Likewise. * ld-mips-elf/pic-and-nonpic-3a.ld: Likewise. * ld-mips-elf/pic-and-nonpic-3b.ld: Likewise. * ld-mips-elf/pic-and-nonpic-4b.ld: Likewise. * ld-mips-elf/pic-and-nonpic-5b.ld: Likewise. * ld-mips-elf/region1.t: Likewise. * ld-mips-elf/stub-dynsym-1.ld: Likewise. * ld-mips-elf/tls-hidden3.ld: Likewise. * ld-mips-elf/vxworks1.ld: Likewise. * ld-scripts/overlay-size.t: Likewise. * ld-mips-elf/elf-rel-got-n32-embed.d: Remove .MIPS.abiflags from objects. * ld-mips-elf/elf-rel-got-n32.d: Likewise. * ld-mips-elf/elf-rel-got-n64-embed.d: Likewise. * ld-mips-elf/elf-rel-got-n64-linux.d: Likewise. * ld-mips-elf/elf-rel-got-n64.d: Likewise. * ld-mips-elf/elf-rel-xgot-n32.d: Likewise. * ld-mips-elf/elf-rel-xgot-n32-embed.d: Likewise. * ld-mips-elf/elf-rel-xgot-n64.d: Likewise. * ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise. * ld-mips-elf/elf-rel-xgot-n64-embed.d: Likewise. * ld-mips-elf/mips-elf.exp: Add new tests.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/emulparams/elf32bmip.sh3
-rw-r--r--ld/emulparams/elf32bmipn32-defs.sh1
-rw-r--r--ld/emulparams/elf64bmip-defs.sh5
-rw-r--r--ld/testsuite/ChangeLog156
-rw-r--r--ld/testsuite/ld-elf/group.ld2
-rw-r--r--ld/testsuite/ld-elf/orphan-region.ld2
-rw-r--r--ld/testsuite/ld-elf/orphan.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d13
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d29
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d29
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d33
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d33
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d29
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d29
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d29
-rw-r--r--ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d29
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-0-n64-ph.d25
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-00.d13
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-01.d14
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-02.d14
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-03.d15
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-04.d10
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-05.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-06.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-07.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-08.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-1-n32-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-1-n64-ph.d25
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-10.d43
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-11.d14
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-12.d1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-13.d1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-14.d7
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-15.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-16.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-17.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-18.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-2-n32-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-2-n64-ph.d25
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-2.s1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-20.d14
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-21.d1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-22.d14
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-23.d1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-24.d7
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-25.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-26.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-27.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-28.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-3-n32-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-3-n64-ph.d25
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-3.s1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-30.d14
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-31.d1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-32.d1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-33.d14
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-34.d7
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-35.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-36.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-37.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-38.d22
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-40.d10
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-41.d7
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-42.d7
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-43.d7
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-44.d20
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-45.d16
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-46.d6
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-47.d6
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-48.d6
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-5.s2
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-50.d41
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-51.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-52.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-53.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-54.d6
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-55.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-56.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-57.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-58.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-6.s4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-60.d41
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-61.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-62.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-63.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-64.d6
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-65.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-66.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-67.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-68.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d26
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-7.s5
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-70.d41
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-71.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-72.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-73.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-74.d6
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-75.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-76.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-77.d21
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-78.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-8.s1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-4-81.d4
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-00.d5
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-01.d3
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-02.d3
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-10.d3
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-11.d3
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-12.d1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-20.d3
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-21.d1
-rw-r--r--ld/testsuite/ld-mips-elf/attr-gnu-8-22.d3
-rw-r--r--ld/testsuite/ld-mips-elf/compressed-plt-1.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/dyn-sec64.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-got-n32-embed.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-got-n32.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-got-n64-embed.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-got-n64.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-xgot-n32-embed.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-embed.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d3
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-xgot-n64.d3
-rw-r--r--ld/testsuite/ld-mips-elf/empty.s0
-rw-r--r--ld/testsuite/ld-mips-elf/got-dump-1.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/got-dump-2.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/got-page-1.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/jalx-2.dd2
-rw-r--r--ld/testsuite/ld-mips-elf/mips-dyn.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp84
-rw-r--r--ld/testsuite/ld-mips-elf/mips-lib.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-pic-1.gd17
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-pic-2.gd25
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-pic-3.gd17
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-pic-4a.gd17
-rw-r--r--ld/testsuite/ld-mips-elf/multi-got-no-shared.d12
-rw-r--r--ld/testsuite/ld-mips-elf/nan-2008.d1
-rw-r--r--ld/testsuite/ld-mips-elf/nan-legacy.d4
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.gd4
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.gd4
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.gd4
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/region1.t2
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-n32.d6
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-o32.d6
-rw-r--r--ld/testsuite/ld-mips-elf/rel64.d6
-rw-r--r--ld/testsuite/ld-mips-elf/stub-dynsym-1.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/tls-hidden3.ld2
-rw-r--r--ld/testsuite/ld-mips-elf/tls-multi-got-1.r2
-rw-r--r--ld/testsuite/ld-mips-elf/vxworks1.ld2
-rw-r--r--ld/testsuite/ld-scripts/overlay-size.t2
165 files changed, 2013 insertions, 186 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index e6ed34c..0f6c57c 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * emulparams/elf32bmip.sh: Add .MIPS.abiflags.
+ * emulparams/elf32bmipn32-defs.sh: Likewise.
+ * emulparams/elf64bmip-defs.sh: Likewise.
+
2014-07-27 Anthony Green <green@moxielogic.com>
* Makefile.am (ALL_EMULATION_SOURCES): Add moxiebox support.
diff --git a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh
index 118d57a..8da0f8f 100644
--- a/ld/emulparams/elf32bmip.sh
+++ b/ld/emulparams/elf32bmip.sh
@@ -17,7 +17,8 @@ if test -z "${CREATE_SHLIB}"; then
INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
fi
INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
- .reginfo ${RELOCATING-0} : { *(.reginfo) }
+ .MIPS.abiflags ${RELOCATING-0} : { *(.MIPS.abiflags) }
+ .reginfo ${RELOCATING-0} : { *(.reginfo) }
"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
# Unlike most targets, the MIPS backend puts all dynamic relocations
diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh
index 514990b..723eac8 100644
--- a/ld/emulparams/elf32bmipn32-defs.sh
+++ b/ld/emulparams/elf32bmipn32-defs.sh
@@ -88,6 +88,7 @@ if test -z "${CREATE_SHLIB}"; then
INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
fi
INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+ .MIPS.abiflags ${RELOCATING-0} : { *(.MIPS.abiflags) }
.reginfo ${RELOCATING-0} : { *(.reginfo) }"
# Discard any .MIPS.content* or .MIPS.events* sections. The linker
# doesn't know how to adjust them.
diff --git a/ld/emulparams/elf64bmip-defs.sh b/ld/emulparams/elf64bmip-defs.sh
index 110f892..8a0522f 100644
--- a/ld/emulparams/elf64bmip-defs.sh
+++ b/ld/emulparams/elf64bmip-defs.sh
@@ -1,3 +1,6 @@
. ${srcdir}/emulparams/elf32bmipn32-defs.sh
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
+INITIAL_READONLY_SECTIONS="
+ .MIPS.abiflags ${RELOCATING-0} : { *(.MIPS.abiflags) }
+ .MIPS.options : { *(.MIPS.options) }
+"
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e940e1a..02f9dc4 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,159 @@
+2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * ld-mips-elf/abiflags-strip1-ph.d: New.
+ * ld-mips-elf/abiflags-strip2-ph.d: Likewise.
+ * ld-mips-elf/abiflags-strip3-ph.d: Likewise.
+ * ld-mips-elf/abiflags-strip4-ph.d: Likewise.
+ * ld-mips-elf/abiflags-strip5-ph.d: Likewise.
+ * ld-mips-elf/abiflags-strip6-ph.d: Likewise.
+ * ld-mips-elf/abiflags-strip7-ph.d: Likewise.
+ * ld-mips-elf/abiflags-strip8-ph.d: Likewise.
+ * ld-mips-elf/abiflags-strip9-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-0-n32-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-0-n64-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-0-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-06.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-07.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-08.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-1-n32-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-1-n64-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-1-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-16.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-17.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-18.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-2-n32-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-2-n64-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-2-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-26.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-27.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-28.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-3-n32-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-3-n64-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-3-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-36.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-37.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-38.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-4-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-46.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-47.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-48.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-5-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-50.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-52.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-53.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-54.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-55.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-56.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-57.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-58.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-6-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-6.s: Likewise.
+ * ld-mips-elf/attr-gnu-4-60.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-61.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-62.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-63.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-64.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-65.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-66.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-67.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-68.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-7-ph.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-7.s: Likewise.
+ * ld-mips-elf/attr-gnu-4-70.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-71.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-72.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-73.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-74.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-75.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-76.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-77.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-78.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-8.s: Likewise.
+ * ld-mips-elf/attr-gnu-4-81.d: Likewise.
+ * ld-mips-elf/empty.s: Likewise.
+ * ld-mips-elf/attr-gnu-4-00.d: Adjust expected output.
+ * ld-mips-elf/attr-gnu-4-01.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-02.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-03.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-04.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-05.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-10.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-11.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-14.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-15.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-2.s: Likewise.
+ * ld-mips-elf/attr-gnu-4-20.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-22.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-24.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-25.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-3.s: Likewise.
+ * ld-mips-elf/attr-gnu-4-30.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-33.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-34.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-35.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-40.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-41.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-42.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-43.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-44.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-45.d: Likewise.
+ * ld-mips-elf/attr-gnu-4-5.s: Likewise.
+ * ld-mips-elf/attr-gnu-4-51.d: Likewise.
+ * ld-mips-elf/attr-gnu-8-00.d: Likewise.
+ * ld-mips-elf/attr-gnu-8-01.d: Likewise.
+ * ld-mips-elf/attr-gnu-8-02.d: Likewise.
+ * ld-mips-elf/attr-gnu-8-10.d: Likewise.
+ * ld-mips-elf/attr-gnu-8-11.d: Likewise.
+ * ld-mips-elf/attr-gnu-8-20.d: Likewise.
+ * ld-mips-elf/attr-gnu-8-22.d: Likewise.
+ * ld-mips-elf/jalx-2.dd: Likewise.
+ * ld-mips-elf/mips16-pic-1.gd: Likewise.
+ * ld-mips-elf/mips16-pic-2.gd: Likewise.
+ * ld-mips-elf/mips16-pic-3.gd: Likewise.
+ * ld-mips-elf/mips16-pic-4a.gd: Likewise.
+ * ld-mips-elf/multi-got-no-shared.d: Likewise.
+ * ld-mips-elf/nan-2008.d: Likewise.
+ * ld-mips-elf/nan-legacy.d: Rework test.
+ * ld-mips-elf/pic-and-nonpic-3a.gd: Likewise.
+ * ld-mips-elf/pic-and-nonpic-3b.gd: Likewise.
+ * ld-mips-elf/pic-and-nonpic-5b.gd: Likewise.
+ * ld-mips-elf/pic-and-nonpic-6.ld: Likewise.
+ * ld-mips-elf/rel32-n32.d: Likewise.
+ * ld-mips-elf/rel32-o32.d: Likewise.
+ * ld-mips-elf/rel64.d: Likewise.
+ * ld-mips-elf/tls-multi-got-1.r: Likewise.
+ * ld-elf/group.ld: Discard .MIPS.abiflags and .gnu.attributes.
+ * ld-elf/orphan-region.ld: Likewise.
+ * ld-elf/orphan.ld: Likewise.
+ * ld-mips-elf/compressed-plt-1.ld: Likewise.
+ * ld-mips-elf/dyn-sec64.ld: Likewise.
+ * ld-mips-elf/got-dump-1.ld: Likewise.
+ * ld-mips-elf/got-dump-2.ld: Likewise.
+ * ld-mips-elf/got-page-1.ld: Likewise.
+ * ld-mips-elf/mips-dyn.ld: Likewise.
+ * ld-mips-elf/mips-lib.ld: Likewise.
+ * ld-mips-elf/pic-and-nonpic-3a.ld: Likewise.
+ * ld-mips-elf/pic-and-nonpic-3b.ld: Likewise.
+ * ld-mips-elf/pic-and-nonpic-4b.ld: Likewise.
+ * ld-mips-elf/pic-and-nonpic-5b.ld: Likewise.
+ * ld-mips-elf/region1.t: Likewise.
+ * ld-mips-elf/stub-dynsym-1.ld: Likewise.
+ * ld-mips-elf/tls-hidden3.ld: Likewise.
+ * ld-mips-elf/vxworks1.ld: Likewise.
+ * ld-scripts/overlay-size.t: Likewise.
+ * ld-mips-elf/elf-rel-got-n32-embed.d: Remove .MIPS.abiflags from
+ objects.
+ * ld-mips-elf/elf-rel-got-n32.d: Likewise.
+ * ld-mips-elf/elf-rel-got-n64-embed.d: Likewise.
+ * ld-mips-elf/elf-rel-got-n64-linux.d: Likewise.
+ * ld-mips-elf/elf-rel-got-n64.d: Likewise.
+ * ld-mips-elf/elf-rel-xgot-n32.d: Likewise.
+ * ld-mips-elf/elf-rel-xgot-n32-embed.d: Likewise.
+ * ld-mips-elf/elf-rel-xgot-n64.d: Likewise.
+ * ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
+ * ld-mips-elf/elf-rel-xgot-n64-embed.d: Likewise.
+ * ld-mips-elf/mips-elf.exp: Add new tests.
+
2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/17154
diff --git a/ld/testsuite/ld-elf/group.ld b/ld/testsuite/ld-elf/group.ld
index 123ab26..f8e50c3 100644
--- a/ld/testsuite/ld-elf/group.ld
+++ b/ld/testsuite/ld-elf/group.ld
@@ -2,5 +2,5 @@ SECTIONS
{
. = 0x1000;
.text : { *(.text) *(.rodata.brlt) }
- /DISCARD/ : { *(.dropme) *(.reginfo) }
+ /DISCARD/ : { *(.dropme) *(.reginfo) *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-elf/orphan-region.ld b/ld/testsuite/ld-elf/orphan-region.ld
index b7dfdba..2abf8bc 100644
--- a/ld/testsuite/ld-elf/orphan-region.ld
+++ b/ld/testsuite/ld-elf/orphan-region.ld
@@ -7,5 +7,5 @@ SECTIONS
{
.text : ALIGN (4) { *(.text) } > region
.rodata : ALIGN (4) { *(.rodata) } > region
- /DISCARD/ : { *(.reginfo) *(.trampolines) }
+ /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.trampolines) }
}
diff --git a/ld/testsuite/ld-elf/orphan.ld b/ld/testsuite/ld-elf/orphan.ld
index d23222b..44eb7eb 100644
--- a/ld/testsuite/ld-elf/orphan.ld
+++ b/ld/testsuite/ld-elf/orphan.ld
@@ -4,5 +4,5 @@ SECTIONS
.data : { *(.data) }
.bss : { *(.bss) *(COMMON) }
.note : { *(.note) }
- /DISCARD/ : { *(.reginfo) *(.trampolines) }
+ /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.trampolines) }
}
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d
new file mode 100644
index 0000000..3af3433
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d
@@ -0,0 +1,13 @@
+#source: jr.s -mips32r2 -32 -mfp32 -EB RUN_OBJCOPY
+#objcopy_objects: -R .MIPS.abiflags
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+#...
+!0x70000003.*
+#...
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d
new file mode 100644
index 0000000..1da7840
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d
@@ -0,0 +1,29 @@
+#source: jr.s -mips32r2 -32 -mfpxx -EB
+#source: jr.s -march=octeon -32 -mfp64 -EB RUN_OBJCOPY
+#ld: -melf32btsmip -e 0
+#objcopy_objects: -R .MIPS.abiflags
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r-x
+private flags = 808b1100: \[abi=O32\] \[mips64r2\] \[32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: Cavium Networks Octeon
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d
new file mode 100644
index 0000000..df5640a
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d
@@ -0,0 +1,29 @@
+#source: jr.s -march=octeon -32 -mfp64 -EB RUN_OBJCOPY
+#source: jr.s -mips32r2 -32 -mfpxx -EB
+#ld: -melf32btsmip -e 0
+#objcopy_objects: -R .MIPS.abiflags
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r-x
+private flags = 808b1100: \[abi=O32\] \[mips64r2\] \[32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: Cavium Networks Octeon
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d
new file mode 100644
index 0000000..09ceadf
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d
@@ -0,0 +1,33 @@
+#source: jr.s -march=octeon -32 -mfp64 -EB -mdmx RUN_OBJCOPY
+#source: jr.s -mips32r2 -32 -mfpxx -EB
+#source: jr.s -mips32r2 -32 -mfp64 -mno-odd-spreg -mmsa -EB
+#source: jr.s -mips2 -32 -mfpxx -mips16 -EB RUN_OBJCOPY
+#ld: -melf32btsmip -e 0
+#objcopy_objects: -R .MIPS.abiflags
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x00000... memsz 0x00000... flags r-x
+private flags = 8c8b1100: \[abi=O32\] \[mips64r2\] \[mdmx\] \[mips16\] \[32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64r2
+GPR size: 32
+CPR1 size: 128
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: Cavium Networks Octeon
+ASEs:
+ MDMX ASE
+ MSA ASE
+ MIPS16 ASE
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d
new file mode 100644
index 0000000..bde7096
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d
@@ -0,0 +1,33 @@
+#source: jr.s -mips32r2 -32 -mfpxx -EB
+#source: jr.s -mips32r2 -32 -mfp64 -mmsa -EB
+#source: jr.s -march=octeon -32 -mfp64 -EB -mdmx RUN_OBJCOPY
+#source: jr.s -mips2 -32 -mips16 -mfpxx -EB RUN_OBJCOPY
+#ld: -melf32btsmip -e 0
+#objcopy_objects: -R .MIPS.abiflags
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x00000... memsz 0x00000... flags r-x
+private flags = 8c8b1100: \[abi=O32\] \[mips64r2\] \[mdmx\] \[mips16\] \[32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64r2
+GPR size: 32
+CPR1 size: 128
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: Cavium Networks Octeon
+ASEs:
+ MDMX ASE
+ MSA ASE
+ MIPS16 ASE
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d
new file mode 100644
index 0000000..3abb336
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d
@@ -0,0 +1,29 @@
+#source: jr.s -mips32r3 -32 -EB RUN_OBJCOPY
+#source: jr.s -mips32r2 -32 -EB
+#ld: -melf32btsmip -e 0
+#objcopy_objects: -R .MIPS.abiflags
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r-x
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d
new file mode 100644
index 0000000..d8f5dc5
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d
@@ -0,0 +1,29 @@
+#source: jr.s -mips32r3 -32 -EB
+#source: jr.s -mips32r2 -32 -EB RUN_OBJCOPY
+#ld: -melf32btsmip -e 0
+#objcopy_objects: -R .MIPS.abiflags
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r-x
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r3
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d
new file mode 100644
index 0000000..840dc59
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d
@@ -0,0 +1,29 @@
+#source: jr.s -mips32r2 -32 -mfpxx -EB
+#source: jr.s -mips32r2 -32 -mfp64 -EB RUN_OBJCOPY
+#ld: -melf32btsmip -e 0
+#objcopy_objects: -R .gnu.attributes
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r-x
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d
new file mode 100644
index 0000000..f42961b
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d
@@ -0,0 +1,29 @@
+#source: jr.s -mips32r2 -32 -mfpxx -EB
+#source: jr.s -mips32r2 -32 -mfp64 -mno-odd-spreg -EB RUN_OBJCOPY
+#ld: -melf32btsmip -e 0
+#objcopy_objects: -R .gnu.attributes
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r-x
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d
new file mode 100644
index 0000000..0fb6988
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d
@@ -0,0 +1,26 @@
+#source: attr-gnu-4-0.s -mips3 -n32 -EB
+#ld: -melf32btsmipn32 -e 0
+#objdump: -p
+
+[^:]*: file format elf32-ntradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x100000.. paddr 0x100000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x10000000 paddr 0x10000000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 20000020: \[abi=N32\] \[mips3\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 64
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard or soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n64-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n64-ph.d
new file mode 100644
index 0000000..f276025
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n64-ph.d
@@ -0,0 +1,25 @@
+#source: attr-gnu-4-0.s -mips3 -64 -EB
+#ld: -melf64btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf64-tradbigmips
+
+Program Header:
+0x70000003 off 0x00000000000000b0 vaddr 0x00000001200000b0 paddr 0x00000001200000b0 align 2\*\*3
+ filesz 0x0000000000000018 memsz 0x0000000000000018 flags r--
+ LOAD off 0x0000000000000000 vaddr 0x0000000120000000 paddr 0x0000000120000000 align 2\*\*16
+ filesz 0x00000000000000.. memsz 0x00000000000000.. flags r--
+private flags = 20000000: \[abi=64\] \[mips3\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 64
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard or soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d
new file mode 100644
index 0000000..eb33a70
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d
@@ -0,0 +1,26 @@
+#source: attr-gnu-4-0.s -mips32r2 -32 -EB
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: .*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard or soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-00.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-00.d
index 32bc319..d86eda4 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-00.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-00.d
@@ -2,5 +2,16 @@
#source: attr-gnu-4-0.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard or soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-01.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-01.d
index 7a5c7a1..ffc16c3 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-01.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-01.d
@@ -2,8 +2,20 @@
#source: attr-gnu-4-1.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-02.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-02.d
index f29d5d5..3d1a2eb 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-02.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-02.d
@@ -2,8 +2,20 @@
#source: attr-gnu-4-2.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-03.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-03.d
index e571e13..116b6f1 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-03.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-03.d
@@ -1,9 +1,22 @@
#source: attr-gnu-4-0.s
+#as: -msoft-float
#source: attr-gnu-4-3.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-04.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-04.d
index f8dee5c..628daee 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-04.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-04.d
@@ -1,9 +1,5 @@
#source: attr-gnu-4-0.s
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
#ld: -r
-#readelf: -A
-#target: mips*-*-*
-
-Attribute Section: gnu
-File Attributes
- Tag_GNU_MIPS_ABI_FP: Hard float \(MIPS32r2 64-bit FPU\)
+#error: \A[^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d
index 6856df0..46b94805 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d
@@ -1,9 +1,21 @@
-#source: attr-gnu-4-0.s
-#source: attr-gnu-4-5.s
-#ld: -r
+#source: attr-gnu-4-0.s -32 -EB
+#source: attr-gnu-4-5.s -32 -EB
+#ld: -r -melf32btsmip
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
- Tag_GNU_MIPS_ABI_FP: \?\?\? \(5\)
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, Any FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, Any FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-06.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-06.d
new file mode 100644
index 0000000..c23c0dc
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-06.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-0.s -32 -EB
+#source: attr-gnu-4-6.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-07.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-07.d
new file mode 100644
index 0000000..040c06f
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-07.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-0.s -32 -EB
+#source: attr-gnu-4-7.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float compat \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-08.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-08.d
new file mode 100644
index 0000000..3ce25cd
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-08.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-0.s
+#source: attr-gnu-4-8.s -W
+#ld: -r
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: \?\?\? \(8\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: \?\?\? \(8\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-1-n32-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-1-n32-ph.d
new file mode 100644
index 0000000..d83c859
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-1-n32-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips3 -n32 -EB
+#ld: -melf32btsmipn32 -e 0
+#objdump: -p
+
+[^:]*: file format elf32-ntradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x100000.. paddr 0x100000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x10000000 paddr 0x10000000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 20000020: \[abi=N32\] \[mips3\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 64
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-1-n64-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-1-n64-ph.d
new file mode 100644
index 0000000..157f3e6
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-1-n64-ph.d
@@ -0,0 +1,25 @@
+#source: empty.s -mips3 -64 -EB
+#ld: -melf64btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf64-tradbigmips
+
+Program Header:
+0x70000003 off 0x00000000000000b0 vaddr 0x00000001200000b0 paddr 0x00000001200000b0 align 2\*\*3
+ filesz 0x0000000000000018 memsz 0x0000000000000018 flags r--
+ LOAD off 0x0000000000000000 vaddr 0x0000000120000000 paddr 0x0000000120000000 align 2\*\*16
+ filesz 0x00000000000000.. memsz 0x00000000000000.. flags r--
+private flags = 20000000: \[abi=64\] \[mips3\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 64
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d
new file mode 100644
index 0000000..7aacd65
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips32r2 -32 -mfp32 -EB
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
index 7661963..0abd9d1 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
@@ -1,9 +1,42 @@
-#source: attr-gnu-4-1.s
-#source: attr-gnu-4-0.s
-#ld: -r
-#readelf: -A
-#target: mips*-*-*
+#source: attr-gnu-4-1.s -EB -32
+#source: attr-gnu-4-0.s -EB -32
+#ld: -r -melf32btsmip
+#readelf: -hA
+
+ELF Header:
+ Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00.*
+ Class: ELF32
+ Data: 2's complement, big endian
+ Version: 1 \(current\)
+ OS/ABI: UNIX - System V
+ ABI Version: 0
+ Type: REL \(Relocatable file\)
+ Machine: MIPS R3000
+ Version: 0x1
+ Entry point address: 0x0
+ Start of program headers: 0 \(bytes into file\)
+ Start of section headers: ... \(bytes into file\)
+ Flags: .*
+ Size of this header: 52 \(bytes\)
+ Size of program headers: 0 \(bytes\)
+ Number of program headers: 0
+ Size of section headers: 40 \(bytes\)
+ Number of section headers: 11
+ Section header string table index: 8
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-11.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-11.d
index f70306b..f456096 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-11.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-11.d
@@ -2,8 +2,20 @@
#source: attr-gnu-4-1.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-12.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-12.d
index c0eace6..b1b0760 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-12.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-12.d
@@ -2,4 +2,3 @@
#source: attr-gnu-4-2.s
#ld: -r
#warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses -msingle-float
-#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-13.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-13.d
index cb30f7a..c9bf544 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-13.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-13.d
@@ -2,4 +2,3 @@
#source: attr-gnu-4-3.s
#ld: -r
#warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
-#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-14.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-14.d
index bde387b..58cfd24 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-14.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-14.d
@@ -1,5 +1,6 @@
#source: attr-gnu-4-1.s
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
#ld: -r
-#warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses -mips32r2 -mfp64
-#target: mips*-*-*
+#error: \A[^\n]*: Warning: .* uses -mdouble-float \(set by .*\), .* uses -mips32r2 -mfp64 \(12 callee-saved\)\n
+#error: [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d
index b19645f..29d2eb9 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d
@@ -1,10 +1,21 @@
-#source: attr-gnu-4-1.s
-#source: attr-gnu-4-5.s
-#ld: -r
+#source: attr-gnu-4-1.s -32 -EB
+#source: attr-gnu-4-5.s -32 -EB
+#ld: -r -melf32btsmip
#readelf: -A
-#warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses unknown floating point ABI 5
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-16.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-16.d
new file mode 100644
index 0000000..1e55b05
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-16.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-1.s -32 -EB
+#source: attr-gnu-4-6.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses -mgp32 -mfp64
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-17.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-17.d
new file mode 100644
index 0000000..f72eb0b
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-17.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-1.s -32 -EB
+#source: attr-gnu-4-7.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses -mgp32 -mfp64 -mno-odd-spreg
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-18.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-18.d
new file mode 100644
index 0000000..f911f56
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-18.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-1.s
+#source: attr-gnu-4-8.s -W
+#ld: -r
+#readelf: -A
+#warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses unknown floating point ABI 8
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-2-n32-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-2-n32-ph.d
new file mode 100644
index 0000000..5a04804
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-2-n32-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips3 -n32 -msingle-float -EB
+#ld: -melf32btsmipn32 -e 0
+#objdump: -p
+
+[^:]*: file format elf32-ntradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x100000.. paddr 0x100000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x10000000 paddr 0x10000000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 20000020: \[abi=N32\] \[mips3\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 64
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-2-n64-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-2-n64-ph.d
new file mode 100644
index 0000000..88b4ff9
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-2-n64-ph.d
@@ -0,0 +1,25 @@
+#source: empty.s -mips3 -64 -msingle-float -EB
+#ld: -melf64btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf64-tradbigmips
+
+Program Header:
+0x70000003 off 0x00000000000000b0 vaddr 0x00000001200000b0 paddr 0x00000001200000b0 align 2\*\*3
+ filesz 0x0000000000000018 memsz 0x0000000000000018 flags r--
+ LOAD off 0x0000000000000000 vaddr 0x0000000120000000 paddr 0x0000000120000000 align 2\*\*16
+ filesz 0x00000000000000.. memsz 0x00000000000000.. flags r--
+private flags = 20000000: \[abi=64\] \[mips3\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 64
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d
new file mode 100644
index 0000000..509834c
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips32r2 -32 -msingle-float -EB
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-2.s b/ld/testsuite/ld-mips-elf/attr-gnu-4-2.s
index 54ebf4e..4021bed 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-2.s
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-2.s
@@ -1 +1,2 @@
+.module singlefloat
.gnu_attribute 4,2
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-20.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-20.d
index 3620069..1cedafa 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-20.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-20.d
@@ -2,8 +2,20 @@
#source: attr-gnu-4-0.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-21.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-21.d
index 68a006f..0081c72 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-21.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-21.d
@@ -2,4 +2,3 @@
#source: attr-gnu-4-1.s
#ld: -r
#warning: Warning: .* uses -msingle-float \(set by .*\), .* uses -mdouble-float
-#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-22.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-22.d
index 63edea9..4478fd2 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-22.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-22.d
@@ -2,8 +2,20 @@
#source: attr-gnu-4-2.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-23.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-23.d
index e16226f..0b8a6fc 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-23.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-23.d
@@ -2,4 +2,3 @@
#source: attr-gnu-4-3.s
#ld: -r
#warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
-#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-24.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-24.d
index c31bb64..e48e5bb 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-24.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-24.d
@@ -1,5 +1,6 @@
#source: attr-gnu-4-2.s
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
#ld: -r
-#warning: Warning: .* uses -msingle-float \(set by .*\), .* uses -mips32r2 -mfp64
-#target: mips*-*-*
+#error: \A[^\n]*: Warning: .* uses -msingle-float \(set by .*\), .* uses -mips32r2 -mfp64 \(12 callee-saved\)\n
+#error: [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d
index b5456ab..711eb10 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d
@@ -1,10 +1,22 @@
-#source: attr-gnu-4-2.s
-#source: attr-gnu-4-5.s
-#ld: -r
+#source: attr-gnu-4-2.s -32 -EB
+#source: attr-gnu-4-5.s -32 -EB
+#ld: -r -melf32btsmip
#readelf: -A
-#warning: Warning: .* uses -msingle-float \(set by .*\), .* uses unknown floating point ABI 5
-#target: mips*-*-*
+#warning: Warning: .* uses -msingle-float \(set by .*\), .* uses -mfpxx
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-26.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-26.d
new file mode 100644
index 0000000..2c72a57
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-26.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-2.s -32 -EB
+#source: attr-gnu-4-6.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses -msingle-float \(set by .*\), .* uses -mgp32 -mfp64
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-27.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-27.d
new file mode 100644
index 0000000..e7aeb1a
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-27.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-2.s -32 -EB
+#source: attr-gnu-4-7.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses -msingle-float \(set by .*\), .* uses -mgp32 -mfp64 -mno-odd-spreg
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-28.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-28.d
new file mode 100644
index 0000000..f6e1ea4
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-28.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-2.s
+#source: attr-gnu-4-8.s -W
+#ld: -r
+#readelf: -A
+#warning: Warning: .* uses -msingle-float \(set by .*\), .* uses unknown floating point ABI 8
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-3-n32-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-3-n32-ph.d
new file mode 100644
index 0000000..5a04804
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-3-n32-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips3 -n32 -msingle-float -EB
+#ld: -melf32btsmipn32 -e 0
+#objdump: -p
+
+[^:]*: file format elf32-ntradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x100000.. paddr 0x100000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x10000000 paddr 0x10000000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 20000020: \[abi=N32\] \[mips3\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 64
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-3-n64-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-3-n64-ph.d
new file mode 100644
index 0000000..3731dc4
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-3-n64-ph.d
@@ -0,0 +1,25 @@
+#source: empty.s -mips3 -64 -msoft-float -EB
+#ld: -melf64btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf64-tradbigmips
+
+Program Header:
+0x70000003 off 0x00000000000000b0 vaddr 0x00000001200000b0 paddr 0x00000001200000b0 align 2\*\*3
+ filesz 0x0000000000000018 memsz 0x0000000000000018 flags r--
+ LOAD off 0x0000000000000000 vaddr 0x0000000120000000 paddr 0x0000000120000000 align 2\*\*16
+ filesz 0x00000000000000.. memsz 0x00000000000000.. flags r--
+private flags = 20000000: \[abi=64\] \[mips3\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 64
+CPR1 size: 0
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d
new file mode 100644
index 0000000..edeb6b1
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips32r2 -32 -msoft-float -EB
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 0
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-3.s b/ld/testsuite/ld-mips-elf/attr-gnu-4-3.s
index 32e5f5d..0ba0b80 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-3.s
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-3.s
@@ -1 +1,2 @@
+.module softfloat
.gnu_attribute 4,3
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-30.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-30.d
index cdc108e..5dedc07 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-30.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-30.d
@@ -2,8 +2,20 @@
#source: attr-gnu-4-0.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-31.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-31.d
index b749e82..4fcf76f 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-31.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-31.d
@@ -2,4 +2,3 @@
#source: attr-gnu-4-1.s
#ld: -r
#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
-#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-32.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-32.d
index d0fd7bc..0d663c2 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-32.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-32.d
@@ -2,4 +2,3 @@
#source: attr-gnu-4-2.s
#ld: -r
#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
-#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-33.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-33.d
index 39eebb3..2dcd25b 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-33.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-33.d
@@ -2,8 +2,20 @@
#source: attr-gnu-4-3.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-34.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-34.d
index be24523..314515a 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-34.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-34.d
@@ -1,5 +1,6 @@
#source: attr-gnu-4-3.s
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
#ld: -r
-#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
-#target: mips*-*-*
+#error: \A[^\n]*: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float\n
+#error: [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d
index bcb1e02..19fbce4 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d
@@ -1,10 +1,22 @@
-#source: attr-gnu-4-3.s
-#source: attr-gnu-4-5.s
-#ld: -r
+#source: attr-gnu-4-3.s -32 -EB
+#source: attr-gnu-4-5.s -32 -EB
+#ld: -r -melf32btsmip
#readelf: -A
-#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses unknown floating point ABI 5
-#target: mips*-*-*
+#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-36.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-36.d
new file mode 100644
index 0000000..de7393b
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-36.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-3.s -32 -EB
+#source: attr-gnu-4-6.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-37.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-37.d
new file mode 100644
index 0000000..0702cb5
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-37.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-3.s -32 -EB
+#source: attr-gnu-4-7.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-38.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-38.d
new file mode 100644
index 0000000..014c52d
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-38.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-3.s
+#source: attr-gnu-4-8.s -W
+#ld: -r
+#readelf: -A
+#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses unknown floating point ABI 8
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d
new file mode 100644
index 0000000..13f5267
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d
@@ -0,0 +1,26 @@
+#source: attr-gnu-4-4.s -mips32r2 -32 -EB -W
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 70001200: \[abi=O32\] \[mips32r2\] \[old fp64\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(MIPS32r2 64-bit FPU 12 callee-saved\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d
index 27d4571..6aa22b9 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d
@@ -1,9 +1,5 @@
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
#source: attr-gnu-4-0.s
#ld: -r
-#readelf: -A
-#target: mips*-*-*
-
-Attribute Section: gnu
-File Attributes
- Tag_GNU_MIPS_ABI_FP: Hard float \(MIPS32r2 64-bit FPU\)
+#error: \A[^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-41.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-41.d
index b652983..7c61365 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-41.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-41.d
@@ -1,5 +1,6 @@
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
#source: attr-gnu-4-1.s
#ld: -r
-#warning: Warning: .* uses -mips32r2 -mfp64 \(set by .*\), .* uses -mdouble-float
-#target: mips*-*-*
+#error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -mdouble-float\n
+#error: [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-42.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-42.d
index a1b79ea..dad0421 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-42.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-42.d
@@ -1,5 +1,6 @@
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
#source: attr-gnu-4-2.s
#ld: -r
-#warning: Warning: .* uses -mips32r2 -mfp64 \(set by .*\), .* uses -msingle-float
-#target: mips*-*-*
+#error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -msingle-float\n
+#error: [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-43.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-43.d
index 23f40c6..f30c18e 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-43.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-43.d
@@ -1,5 +1,6 @@
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
#source: attr-gnu-4-3.s
#ld: -r
-#warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
-#target: mips*-*-*
+#error: \A[^\n]*: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float\n
+#error: [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-44.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-44.d
index 68b03a0..2599a90 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-44.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-44.d
@@ -1,9 +1,21 @@
-#source: attr-gnu-4-4.s
-#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s -W
+#source: attr-gnu-4-4.s -W
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
- Tag_GNU_MIPS_ABI_FP: Hard float \(MIPS32r2 64-bit FPU\)
+ Tag_GNU_MIPS_ABI_FP: Hard float \(MIPS32r2 64-bit FPU 12 callee-saved\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(MIPS32r2 64-bit FPU 12 callee-saved\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d
index 0d1b079..d21e66f 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d
@@ -1,10 +1,6 @@
-#source: attr-gnu-4-4.s
-#source: attr-gnu-4-5.s
-#ld: -r
-#readelf: -A
-#warning: Warning: .* uses -mips32r2 -mfp64 \(set by .*\), .* uses unknown floating point ABI 5
-#target: mips*-*-*
-
-Attribute Section: gnu
-File Attributes
- Tag_GNU_MIPS_ABI_FP: Hard float \(MIPS32r2 64-bit FPU\)
+#source: attr-gnu-4-4.s -W -32 -EB
+#source: attr-gnu-4-5.s -32 -EB
+#ld: -r -melf32btsmip
+#error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -mfpxx\n
+#error: [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-46.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-46.d
new file mode 100644
index 0000000..fb8baf8
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-46.d
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-4.s -W -32 -EB
+#source: attr-gnu-4-6.s -32 -EB
+#ld: -r -melf32btsmip
+#error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -mgp32 -mfp64\n
+#error: [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-47.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-47.d
new file mode 100644
index 0000000..889e0e1
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-47.d
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-4.s -W -32 -EB
+#source: attr-gnu-4-7.s -32 -EB
+#ld: -r -melf32btsmip
+#error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -mgp32 -mfp64 -mno-odd-spreg\n
+#error: [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-48.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-48.d
new file mode 100644
index 0000000..cb4dcb6
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-48.d
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-4.s -W
+#source: attr-gnu-4-8.s -W
+#ld: -r
+#error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses unknown floating point ABI 8\n
+#error: [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d
new file mode 100644
index 0000000..b68bbf3
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips32r2 -32 -mfpxx -EB
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, Any FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-5.s b/ld/testsuite/ld-mips-elf/attr-gnu-4-5.s
index b21ec3b..06f6c6f 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-5.s
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-5.s
@@ -1 +1,3 @@
+.module mips32r2
+.module fp=xx
.gnu_attribute 4,5
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-50.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-50.d
new file mode 100644
index 0000000..ac848ed
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-50.d
@@ -0,0 +1,41 @@
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-0.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -hA
+
+ELF Header:
+ Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00.*
+ Class: ELF32
+ Data: 2's complement, big endian
+ Version: 1 \(current\)
+ OS/ABI: UNIX - System V
+ ABI Version: 0
+ Type: REL \(Relocatable file\)
+ Machine: MIPS R3000
+ Version: 0x1
+ Entry point address: 0x0
+ Start of program headers: 0 \(bytes into file\)
+ Start of section headers: ... \(bytes into file\)
+ Flags: 0x70001000, o32, mips32r2
+ Size of this header: 52 \(bytes\)
+ Size of program headers: 0 \(bytes\)
+ Number of program headers: 0
+ Size of section headers: 40 \(bytes\)
+ Number of section headers: 11
+ Section header string table index: 8
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, Any FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, Any FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d
index e183d54..72ad878 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d
@@ -1,5 +1,21 @@
-#source: attr-gnu-4-5.s
-#source: attr-gnu-4-1.s
-#ld: -r
-#warning: Warning: .* uses unknown floating point ABI 5 \(set by .*\), .* uses -mdouble-float
-#target: mips*-*-*
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-1.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-52.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-52.d
new file mode 100644
index 0000000..b36547d
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-52.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-2.s -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mfpxx \(set by .*\), .* uses -msingle-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-53.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-53.d
new file mode 100644
index 0000000..7312d17
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-53.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-3.s -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-54.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-54.d
new file mode 100644
index 0000000..a5beaf1
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-54.d
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-4.s -W -32 -EB
+#ld: -r -melf32btsmip
+#error: \A[^\n]*: Warning: .* uses -mfpxx \(set by .*\), .* uses -mips32r2 -mfp64 \(12 callee-saved\)\n
+#error: [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-55.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-55.d
new file mode 100644
index 0000000..d4569ad
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-55.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-5.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, Any FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, Any FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-56.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-56.d
new file mode 100644
index 0000000..d63150d
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-56.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-6.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-57.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-57.d
new file mode 100644
index 0000000..5de1678
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-57.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-7.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float compat \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-58.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-58.d
new file mode 100644
index 0000000..83d6747
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-58.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-5.s -32 -EB
+#source: attr-gnu-4-8.s -W -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mfpxx \(set by .*\), .* uses unknown floating point ABI 8
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d
new file mode 100644
index 0000000..9628991
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips32r2 -32 -mfp64 -EB
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-6.s b/ld/testsuite/ld-mips-elf/attr-gnu-4-6.s
new file mode 100644
index 0000000..adcff8a
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-6.s
@@ -0,0 +1,4 @@
+.module mips32r2
+.module gp=32
+.module fp=64
+.gnu_attribute 4,6
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-60.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-60.d
new file mode 100644
index 0000000..62e6a2c
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-60.d
@@ -0,0 +1,41 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-0.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -hA
+
+ELF Header:
+ Magic: 7f 45 4c 46 01 02 01 00 03 00 00 00 00 00 00 00.*
+ Class: ELF32
+ Data: 2's complement, big endian
+ Version: 1 \(current\)
+ OS/ABI: UNIX - System V
+ ABI Version: 3
+ Type: REL \(Relocatable file\)
+ Machine: MIPS R3000
+ Version: 0x1
+ Entry point address: 0x0
+ Start of program headers: 0 \(bytes into file\)
+ Start of section headers: ... \(bytes into file\)
+ Flags: 0x70001000, o32, mips32r2
+ Size of this header: 52 \(bytes\)
+ Size of program headers: 0 \(bytes\)
+ Number of program headers: 0
+ Size of section headers: 40 \(bytes\)
+ Number of section headers: 11
+ Section header string table index: 8
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-61.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-61.d
new file mode 100644
index 0000000..6e9040c
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-61.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-1.s -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses -mdouble-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-62.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-62.d
new file mode 100644
index 0000000..5eec884
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-62.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-2.s -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses -msingle-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-63.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-63.d
new file mode 100644
index 0000000..eb750f3
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-63.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-3.s -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-64.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-64.d
new file mode 100644
index 0000000..a5dcb7e
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-64.d
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-4.s -W -32 -EB
+#ld: -r -melf32btsmip
+#error: \A[^\n]*: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses -mips32r2 -mfp64 \(12 callee-saved\)\n
+#error: [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-65.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-65.d
new file mode 100644
index 0000000..ccf19b8
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-65.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-5.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-66.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-66.d
new file mode 100644
index 0000000..552e6d2
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-66.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-6.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-67.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-67.d
new file mode 100644
index 0000000..171af5b
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-67.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-7.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-68.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-68.d
new file mode 100644
index 0000000..e850b03
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-68.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-6.s -32 -EB
+#source: attr-gnu-4-8.s -W -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses unknown floating point ABI 8
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d
new file mode 100644
index 0000000..b0245b6
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d
@@ -0,0 +1,26 @@
+#source: empty.s -mips32r2 -32 -mfp64 -mno-odd-spreg -EB
+#ld: -melf32btsmip -e 0
+#objdump: -p
+
+[^:]*: file format elf32-tradbigmips
+
+Program Header:
+0x70000003 off 0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+ filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+ LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
+ filesz 0x000000.. memsz 0x000000.. flags r--
+private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-7.s b/ld/testsuite/ld-mips-elf/attr-gnu-4-7.s
new file mode 100644
index 0000000..e79d50b
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-7.s
@@ -0,0 +1,5 @@
+.module mips32r2
+.module gp=32
+.module fp=64
+.module nooddspreg
+.gnu_attribute 4,7
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-70.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-70.d
new file mode 100644
index 0000000..784401e
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-70.d
@@ -0,0 +1,41 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-0.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -hA
+
+ELF Header:
+ Magic: 7f 45 4c 46 01 02 01 00 03 00 00 00 00 00 00 00.*
+ Class: ELF32
+ Data: 2's complement, big endian
+ Version: 1 \(current\)
+ OS/ABI: UNIX - System V
+ ABI Version: 3
+ Type: REL \(Relocatable file\)
+ Machine: MIPS R3000
+ Version: 0x1
+ Entry point address: 0x0
+ Start of program headers: 0 \(bytes into file\)
+ Start of section headers: ... \(bytes into file\)
+ Flags: 0x70001000, o32, mips32r2
+ Size of this header: 52 \(bytes\)
+ Size of program headers: 0 \(bytes\)
+ Number of program headers: 0
+ Size of section headers: 40 \(bytes\)
+ Number of section headers: 11
+ Section header string table index: 8
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float compat \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-71.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-71.d
new file mode 100644
index 0000000..b61b6c5
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-71.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-1.s -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses -mdouble-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-72.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-72.d
new file mode 100644
index 0000000..1d7dec5
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-72.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-2.s -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses -msingle-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-73.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-73.d
new file mode 100644
index 0000000..41c0fdc
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-73.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-3.s -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-74.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-74.d
new file mode 100644
index 0000000..cc9279b
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-74.d
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-4.s -W -32 -EB
+#ld: -r -melf32btsmip
+#error: \A[^\n]*: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses -mips32r2 -mfp64 \(12 callee-saved\)\n
+#error: [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-75.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-75.d
new file mode 100644
index 0000000..9b0e587
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-75.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-5.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float compat \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-76.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-76.d
new file mode 100644
index 0000000..d8f666b
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-76.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-6.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-77.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-77.d
new file mode 100644
index 0000000..50d0236
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-77.d
@@ -0,0 +1,21 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-7.s -32 -EB
+#ld: -r -melf32btsmip
+#readelf: -A
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float compat \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-78.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-78.d
new file mode 100644
index 0000000..b04ad22
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-78.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-7.s -32 -EB
+#source: attr-gnu-4-8.s -W -32 -EB
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses unknown floating point ABI 8
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-8.s b/ld/testsuite/ld-mips-elf/attr-gnu-4-8.s
new file mode 100644
index 0000000..79f64f9
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-8.s
@@ -0,0 +1 @@
+.gnu_attribute 4,8
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-81.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-81.d
new file mode 100644
index 0000000..fd44915
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-81.d
@@ -0,0 +1,4 @@
+#source: attr-gnu-4-8.s -W
+#source: attr-gnu-4-1.s
+#ld: -r
+#warning: Warning: .* uses unknown floating point ABI 8 \(set by .*\), .* uses -mdouble-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-00.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-00.d
index 5ee34a1..2f8e5f0 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-00.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-00.d
@@ -2,5 +2,8 @@
#source: attr-gnu-8-0.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+#pass
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-01.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-01.d
index 2d44dfe..e2cda33 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-01.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-01.d
@@ -2,8 +2,9 @@
#source: attr-gnu-8-1.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
Tag_GNU_MIPS_ABI_MSA: 128-bit MSA
+#pass
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-02.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-02.d
index e873d44..54b196f 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-02.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-02.d
@@ -2,8 +2,9 @@
#source: attr-gnu-8-2.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
Tag_GNU_MIPS_ABI_MSA: \?\?\? \(2\)
+#pass
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-10.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-10.d
index f0e9125..f7c512b 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-10.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-10.d
@@ -2,8 +2,9 @@
#source: attr-gnu-8-0.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
Tag_GNU_MIPS_ABI_MSA: 128-bit MSA
+#pass
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-11.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-11.d
index 50d518f..be87af4 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-11.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-11.d
@@ -2,8 +2,9 @@
#source: attr-gnu-8-1.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
Tag_GNU_MIPS_ABI_MSA: 128-bit MSA
+#pass
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-12.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-12.d
index b5392f3..10249d0 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-12.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-12.d
@@ -2,4 +2,3 @@
#source: attr-gnu-8-2.s
#ld: -r
#warning: Warning: .* uses -mmsa \(set by .*\), .* uses unknown MSA ABI 2
-#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-20.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-20.d
index 268d670..05f4da0 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-20.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-20.d
@@ -2,8 +2,9 @@
#source: attr-gnu-8-0.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
Tag_GNU_MIPS_ABI_MSA: \?\?\? \(2\)
+#pass
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-21.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-21.d
index 0222f03..b8f0e7c 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-21.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-21.d
@@ -2,4 +2,3 @@
#source: attr-gnu-8-1.s
#ld: -r
#warning: Warning: .* uses unknown MSA ABI 2 \(set by .*\), .* uses -mmsa
-#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-22.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-22.d
index b781150..908ce4f 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-8-22.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-22.d
@@ -2,8 +2,9 @@
#source: attr-gnu-8-2.s
#ld: -r
#readelf: -A
-#target: mips*-*-*
Attribute Section: gnu
File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
Tag_GNU_MIPS_ABI_MSA: \?\?\? \(2\)
+#pass
diff --git a/ld/testsuite/ld-mips-elf/compressed-plt-1.ld b/ld/testsuite/ld-mips-elf/compressed-plt-1.ld
index 9f15af9..0108d0f 100644
--- a/ld/testsuite/ld-mips-elf/compressed-plt-1.ld
+++ b/ld/testsuite/ld-mips-elf/compressed-plt-1.ld
@@ -35,4 +35,6 @@ SECTIONS
.got : { *(.got) }
. = ALIGN(0x1000);
.rld_map : { *(.rld_map) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) *(.gnu.attributes) }
}
diff --git a/ld/testsuite/ld-mips-elf/dyn-sec64.ld b/ld/testsuite/ld-mips-elf/dyn-sec64.ld
index 4c6353a..c7af3f4 100644
--- a/ld/testsuite/ld-mips-elf/dyn-sec64.ld
+++ b/ld/testsuite/ld-mips-elf/dyn-sec64.ld
@@ -20,4 +20,6 @@ SECTIONS
HIDDEN (_gp = ALIGN (16) + 0x7ff0);
.got : { *(.got) }
.data : { *(.data) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) *(.gnu.attributes) }
}
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-got-n32-embed.d b/ld/testsuite/ld-mips-elf/elf-rel-got-n32-embed.d
index d492998..58f23ed 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-got-n32-embed.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-got-n32-embed.d
@@ -1,6 +1,7 @@
#name: MIPS ELF got reloc n32
#as: -march=from-abi -EB -n32 -KPIC
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n32.s
+#objcopy_objects: -R .MIPS.abiflags
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n32.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-got-n32.d b/ld/testsuite/ld-mips-elf/elf-rel-got-n32.d
index 535a538..174153d 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-got-n32.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-got-n32.d
@@ -1,6 +1,7 @@
#name: MIPS ELF got reloc n32
#as: -march=from-abi -EB -n32 -KPIC
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n32.s
+#objcopy_objects: -R .MIPS.abiflags -K __start
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n32.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-got-n64-embed.d b/ld/testsuite/ld-mips-elf/elf-rel-got-n64-embed.d
index f2719f0..c55900f 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-got-n64-embed.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-got-n64-embed.d
@@ -1,6 +1,7 @@
#name: MIPS ELF got reloc n64
#as: -march=from-abi -EB -64 -KPIC
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s
+#objcopy_objects: -R .MIPS.abiflags
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d b/ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d
index c1c3326..8e2822d 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d
@@ -1,6 +1,7 @@
#name: MIPS ELF got reloc n64
#as: -march=from-abi -EB -64 -KPIC
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s
+#objcopy_objects: -R .MIPS.abiflags
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-got-n64.d b/ld/testsuite/ld-mips-elf/elf-rel-got-n64.d
index 55dd7ae..492f76e 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-got-n64.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-got-n64.d
@@ -1,6 +1,7 @@
#name: MIPS ELF got reloc n64
#as: -march=from-abi -EB -64 -KPIC
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s
+#objcopy_objects: -R .MIPS.abiflags
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32-embed.d b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32-embed.d
index a0bef16..d6c2e85 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32-embed.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32-embed.d
@@ -1,6 +1,7 @@
#name: MIPS ELF xgot reloc n32
#as: -march=from-abi -EB -n32 -KPIC -xgot
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n32.s
+#objcopy_objects: -R .MIPS.abiflags -K __start
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n32.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d
index a909aa9..b202e92 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d
@@ -1,6 +1,7 @@
#name: MIPS ELF xgot reloc n32
#as: -march=from-abi -EB -n32 -KPIC -xgot
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n32.s
+#objcopy_objects: -R .MIPS.abiflags -K __start
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n32.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-embed.d b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-embed.d
index 271257f..bdacf78 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-embed.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-embed.d
@@ -1,6 +1,7 @@
#name: MIPS ELF xgot reloc n64
#as: -march=from-abi -EB -64 -KPIC -xgot
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s
+#objcopy_objects: -R .MIPS.abiflags -K __start
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d
index 4579700..fd21487 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d
@@ -1,6 +1,7 @@
#name: MIPS ELF xgot reloc n64
#as: -march=from-abi -EB -64 -KPIC -xgot
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s
+#objcopy_objects: -R .MIPS.abiflags -K __start
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64.d b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64.d
index 72ac666..348b718 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64.d
@@ -1,6 +1,7 @@
#name: MIPS ELF xgot reloc n64
#as: -march=from-abi -EB -64 -KPIC -xgot
-#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s
+#objcopy_objects: -R .MIPS.abiflags -K __start
+#source: ../../../gas/testsuite/gas/mips/elf-rel-got-n64.s RUN_OBJCOPY
#ld:
#objdump: -D --show-raw-insn
diff --git a/ld/testsuite/ld-mips-elf/empty.s b/ld/testsuite/ld-mips-elf/empty.s
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/empty.s
diff --git a/ld/testsuite/ld-mips-elf/got-dump-1.ld b/ld/testsuite/ld-mips-elf/got-dump-1.ld
index ba228f5..e8a40f1 100644
--- a/ld/testsuite/ld-mips-elf/got-dump-1.ld
+++ b/ld/testsuite/ld-mips-elf/got-dump-1.ld
@@ -16,4 +16,6 @@ SECTIONS
.data : { *(.data) }
HIDDEN (_gp = ALIGN (16) + 0x7ff0);
.got : { *(.got) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) *(.gnu.attributes) }
}
diff --git a/ld/testsuite/ld-mips-elf/got-dump-2.ld b/ld/testsuite/ld-mips-elf/got-dump-2.ld
index 0e237de..d7ba691 100644
--- a/ld/testsuite/ld-mips-elf/got-dump-2.ld
+++ b/ld/testsuite/ld-mips-elf/got-dump-2.ld
@@ -15,4 +15,6 @@ SECTIONS
.data : { *(.data) }
HIDDEN (_gp = ALIGN (16) + 0x7ff0);
.got : { *(.got) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) *(.gnu.attributes) }
}
diff --git a/ld/testsuite/ld-mips-elf/got-page-1.ld b/ld/testsuite/ld-mips-elf/got-page-1.ld
index 3197c9b..cfe7c1f 100644
--- a/ld/testsuite/ld-mips-elf/got-page-1.ld
+++ b/ld/testsuite/ld-mips-elf/got-page-1.ld
@@ -22,7 +22,7 @@ SECTIONS
. = ALIGN (0x400);
.bss : { *(.bss .bss.*) }
- /DISCARD/ : { *(.reginfo) }
+ /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
}
VERSION
diff --git a/ld/testsuite/ld-mips-elf/jalx-2.dd b/ld/testsuite/ld-mips-elf/jalx-2.dd
index 50ebdb8..69985f6 100644
--- a/ld/testsuite/ld-mips-elf/jalx-2.dd
+++ b/ld/testsuite/ld-mips-elf/jalx-2.dd
@@ -28,7 +28,7 @@ Disassembly of section \.text:
4400034: f89e 0020 sw a0,32\(s8\)
4400038: f8be 0024 sw a1,36\(s8\)
440003c: 41a2 0440 lui v0,0x440
- 4400040: 3082 0260 addiu a0,v0,608
+ 4400040: 3082 0280 addiu a0,v0,640
4400044: f620 004c jal 4400098 <printf@micromipsplt>
4400048: 0000 0000 nop
440004c: f620 0010 jal 4400020 <internal_function>
diff --git a/ld/testsuite/ld-mips-elf/mips-dyn.ld b/ld/testsuite/ld-mips-elf/mips-dyn.ld
index b931e1b..bd2802fc 100644
--- a/ld/testsuite/ld-mips-elf/mips-dyn.ld
+++ b/ld/testsuite/ld-mips-elf/mips-dyn.ld
@@ -219,5 +219,5 @@ SECTIONS
.debug_varnames 0 : { *(.debug_varnames) }
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
- /DISCARD/ : { *(.note.GNU-stack) }
+ /DISCARD/ : { *(.note.GNU-stack) *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index a2632b2..64bb8e5 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -634,37 +634,49 @@ run_ld_link_tests $mips16_intermix_test
run_dump_test "mips16-local-stubs-1"
-run_dump_test "attr-gnu-4-00"
-run_dump_test "attr-gnu-4-01"
-run_dump_test "attr-gnu-4-02"
-run_dump_test "attr-gnu-4-03"
-run_dump_test "attr-gnu-4-04"
-run_dump_test "attr-gnu-4-05"
-run_dump_test "attr-gnu-4-10"
-run_dump_test "attr-gnu-4-11"
-run_dump_test "attr-gnu-4-12"
-run_dump_test "attr-gnu-4-13"
-run_dump_test "attr-gnu-4-14"
-run_dump_test "attr-gnu-4-15"
-run_dump_test "attr-gnu-4-20"
-run_dump_test "attr-gnu-4-21"
-run_dump_test "attr-gnu-4-22"
-run_dump_test "attr-gnu-4-23"
-run_dump_test "attr-gnu-4-24"
-run_dump_test "attr-gnu-4-25"
-run_dump_test "attr-gnu-4-30"
-run_dump_test "attr-gnu-4-31"
-run_dump_test "attr-gnu-4-32"
-run_dump_test "attr-gnu-4-33"
-run_dump_test "attr-gnu-4-34"
-run_dump_test "attr-gnu-4-35"
-run_dump_test "attr-gnu-4-40"
-run_dump_test "attr-gnu-4-41"
-run_dump_test "attr-gnu-4-42"
-run_dump_test "attr-gnu-4-43"
-run_dump_test "attr-gnu-4-44"
-run_dump_test "attr-gnu-4-45"
-run_dump_test "attr-gnu-4-51"
+foreach firstfpabi [list 0 1 2 3 4 5 6 7 ] {
+ foreach secondfpabi [list 0 1 2 3 4 5 6 7 8] {
+ run_dump_test "attr-gnu-4-${firstfpabi}${secondfpabi}"
+ }
+}
+run_dump_test "attr-gnu-4-81"
+
+run_dump_test "attr-gnu-8-00"
+run_dump_test "attr-gnu-8-01"
+run_dump_test "attr-gnu-8-02"
+run_dump_test "attr-gnu-8-10"
+run_dump_test "attr-gnu-8-11"
+run_dump_test "attr-gnu-8-12"
+run_dump_test "attr-gnu-8-20"
+run_dump_test "attr-gnu-8-21"
+run_dump_test "attr-gnu-8-22"
+
+run_dump_test "attr-gnu-4-0-ph"
+run_dump_test "attr-gnu-4-1-ph"
+run_dump_test "attr-gnu-4-2-ph"
+run_dump_test "attr-gnu-4-3-ph"
+run_dump_test "attr-gnu-4-4-ph"
+run_dump_test "attr-gnu-4-5-ph"
+run_dump_test "attr-gnu-4-6-ph"
+run_dump_test "attr-gnu-4-7-ph"
+run_dump_test "attr-gnu-4-0-n32-ph"
+run_dump_test "attr-gnu-4-1-n32-ph"
+run_dump_test "attr-gnu-4-2-n32-ph"
+run_dump_test "attr-gnu-4-3-n32-ph"
+run_dump_test "attr-gnu-4-0-n64-ph"
+run_dump_test "attr-gnu-4-1-n64-ph"
+run_dump_test "attr-gnu-4-2-n64-ph"
+run_dump_test "attr-gnu-4-3-n64-ph"
+
+run_dump_test "abiflags-strip1-ph"
+run_dump_test "abiflags-strip2-ph"
+run_dump_test "abiflags-strip3-ph"
+run_dump_test "abiflags-strip4-ph"
+run_dump_test "abiflags-strip5-ph"
+run_dump_test "abiflags-strip6-ph"
+run_dump_test "abiflags-strip7-ph"
+run_dump_test "abiflags-strip8-ph"
+run_dump_test "abiflags-strip9-ph"
run_dump_test "nan-legacy"
run_dump_test "nan-2008"
@@ -828,13 +840,3 @@ if { $linux_gnu } {
n32 -1 1 umips
}
}
-
-run_dump_test "attr-gnu-8-00"
-run_dump_test "attr-gnu-8-01"
-run_dump_test "attr-gnu-8-02"
-run_dump_test "attr-gnu-8-10"
-run_dump_test "attr-gnu-8-11"
-run_dump_test "attr-gnu-8-12"
-run_dump_test "attr-gnu-8-20"
-run_dump_test "attr-gnu-8-21"
-run_dump_test "attr-gnu-8-22"
diff --git a/ld/testsuite/ld-mips-elf/mips-lib.ld b/ld/testsuite/ld-mips-elf/mips-lib.ld
index 1d66c62..b3a2c97 100644
--- a/ld/testsuite/ld-mips-elf/mips-lib.ld
+++ b/ld/testsuite/ld-mips-elf/mips-lib.ld
@@ -214,5 +214,5 @@ SECTIONS
.debug_varnames 0 : { *(.debug_varnames) }
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
- /DISCARD/ : { *(.note.GNU-stack) }
+ /DISCARD/ : { *(.note.GNU-stack) *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-1.gd b/ld/testsuite/ld-mips-elf/mips16-pic-1.gd
index b8d8b34..cca758e 100644
--- a/ld/testsuite/ld-mips-elf/mips16-pic-1.gd
+++ b/ld/testsuite/ld-mips-elf/mips16-pic-1.gd
@@ -1,4 +1,21 @@
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: .*
+ASEs:
+ MIPS16 ASE
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
Primary GOT:
Canonical gp value: 00057ff0
diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-2.gd b/ld/testsuite/ld-mips-elf/mips16-pic-2.gd
index c291bc8..269ae38 100644
--- a/ld/testsuite/ld-mips-elf/mips16-pic-2.gd
+++ b/ld/testsuite/ld-mips-elf/mips16-pic-2.gd
@@ -1,4 +1,21 @@
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: .*
+ASEs:
+ MIPS16 ASE
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
Primary GOT:
Canonical gp value: 00057ff0
@@ -16,8 +33,8 @@ Primary GOT:
Global entries:
Address Access Initial Sym\.Val\. Type Ndx Name
- 00050018 -32728\(gp\) 00040574 00040574 FUNC 6 used6
- 0005001c -32724\(gp\) 00040598 00040598 FUNC 6 used7
- 00050020 -32720\(gp\) 00040550 00040550 FUNC 6 used5
- 00050024 -32716\(gp\) 0004052c 0004052c FUNC 6 used4
+ 00050018 -32728\(gp\) 00040574 00040574 FUNC 7 used6
+ 0005001c -32724\(gp\) 00040598 00040598 FUNC 7 used7
+ 00050020 -32720\(gp\) 00040550 00040550 FUNC 7 used5
+ 00050024 -32716\(gp\) 0004052c 0004052c FUNC 7 used4
diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-3.gd b/ld/testsuite/ld-mips-elf/mips16-pic-3.gd
index 9297fe6..141c4e6 100644
--- a/ld/testsuite/ld-mips-elf/mips16-pic-3.gd
+++ b/ld/testsuite/ld-mips-elf/mips16-pic-3.gd
@@ -1,4 +1,21 @@
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: .*
+ASEs:
+ MIPS16 ASE
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
Primary GOT:
Canonical gp value: 00057ff0
diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-4a.gd b/ld/testsuite/ld-mips-elf/mips16-pic-4a.gd
index 1ab835e..55c8e1c 100644
--- a/ld/testsuite/ld-mips-elf/mips16-pic-4a.gd
+++ b/ld/testsuite/ld-mips-elf/mips16-pic-4a.gd
@@ -1,4 +1,21 @@
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: .*
+ASEs:
+ MIPS16 ASE
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
Primary GOT:
Canonical gp value: 00057ff0
diff --git a/ld/testsuite/ld-mips-elf/multi-got-no-shared.d b/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
index 25af107..a3e1bb2 100644
--- a/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
+++ b/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
@@ -8,11 +8,11 @@
.*: +file format.*
Disassembly of section \.text:
-004000b0 <[^>]*> 3c1c0043 lui gp,0x43
-004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
-004000b8 <[^>]*> afbc0008 sw gp,8\(sp\)
+004000f0 <[^>]*> 3c1c0043 lui gp,0x43
+004000f4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
+004000f8 <[^>]*> afbc0008 sw gp,8\(sp\)
#...
-00408d60 <[^>]*> 3c1c0043 lui gp,0x43
-00408d64 <[^>]*> 279c2c98 addiu gp,gp,11416
-00408d68 <[^>]*> afbc0008 sw gp,8\(sp\)
+00408da0 <[^>]*> 3c1c0043 lui gp,0x43
+00408da4 <[^>]*> 279c2c98 addiu gp,gp,11416
+00408da8 <[^>]*> afbc0008 sw gp,8\(sp\)
#pass
diff --git a/ld/testsuite/ld-mips-elf/nan-2008.d b/ld/testsuite/ld-mips-elf/nan-2008.d
index aa20049..30ea837 100644
--- a/ld/testsuite/ld-mips-elf/nan-2008.d
+++ b/ld/testsuite/ld-mips-elf/nan-2008.d
@@ -5,3 +5,4 @@
.*:.*file format.*mips.*
private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].*
+#pass
diff --git a/ld/testsuite/ld-mips-elf/nan-legacy.d b/ld/testsuite/ld-mips-elf/nan-legacy.d
index 081abcf..8dacc06 100644
--- a/ld/testsuite/ld-mips-elf/nan-legacy.d
+++ b/ld/testsuite/ld-mips-elf/nan-legacy.d
@@ -4,5 +4,5 @@
#objdump: -p
.*:.*file format.*mips.*
-#failif
-private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].*
+!private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].*
+#pass
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.gd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.gd
index aa9579b..b0f7b1e 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.gd
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.gd
@@ -1,4 +1,8 @@
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
Primary GOT:
Canonical gp value: 000183f0
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld
index 81d0d8a..f2db79a 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld
@@ -20,4 +20,6 @@ SECTIONS
. = ALIGN (0x400);
HIDDEN (_gp = . + 0x7ff0);
.got : { *(.got) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.gd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.gd
index 6d3d677..e96e87f 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.gd
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.gd
@@ -1,4 +1,8 @@
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
Primary GOT:
Canonical gp value: 000a7ff0
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld
index 693bbdd..ab64ea6 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld
@@ -32,4 +32,6 @@ SECTIONS
. = 0xa1000;
.data : { *(.data) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld
index bae9fd8..102c851 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld
@@ -30,4 +30,6 @@ SECTIONS
. = 0xa2000;
.bss : { *(.dynbss) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.gd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.gd
index 6919a69..6d46b4f 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.gd
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.gd
@@ -1,4 +1,8 @@
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
Primary GOT:
Canonical gp value: 000a7ff0
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld
index b3ae77d..b76ceff 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld
@@ -35,4 +35,6 @@ SECTIONS
. = 0xa2000;
.bss : { *(.dynbss) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld
index d9f276b..c819816 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld
@@ -37,4 +37,6 @@ SECTIONS
. = 0xa2000;
.bss : { *(.dynbss) }
+
+ /DISCARD/ : { *(.MIPS.abiflags) *(.gnu.attributes) }
}
diff --git a/ld/testsuite/ld-mips-elf/region1.t b/ld/testsuite/ld-mips-elf/region1.t
index 13077ab..1f20e56 100644
--- a/ld/testsuite/ld-mips-elf/region1.t
+++ b/ld/testsuite/ld-mips-elf/region1.t
@@ -9,4 +9,6 @@ SECTIONS
.text : { *(.text) } > TEXTMEM
.data : { *(.data) } > DATAMEM
.bss : { *(.bss) } > DATAMEM
+
+ /DISCARD/ : { *(.MIPS.abiflags) *(.gnu.attributes) }
}
diff --git a/ld/testsuite/ld-mips-elf/rel32-n32.d b/ld/testsuite/ld-mips-elf/rel32-n32.d
index 43c2632..9951615 100644
--- a/ld/testsuite/ld-mips-elf/rel32-n32.d
+++ b/ld/testsuite/ld-mips-elf/rel32-n32.d
@@ -10,6 +10,6 @@ Relocation section '.rel.dyn' at offset .* contains 2 entries:
[0-9a-f ]+R_MIPS_REL32
Hex dump of section '.text':
- 0x000002a0 00000000 00000000 00000000 00000000 ................
- 0x000002b0 000002b0 00000000 00000000 00000000 ................
- 0x000002c0 00000000 00000000 00000000 00000000 ................
+ 0x000002e0 00000000 00000000 00000000 00000000 ................
+ 0x000002f0 000002f0 00000000 00000000 00000000 ................
+ 0x00000300 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/rel32-o32.d b/ld/testsuite/ld-mips-elf/rel32-o32.d
index 0103d79..742cdaa 100644
--- a/ld/testsuite/ld-mips-elf/rel32-o32.d
+++ b/ld/testsuite/ld-mips-elf/rel32-o32.d
@@ -10,6 +10,6 @@ Relocation section '.rel.dyn' at offset .* contains 2 entries:
[0-9a-f ]+R_MIPS_REL32
Hex dump of section '.text':
- 0x000002a0 00000000 00000000 00000000 00000000 ................
- 0x000002b0 000002b0 00000000 00000000 00000000 ................
- 0x000002c0 00000000 00000000 00000000 00000000 ................
+ 0x000002e0 00000000 00000000 00000000 00000000 ................
+ 0x000002f0 000002f0 00000000 00000000 00000000 ................
+ 0x00000300 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/rel64.d b/ld/testsuite/ld-mips-elf/rel64.d
index 89df314..01bffa3 100644
--- a/ld/testsuite/ld-mips-elf/rel64.d
+++ b/ld/testsuite/ld-mips-elf/rel64.d
@@ -14,6 +14,6 @@ Relocation section '.rel.dyn' at offset .* contains 2 entries:
+Type3: R_MIPS_NONE
Hex dump of section '.text':
- 0x00000400 00000000 00000000 00000000 00000000 ................
- 0x00000410 00000000 00000410 00000000 00000000 ................
- 0x00000420 00000000 00000000 00000000 00000000 ................
+ 0x00000450 00000000 00000000 00000000 00000000 ................
+ 0x00000460 00000000 00000460 00000000 00000000 ................
+ 0x00000470 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld b/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld
index 0a58e6f..dec5ca1 100644
--- a/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld
+++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld
@@ -13,5 +13,5 @@ SECTIONS
HIDDEN (_gp = . + 0x7ff0);
.got : { *(.got) }
- /DISCARD/ : { *(.reginfo) }
+ /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-mips-elf/tls-hidden3.ld b/ld/testsuite/ld-mips-elf/tls-hidden3.ld
index 8e0d0aa..5609a4b 100644
--- a/ld/testsuite/ld-mips-elf/tls-hidden3.ld
+++ b/ld/testsuite/ld-mips-elf/tls-hidden3.ld
@@ -19,7 +19,7 @@ SECTIONS
. = ALIGN (0x400);
.tdata : { *(.tdata) }
- /DISCARD/ : { *(.reginfo) }
+ /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
}
VERSION
diff --git a/ld/testsuite/ld-mips-elf/tls-multi-got-1.r b/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
index aea3d2de..45bd791 100644
--- a/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
+++ b/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
@@ -15,7 +15,7 @@ Dynamic section at offset .* contains 18 entries:
0x70000006 \(MIPS_BASE_ADDRESS\) 0x0
0x7000000a \(MIPS_LOCAL_GOTNO\) 2
0x70000011 \(MIPS_SYMTABNO\) 20011
- 0x70000012 \(MIPS_UNREFEXTNO\) 10
+ 0x70000012 \(MIPS_UNREFEXTNO\) 11
0x70000013 \(MIPS_GOTSYM\) 0xb
0x0000001e \(FLAGS\) STATIC_TLS
0x00000000 \(NULL\) 0x0
diff --git a/ld/testsuite/ld-mips-elf/vxworks1.ld b/ld/testsuite/ld-mips-elf/vxworks1.ld
index 8fe3c48..d9f8621 100644
--- a/ld/testsuite/ld-mips-elf/vxworks1.ld
+++ b/ld/testsuite/ld-mips-elf/vxworks1.ld
@@ -28,5 +28,5 @@ SECTIONS
. = ALIGN (0x400);
.bss : { *(.bss) *(.dynbss) }
- /DISCARD/ : { *(.reginfo) }
+ /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
}
diff --git a/ld/testsuite/ld-scripts/overlay-size.t b/ld/testsuite/ld-scripts/overlay-size.t
index 0d9af35..68c0986 100644
--- a/ld/testsuite/ld-scripts/overlay-size.t
+++ b/ld/testsuite/ld-scripts/overlay-size.t
@@ -60,5 +60,5 @@ SECTIONS
end_of_data_overlays = . ;
. = 0x8000;
- /DISCARD/ : { *(.reginfo) }
+ /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
}