diff options
Diffstat (limited to 'test/old-elf/Mips/abi-flags-07.test')
-rw-r--r-- | test/old-elf/Mips/abi-flags-07.test | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/old-elf/Mips/abi-flags-07.test b/test/old-elf/Mips/abi-flags-07.test new file mode 100644 index 0000000000000..6cae9b2feb4d9 --- /dev/null +++ b/test/old-elf/Mips/abi-flags-07.test @@ -0,0 +1,60 @@ +# Check that .MIPS.abiflags section is not written if no input object files +# contain that section. + +# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o +# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o +# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t1.o %t2.o +# RUN: llvm-readobj -mips-abi-flags %t.so | FileCheck %s + +# CHECK: There is no .MIPS.abiflags section in the file. + +# abi.o +--- +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS + Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, + EF_MIPS_ARCH_32, EF_MIPS_ARCH_ASE_MDMX] + +Sections: +- Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Size: 4 + AddressAlign: 16 + +Symbols: + Global: + - Name: T0 + Section: .text + Type: STT_FUNC + Value: 0 + Size: 4 + +# elf.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: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Size: 4 + AddressAlign: 16 + +Symbols: + Global: + - Name: T1 + Section: .text + Type: STT_FUNC + Value: 0 + Size: 4 +... |