[PATCH] D58315: [WebAssembly] Add .shared directive for shared memory

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 15 21:15:32 PST 2019

sbc100 added a comment.

In D58315#1400286 <https://reviews.llvm.org/D58315#1400286>, @tlively wrote:

> @sbc100 I'm looking at the linker to figure out how to implement shared memory-aware linking, and it looks like the linker doesn't even look in the imports section of the wobject. Why even bother importing `__linear_memory` in object files at all? Is it just to make the object file a spec-compliant wasm? I think I'm going to have to make the linker look at the import section for the sole purpose of fetching out this shared bit on the memory import. This isn't a problem, but it did surprise me.

Yes, its purely to make the object file valid.

I'm tempted to have the linker driven by a flag for this rather then driven by the input file.

If you were going to check that kind of think I would do it when cheking the format of the object file.  Perhaps is lld::wasm::createObjectFile.

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list