[ELF] relocateNonAlloc: clean up workaround code
[llvm-project.git] / lld / test / COFF / thin-archive.s
bloba35eabed688ced4c31782404c2e7f599d73b5d2a
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %t.main.obj %s
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %t.lib.obj \
6 # RUN: %S/Inputs/mangled-symbol.s
7 # RUN: lld-link /lib /out:%t.lib %t.lib.obj
8 # RUN: lld-link /lib /llvmlibthin /out:%t_thin.lib %t.lib.obj
10 # RUN: lld-link /entry:main %t.main.obj %t.lib /out:%t.exe 2>&1 | \
11 # RUN: FileCheck --allow-empty %s
12 # RUN: lld-link /entry:main %t.main.obj %t_thin.lib /out:%t.exe 2>&1 | \
13 # RUN: FileCheck --allow-empty %s
14 # RUN: lld-link /entry:main %t.main.obj /wholearchive:%t_thin.lib /out:%t.exe 2>&1 | \
15 # RUN: FileCheck --allow-empty %s
17 # RUN: rm %t.lib.obj
18 # RUN: lld-link /entry:main %t.main.obj %t.lib /out:%t.exe 2>&1 | \
19 # RUN: FileCheck --allow-empty %s
20 # RUN: env LLD_IN_TEST=1 not lld-link /entry:main %t.main.obj %t_thin.lib \
21 # RUN: /out:%t.exe 2>&1 | FileCheck --check-prefix=NOOBJ %s
22 # RUN: env LLD_IN_TEST=1 not lld-link /entry:main %t.main.obj %t_thin.lib /out:%t.exe \
23 # RUN: /demangle:no 2>&1 | FileCheck --check-prefix=NOOBJNODEMANGLE %s
25 # CHECK-NOT: error: could not get the buffer for the member defining
26 # NOOBJ: error: could not get the buffer for the member defining symbol int __cdecl f(void): {{.*}}.lib({{.*}}.lib.obj):
27 # NOOBJNODEMANGLE: error: could not get the buffer for the member defining symbol ?f@@YAHXZ: {{.*}}.lib({{.*}}.lib.obj):
29 .text
31 .def main
32 .scl 2
33 .type 32
34 .endef
35 .global main
36 main:
37 call "?f@@YAHXZ"
38 retq $0