110 lines · plain
1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t2// RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOLS %s3// RUN: llvm-nm %t | FileCheck --check-prefix=NM %s4 5// Test that symbol a has a section that could be confused with common (0xFFF2)6// SYMBOLS: Name: a7// SYMBOLS-NEXT: Value: 0x08// SYMBOLS-NEXT: Size: 09// SYMBOLS-NEXT: Binding: Local (0x0)10// SYMBOLS-NEXT: Type: None (0x0)11// SYMBOLS-NEXT: Other: 012// SYMBOLS-NEXT: Section: bar (0xFFF2)13// SYMBOLS-NEXT: }14 15// Test that we don't get confused16// NM: 0000000000000000 r a17 18.macro gen_sections4 x19 .section a\x20 .section b\x21 .section c\x22 .section d\x23.endm24 25.macro gen_sections8 x26 gen_sections4 a\x27 gen_sections4 b\x28.endm29 30.macro gen_sections16 x31 gen_sections8 a\x32 gen_sections8 b\x33.endm34 35.macro gen_sections32 x36 gen_sections16 a\x37 gen_sections16 b\x38.endm39 40.macro gen_sections64 x41 gen_sections32 a\x42 gen_sections32 b\x43.endm44 45.macro gen_sections128 x46 gen_sections64 a\x47 gen_sections64 b\x48.endm49 50.macro gen_sections256 x51 gen_sections128 a\x52 gen_sections128 b\x53.endm54 55.macro gen_sections512 x56 gen_sections256 a\x57 gen_sections256 b\x58.endm59 60.macro gen_sections1024 x61 gen_sections512 a\x62 gen_sections512 b\x63.endm64 65.macro gen_sections2048 x66 gen_sections1024 a\x67 gen_sections1024 b\x68.endm69 70.macro gen_sections4096 x71 gen_sections2048 a\x72 gen_sections2048 b\x73.endm74 75.macro gen_sections8192 x76 gen_sections4096 a\x77 gen_sections4096 b\x78.endm79 80.macro gen_sections16384 x81 gen_sections8192 a\x82 gen_sections8192 b\x83.endm84 85.macro gen_sections32768 x86 gen_sections16384 a\x87 gen_sections16384 b\x88.endm89 90gen_sections32768 a91gen_sections16384 b92gen_sections8192 c93gen_sections4096 d94gen_sections2048 e95gen_sections1024 f96gen_sections512 g97gen_sections256 h98gen_sections128 i99gen_sections64 j100gen_sections32 k101gen_sections8 l102gen_sections4 m103 104 .section foo105 .section foo2106 .section foo3107 .section bar, "a"108 109a:110