mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 02:46:11 +00:00

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.
21 lines
419 B
Plaintext
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
|