]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/Mips/e-flags-merge-8.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / Mips / e-flags-merge-8.test
1 # Check that LLD links files with mips32 and mips64 instructions
2 # if all these files satisfy O32 ABI.
3
4 # RUN: yaml2obj -format=elf -docnum 1 %s > %t-32.o
5 # RUN: yaml2obj -format=elf -docnum 2 %s > %t-64.o
6 # RUN: yaml2obj -format=elf -docnum 3 %s > %t-64r2.o
7
8 # RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-32.o %t-64.o %t-64r2.o
9 # RUN: llvm-readobj -file-headers %t.so | FileCheck %s
10
11 # CHECK:      Flags [ (0x80001100)
12 # CHECK-NEXT:   EF_MIPS_32BITMODE (0x100)
13 # CHECK-NEXT:   EF_MIPS_ABI_O32 (0x1000)
14 # CHECK-NEXT:   EF_MIPS_ARCH_64R2 (0x80000000)
15 # CHECK-NEXT: ]
16
17
18 # 32.o
19 ---
20 FileHeader:
21   Class:           ELFCLASS32
22   Data:            ELFDATA2LSB
23   Type:            ET_REL
24   Machine:         EM_MIPS
25   Flags:           [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32]
26
27 Sections:
28   - Name:          .text
29     Type:          SHT_PROGBITS
30     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
31     AddressAlign:  0x04
32     Size:          0x04
33
34 # 64.o
35 ---
36 FileHeader:
37   Class:           ELFCLASS32
38   Data:            ELFDATA2LSB
39   Type:            ET_REL
40   Machine:         EM_MIPS
41   Flags:           [EF_MIPS_ABI_O32, EF_MIPS_ARCH_64, EF_MIPS_32BITMODE]
42
43 Sections:
44   - Name:          .text
45     Type:          SHT_PROGBITS
46     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
47     AddressAlign:  0x04
48     Size:          0x04
49
50 # 64r2.o
51 ---
52 FileHeader:
53   Class:           ELFCLASS32
54   Data:            ELFDATA2LSB
55   Type:            ET_REL
56   Machine:         EM_MIPS
57   Flags:           [EF_MIPS_ABI_O32, EF_MIPS_ARCH_64R2, EF_MIPS_32BITMODE]
58
59 Sections:
60   - Name:          .text
61     Type:          SHT_PROGBITS
62     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
63     AddressAlign:  0x04
64     Size:          0x04
65 ...