forked from OSchip/llvm-project
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
# Check that LLD shows an error and does not link files with O32 and N32 ABIs.
|
|
|
|
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o32.o
|
|
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-n32.o
|
|
|
|
# RUN: not lld -flavor old-gnu -target mipsel -shared -o %t.so \
|
|
# RUN: %t-o32.o %t-n32.o 2>&1 | FileCheck %s
|
|
|
|
# CHECK: Linking modules with incompatible ABI
|
|
|
|
# o32.o
|
|
---
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32,
|
|
EF_MIPS_32BITMODE, EF_MIPS_ARCH_64]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 0x04
|
|
Size: 0x04
|
|
|
|
# n32.o
|
|
---
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI2,
|
|
EF_MIPS_ARCH_64]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 0x04
|
|
Size: 0x04
|
|
...
|