summaryrefslogtreecommitdiffstats
path: root/lld/wasm/SyntheticSections.h
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Elide data segments for .bss sectionsThomas Lively2019-10-151-3/+1
| | | | | | | | | | | | | | | | | | | Summary: WebAssembly memories are zero-initialized, so when module does not import its memory initializing .bss sections is guaranteed to be a no-op. To reduce binary size and initialization time, .bss sections are simply not emitted into the final binary unless the memory is imported. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68965 llvm-svn: 374940
* [lld][WebAssembly] Fix static linking of -fPIC code with external undefined ↵Sam Clegg2019-09-241-4/+10
| | | | | | | | functions Differential Revision: https://reviews.llvm.org/D66784 llvm-svn: 372779
* [WebAssembly] Initialize memory in start functionThomas Lively2019-09-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: - `__wasm_init_memory` is now the WebAssembly start function instead of being called from `__wasm_call_ctors` or called directly by the runtime. - Adds a new synthetic data symbol `__wasm_init_memory_flag` that is atomically incremented from zero to one by the thread responsible for initializing memory. - All threads now unconditionally perform data.drop on all passive segments. - Removes --passive-segments and --active-segments flags and controls segment type based on --shared-memory instead. The deleted flags were only present to ameliorate the upgrade path in Emscripten. Reviewers: sbc100, aheejin Subscribers: dschuff, jgravelle-google, sunfish, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65783 llvm-svn: 370965
* [lld][WebAssembly] Store table base in config rather than passing it around. ↵Sam Clegg2019-08-271-3/+2
| | | | | | | | | | | NFC. I've got another change that makes more use of this value in other places. Differential Revision: https://reviews.llvm.org/D66777 llvm-svn: 370010
* [lld][WebAssembly] Allow linking of pic code into static binariesSam Clegg2019-08-131-1/+6
| | | | | | | | | | | | Summary: See https://github.com/emscripten-core/emscripten/issues/9013 Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65922 llvm-svn: 368719
* [Coding style change][lld] Rename variables for non-ELF portsRui Ueyama2019-07-111-103/+103
| | | | | | | | | | | This patch does the same thing as r365595 to other subdirectories, which completes the naming style change for the entire lld directory. With this, the naming style conversion is complete for lld. Differential Revision: https://reviews.llvm.org/D64473 llvm-svn: 365730
* Make functions and member variables distinguishable even after the name ↵Rui Ueyama2019-07-101-6/+6
| | | | | | style change. NFC. llvm-svn: 365605
* [WebAssembly] Add support for -emit-relocsSam Clegg2019-05-241-1/+3
| | | | | | | | | | This can be useful for post-link tools and for testing. Sometimes it can be useful to produces a regular executable but with relocations preserved. Differential Revision: https://reviews.llvm.org/D62378 llvm-svn: 361635
* [WebAssembly] Seal imports section before counting importsSam Clegg2019-05-231-3/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: Before we can assign entries in the function of global index space we need to know the total number of function and global imports respectively. To avoid programmer error this change seals that imports section before assigned function and global index space. Any attempt to add an import after the section is sealed will assert. The lack this such as check caused https://reviews.llvm.org/D61876 to be reverted. I'm also trying to craft a test case the this failure. Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62240 llvm-svn: 361470
* [WebAssembly] Refactor synthetic sections and relocation processing. NFC.Sam Clegg2019-05-211-0/+323
Major refactor to better match the structure of the ELF linker. - Split out relocation processing into scanRelocations - Split out synthetic sections into their own classes. Differential Revision: https://reviews.llvm.org/D61811 llvm-svn: 361233
OpenPOWER on IntegriCloud