[PATCH] D43264: [WebAssembly] Add explicit symbol table
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 12:15:29 PST 2018
sbc100 added a comment.
Maybe I can explain a little better.
This change introduces this new concept of a first class wasm "global" which can be named by "GlobalSymbol". This is distinct from data objects which are names via "DataSymbol". For now, llvm is only using one actual such wasm global (the one it used for stack pointer manipulation via the `__stack_pointer` symbol).
For parity with Functions and Data objects we want to allow a many-to-one mapping between symbols and the things symbols point to. This is mostly for supporting aliases. This means you can have several names (Symbols) pointing to a given InputFunction, InputGlobal, or InputSegment (segments can have even more names pointing to them because symbols can point to offsets within a segment).
However, as you point out, it is strange that InputGlobal is not really an InputChunk, in that it is not copied into place with memcpy + relocations like the other two subtypes. We can fix that in a followup CL, either by having it use memcpy for its tiny region, or my breaking the inheritance hierarchy.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D43264
More information about the llvm-commits
mailing list