[lld] [Coverage][WebAssembly] Discard InstrProf sections if object not live (PR #172023)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 19 03:50:41 PST 2025
================
@@ -0,0 +1,13 @@
+; ModuleID = 'instr-prof.c'
+source_filename = "instr-prof.c"
+target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20"
+target triple = "wasm32-unknown-unknown"
+
+ at __llvm_profile_runtime = hidden global i32 0, align 4
+
+!llvm.module.flags = !{!0, !1}
+!llvm.ident = !{!2}
+
+!0 = !{i32 2, !"EnableValueProfiling", i32 0}
+!1 = !{i32 1, !"wchar_size", i32 4}
+!2 = !{!"clang version 21.1.6"}
----------------
Spxg wrote:
I have no idea..
```sh
$ llvm-mc -filetype=obj -triple=wasm32-unknown-unknown lld/test/wasm/Inputs/malformed-prf1.s -o malformed-prf1.o
lld/test/wasm/Inputs/malformed-prf1.s:92:17: error: non-local symbol required
.no_dead_strip .L__llvm_coverage_mapping
^
lld/test/wasm/Inputs/malformed-prf1.s:94:17: error: non-local symbol required
.no_dead_strip .L__profd_foo
^
lld/test/wasm/Inputs/malformed-prf1.s:95:17: error: non-local symbol required
.no_dead_strip .L__llvm_prf_nm
```
https://github.com/llvm/llvm-project/pull/172023
More information about the llvm-commits
mailing list