]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/Mips/e-flags-merge-6.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / Mips / e-flags-merge-6.test
1 # Check selecting ELF header ARCH flag.
2
3 # RUN: yaml2obj -format=elf -docnum 1 %s > %t-m1.o
4 # RUN: yaml2obj -format=elf -docnum 2 %s > %t-m2.o
5 # RUN: yaml2obj -format=elf -docnum 3 %s > %t-m32.o
6 # RUN: yaml2obj -format=elf -docnum 4 %s > %t-m32r2.o
7
8 # RUN: lld -flavor gnu -target mipsel -shared -o %t.so \
9 # RUN:     %t-m32.o %t-m2.o %t-m32r2.o %t-m1.o
10 # RUN: llvm-readobj -file-headers %t.so | FileCheck %s
11
12 # CHECK:      Flags [ (0x70001000)
13 # CHECK-NEXT:   EF_MIPS_ABI_O32 (0x1000)
14 # CHECK-NEXT:   EF_MIPS_ARCH_32R2 (0x70000000)
15 # CHECK-NEXT: ]
16
17 # m1.o
18 ---
19 FileHeader:
20   Class:           ELFCLASS32
21   Data:            ELFDATA2LSB
22   Type:            ET_REL
23   Machine:         EM_MIPS
24   Flags:           [EF_MIPS_ABI_O32, EF_MIPS_ARCH_1]
25
26 Sections:
27   - Name:          .text
28     Type:          SHT_PROGBITS
29     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
30     AddressAlign:  0x04
31     Size:          0x04
32
33 # m2.o
34 ---
35 FileHeader:
36   Class:           ELFCLASS32
37   Data:            ELFDATA2LSB
38   Type:            ET_REL
39   Machine:         EM_MIPS
40   Flags:           [EF_MIPS_ABI_O32, EF_MIPS_ARCH_2]
41
42 Sections:
43   - Name:          .text
44     Type:          SHT_PROGBITS
45     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
46     AddressAlign:  0x04
47     Size:          0x04
48
49 # m32.o
50 ---
51 FileHeader:
52   Class:           ELFCLASS32
53   Data:            ELFDATA2LSB
54   Type:            ET_REL
55   Machine:         EM_MIPS
56   Flags:           [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32]
57
58 Sections:
59   - Name:          .text
60     Type:          SHT_PROGBITS
61     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
62     AddressAlign:  0x04
63     Size:          0x04
64
65 # m32r2.o
66 ---
67 FileHeader:
68   Class:           ELFCLASS32
69   Data:            ELFDATA2LSB
70   Type:            ET_REL
71   Machine:         EM_MIPS
72   Flags:           [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
73
74 Sections:
75   - Name:          .text
76     Type:          SHT_PROGBITS
77     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
78     AddressAlign:  0x04
79     Size:          0x04
80 ...