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 7main: # @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]', 0x02) 34// CHECK: ('e_indent[EI_DATA]', 0x01) 35// CHECK: ('e_indent[EI_VERSION]', 0x01) 36// CHECK: ('_sections', [ 37// CHECK: # Section 0 38// CHECK: (('sh_name', 0x00000000) # '' 39 40// CHECK: # '.text' 41 42// CHECK: # '.rela.text' 43 44// CHECK: ('_relocations', [ 45// CHECK: # Relocation 0 46// CHECK: (('r_offset', 0x0000000000000005) 47// CHECK: ('r_type', 0x0000000a) 48// CHECK: ('r_addend', 0x0000000000000000) 49// CHECK: ), 50// CHECK: # Relocation 1 51// CHECK: (('r_offset', 0x000000000000000a) 52// CHECK: ('r_type', 0x00000002) 53// CHECK: ('r_addend', 0xfffffffffffffffc) 54// CHECK: ), 55// CHECK: # Relocation 2 56// CHECK: (('r_offset', 0x000000000000000f) 57// CHECK: ('r_type', 0x0000000a) 58// CHECK: ('r_addend', 0x0000000000000006) 59// CHECK: ), 60// CHECK: # Relocation 3 61// CHECK: (('r_offset', 0x0000000000000014) 62// CHECK: ('r_type', 0x00000002) 63// CHECK: ('r_addend', 0xfffffffffffffffc) 64// CHECK: ), 65// CHECK: ]) 66 67// CHECK: ('st_bind', 0x0) 68// CHECK: ('st_type', 0x3) 69 70// CHECK: ('st_bind', 0x0) 71// CHECK: ('st_type', 0x3) 72 73// CHECK: ('st_bind', 0x0) 74// CHECK: ('st_type', 0x3) 75 76// CHECK: # 'main' 77// CHECK-NEXT: ('st_bind', 0x1) 78// CHECK-NEXT: ('st_type', 0x2) 79 80// CHECK: # 'puts' 81// CHECK-NEXT: ('st_bind', 0x1) 82// CHECK-NEXT: ('st_type', 0x0) 83