llvm-project/lld/test/COFF/import_weak_alias.test
Mike Hommey 5e23b66699
[LLD][COFF] Handle imported weak aliases consistently (#109105)
symTab being a DenseMap, the order in which a symbol and its
corresponding import symbol are processed is not guaranteed, and when
the latter comes first, it is left undefined.
2024-09-18 14:42:42 +03:00

21 lines
419 B
Plaintext

# REQUIRES: x86
# RUN: split-file %s %t.dir
# RUN: llvm-mc --filetype=obj -triple=x86_64-windows-msvc %t.dir/foo.s -o %t.foo.obj
# RUN: llvm-mc --filetype=obj -triple=x86_64-windows-msvc %t.dir/qux.s -o %t.qux.obj
# RUN: lld-link %t.qux.obj %t.foo.obj -out:%t.dll -dll
#
#--- foo.s
.text
bar:
ret
.weak foo
.set foo, bar
#--- qux.s
.text
.global _DllMainCRTStartup
_DllMainCRTStartup:
call *__imp_foo(%rip)
ret