OSDN Git Service

[WebAssembly] Initial linking metadata support
authorDan Gohman <dan433584@gmail.com>
Thu, 30 Mar 2017 23:58:19 +0000 (23:58 +0000)
committerDan Gohman <dan433584@gmail.com>
Thu, 30 Mar 2017 23:58:19 +0000 (23:58 +0000)
commit546a4623a537387f054179fa484a921cca531522
treec9bbf2856baf5a8ff3a423a4f4610f1f7e22d25a
parent839e869207cbced2b4805b5852f41c2982dda892
[WebAssembly] Initial linking metadata support

Add support for the new relocations and linking metadata section support in
https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md. In
particular, this allows LLVM to indicate which variable is the stack pointer,
so that it can be linked with other objects.

This also adds support for emitting type relocations for call_indirect
instructions.

Right now, this is mainly tested by using wabt and hexdump to examine the
output on selected testcases. We'll add more tests as the design stablizes
and more of the pieces are in place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299141 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineModuleInfoImpls.h
include/llvm/Support/Wasm.h
include/llvm/Support/WasmRelocs/WebAssembly.def
lib/MC/WasmObjectWriter.cpp
lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h
lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp