llvm-project/lld/test/elf/Mips/e-flags-merge-8.test

66 lines
1.7 KiB
Plaintext

# Check that LLD links files with mips32 and mips64 instructions
# if all these files satisfy O32 ABI.
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-32.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-64.o
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-64r2.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-32.o %t-64.o %t-64r2.o
# RUN: llvm-readobj -file-headers %t.so | FileCheck %s
# CHECK: Flags [ (0x80001100)
# CHECK-NEXT: EF_MIPS_32BITMODE (0x100)
# CHECK-NEXT: EF_MIPS_ABI_O32 (0x1000)
# CHECK-NEXT: EF_MIPS_ARCH_64R2 (0x80000000)
# CHECK-NEXT: ]
# 32.o
---
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32]
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x04
Size: 0x04
# 64.o
---
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_64, EF_MIPS_32BITMODE]
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x04
Size: 0x04
# 64r2.o
---
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_64R2, EF_MIPS_32BITMODE]
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x04
Size: 0x04
...