1# REQUIRES: x86 2 3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o 4# RUN: echo '{ \ 5# RUN: global: \ 6# RUN: _Z3bari; \ 7# RUN: extern "C++" { \ 8# RUN: "foo(int)"; \ 9# RUN: z*; \ 10# RUN: std::q*; \ 11# RUN: }; \ 12# RUN: local: *; \ 13# RUN: }; ' > %t.script 14# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so 15# RUN: llvm-readobj --dyn-syms %t.so | FileCheck %s 16 17# CHECK: DynamicSymbols [ 18# CHECK-NEXT: Symbol { 19# CHECK-NEXT: Name: 20# CHECK-NEXT: Value: 21# CHECK-NEXT: Size: 22# CHECK-NEXT: Binding: Local 23# CHECK-NEXT: Type: 24# CHECK-NEXT: Other: 25# CHECK-NEXT: Section: 26# CHECK-NEXT: } 27# CHECK-NEXT: Symbol { 28# CHECK-NEXT: Name: _Z3bari 29# CHECK-NEXT: Value: 30# CHECK-NEXT: Size: 31# CHECK-NEXT: Binding: Global 32# CHECK-NEXT: Type: 33# CHECK-NEXT: Other: 34# CHECK-NEXT: Section: 35# CHECK-NEXT: } 36# CHECK-NEXT: Symbol { 37# CHECK-NEXT: Name: _Z3fooi 38# CHECK-NEXT: Value: 39# CHECK-NEXT: Size: 40# CHECK-NEXT: Binding: Global 41# CHECK-NEXT: Type: 42# CHECK-NEXT: Other: 43# CHECK-NEXT: Section: 44# CHECK-NEXT: } 45# CHECK-NEXT: Symbol { 46# CHECK-NEXT: Name: _Z3zedi 47# CHECK-NEXT: Value: 48# CHECK-NEXT: Size: 49# CHECK-NEXT: Binding: Global 50# CHECK-NEXT: Type: 51# CHECK-NEXT: Other: 52# CHECK-NEXT: Section: 53# CHECK-NEXT: } 54# CHECK-NEXT: Symbol { 55# CHECK-NEXT: Name: _ZSt3qux 56# CHECK-NEXT: Value: 57# CHECK-NEXT: Size: 58# CHECK-NEXT: Binding: Global 59# CHECK-NEXT: Type: 60# CHECK-NEXT: Other: 61# CHECK-NEXT: Section: 62# CHECK-NEXT: } 63# CHECK-NEXT: ] 64 65.global _Z3fooi 66_Z3fooi: 67.global _Z3bari 68_Z3bari: 69.global _Z3zedi 70_Z3zedi: 71.global _Z3bazi 72_Z3bazi: 73.global _ZSt3qux 74_ZSt3qux: 75