[lld] wasm-ld: Add allow-multiple-definition flag (PR #97699)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 7 04:02:10 PDT 2024


Martin =?utf-8?q?Žukovec?= <martin.zukovec at xlab.si>,
Martin =?utf-8?q?Žukovec?= <martin.zukovec at xlab.si>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/97699 at github.com>


================
@@ -0,0 +1,39 @@
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t1
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/allow-multiple-definition.s -o %t2
+# RUN: llvm-objdump --no-print-imm-hex -d %t1 | FileCheck --check-prefix=DEF1 %s
+# RUN: llvm-objdump --no-print-imm-hex -d %t2 | FileCheck --check-prefix=DEF2 %s
+# RUN: not wasm-ld -o %t.wasm %t1 %t2 2>&1 | FileCheck --check-prefix=DUP1 %s
+# RUN: not wasm-ld -o %t.wasm %t2 %t1 2>&1 | FileCheck --check-prefix=DUP2 %s
+# RUN: wasm-ld --allow-multiple-definition %t1 %t2 -o %t3
+# RUN: llvm-objdump --no-print-imm-hex -d %t3 | FileCheck --check-prefix=RES12 %s
+# RUN: wasm-ld --allow-multiple-definition %t2 %t1 -o %t4
+# RUN: llvm-objdump --no-print-imm-hex -d %t4 | FileCheck --check-prefix=RES21 %s
----------------
mzukovec wrote:

Test is now updated to follow the ELF test logic. New flag `--noinhibit-exec` had to be added in order to support the same logic.

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


More information about the llvm-commits mailing list