1 # RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s 2 # RUN: elf-dump --dump-section-data < %t | FileCheck %s 3 .section test1 4 .byte 1 5 .section test2 6 .byte 2 7 .previous 8 .byte 1 9 .section test2 10 .byte 2 11 .previous 12 .byte 1 13 .section test1 14 .byte 1 15 .previous 16 .byte 1 17 .section test2 18 .byte 2 19 .pushsection test3 20 .byte 3 21 .pushsection test4 22 .byte 4 23 .pushsection test5 24 .byte 5 25 .popsection 26 .byte 4 27 .popsection 28 .byte 3 29 .popsection 30 .byte 2 31 .pushsection test3 32 .byte 3 33 .pushsection test4 34 .byte 4 35 .previous 36 .byte 3 37 .popsection 38 .byte 3 39 .previous 40 .byte 2 41 .section test1 42 .byte 1 43 .popsection 44 .byte 2 45 .previous 46 .byte 1 47 .previous 48 # CHECK: (('sh_name', 0x00000044) # 'test1' 49 # CHECK-NEXT: ('sh_type', 0x00000001) 50 # CHECK-NEXT: ('sh_flags', 0x00000000) 51 # CHECK-NEXT: ('sh_addr', 0x00000000) 52 # CHECK-NEXT: ('sh_offset', 0x00000034) 53 # CHECK-NEXT: ('sh_size', 0x00000007) 54 # CHECK-NEXT: ('sh_link', 0x00000000) 55 # CHECK-NEXT: ('sh_info', 0x00000000) 56 # CHECK-NEXT: ('sh_addralign', 0x00000001) 57 # CHECK-NEXT: ('sh_entsize', 0x00000000) 58 # CHECK-NEXT: ('_section_data', '01010101 010101') 59 # CHECK-NEXT: ), 60 # CHECK: (('sh_name', 0x0000003e) # 'test2' 61 # CHECK-NEXT: ('sh_type', 0x00000001) 62 # CHECK-NEXT: ('sh_flags', 0x00000000) 63 # CHECK-NEXT: ('sh_addr', 0x00000000) 64 # CHECK-NEXT: ('sh_offset', 0x0000003b) 65 # CHECK-NEXT: ('sh_size', 0x00000006) 66 # CHECK-NEXT: ('sh_link', 0x00000000) 67 # CHECK-NEXT: ('sh_info', 0x00000000) 68 # CHECK-NEXT: ('sh_addralign', 0x00000001) 69 # CHECK-NEXT: ('sh_entsize', 0x00000000) 70 # CHECK-NEXT: ('_section_data', '02020202 0202') 71 # CHECK-NEXT: ), 72 # CHECK: (('sh_name', 0x00000038) # 'test3' 73 # CHECK-NEXT: ('sh_type', 0x00000001) 74 # CHECK-NEXT: ('sh_flags', 0x00000000) 75 # CHECK-NEXT: ('sh_addr', 0x00000000) 76 # CHECK-NEXT: ('sh_offset', 0x00000041) 77 # CHECK-NEXT: ('sh_size', 0x00000005) 78 # CHECK-NEXT: ('sh_link', 0x00000000) 79 # CHECK-NEXT: ('sh_info', 0x00000000) 80 # CHECK-NEXT: ('sh_addralign', 0x00000001) 81 # CHECK-NEXT: ('sh_entsize', 0x00000000) 82 # CHECK-NEXT: ('_section_data', '03030303 03') 83 # CHECK-NEXT: ), 84 # CHECK: (('sh_name', 0x00000032) # 'test4' 85 # CHECK-NEXT: ('sh_type', 0x00000001) 86 # CHECK-NEXT: ('sh_flags', 0x00000000) 87 # CHECK-NEXT: ('sh_addr', 0x00000000) 88 # CHECK-NEXT: ('sh_offset', 0x00000046) 89 # CHECK-NEXT: ('sh_size', 0x00000003) 90 # CHECK-NEXT: ('sh_link', 0x00000000) 91 # CHECK-NEXT: ('sh_info', 0x00000000) 92 # CHECK-NEXT: ('sh_addralign', 0x00000001) 93 # CHECK-NEXT: ('sh_entsize', 0x00000000) 94 # CHECK-NEXT: ('_section_data', '040404') 95 # CHECK-NEXT: ), 96 # CHECK: (('sh_name', 0x0000002c) # 'test5' 97 # CHECK-NEXT: ('sh_type', 0x00000001) 98 # CHECK-NEXT: ('sh_flags', 0x00000000) 99 # CHECK-NEXT: ('sh_addr', 0x00000000) 100 # CHECK-NEXT: ('sh_offset', 0x00000049) 101 # CHECK-NEXT: ('sh_size', 0x00000001) 102 # CHECK-NEXT: ('sh_link', 0x00000000) 103 # CHECK-NEXT: ('sh_info', 0x00000000) 104 # CHECK-NEXT: ('sh_addralign', 0x00000001) 105 # CHECK-NEXT: ('sh_entsize', 0x00000000) 106 # CHECK-NEXT: ('_section_data', '05') 107 # CHECK-NEXT: ), 108