[clang] [lld] [llvm] [WebAssembly] Emit constant initializers for addrspace(1) globals (PR #212007)
Max Desiatov via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 13 12:56:16 PDT 2026
================
@@ -28,6 +28,7 @@ class MCSymbolWasm : public MCSymbol {
wasm::WasmSignature *Signature = nullptr;
std::optional<wasm::WasmGlobalType> GlobalType;
std::optional<wasm::WasmTableType> TableType;
+ std::optional<uint64_t> GlobalInitValue;
----------------
MaxDesiatov wrote:
How do I export it as C data address in the first place? And where would LLDB read that address from without parsing DWARF?
IIUC this global is read early enough where DWARF parsing can't happen yet, but we have the names section parsed at the point, so the prototype in a fork that we have looks up this as global by its name and reads its value directly.
https://github.com/llvm/llvm-project/pull/212007
More information about the cfe-commits
mailing list