1 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-linux-gnu
%s
-o
%t
2 // RUN
: llvm-readobj
-S
%t | FileCheck
--check-prefix
=SECTIONS
%s
3 // RUN
: llvm-readobj
--symbols
%t | FileCheck
--check-prefix
=SYMBOLS
%s
5 // Test that we create
a .symtab_shndx if a symbol points to a section
6 // numbered SHN_LORESERVE
(0xFF00) or higher.
8 // SECTIONS
: Name
: .symtab_shndx
10 // Test that we don
't create a symbol for the symtab_shndx section.
11 // SYMBOLS-NOT: symtab_shndx
13 // SYMBOLS: Name: dm (0)
14 // SYMBOLS: Value: 0x0
16 // SYMBOLS: Binding: Local (0x0)
17 // SYMBOLS: Type: Section (0x3)
19 // SYMBOLS: Section: dm (0xFF00)
22 // Test that both a and b show up in the correct section.
24 // SYMBOLS-NEXT: Value: 0x0
25 // SYMBOLS-NEXT: Size: 0
26 // SYMBOLS-NEXT: Binding: Local (0x0)
27 // SYMBOLS-NEXT: Type: None (0x0)
28 // SYMBOLS-NEXT: Other: 0
29 // SYMBOLS-NEXT: Section: dm (0xFF00)
31 // SYMBOLS-NEXT: Symbol {
32 // SYMBOLS-NEXT: Name: b
33 // SYMBOLS-NEXT: Value: 0x1
34 // SYMBOLS-NEXT: Size: 0
35 // SYMBOLS-NEXT: Binding: Local (0x0)
36 // SYMBOLS-NEXT: Type: None (0x0)
37 // SYMBOLS-NEXT: Other: 0
38 // SYMBOLS-NEXT: Section: dm (0xFF00)
42 .macro gen_sections4 x
49 .macro gen_sections8 x
54 .macro gen_sections16 x
59 .macro gen_sections32 x
64 .macro gen_sections64 x
69 .macro gen_sections128 x
74 .macro gen_sections256 x
79 .macro gen_sections512 x
84 .macro gen_sections1024 x
89 .macro gen_sections2048 x
94 .macro gen_sections4096 x
99 .macro gen_sections8192 x
104 .macro gen_sections16384 x
109 .macro gen_sections32768 x
110 gen_sections16384 a\x
111 gen_sections16384 b\x