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