1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t 2// RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOLS %s 3// RUN: llvm-nm %t | FileCheck --check-prefix=NM %s 4 5// Test that symbol a has a section that could be confused with common (0xFFF2) 6// SYMBOLS: Name: a 7// SYMBOLS-NEXT: Value: 0x0 8// SYMBOLS-NEXT: Size: 0 9// SYMBOLS-NEXT: Binding: Local (0x0) 10// SYMBOLS-NEXT: Type: None (0x0) 11// SYMBOLS-NEXT: Other: 0 12// SYMBOLS-NEXT: Section: bar (0xFFF2) 13// SYMBOLS-NEXT: } 14 15// Test that we don't get confused 16// NM: 0000000000000000 r a 17 18.macro gen_sections4 x 19 .section a\x 20 .section b\x 21 .section c\x 22 .section d\x 23.endm 24 25.macro gen_sections8 x 26 gen_sections4 a\x 27 gen_sections4 b\x 28.endm 29 30.macro gen_sections16 x 31 gen_sections8 a\x 32 gen_sections8 b\x 33.endm 34 35.macro gen_sections32 x 36 gen_sections16 a\x 37 gen_sections16 b\x 38.endm 39 40.macro gen_sections64 x 41 gen_sections32 a\x 42 gen_sections32 b\x 43.endm 44 45.macro gen_sections128 x 46 gen_sections64 a\x 47 gen_sections64 b\x 48.endm 49 50.macro gen_sections256 x 51 gen_sections128 a\x 52 gen_sections128 b\x 53.endm 54 55.macro gen_sections512 x 56 gen_sections256 a\x 57 gen_sections256 b\x 58.endm 59 60.macro gen_sections1024 x 61 gen_sections512 a\x 62 gen_sections512 b\x 63.endm 64 65.macro gen_sections2048 x 66 gen_sections1024 a\x 67 gen_sections1024 b\x 68.endm 69 70.macro gen_sections4096 x 71 gen_sections2048 a\x 72 gen_sections2048 b\x 73.endm 74 75.macro gen_sections8192 x 76 gen_sections4096 a\x 77 gen_sections4096 b\x 78.endm 79 80.macro gen_sections16384 x 81 gen_sections8192 a\x 82 gen_sections8192 b\x 83.endm 84 85.macro gen_sections32768 x 86 gen_sections16384 a\x 87 gen_sections16384 b\x 88.endm 89 90gen_sections32768 a 91gen_sections16384 b 92gen_sections8192 c 93gen_sections4096 d 94gen_sections2048 e 95gen_sections1024 f 96gen_sections512 g 97gen_sections256 h 98gen_sections128 i 99gen_sections64 j 100gen_sections32 k 101gen_sections8 l 102gen_sections4 m 103 104 .section foo 105 .section foo2 106 .section foo3 107 .section bar, "a" 108 109a: 110