JDevlieghere wrote:

@DavidSpickett Great question and that definitely deserved more explanation 
from my end. I was a bit rushed in getting the PR up to unlock Adrian who needs 
the data for the Swift Reflection metadata. 

In WebAssembly, the data section (`WASM_NAMES_DATA_SEGMENT`) contain the actual 
initialized data that will be copied into (linear) memory when the module is 
loaded. The `names` section has names for the different segments, but there's 
no symbols for referencing items within those segments (like `.data` and 
`.rodata`) the same way that's the case for ELF and Mach-O. 

`llvm-objdump` gives you the same:

```
SYMBOL TABLE:
00000188 g     F CODE   00000003 __wasm_call_ctors
0000018b g     F CODE   0000002a add
000001b5 g     F CODE   0000004d __original_main
00000202 g     F CODE   0000000a main
0000002e g       GLOBAL 00000007 __stack_pointer
00000400 l     O DATA   00000009 .rodata
0000040c l     O DATA   00000004 .data
```

That said, I do think these should also be represented as segments in LLDB, and 
that's indeed something I have planned to do next.

https://github.com/llvm/llvm-project/pull/153494
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to