diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:57:38 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:57:38 +0000 |
commit | 5a5c549fe9a3fef595297bd21d36bed8409dc37d (patch) | |
tree | a964c8f5ac85b7b641cac022c5f9bf4eed3d2b9b /test/old-elf/Mips/abi-flags-08.test | |
parent | fb911942f1434f3d1750f83f25f5e42c80e60638 (diff) |
Notes
Diffstat (limited to 'test/old-elf/Mips/abi-flags-08.test')
-rw-r--r-- | test/old-elf/Mips/abi-flags-08.test | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/test/old-elf/Mips/abi-flags-08.test b/test/old-elf/Mips/abi-flags-08.test new file mode 100644 index 0000000000000..c4b75bcf4516a --- /dev/null +++ b/test/old-elf/Mips/abi-flags-08.test @@ -0,0 +1,71 @@ +# Check that the linker shows errors if ELF header flags +# and .MIPS.abiflags section are incompatible. + +# RUN: yaml2obj -format=elf -docnum 1 %s > %t-isa.o +# RUN: yaml2obj -format=elf -docnum 2 %s > %t-ext.o +# RUN: yaml2obj -format=elf -docnum 3 %s > %t-ases.o +# RUN: lld -flavor old-gnu -target mipsel -shared -o %t1.so %t-isa.o 2>&1 \ +# RUN: | FileCheck -check-prefix=ISA-ERR %s +# RUN: lld -flavor old-gnu -target mipsel -shared -o %t2.so %t-ext.o 2>&1 \ +# RUN: | FileCheck -check-prefix=EXT-ERR %s +# RUN: lld -flavor old-gnu -target mipsel -shared -o %t3.so %t-ases.o 2>&1 \ +# RUN: | FileCheck -check-prefix=ASE-ERR %s +# RUN: llvm-readobj -mips-abi-flags %t1.so %t2.so %t3.so \ +# RUN: | FileCheck -check-prefix=SEC %s + +# ISA-ERR: inconsistent ISA between .MIPS.abiflags and ELF header e_flags field +# EXT-ERR: inconsistent ISA between .MIPS.abiflags and ELF header e_flags field +# ASE-ERR: inconsistent ASEs between .MIPS.abiflags and ELF header e_flags field + +# SEC: There is no .MIPS.abiflags section in the file. + +# isa.o +--- +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS + Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32] + +Sections: +- Name: .MIPS.abiflags + Type: SHT_MIPS_ABIFLAGS + AddressAlign: 8 + ISA: MIPS32 + ISARevision: 2 + +# ext.o +--- +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS + Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_3, EF_MIPS_MACH_4650] + +Sections: +- Name: .MIPS.abiflags + Type: SHT_MIPS_ABIFLAGS + AddressAlign: 8 + ISA: MIPS3 + ISAExtension: EXT_4120 + +# ases.o +--- +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS + Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS] + +Sections: +- Name: .MIPS.abiflags + Type: SHT_MIPS_ABIFLAGS + AddressAlign: 8 + ISA: MIPS32 + ISARevision: 2 + ASEs: [] + +... |