aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/COFF/def-export-stdcall.s3
-rw-r--r--test/COFF/export.test5
-rw-r--r--test/ELF/icf-none.s22
3 files changed, 28 insertions, 2 deletions
diff --git a/test/COFF/def-export-stdcall.s b/test/COFF/def-export-stdcall.s
index d7700d9e9535..17473f7f9761 100644
--- a/test/COFF/def-export-stdcall.s
+++ b/test/COFF/def-export-stdcall.s
@@ -2,7 +2,8 @@
# RUN: llvm-mc -filetype=obj -triple=i686-windows-msvc %s -o %t.obj
# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall" > %t.def
# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
-# RUN: llvm-nm %t.lib | FileCheck %s
+# RUN: llvm-readobj %t.lib | FileCheck %s
+# CHECK: Name type: undecorate
# CHECK: __imp__stdcall@8
# CHECK: _stdcall@8
diff --git a/test/COFF/export.test b/test/COFF/export.test
index e4a094ce6073..174f4ac55d9d 100644
--- a/test/COFF/export.test
+++ b/test/COFF/export.test
@@ -39,8 +39,9 @@ CHECK3-NEXT: 4 0
CHECK3-NEXT: 5 0x1008
CHECK3-NEXT: 6 0x1010 exportfn2
-# RUN: lld-link /out:%t.dll /dll %t.obj /export:f1=exportfn1 /export:f2=exportfn2
+# RUN: lld-link /out:%t.dll /dll %t.obj /export:f1=exportfn1 /export:f2=exportfn2 /implib:%t.lib
# RUN: llvm-objdump -p %t.dll | FileCheck -check-prefix=CHECK4 %s
+# RUN: llvm-nm %t.lib | FileCheck -check-prefix=CHECK4-NM %s
CHECK4: Export Table:
CHECK4: DLL name: export.test.tmp.dll
@@ -49,6 +50,8 @@ CHECK4-NEXT: 0 0
CHECK4-NEXT: 1 0x1010 exportfn3
CHECK4-NEXT: 2 0x1008 f1
CHECK4-NEXT: 3 0x1010 f2
+CHECK4-NM: 00000000 T f1
+CHECK4-NM: 00000000 T f2
# RUN: echo "EXPORTS exportfn1 @3" > %t.def
# RUN: echo "fn2=exportfn2 @2" >> %t.def
diff --git a/test/ELF/icf-none.s b/test/ELF/icf-none.s
new file mode 100644
index 000000000000..671f2085f669
--- /dev/null
+++ b/test/ELF/icf-none.s
@@ -0,0 +1,22 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
+# RUN: ld.lld %t -o %t2 --icf=all --icf=none --verbose | FileCheck %s
+
+# CHECK-NOT: selected .text.f1
+
+.globl _start, f1, f2
+_start:
+ ret
+
+.section .text.f1, "ax"
+f1:
+ mov $60, %rax
+ mov $42, %rdi
+ syscall
+
+.section .text.f2, "ax"
+f2:
+ mov $60, %rax
+ mov $42, %rdi
+ syscall