[lld] [llvm] [LTO] [LLD] Don't alias the __imp_func and func symbol resolutions (PR #71376)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 18 00:27:42 PST 2023


================
@@ -3,9 +3,11 @@
 ; RUN: rm -rf %t.dir
 ; RUN: split-file %s %t.dir
 ; RUN: llvm-as %t.dir/main.ll -o %t.main.obj
-; RUN: llvm-as %t.dir/other.ll -o %t.other.obj
+; RUN: llvm-as %t.dir/other1.ll -o %t.other1.obj
+; RUN: llvm-as %t.dir/other2.ll -o %t.other2.obj
 
-; RUN: lld-link /entry:entry %t.main.obj %t.other.obj /out:%t.exe /subsystem:console
+; RUN: lld-link /entry:entry %t.main.obj %t.other1.obj /out:%t.exe /subsystem:console
----------------
MaskRay wrote:

I think you can define a `__imp_other` and link with `-debug:symtab` and check that `__imp_other` (not strictly needed) is emitted.

https://github.com/llvm/llvm-project/pull/71376


More information about the llvm-commits mailing list