From 483506562c00bebd2fa12521ad72880ab098a19c Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 18 Jul 2017 22:52:44 +0000 Subject: [PATCH] Add a test for PR33820. This would have found the issue. llvm-svn: 308389 --- lld/test/ELF/version-script-twice.s | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lld/test/ELF/version-script-twice.s diff --git a/lld/test/ELF/version-script-twice.s b/lld/test/ELF/version-script-twice.s new file mode 100644 index 000000000000..87687cb2f190 --- /dev/null +++ b/lld/test/ELF/version-script-twice.s @@ -0,0 +1,13 @@ +# REQUIRES: x86 + +# RUN: echo "FBSD_1.2 {};" > %t.ver +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: ld.lld -shared %t.o -o %t.so --version-script=%t.ver +# RUN: llvm-nm --dynamic %t.so | FileCheck %s + + .weak openat +openat: +openat@@FBSD_1.2 = openat + +# CHECK: 0000000000001000 W openat +# CHECK-NEXT: 0000000000001000 W openat