summaryrefslogtreecommitdiffstats
path: root/lld/wasm/OutputSegment.h
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Elide data segments for .bss sectionsThomas Lively2019-10-151-0/+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
* [WebAssembly] Sort output data sections to place .bss lastThomas Lively2019-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: This was always the intended behavior, but had not been implemented. This ordering is important for Emscripten when generating .mem files while compiling to JS, since only zeros at the end of initialized memory can be dropped. Fixes https://github.com/emscripten-core/emscripten/issues/8999 Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67736 llvm-svn: 372284
* [Coding style change][lld] Rename variables for non-ELF portsRui Ueyama2019-07-111-18/+18
| | | | | | | | | | | 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
* [WebAssembly] Add option to emit passive segmentsThomas Lively2019-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Adds `--passive-segments` and `--active-segments` flags to control what kind of segments are emitted. For now the default is always to emit active segments so this is not a breaking change, but in the future the default will be changed to passive segments when shared memory is requested and active segments otherwise. When passive segments are emitted, corresponding memory.init and data.drop instructions are emitted in a `__wasm_init_memory` function that is automatically called at the beginning of `__wasm_call_ctors`. Reviewers: sbc100, aheejin, dschuff Subscribers: azakai, dschuff, jgravelle-google, sunfish, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59343 llvm-svn: 365088
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [WebAssembly] Fix windows compiler warning by using explicit 64bit shift. NFC.Sam Clegg2019-01-171-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D56874 llvm-svn: 351488
* [WebAssembly] Store section alignment as a power of 2Sam Clegg2019-01-161-1/+1
| | | | | | | | | | | This change bumps for version number of the wasm object file metadata. See https://github.com/WebAssembly/tool-conventions/pull/92 Differential Revision: https://reviews.llvm.org/D56762 llvm-svn: 351287
* [WebAssembly] Remove another trivial accessor.Rui Ueyama2018-04-051-7/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D43725 llvm-svn: 329336
* [WebAssembly] Remove trivial accessors.Rui Ueyama2018-02-281-6/+7
| | | | | | | | {set,get}OutputSegment don't hide anything, so remove them. Differential Revision: https://reviews.llvm.org/D43724 llvm-svn: 326276
* [WebAssembly] Add explicit symbol tableSam Clegg2018-02-231-1/+2
| | | | | | | | | | | | | | | | | | This change modified lld to in response the llvm change which moved to a more explicit symbol table in the object format. Based on patches by Nicholas Wilson: 1. https://reviews.llvm.org/D41955 2. https://reviews.llvm.org/D42585 The primary difference that we see in the test output is that for relocatable (-r) output we now have symbol table which replaces exports/imports and globals. See: https://github.com/WebAssembly/tool-conventions/issues/38 Differential Revision: https://reviews.llvm.org/D43264 llvm-svn: 325861
* Revert "[WebAssembly] Move checking of InputSegment comdat group earlier"Sam Clegg2018-01-131-7/+0
| | | | | | This reverts commit 7421eab7ccf2e14518f4526a084a5afc76ac9c6a. llvm-svn: 322441
* [WebAssembly] Move checking of InputSegment comdat group earlierSam Clegg2018-01-131-0/+7
| | | | | | | This should also fixe an unused varaible warning in the realeae build. llvm-svn: 322440
* [WebAssembly] Add InputChunk as common base class for InputSegment and ↵Sam Clegg2018-01-101-1/+1
| | | | | | | | InputFunction. NFC. Differential Revision: https://reviews.llvm.org/D41419 llvm-svn: 322148
* [WebAssembly] Apply data relocations in parallel. NFC.Sam Clegg2017-12-191-1/+1
| | | | | | | | | | Store data relocations with their respective segment. This allows relocations to be applied as each segment is written (and therefore in parallel). Differential Revision: https://reviews.llvm.org/D41410 llvm-svn: 321105
* [WebAssembly] Remove extra semicolon. NFC.Sam Clegg2017-12-151-1/+0
| | | | llvm-svn: 320777
* wasm/OutputSegment.h: Include missing headerDavid Blaikie2017-11-221-0/+1
| | | | llvm-svn: 318879
* [WebAssembly] Initial wasm linker implementationSam Clegg2017-11-171-0/+56
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
OpenPOWER on IntegriCloud