1; REQUIRES: x86 2 3;; For non-relocatable output, test we parse symbol versions after LTO, 4;; otherwise we may get a symbol named "foo@@VER1", but not "foo" with the 5;; version VER1. 6 7; RUN: llvm-as %s -o %t.o 8; RUN: echo "VER1 {};" > %t.script 9; RUN: ld.lld %t.o -o %t.so -shared --version-script %t.script 10; RUN: llvm-readelf --dyn-syms %t.so | FileCheck %s 11 12;; For non-relocatable output, @ in symbol names has no effect on undefined symbols. 13; CHECK: UND bar{{$}} 14; CHECK-NEXT: {{[1-9]}} foo@@VER1 15 16;; For relocatable output, @ should be retained in the symbol name. 17;; Don't parse and drop `@VER1`. Also check that --version-script is ignored. 18; RUN: ld.lld %t.o -o %t.ro -r --version-script %t.script 19; RUN: llvm-readelf -s %t.ro | FileCheck %s --check-prefix=RELOCATABLE 20 21; RELOCATABLE: {{[1-9]}} foo@@VER1 22; RELOCATABLE-NEXT: UND bar@VER1 23 24target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 25target triple = "x86_64-unknown-linux-gnu" 26 27module asm ".global foo" 28module asm "foo: call bar" 29module asm ".symver foo,foo@@@VER1" 30module asm ".symver bar,bar@@@VER1" 31