[PATCH] D43264: [WebAssembly] Add explicit symbol table

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 17:15:23 PST 2018

sbc100 added a comment.

In the old code we used `DefinedGlobal` to meant global data in linear memory.  In the new code that got renamed to `DefinedData` and a new type of entity called `DefinedGlobal` was added used to wasm globals.  Its a shame it has the same in the new code, but I think it makes sense.

To make this even more complicated to follow, we previously modeled data symbols as wasm globals...  i.e. we use the wasm globals in the object format to store the addresses in linear memory of data symbols.   A little confusing, and one reason why we are making this change to have a more explicit symbol table.

We could simply store the wasm global data in the DefinedGlobal itself, rather then having it point to an InputGlobal.  I think the problem there is when more than one symbol aliases the same global.   But, we don't have the case yet so perhaps we can push that down the line a little.   Let me see if I can simplify things.

  rLLD LLVM Linker


More information about the llvm-commits mailing list