summaryrefslogtreecommitdiffstats
path: root/lld/wasm/OutputSections.h
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Elide data segments for .bss sectionsThomas Lively2019-10-151-1/+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
* [Coding style change][lld] Rename variables for non-ELF portsRui Ueyama2019-07-111-42/+42
| | | | | | | | | | | 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-4/+4
| | | | | | style change. NFC. llvm-svn: 365605
* [WebAssembly] Refactor synthetic sections and relocation processing. NFC.Sam Clegg2019-05-211-47/+6
| | | | | | | | | | | 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
* [WebAssembly] Move code and data section generation to finalizeContent. NFC.Sam Clegg2019-05-161-6/+31
| | | | | | | | | | | | | | Previously these sections were being generated during their constructors. This moves the work to finalizeContent, and also does the same for the relocation sections because their contents depends on the final layout too. This change is part of a larger refactor to how we deal with synthetic sections: https://reviews.llvm.org/D61811 Differential Revision: https://reviews.llvm.org/D61971 llvm-svn: 360941
* 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] Remove `using` statements from header files. NFC.Sam Clegg2018-11-271-4/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D54758 llvm-svn: 347621
* [WebAssembly] clang-format (NFC)Heejin Ahn2018-08-291-1/+1
| | | | | | | | | | | | Summary: This patch runs clang-format on all wasm-only files. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51449 llvm-svn: 340970
* [WebAssembly] Add support for debug (DWARF) sectionsSam Clegg2018-05-041-0/+2
| | | | | | | | | | | | | | Specifically add support for custom sections that contain relocations, and for the two new relocation types needed by DWARF sections. See: https://reviews.llvm.org/D44184 Patch by Yury Delendik! Differential Revision: https://reviews.llvm.org/D44184 llvm-svn: 331566
* [WebAssembly] Add support for custom sectionsSam Clegg2018-04-101-0/+21
| | | | | | | | | Copy user-defined custom sections into the output, concatenating sections with the same name. Differential Revision: https://reviews.llvm.org/D45340 llvm-svn: 329717
* [WebAssembly] Return a StringRef instead of std::string from ↵Rui Ueyama2018-02-281-1/+1
| | | | | | | | getSectionName(). NFC. Differential Revision: https://reviews.llvm.org/D43854 llvm-svn: 326337
* [WebAssembly] Do not use inheritance to define SubSection.Rui Ueyama2018-02-281-16/+0
| | | | | | | | | | | | | | SubSection inherited from SyntheticSection, and SyntheticSection inherits from OutputSection, so SubSection was an OutputSection. But that's wrong because SubSection is not actually a WebAssembly output section. It shares some functionalities with OutputSection, but overall it's very different. This patch removes that inheritance. Differential Revision: https://reviews.llvm.org/D43719 llvm-svn: 326286
* Refactor wasm/WriterUtil.{cpp,h}.Rui Ueyama2018-02-161-3/+3
| | | | | | | | | | | | | | | | Summary: - Makes code more in line with LLVM style (e.g. const char * -> StringRef) - Do not use formatv since we can construct message just by `+` - Replace some odd types such as `const StringRef` with more common type - Do not use default arguments if they are not necessary Reviewers: sbc100 Subscribers: jfb, aheejin, llvm-commits, sunfish Differential Revision: https://reviews.llvm.org/D43403 llvm-svn: 325383
* [WebAssembly] Add InputChunk as common base class for InputSegment and ↵Sam Clegg2018-01-101-2/+1
| | | | | | | | InputFunction. NFC. Differential Revision: https://reviews.llvm.org/D41419 llvm-svn: 322148
* [WebAssembly] Output functions individuallySam Clegg2018-01-091-3/+3
| | | | | | | | | | | | | The code section is now written out one function at a time rather than all the functions in a given objects being serialized at once. This change lays the groundwork for supporting --gc-sections. Differential Revision: https://reviews.llvm.org/D41315 llvm-svn: 322138
* [WebAssembly] Improve toString(OutputSection). NFC.Sam Clegg2017-12-201-12/+7
| | | | llvm-svn: 321146
* [WebAssembly] Apply data relocations in parallel. NFC.Sam Clegg2017-12-191-2/+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] Add support for writing out init functions in linking sectionSam Clegg2017-12-191-0/+4
| | | | | | | | | This change add support for init functions in the linking section, but only in -r/--relocatable mode. Differential Revision: https://reviews.llvm.org/D41375 llvm-svn: 321088
* Prefer `ArrayRef` over `const std::vector&`Sam Clegg2017-12-081-4/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D40993 llvm-svn: 320125
* [WebAssembly] Initial wasm linker implementationSam Clegg2017-11-171-0/+138
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