Commit Graph

10 Commits

Author SHA1 Message Date
Sam Clegg ff2b12216b [WebAssembly] Remove --emit-relocs
This was added to mimic ELF, but maintaining it has cost
and we currently don't have any use for it outside of the
test code.

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

llvm-svn: 323154
2018-01-22 21:55:43 +00:00
Sam Clegg 51bcdc2d49 [WebAssembly] Define __heap_base global
This is an immutable exported global representing
the start of the heap area.  It is a page aligned.

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

llvm-svn: 322609
2018-01-17 01:34:31 +00:00
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 80cfdd6b56 [WebAssembly] Remove used variable
llvm-svn: 320007
2017-12-07 03:51:37 +00:00
Sam Clegg 4eedcfc946 [WebAssembly] Improve support linker synthetic symbols
This is part of larger change to add synthetic symbols
for section start/end points and init/fini_array:
  https://reviews.llvm.org/D40760

Allows synthetic global symbols to have an explicitly set
virtual address.

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

llvm-svn: 319813
2017-12-05 19:05:45 +00:00
Sam Clegg 3b4a475c37 [WebAssembly] Remove used --sysroot option
Differential Revision: https://reviews.llvm.org/D40771

llvm-svn: 319805
2017-12-05 18:13:45 +00:00
Sam Clegg b862159683 [WebAssembly] Allow function signature checking at link time
This change allows checking of function signatures but
does not yes enable it by default.  In this mode, linking
two objects that were compiled with a different signatures
for the same function will produce a link error.

New options for enabling and disabling this feature have been
added: (--check-signatures/--no-check-signatures).

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

llvm-svn: 319396
2017-11-30 01:40:08 +00:00
Rui Ueyama 7d5a13799a Use llvm::StringSet instead of std::set.
std::set is pretty slow. We generally prefer llvm::StringSet if we don't
need an sorted set.

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

llvm-svn: 319371
2017-11-29 22:21:37 +00:00
Sam Clegg f95826dccd [WebAssembly] Remove initializers from Config.h
These should get initialized in by Driver.cpp based on
command line options.

Also, sort entries.

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

llvm-svn: 319219
2017-11-28 20:27:21 +00:00
Sam Clegg c94d393ad5 [WebAssembly] Initial wasm linker implementation
This linker backend is still a work in progress but is
enough to link simple programs including linking against
library archives.

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

llvm-svn: 318539
2017-11-17 18:14:09 +00:00