]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/X86_64/yamlinput.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / X86_64 / yamlinput.test
1 # This tests the functionality that lld is able to read
2 # an input YAML from a previous link
3
4 RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o \
5 RUN: --noinhibit-exec --output-filetype=yaml -o %t.objtxt
6 RUN: lld -flavor gnu -target x86_64-linux %t.objtxt \
7 RUN: --noinhibit-exec -o %t1
8 RUN: llvm-readobj -sections %t1 | FileCheck %s -check-prefix=SECTIONS
9
10 SECTIONS:   Section {
11 SECTIONS:     Index: 0
12 SECTIONS:     Name:  (0)
13 SECTIONS:     Type: SHT_NULL (0x0)
14 SECTIONS:     Flags [ (0x0)
15 SECTIONS:     ]
16 SECTIONS:   }
17 SECTIONS:   Section {
18 SECTIONS:     Index: 1
19 SECTIONS:     Name: .interp
20 SECTIONS:     Type: SHT_PROGBITS (0x1)
21 SECTIONS:     Flags [ (0x2)
22 SECTIONS:       SHF_ALLOC (0x2)
23 SECTIONS:     ]
24 SECTIONS:   }
25 SECTIONS:   Section {
26 SECTIONS:     Index: 2
27 SECTIONS:     Name: .hash
28 SECTIONS:     Type: SHT_HASH (0x5)
29 SECTIONS:     Flags [ (0x2)
30 SECTIONS:       SHF_ALLOC (0x2)
31 SECTIONS:     ]
32 SECTIONS:   }
33 SECTIONS:   Section {
34 SECTIONS:     Index: 3
35 SECTIONS:     Name: .dynsym
36 SECTIONS:     Type: SHT_DYNSYM (0xB)
37 SECTIONS:     Flags [ (0x2)
38 SECTIONS:       SHF_ALLOC (0x2)
39 SECTIONS:     ]
40 SECTIONS:   }
41 SECTIONS:   Section {
42 SECTIONS:     Index: 4
43 SECTIONS:     Name: .dynstr
44 SECTIONS:     Type: SHT_STRTAB (0x3)
45 SECTIONS:     Flags [ (0x2)
46 SECTIONS:       SHF_ALLOC (0x2)
47 SECTIONS:     ]
48 SECTIONS:   }
49 SECTIONS:   Section {
50 SECTIONS:     Index: 5
51 SECTIONS:     Name: .text
52 SECTIONS:     Type: SHT_PROGBITS (0x1)
53 SECTIONS:     Flags [ (0x6)
54 SECTIONS:       SHF_ALLOC (0x2)
55 SECTIONS:       SHF_EXECINSTR (0x4)
56 SECTIONS:     ]
57 SECTIONS:   }
58 SECTIONS:   Section {
59 SECTIONS:     Index: 6
60 SECTIONS:     Name: .rodata
61 SECTIONS:     Type: SHT_PROGBITS (0x1)
62 SECTIONS:     Flags [ (0x2)
63 SECTIONS:       SHF_ALLOC (0x2)
64 SECTIONS:     ]
65 SECTIONS:   }
66 SECTIONS:   Section {
67 SECTIONS:     Index: 7
68 SECTIONS:     Name: .eh_frame
69 SECTIONS:     Type: SHT_PROGBITS (0x1)
70 SECTIONS:     Flags [ (0x2)
71 SECTIONS:       SHF_ALLOC (0x2)
72 SECTIONS:     ]
73 SECTIONS:   }
74 SECTIONS:   Section {
75 SECTIONS:     Index: 8
76 SECTIONS:     Name: .eh_frame_hdr
77 SECTIONS:   }
78 SECTIONS:   Section {
79 SECTIONS:     Index: 9
80 SECTIONS:     Name: .init_array
81 SECTIONS:     Type: SHT_PROGBITS (0x1)
82 SECTIONS:     Flags [ (0x3)
83 SECTIONS:       SHF_ALLOC (0x2)
84 SECTIONS:       SHF_WRITE (0x1)
85 SECTIONS:     ]
86 SECTIONS:   }
87 SECTIONS:   Section {
88 SECTIONS:     Index: 10
89 SECTIONS:     Name: .fini_array
90 SECTIONS:     Type: SHT_PROGBITS (0x1)
91 SECTIONS:     Flags [ (0x3)
92 SECTIONS:       SHF_ALLOC (0x2)
93 SECTIONS:       SHF_WRITE (0x1)
94 SECTIONS:     ]
95 SECTIONS:   }
96 SECTIONS:   Section {
97 SECTIONS:     Index: 11
98 SECTIONS:     Name: .dynamic
99 SECTIONS:     Type: SHT_DYNAMIC (0x6)
100 SECTIONS:     Flags [ (0x3)
101 SECTIONS:       SHF_ALLOC (0x2)
102 SECTIONS:       SHF_WRITE (0x1)
103 SECTIONS:     ]
104 SECTIONS:   }
105 SECTIONS:   Section {
106 SECTIONS:     Index: 12
107 SECTIONS:     Name: .got.plt
108 SECTIONS:     Type: SHT_PROGBITS (0x1)
109 SECTIONS:     Flags [ (0x3)
110 SECTIONS:       SHF_ALLOC (0x2)
111 SECTIONS:       SHF_WRITE (0x1)
112 SECTIONS:     ]
113 SECTIONS:   }
114 SECTIONS:   Section {
115 SECTIONS:     Index: 13
116 SECTIONS:     Name: .data
117 SECTIONS:     Type: SHT_PROGBITS (0x1)
118 SECTIONS:     Flags [ (0x3)
119 SECTIONS:       SHF_ALLOC (0x2)
120 SECTIONS:       SHF_WRITE (0x1)
121 SECTIONS:     ]
122 SECTIONS:   }
123 SECTIONS:   Section {
124 SECTIONS:     Index: 14
125 SECTIONS:     Name: .bss
126 SECTIONS:     Type: SHT_NOBITS (0x8)
127 SECTIONS:     Flags [ (0x3)
128 SECTIONS:       SHF_ALLOC (0x2)
129 SECTIONS:       SHF_WRITE (0x1)
130 SECTIONS:     ]
131 SECTIONS:   }
132 SECTIONS:   Section {
133 SECTIONS:     Index: 15
134 SECTIONS:     Name: .comment
135 SECTIONS:     Type: SHT_PROGBITS (0x1)
136 SECTIONS:     Flags [ (0x0)
137 SECTIONS:     ]
138 SECTIONS:   }
139 SECTIONS:   Section {
140 SECTIONS:     Index: 16
141 SECTIONS:     Name: .note.GNU-stack
142 SECTIONS:     Type: SHT_PROGBITS (0x1)
143 SECTIONS:     Flags [ (0x0)
144 SECTIONS:     ]
145 SECTIONS:   }
146 SECTIONS:   Section {
147 SECTIONS:     Index: 17
148 SECTIONS:     Name: .shstrtab
149 SECTIONS:     Type: SHT_STRTAB (0x3)
150 SECTIONS:     Flags [ (0x0)
151 SECTIONS:     ]
152 SECTIONS:   }
153 SECTIONS:   Section {
154 SECTIONS:     Index: 18
155 SECTIONS:     Name: .symtab
156 SECTIONS:     Type: SHT_SYMTAB (0x2)
157 SECTIONS:     Flags [ (0x0)
158 SECTIONS:     ]
159 SECTIONS:   }
160 SECTIONS:   Section {
161 SECTIONS:     Index: 19
162 SECTIONS:     Name: .strtab
163 SECTIONS:     Type: SHT_STRTAB (0x3)
164 SECTIONS:     Flags [ (0x0)
165 SECTIONS:     ]
166 SECTIONS:   }