[PATCH] D42867: [WebAssembly] Add _edata, _end and other link-sythentic symbols
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 2 15:00:43 PST 2018
sbc100 added a comment.
In https://reviews.llvm.org/D42867#996838, @sunfish wrote:
> Is there a use for `_edata`? I'm curious how applications would use it differently from `_end`.
>
> Is there a way for applications to determine where the data starts? Traditionally that might be something like `_etext`, but of course that doesn't apply to wasm. Could they get it from `__bss_start` and/or `__heap_base`? What's the relationship between those symbols?
Maybe nobody will need `_edata`. I added it mostly for completeness. The current `DataSize` we have in the linker meta section will be replaced by `_end`, and that is needed by emscripten.
There is no way to determine where the data starts, no. We could put `_etext` there, but it seems a little strange to have `_etext`.
I think __bss_start will normally be the same as _edata on wasm (modulo alignment of the first bss symbol I guess?. I just realized I forgot to add __bss_start here.
__heap_base follows data + bss + stack.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D42867
More information about the llvm-commits
mailing list