1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s 2 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. 5 6 // CHECK: ('sh_name', 0x00000001) # '.text' 7 // CHECK-NEXT: ('sh_type', 0x00000001) 8 // CHECK-NEXT: ('sh_flags', 0x0000000000000006) 9 // CHECK-NEXT: ('sh_addr', 0x0000000000000000) 10 // CHECK-NEXT: ('sh_offset', 0x0000000000000040) 11 // CHECK-NEXT: ('sh_size', 0x0000000000000000) 12 // CHECK-NEXT: ('sh_link', 0x00000000) 13 // CHECK-NEXT: ('sh_info', 0x00000000) 14 // CHECK-NEXT: ('sh_addralign', 0x0000000000000004) 15 // CHECK-NEXT: ('sh_entsize', 0x0000000000000000) 16 17 // CHECK: ('sh_name', 0x00000026) # '.data' 18 // CHECK-NEXT: ('sh_type', 0x00000001) 19 // CHECK-NEXT: ('sh_flags', 0x0000000000000003) 20 // CHECK-NEXT: ('sh_addr', 0x0000000000000000) 21 // CHECK-NEXT: ('sh_offset', 0x0000000000000040) 22 // CHECK-NEXT: ('sh_size', 0x0000000000000000) 23 // CHECK-NEXT: ('sh_link', 0x00000000) 24 // CHECK-NEXT: ('sh_info', 0x00000000) 25 // CHECK-NEXT: ('sh_addralign', 0x0000000000000004) 26 // CHECK-NEXT: ('sh_entsize', 0x0000000000000000) 27 28 // CHECK: ('sh_name', 0x00000007) # '.bss' 29 // CHECK-NEXT: ('sh_type', 0x00000008) 30 // CHECK-NEXT: ('sh_flags', 0x0000000000000003) 31 // CHECK-NEXT: ('sh_addr', 0x0000000000000000) 32 // CHECK-NEXT: ('sh_offset', 0x0000000000000040) 33 // CHECK-NEXT: ('sh_size', 0x0000000000000000) 34 // CHECK-NEXT: ('sh_link', 0x00000000) 35 // CHECK-NEXT: ('sh_info', 0x00000000) 36 // CHECK-NEXT: ('sh_addralign', 0x0000000000000004) 37 // CHECK-NEXT: ('sh_entsize', 0x0000000000000000) 38 39 // CHECK: ('sh_name', 0x0000000c) # '.shstrtab' 40 // CHECK-NEXT: ('sh_type', 0x00000003) 41 // CHECK-NEXT: ('sh_flags', 0x0000000000000000) 42 // CHECK-NEXT: ('sh_addr', 0x0000000000000000) 43 // CHECK-NEXT: ('sh_offset', 0x0000000000000040) 44 // CHECK-NEXT: ('sh_size', 0x000000000000002c) 45 // CHECK-NEXT: ('sh_link', 0x00000000) 46 // CHECK-NEXT: ('sh_info', 0x00000000) 47 // CHECK-NEXT: ('sh_addralign', 0x0000000000000001) 48 // CHECK-NEXT: ('sh_entsize', 0x0000000000000000) 49 50 // CHECK: ('sh_name', 0x0000001e) # '.symtab' 51 // CHECK-NEXT: ('sh_type', 0x00000002) 52 // CHECK-NEXT: ('sh_flags', 0x0000000000000000) 53 // CHECK-NEXT: ('sh_addr', 0x0000000000000000) 54 // CHECK-NEXT: ('sh_offset', 55 // CHECK-NEXT: ('sh_size', 0x0000000000000060) 56 // CHECK-NEXT: ('sh_link', 0x00000006) 57 // CHECK-NEXT: ('sh_info', 0x00000004) 58 // CHECK-NEXT: ('sh_addralign', 0x0000000000000008) 59 // CHECK-NEXT: ('sh_entsize', 0x0000000000000018) 60 61 // CHECK: ('sh_name', 0x00000016) # '.strtab' 62 // CHECK-NEXT: ('sh_type', 0x00000003) 63 // CHECK-NEXT: ('sh_flags', 0x0000000000000000) 64 // CHECK-NEXT: ('sh_addr', 0x0000000000000000) 65 // CHECK-NEXT: ('sh_offset', 66 // CHECK-NEXT: ('sh_size', 0x0000000000000001) 67 // CHECK-NEXT: ('sh_link', 0x00000000) 68 // CHECK-NEXT: ('sh_info', 0x00000000) 69 // CHECK-NEXT: ('sh_addralign', 0x0000000000000001) 70 // CHECK-NEXT: ('sh_entsize', 0x0000000000000000) 71