1 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-linux-gnu
%s
-o
- | elf-dump | FileCheck
%s
3 // Test that like gnu as we create text
, data
and bss by default. Also test
4 // that shstrtab
, symtab
and strtab are listed in that order.
6 // CHECK
: ('sh_name', 0x00000001) # '.text'
7 // CHECK-NEXT
: ('sh_type', 0x00000001)
8 // CHECK-NEXT
: ('sh_flags', 0x00000006)
9 // CHECK-NEXT
: ('sh_addr', 0x00000000)
10 // CHECK-NEXT
: ('sh_offset', 0x00000040)
11 // CHECK-NEXT
: ('sh_size', 0x00000000)
12 // CHECK-NEXT
: ('sh_link', 0x00000000)
13 // CHECK-NEXT
: ('sh_info', 0x00000000)
14 // CHECK-NEXT
: ('sh_addralign', 0x00000004)
15 // CHECK-NEXT
: ('sh_entsize', 0x00000000)
17 // CHECK
: ('sh_name', 0x00000007) # '.data'
18 // CHECK-NEXT
: ('sh_type', 0x00000001)
19 // CHECK-NEXT
: ('sh_flags', 0x00000003)
20 // CHECK-NEXT
: ('sh_addr', 0x00000000)
21 // CHECK-NEXT
: ('sh_offset', 0x00000040)
22 // CHECK-NEXT
: ('sh_size', 0x00000000)
23 // CHECK-NEXT
: ('sh_link', 0x00000000)
24 // CHECK-NEXT
: ('sh_info', 0x00000000)
25 // CHECK-NEXT
: ('sh_addralign', 0x00000004)
26 // CHECK-NEXT
: ('sh_entsize', 0x00000000)
28 // CHECK
: ('sh_name', 0x0000000d) # '.bss'
29 // CHECK-NEXT
: ('sh_type', 0x00000008)
30 // CHECK-NEXT
: ('sh_flags', 0x00000003)
31 // CHECK-NEXT
: ('sh_addr', 0x00000000)
32 // CHECK-NEXT
: ('sh_offset', 0x00000040)
33 // CHECK-NEXT
: ('sh_size', 0x00000000)
34 // CHECK-NEXT
: ('sh_link', 0x00000000)
35 // CHECK-NEXT
: ('sh_info', 0x00000000)
36 // CHECK-NEXT
: ('sh_addralign', 0x00000004)
37 // CHECK-NEXT
: ('sh_entsize', 0x00000000)
39 // CHECK
: ('sh_name', 0x00000012) # '.shstrtab'
40 // CHECK-NEXT
: ('sh_type', 0x00000003)
41 // CHECK-NEXT
: ('sh_flags', 0x00000000)
42 // CHECK-NEXT
: ('sh_addr', 0x00000000)
43 // CHECK-NEXT
: ('sh_offset', 0x00000040)
44 // CHECK-NEXT
: ('sh_size', 0x0000002c)
45 // CHECK-NEXT
: ('sh_link', 0x00000000)
46 // CHECK-NEXT
: ('sh_info', 0x00000000)
47 // CHECK-NEXT
: ('sh_addralign', 0x00000001)
48 // CHECK-NEXT
: ('sh_entsize', 0x00000000)
50 // CHECK
: ('sh_name', 0x0000001c) # '.symtab'
51 // CHECK-NEXT
: ('sh_type', 0x00000002)
52 // CHECK-NEXT
: ('sh_flags', 0x00000000)
53 // CHECK-NEXT
: ('sh_addr', 0x00000000)
54 // CHECK-NEXT
: ('sh_offset',
55 // CHECK-NEXT
: ('sh_size', 0x00000060)
56 // CHECK-NEXT
: ('sh_link', 0x00000006)
57 // CHECK-NEXT
: ('sh_info', 0x00000004)
58 // CHECK-NEXT
: ('sh_addralign', 0x00000008)
59 // CHECK-NEXT
: ('sh_entsize', 0x00000018)
61 // CHECK
: ('sh_name', 0x00000024) # '.strtab'
62 // CHECK-NEXT
: ('sh_type', 0x00000003)
63 // CHECK-NEXT
: ('sh_flags', 0x00000000)
64 // CHECK-NEXT
: ('sh_addr', 0x00000000)
65 // CHECK-NEXT
: ('sh_offset',
66 // CHECK-NEXT
: ('sh_size', 0x00000001)
67 // CHECK-NEXT
: ('sh_link', 0x00000000)
68 // CHECK-NEXT
: ('sh_info', 0x00000000)
69 // CHECK-NEXT
: ('sh_addralign', 0x00000001)
70 // CHECK-NEXT
: ('sh_entsize', 0x00000000)