summaryrefslogtreecommitdiffstats
path: root/lld/wasm
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] Fix a couple of typos. NFC.Sam Clegg2017-12-191-11/+7
| | | | | | Also remove unneeded braces and old comment. llvm-svn: 321103
* [WebAssembly] Fix typoSam Clegg2017-12-191-2/+2
| | | | | | Patch by Nicholas Wilson llvm-svn: 321097
* [WebAssembly] Remove used member from SymbolTableSam Clegg2017-12-191-1/+0
| | | | | | Patch by Nicholas Wilson llvm-svn: 321096
* [WebAssembly] Add support for writing out init functions in linking sectionSam Clegg2017-12-193-3/+39
| | | | | | | | | 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
* [WebAssebmly] Fix the single clang-format issue in `wasm` directorySam Clegg2017-12-181-2/+1
| | | | llvm-svn: 321020
* [WebAssembly] Move code for copying of data segment relocation. NFC.Sam Clegg2017-12-172-8/+15
| | | | | | | | | This is a preparetory change for function gc which also requires relocations to be copied in ranges like this. Differential Revision: https://reviews.llvm.org/D41313 llvm-svn: 320948
* [WebAssembly] Don't include lazy symbols in import tableSam Clegg2017-12-151-1/+1
| | | | | | | | | This bug was introduced in: https://reviews.llvm.org/D41304. Add a test for this case. Differential Revision: https://reviews.llvm.org/D41309 llvm-svn: 320872
* [WebAssembly] Base imports on Symtab. NFC.Sam Clegg2017-12-152-14/+9
| | | | | | | | | | | | | Since imports are undefined symbols we know we can find all of them my looking at the symbol table alone. (i.e. imports cannot be have local binding). This will be strictly faster and also allows us to to remove a method from Symbol class Differential Revision: https://reviews.llvm.org/D41304 llvm-svn: 320847
* [WebAssembly] Remove extra semicolon. NFC.Sam Clegg2017-12-151-1/+0
| | | | llvm-svn: 320777
* Fix error messages.Rui Ueyama2017-12-151-1/+1
| | | | llvm-svn: 320772
* Add missing reference to lldCommon in MinGW/CMakeLists.txtSam Clegg2017-12-131-1/+0
| | | | | | | | | | | Without this the LLVM_BUILD_LLVM_DYLIB+DLLVM_LINK_LLVM_DYLIB build break. Also remove unneeded lldCore from wasm/CMakeLists.txt Differential Revision: https://reviews.llvm.org/D41194 llvm-svn: 320610
* Remove redundant local variables.Rui Ueyama2017-12-111-2/+1
| | | | llvm-svn: 320436
* Reduce indentation.Rui Ueyama2017-12-111-2/+2
| | | | llvm-svn: 320433
* [WebAssembly] De-dup indirect function table.Sam Clegg2017-12-115-62/+98
| | | | | | | | | | | | | | | | Create the indirect function table based on symbols rather than just duplicating the input entries. This has the effect of de-duplicating the table. This is a followup to the equivalent change made for globals: https://reviews.llvm.org/D40859 Partially based on a patch by Nicholas Wilson: https://reviews.llvm.org/D40845 Differential Revision: https://reviews.llvm.org/D40989 llvm-svn: 320428
* [WebAssembly] Preserve ordering of global symbolsSam Clegg2017-12-111-7/+5
| | | | | | | | | | This change restores the behavior that global indexes are assigned in object file order. This was accidentally changed in https://reviews.llvm.org/D40859. Differential Revision: https://reviews.llvm.org/D41038 llvm-svn: 320426
* Sort.Rui Ueyama2017-12-111-2/+2
| | | | llvm-svn: 320394
* Change function type more LLVM-ish.Rui Ueyama2017-12-111-2/+2
| | | | | | Also fix variable naming style. llvm-svn: 320393
* [WebAssembly] Add --no-entry argumentSam Clegg2017-12-082-13/+22
| | | | | | | | | | | This adds a `--no-entry` argument to wasm LLD used to suppress the default `_start` entry point. Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D40725 llvm-svn: 320167
* Prefer `ArrayRef` over `const std::vector&`Sam Clegg2017-12-083-8/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D40993 llvm-svn: 320125
* [WebAssembly] Add check to ensure symbol VA is only set once. NFC.Sam Clegg2017-12-082-12/+2
| | | | | | | | Also remove resulting unneeded function. Differential Revision: https://reviews.llvm.org/D40990 llvm-svn: 320118
* [WebAssembly] Remove used variableSam Clegg2017-12-072-2/+0
| | | | llvm-svn: 320007
* [WebAssembly] Add -u/--undefined argument handlingSam Clegg2017-12-074-0/+32
| | | | | | | | | | | | | | Adds a new argument to wasm-lld, `--undefined`, with similar semantics to the ELF linker. It pulls in symbols from files contained within a `.a` archive, forcing them to be included even if the translation unit would not otherwise be pulled in. Patch by Nicholas Wilson Differential Revision: https://reviews.llvm.org/D40724 llvm-svn: 320004
* [WebAssembly] Fix symbol exports under -r/--relocatableSam Clegg2017-12-077-112/+77
| | | | | | | | | | | | | | | This change cleans up the way wasm exports and globals are generated, particualrly for -r/--relocatable where globals need to be created and exported in order for output relocations which reference them. Remove the need for a per file GlobalIndexOffset and instead set the output index for each symbol directly. This simplifies the code in several places. Differential Revision: https://reviews.llvm.org/D40859 llvm-svn: 320001
* Always evaluate the second argument for CHECK() lazily.Rui Ueyama2017-12-061-4/+4
| | | | | | | | | This patch is to rename check CHECK and make it a C macro, so that we can evaluate the second argument lazily. Differential Revision: https://reviews.llvm.org/D40915 llvm-svn: 319974
* [WebAssembly] Remove wasm/Strings.cpp+hSam Clegg2017-12-066-55/+8
| | | | | | | | | This file contained only a single function that was only really needed in one place, so just inline it. Differential Revision: https://reviews.llvm.org/D40870 llvm-svn: 319876
* [WebAssembly] Fix stack pointer relocationsSam Clegg2017-12-051-0/+1
| | | | | | | | | | This line was mistakenly deleted in rL319813 Add a test for stackpointer relocations. Differential Revision: https://reviews.llvm.org/D40847 llvm-svn: 319828
* [WebAssembly] Improve support linker synthetic symbolsSam Clegg2017-12-055-17/+27
| | | | | | | | | | | | | 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
* [WebAssembly] Remove used --sysroot optionSam Clegg2017-12-053-4/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D40771 llvm-svn: 319805
* [WebAssembly] Simplify check for emitting relocationsSam Clegg2017-12-052-3/+5
| | | | | | | | | | | This is a small change I split of from a larger one that simplifies the condition that need to be checked when decided if we need to emit relocation and all the things they depend on (symbols, etc). Differential Revision: https://reviews.llvm.org/D40825 llvm-svn: 319789
* toString function take a const refs where possibleSam Clegg2017-12-054-6/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D40824 llvm-svn: 319787
* Reland "[WebAssembly] Add support for visibility flag""Sam Clegg2017-12-033-23/+21
| | | | | | | | Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish Differential Revision: https://reviews.llvm.org/D40773 llvm-svn: 319627
* [WebAssembly] Revert r319592 "Add support for visibility flag"Heejin Ahn2017-12-023-21/+23
| | | | | | | | | r319488 reportedly broke one of LLVM bots (ubuntu-gcc7.1-werror), and this patch depends on that patch. See http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror/builds/3369 for details. llvm-svn: 319603
* [WebAssembly] Add support for visibility flagSam Clegg2017-12-013-23/+21
| | | | | | | | Patch by Nicholas Wilson Differential Revision: https://reviews.llvm.org/D40690 llvm-svn: 319592
* clang-format.Rui Ueyama2017-12-013-5/+5
| | | | llvm-svn: 319512
* [WebAssembly] Fix typosSam Clegg2017-12-013-6/+6
| | | | | | | | Patch by Nicholas Wilson Differential Revision: https://reviews.llvm.org/D40691 llvm-svn: 319506
* [WebAssembly] Allow function signature checking at link timeSam Clegg2017-11-3010-61/+159
| | | | | | | | | | | | | | 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
* Use llvm::StringSet instead of std::set.Rui Ueyama2017-11-291-3/+2
| | | | | | | | | 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
* Remove `else` or `break` after `fatal`. NFC.Rui Ueyama2017-11-292-13/+8
| | | | | | | fatal() does not return, so we don't need `else` or `break` after a call of fatal. llvm-svn: 319355
* Fix spelling. NFC.Rui Ueyama2017-11-281-1/+1
| | | | llvm-svn: 319238
* Remove unused `using`.Rui Ueyama2017-11-281-1/+0
| | | | llvm-svn: 319236
* Move Memory.{h,cpp} to Common.Rui Ueyama2017-11-286-59/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D40571 llvm-svn: 319221
* [WebAssembly] Remove initializers from Config.hSam Clegg2017-11-281-13/+13
| | | | | | | | | | | 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
* Factor out more code to Common/Args.cpp.Rui Ueyama2017-11-281-53/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D40540 llvm-svn: 319211
* Factor out common code to Common/Strings.cpp.Rui Ueyama2017-11-282-24/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D40530 llvm-svn: 319138
* Rename `Symtab` private memory to avoid confusion with global `Symtab`Sam Clegg2017-11-272-5/+5
| | | | | | | | | | | This is also consistent with SymVector that exists in COFF port and soon to be added to the wasm port. Split off as part of https://reviews.llvm.org/D40371 Differential Revision: https://reviews.llvm.org/D40525 llvm-svn: 319113
* Consistent use of <internal> when displaying internal symbol namesSam Clegg2017-11-271-7/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D40510 llvm-svn: 319108
* wasm/OutputSegment.h: Include missing headerDavid Blaikie2017-11-221-0/+1
| | | | llvm-svn: 318879
* [WebAssembly] Initial wasm linker implementationSam Clegg2017-11-1722-0/+3224
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