2 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-linux-gnu
%s
-o
%t
3 // RUN
: llvm-readobj
--symbols
%t | FileCheck
%s
5 // Verify that the symbol _start is in
a section with an index
>= SHN_LORESERVE.
7 // CHECK-NEXT
: Value
: 0x0
9 // CHECK-NEXT
: Binding
: Global
10 // CHECK-NEXT
: Type
: None
11 // CHECK-NEXT
: Other
: 0
12 // CHECK-NEXT
: Section
: dm
(0xFF00)
14 // RUN
: ld.lld
%t -o
%t2
15 // RUN
: llvm-readobj
--symbols
%t2 | FileCheck
--check-prefix
=LINKED
%s
17 // Test also with
a linker script.
18 // RUN
: echo
"SECTIONS { . = SIZEOF_HEADERS; .text : { *(.text) } }" > %t.script
19 // RUN
: ld.lld
-T %t.script
%t -o
%t2
20 // RUN
: llvm-readobj
--symbols
%t2 | FileCheck
--check-prefix
=LINKED
%s
22 // Test that _start is in the correct section.
23 // LINKED
: Name
: _start
24 // LINKED-NEXT
: Value
: 0x0
25 // LINKED-NEXT
: Size
: 0
26 // LINKED-NEXT
: Binding
: Global
27 // LINKED-NEXT
: Type
: None
28 // LINKED-NEXT
: Other
: 0
29 // LINKED-NEXT
: Section
: dm
31 .macro gen_sections4 x
38 .macro gen_sections8 x
43 .macro gen_sections16 x
48 .macro gen_sections32 x
53 .macro gen_sections64 x
58 .macro gen_sections128 x
63 .macro gen_sections256 x
68 .macro gen_sections512 x
73 .macro gen_sections1024 x
78 .macro gen_sections2048 x
83 .macro gen_sections4096 x
88 .macro gen_sections8192 x
93 .macro gen_sections16384 x
98 .macro gen_sections32768 x
100 gen_sections16384
b\x