Convert MC tests to .s so codegen changes won't break them.
[oota-llvm.git] / test / MC / ELF / basic-elf-64.s
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
2
3         .text
4         .globl  main
5         .align  16, 0x90
6         .type   main,@function
7 main:                                   # @main
8 # BB#0:
9         subq    $8, %rsp
10         movl    $.L.str1, %edi
11         callq   puts
12         movl    $.L.str2, %edi
13         callq   puts
14         xorl    %eax, %eax
15         addq    $8, %rsp
16         ret
17 .Ltmp0:
18         .size   main, .Ltmp0-main
19
20         .type   .L.str1,@object         # @.str1
21         .section        .rodata.str1.1,"aMS",@progbits,1
22 .L.str1:
23         .asciz   "Hello"
24         .size   .L.str1, 6
25
26         .type   .L.str2,@object         # @.str2
27 .L.str2:
28         .asciz   "World!"
29         .size   .L.str2, 7
30
31         .section        .note.GNU-stack,"",@progbits
32
33 // CHECK: ('e_indent[EI_CLASS]', 0x00000002)
34 // CHECK: ('e_indent[EI_DATA]', 0x00000001)
35 // CHECK: ('e_indent[EI_VERSION]', 0x00000001)
36 // CHECK: ('_sections', [
37 // CHECK:   # Section 0
38 // CHECK:   (('sh_name', 0x00000000) # ''
39
40 // CHECK:   # '.text'
41
42 // CHECK: ('st_bind', 0x00000000)
43 // CHECK: ('st_type', 0x00000003)
44
45 // CHECK: ('st_bind', 0x00000000)
46 // CHECK: ('st_type', 0x00000003)
47
48 // CHECK: ('st_bind', 0x00000000)
49 // CHECK: ('st_type', 0x00000003)
50
51 // CHECK:   # 'main'
52 // CHECK-NEXT: ('st_bind', 0x00000001)
53 // CHECK-NEXT: ('st_type', 0x00000002)
54
55 // CHECK:   # 'puts'
56 // CHECK-NEXT: ('st_bind', 0x00000001)
57 // CHECK-NEXT: ('st_type', 0x00000000)
58
59 // CHECK:   # '.rela.text'
60
61 // CHECK:   ('_relocations', [
62 // CHECK:     # Relocation 0x00000000
63 // CHECK:     (('r_offset', 0x00000005)
64 // CHECK:      ('r_type', 0x0000000a)
65 // CHECK:      ('r_addend', 0x00000000)
66 // CHECK:     ),
67 // CHECK:     # Relocation 0x00000001
68 // CHECK:     (('r_offset', 0x0000000a)
69 // CHECK:      ('r_type', 0x00000002)
70 // CHECK:      ('r_addend', 0xfffffffc)
71 // CHECK:     ),
72 // CHECK:     # Relocation 0x00000002
73 // CHECK:     (('r_offset', 0x0000000f)
74 // CHECK:      ('r_type', 0x0000000a)
75 // CHECK:      ('r_addend', 0x00000006)
76 // CHECK:     ),
77 // CHECK:     # Relocation 0x00000003
78 // CHECK:     (('r_offset', 0x00000014)
79 // CHECK:      ('r_type', 0x00000002)
80 // CHECK:      ('r_addend', 0xfffffffc)
81 // CHECK:     ),
82 // CHECK:   ])