1// Test section manipulation via .linkonce directive. 2// 3// RUN: llvm-mc -triple i386-pc-win32 -filetype=obj %s | llvm-readobj -s -t | FileCheck %s 4// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -s -t | FileCheck %s 5 6.section s1 7.linkonce 8.long 1 9 10.section s2 11.linkonce one_only 12.long 1 13 14.section s3 15.linkonce discard 16.long 1 17 18.section s4 19.linkonce same_size 20.long 1 21 22.section s5 23.linkonce same_contents 24.long 1 25 26.section s6 27.long 1 28 29.section s7 30.linkonce largest 31.long 1 32 33.section s8 34.linkonce newest 35.long 1 36 37.section .foo$bar 38.linkonce discard 39.long 1 40 41 42// CHECK: Sections [ 43// CHECK: Section { 44// CHECK: Name: s1 45// CHECK: Characteristics [ 46// CHECK: IMAGE_SCN_LNK_COMDAT 47// CHECK: ] 48// CHECK: } 49// CHECK: Section { 50// CHECK: Name: s2 51// CHECK: Characteristics [ 52// CHECK: IMAGE_SCN_LNK_COMDAT 53// CHECK: ] 54// CHECK: } 55// CHECK: Section { 56// CHECK: Name: s3 57// CHECK: Characteristics [ 58// CHECK: IMAGE_SCN_LNK_COMDAT 59// CHECK: ] 60// CHECK: } 61// CHECK: Section { 62// CHECK: Name: s4 63// CHECK: Characteristics [ 64// CHECK: IMAGE_SCN_LNK_COMDAT 65// CHECK: ] 66// CHECK: } 67// CHECK: Section { 68// CHECK: Name: s5 69// CHECK: Characteristics [ 70// CHECK: IMAGE_SCN_LNK_COMDAT 71// CHECK: ] 72// CHECK: } 73// CHECK: Section { 74// CHECK: Name: s6 75// CHECK: Characteristics [ 76// CHECK: ] 77// CHECK: } 78// CHECK: Section { 79// CHECK: Name: s7 80// CHECK: Characteristics [ 81// CHECK: IMAGE_SCN_LNK_COMDAT 82// CHECK: ] 83// CHECK: } 84// CHECK: Section { 85// CHECK: Name: s8 86// CHECK: Characteristics [ 87// CHECK: IMAGE_SCN_LNK_COMDAT 88// CHECK: ] 89// CHECK: } 90// CHECK: ] 91// CHECK: Symbols [ 92// CHECK: Symbol { 93// CHECK: Name: s1 94// CHECK: Section: s1 (4) 95// CHECK: AuxSectionDef { 96// CHECK: Number: 4 97// CHECK: Selection: Any (0x2) 98// CHECK: } 99// CHECK: } 100// CHECK: Symbol { 101// CHECK: Name: s2 102// CHECK: Section: s2 (5) 103// CHECK: AuxSectionDef { 104// CHECK: Number: 5 105// CHECK: Selection: NoDuplicates (0x1) 106// CHECK: } 107// CHECK: } 108// CHECK: Symbol { 109// CHECK: Name: s3 110// CHECK: Section: s3 (6) 111// CHECK: AuxSectionDef { 112// CHECK: Number: 6 113// CHECK: Selection: Any (0x2) 114// CHECK: } 115// CHECK: } 116// CHECK: Symbol { 117// CHECK: Name: s4 118// CHECK: Section: s4 (7) 119// CHECK: AuxSectionDef { 120// CHECK: Number: 7 121// CHECK: Selection: SameSize (0x3) 122// CHECK: } 123// CHECK: } 124// CHECK: Symbol { 125// CHECK: Name: s5 126// CHECK: Section: s5 (8) 127// CHECK: AuxSectionDef { 128// CHECK: Number: 8 129// CHECK: Selection: ExactMatch (0x4) 130// CHECK: } 131// CHECK: } 132// CHECK: Symbol { 133// CHECK: Name: s6 134// CHECK: } 135// CHECK: Symbol { 136// CHECK: Name: s7 137// CHECK: Section: s7 (10) 138// CHECK: AuxSectionDef { 139// CHECK: Number: 10 140// CHECK: Selection: Largest (0x6) 141// CHECK: } 142// CHECK: } 143// CHECK: Symbol { 144// CHECK: Name: s8 145// CHECK: Section: s8 (11) 146// CHECK: AuxSectionDef { 147// CHECK: Number: 11 148// CHECK: Selection: Newest (0x7) 149// CHECK: } 150// CHECK: } 151