Commit Graph

54 Commits

Author SHA1 Message Date
Sam Clegg 5068685678 [WebAssembly] Create synthetic __wasm_call_ctors function
This change create a new synthetic function in the final
output binary which calls the static constructors in sequence.

See: https://github.com/WebAssembly/tool-conventions/issues/25

Differential Revision: https://reviews.llvm.org/D41893

llvm-svn: 322388
2018-01-12 18:35:13 +00:00
Sam Clegg 408064ef1e [WebAssembly] Don't allow functions to be named more than once
Even though a function can have multiple names in the
linking standards (i.e. due to aliases), there can only
be one name for a given function in the NAME section.

Differential Revision: https://reviews.llvm.org/D41975

llvm-svn: 322383
2018-01-12 17:56:15 +00:00
Sam Clegg d96d93576b [WebAssembly] Move relocation handling InputChunks.cpp
Teach each input chunk how to write itself and apply its
own relocations.

Differential Revision: https://reviews.llvm.org/D41891

llvm-svn: 322212
2018-01-10 19:22:42 +00:00
Sam Clegg 5fa274bea4 [WebAssembly] Add InputChunk as common base class for InputSegment and InputFunction. NFC.
Differential Revision: https://reviews.llvm.org/D41419

llvm-svn: 322148
2018-01-10 01:13:34 +00:00