summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/WasmObjectWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] MC: Fix references to undefined externals in data sectionSam Clegg2017-06-021-8/+13
| | | | | | | | | | | | Undefined externals don't need to have a size or an offset. This was broken by r303915. Added a test for this case. This fixes the "Compile LLVM Torture (o)" step on the wasm waterfall. Differential Revision: https://reviews.llvm.org/D33803 llvm-svn: 304505
* [WebAssembly] MC: Include unnamed data when writing wasm filesSam Clegg2017-05-251-18/+16
| | | | | | | | | | | | Also, include global entries for all data symbols, not just external ones, since these are referenced by the relocation records. Add a test case that includes unnamed data. Differential Revision: https://reviews.llvm.org/D33079 llvm-svn: 303915
* [WebAssembly] Add size of section header to data relocation offsets.Sam Clegg2017-04-281-9/+12
| | | | | | | | | | | Also, add test for data relocations and fix addend to be signed. Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32513 llvm-svn: 301690
* [WebAssembly] Write initial memory in pages not bytesSam Clegg2017-04-281-2/+4
| | | | | | | | Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32660 llvm-svn: 301687
* [WebAssembly] Fix relocation count in wasm binaries with call_indirectSam Clegg2017-04-251-1/+1
| | | | | | | | Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32459 llvm-svn: 301331
* Fix signed/unsigned warningSimon Pilgrim2017-03-311-1/+1
| | | | llvm-svn: 299194
* [WebAssembly] Initial linking metadata supportDan Gohman2017-03-301-23/+123
| | | | | | | | | | | | | | | | Add support for the new relocations and linking metadata section support in https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md. In particular, this allows LLVM to indicate which variable is the stack pointer, so that it can be linked with other objects. This also adds support for emitting type relocations for call_indirect instructions. Right now, this is mainly tested by using wabt and hexdump to examine the output on selected testcases. We'll add more tests as the design stablizes and more of the pieces are in place. llvm-svn: 299141
* [WebAssembly] Fix import type to be signed LEBsDerek Schuff2017-03-231-1/+1
| | | | | | | | | | | | | | This fix is a follow up a previous change with stored value types as signed integers in memory. In future, once the yaml<->wasm binary patche lands we can add test coverage for this kind of thing. Differential Revision: https://reviews.llvm.org/D31227 Patch by Sam Clegg llvm-svn: 298612
* [WebAssembly] Fix some broken type encodings in wasm binaryDerek Schuff2017-03-161-9/+9
| | | | | | | | | | | | A recent change switch the in-memory wasm value types to be signed integers, but I missing a few cases where these were being writing to the binary. Differential Revision: https://reviews.llvm.org/D31014 Patch by Sam Clegg llvm-svn: 297991
* [WebAssembly] Update format of 'names' section.Derek Schuff2017-03-151-6/+11
| | | | | | | | | | | | This change updates to the format of the 'names' sectionin the generated wasm binary to match the latest changesto the design and 'wabt'. Differential Revision: https://reviews.llvm.org/D30950 Patch by Sam Clegg llvm-svn: 297877
* [WebAssembly] Use LEB encoding for value typesDerek Schuff2017-03-141-20/+24
| | | | | | | | | | | | Previously we were using the encoded LEB hex values for the value types. This change uses the decoded negative value and the LEB encoder to write them out. Differential Revision: https://reviews.llvm.org/D30847 Patch by Sam Clegg llvm-svn: 297777
* [WebAssembly] Add some comments and tidy up whitespace.Dan Gohman2017-02-271-2/+3
| | | | llvm-svn: 296402
* [WebAssembly] Add support for using a wasm global for the stack pointer.Dan Gohman2017-02-241-0/+24
| | | | | | | This replaces the __stack_pointer variable which was allocated in linear memory. llvm-svn: 296201
* [WebAssembly] Basic support for Wasm object file encoding.Dan Gohman2017-02-241-6/+900
| | | | | | | | | With the "wasm32-unknown-unknown-wasm" triple, this allows writing out simple wasm object files, and is another step in a larger series toward migrating from ELF to general wasm object support. Note that this code and the binary format itself is still experimental. llvm-svn: 296190
* [WebAssembly] Implement the wasm binary container header.Dan Gohman2017-02-221-1/+3
| | | | | | | Also, update the version number to 0x1, which is what engines are now expecting. llvm-svn: 295860
* [WebAssembly] Add skeleton MC support for the Wasm container formatDan Gohman2017-02-221-0/+119
This just adds the basic skeleton for supporting a new object file format. All of the actual encoding will be implemented in followup patches. Differential Revision: https://reviews.llvm.org/D26722 llvm-svn: 295803
OpenPOWER on IntegriCloud