summaryrefslogtreecommitdiffstats
path: root/lld/unittests
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support library.Shankar Easwaran2014-11-101-1/+3
| | | | | | | | | The parsing routines in the linker script to parse strings encoded in various formats(hexadecimal, octal, decimal, etc), is needed by the GNU driver too. This library provides helper functions for all flavors and flavors to add helper functions which other flavors may make use of. llvm-svn: 221583
* Fix Mach-O unit tests breakage on WindowsRui Ueyama2014-11-071-10/+17
| | | | | | | | | | | | Mach-O normalized file reader assumes that the entire file is aligned to a large boundary. If the in-memory file is not aligned properly, it will abort with an assertion failure in read32/read64. This patch forces the in-memory file for the unit test to be aligned at 64-byte boundary. I found these tests are failing on Windows, but theoretically they could fail on other platform. llvm-svn: 221508
* Use LLVMLIBS here since these are produced by theEric Christopher2014-11-041-1/+1
| | | | | | | llvm build and not supposed to be resident on the system. llvm-svn: 221314
* [PECOFF] Fix /nodefaultlib option.Rui Ueyama2014-10-231-0/+9
| | | | | | | /nodefaultlib argument is a path name, so that needs to be compared case-insensitive way. Also the ".lib" extension should be ignored. llvm-svn: 220508
* Sort include files according to convention.Shankar Easwaran2014-10-1812-31/+8
| | | | llvm-svn: 220131
* [PECOFF] Remember DLL names given with /delayload option.Rui Ueyama2014-10-081-1/+13
| | | | | | This is a step toward full support of /delayload. llvm-svn: 219344
* Add support to print version.Shankar Easwaran2014-10-081-1/+1
| | | | | | | | | | | | | | | | | | | Summary: Add support in the universal driver to print the lld version and the repository version. Test Plan: A driver test is added Reviewers: kledzik, ruiu Reviewed By: ruiu Subscribers: llvm-commits Projects: #lld Differential Revision: http://reviews.llvm.org/D5641 llvm-svn: 219277
* update library dependencyNick Kledzik2014-09-291-0/+1
| | | | llvm-svn: 218646
* [PECOFF] Simplify /machine option handlingRui Ueyama2014-09-241-0/+5
| | | | | | | | /machine:ebc was previously recognized but rejected. Unknown architecture names were handled differently but eventually rejected too. We don't need to distinguish them. llvm-svn: 218344
* [PECOFF] Change export table type.Rui Ueyama2014-09-241-21/+17
| | | | | | | | | This patch changes the type of export table set from std::set to std::vector. The new code is slightly inefficient, but because export table elements are actually mutable, std::vector is better here. No functionality change. llvm-svn: 218343
* [PECOFF] Fix duplicate /export optionsRui Ueyama2014-09-231-2/+2
| | | | | | | | | If two or more /export options are given for the same symbol, we should always print a warning message and use the first one regardless of other parameters. Previously there was a case that the first parameter is not used. llvm-svn: 218342
* Driver: accept /machine:arm for Windows linkerSaleem Abdulrasool2014-09-191-3/+2
| | | | | | | | | Accept /machine:arm as an argument. This is changed to support ARM NT. Although there is no way to differentiate between ARM (Windows CE) and ARM NT (Windows on ARM), since LLVM currently only supports Windows on ARM, simply take /machine:arm to mean Windows on ARM. llvm-svn: 218105
* [mach-o] Let darwin driver infer arch from .o files if -arch not used.Nick Kledzik2014-09-041-30/+40
| | | | | | | | | | | | | | | | Mach-O has a "fat" (or "universal") variant where the same contents built for different architectures are concatenated into one file with a table-of-contents header at the start. But this leaves a dilemma for the linker - which architecture to use. Normally, the linker command line -arch is used to force which slice of any fat files are used. The clang compiler always passes -arch to the linker when invoking it. But some Makefiles invoke the linker directly and don’t specify the -arch option. For those cases, the linker scans all input files in command line order and finds the first non-fat object file. Whatever architecture it is becomes the architecture for the link. llvm-svn: 217189
* Fix unit test now that 'ld' is host specificNick Kledzik2014-09-041-1/+1
| | | | llvm-svn: 217114
* [mach-o] Fix initial live atoms with -dead_stripNick Kledzik2014-08-211-3/+4
| | | | | | | When -dead_strip is used with -exported_symbols_list the initial set of live atoms are those in the export list. llvm-svn: 216213
* [AArch64] Initial ELF/AArch64 SupportChad Rosier2014-08-131-1/+1
| | | | | | | | | | This patch adds the initial ELF/AArch64 support to lld. Only a basic "Hello World" app has been successfully tested for both dynamic and static compiling. Differential Revision: http://reviews.llvm.org/D4778 Patch by Daniel Stewart <stewartd@codeaurora.org>! llvm-svn: 215544
* [PECOFF] Fix /profile option.Rui Ueyama2014-08-111-2/+2
| | | | | | | /profile implies /fixed:no -- so we had to *enable* base relocations rather than disabling it. llvm-svn: 215389
* [PECOFF] Add /profile command line option.Rui Ueyama2014-07-251-0/+11
| | | | llvm-svn: 213984
* [PECOFF] Add the entry point file at the right place.Rui Ueyama2014-07-231-19/+19
| | | | | | | | | The entry point file needs to be processed after all other object files and before all .lib files. It was processed after .lib files. That caused an issue that the entry point function was not resolved from the standard library files. llvm-svn: 213804
* [PECOFF] Fix entry point functions selectionRui Ueyama2014-07-231-25/+1
| | | | | | | | | | | | | | | | | | | | | On Windows there are four "main" functions -- main, wmain, WinMain, or wWinMain. Their parameter types are diffferent. The standard library provides four different entry functions (i.e. {w,}{WinMain,main}CRTStartup) for them. You need to use the right entry routine for your "main" function. If you give an /entry option, the specified name is used unconditionally. Otherwise, the linker needs to select the right one based on user-supplied entry point function. This can be done after the linker reads all the input files. This patch moves the code to determine the entry point function from the driver to a virtual input file. It also implements the correct logic for the entry point function selection. llvm-svn: 213713
* [PECOFF] Invoke cvtres.exe in the driver.Rui Ueyama2014-07-101-19/+0
| | | | | | | | | | | | | | | | | Previously we invoked cvtres.exe for each compiled Windows resource file. The generated files were then concatenated and embedded to the executable. That was not the correct way to merge compiled Windows resource files. If you just concatenate generated files, only the first file would be recognized and the rest would be ignored as trailing garbage. The right way to merge them is to call cvtres.exe with multiple input files. In this patch we do that in the Windows driver. llvm-svn: 212763
* Update for llvm api change.Rafael Espindola2014-07-061-1/+3
| | | | llvm-svn: 212407
* Fix build of DriverTests for config & make.Iain Sandoe2014-07-061-6/+6
| | | | | | | This adjusts the USED library list following recent changes in the object file heirarchy. llvm-svn: 212400
* MachO: rename _outputFileType to avoid shadowing parent field.Tim Northover2014-06-201-5/+5
| | | | llvm-svn: 211367
* Refer to error_code with an std prefix.Rafael Espindola2014-06-121-10/+13
| | | | llvm-svn: 210820
* include system_error directly.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210801
* Run llvm/utils/sort_includes.py in a few files.Rafael Espindola2014-06-121-2/+0
| | | | | | This will reduce the noise in a followup patch. llvm-svn: 210800
* Uses #include "..." instead of #include <...> for llvm headers.Rafael Espindola2014-06-123-6/+6
| | | | llvm-svn: 210799
* replace llvm::error_code with std::error_code.Rafael Espindola2014-06-122-2/+2
| | | | llvm-svn: 210781
* Fix test build on windows.Rafael Espindola2014-06-111-1/+1
| | | | llvm-svn: 210714
* Move Simple.h and Alias.h to include/Core.Rui Ueyama2014-06-111-1/+1
| | | | | | | | Because the files in Core actually depend on these files. Differential Revision: http://reviews.llvm.org/D4000 llvm-svn: 210710
* Initial set of MakefilesIain Sandoe2014-06-043-0/+64
| | | | | | | | This provides support for the autoconfing & make build style. The format, style and implementation follows that used within the llvm and clang projects. TODO: implement out-of-source documentation builds. llvm-svn: 210177
* Add observers to Input GraphRui Ueyama2014-05-141-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Make it possible to add observers to an Input Graph, so that files returned from an Input Graph can be examined before they are passed to Resolver. To implement some PE/COFF features we need to know all the symbols that *can* be solved, including ones in archive files that are not yet to be read. Currently, Resolver only maintains a set of symbols that are already read. It has no knowledge on symbols in skipped files in an archive file. There are many ways to implement that. I chose to apply the observer pattern here because it seems most non-intrusive. We don't want to mess up Resolver with architecture specific features. Even in PE/COFF, the feature that needs this mechanism is minor. So I chose not to modify Resolver, but add a hook to Input Graph. Differential Revision: http://reviews.llvm.org/D3735 llvm-svn: 208753
* [PECOFF] DLL extension can be omitted in .def file.Rui Ueyama2014-05-091-1/+1
| | | | llvm-svn: 208428
* Expand nested input elements.Rui Ueyama2014-05-061-6/+13
| | | | | | | | Previously only the toplevel elements were expanded by expandElements(). Now we recursively call getReplacements() to expand input elements even if they are in, say, in a group. llvm-svn: 208144
* Add a test for notifyProgress().Rui Ueyama2014-05-061-0/+8
| | | | llvm-svn: 208123
* Remove unused variable.Rui Ueyama2014-05-061-1/+0
| | | | llvm-svn: 208121
* Fix copypaste error.Rui Ueyama2014-05-061-1/+1
| | | | llvm-svn: 208120
* s/My/Test/ as these classes are for tests.Rui Ueyama2014-05-061-11/+13
| | | | llvm-svn: 208119
* Make the test even more readable.Rui Ueyama2014-05-061-202/+80
| | | | llvm-svn: 208118
* Simplify unit test code.Rui Ueyama2014-05-061-20/+6
| | | | llvm-svn: 208116
* Remove meaningless return value in test.Rui Ueyama2014-05-061-2/+1
| | | | llvm-svn: 208112
* Replace copypasta with function calls to make tests intelligible.Rui Ueyama2014-05-061-95/+30
| | | | llvm-svn: 208111
* Don't return value rather than always returning true.Rui Ueyama2014-05-061-9/+9
| | | | | | | addInputElement() never fails, and no one checks its return value except tests. Let's simplify the signature. llvm-svn: 208109
* Remove a method that no one is using.Rui Ueyama2014-05-061-12/+0
| | | | llvm-svn: 208101
* Remove operator[] that was used only in tests.Rui Ueyama2014-05-061-2/+4
| | | | llvm-svn: 208020
* [PECOFF] Allow multiple directives in one module-definition file.Rui Ueyama2014-04-261-44/+78
| | | | | | | | I'm a bit surprised that I have not implemented this yet. This is definitely needed to handle real-world module definition files. This patch contains a unit test for r207294. llvm-svn: 207297
* [PECOFF] Add /IMPLIB command line option.Rui Ueyama2014-04-251-0/+10
| | | | | | This option is to override the default import file path. llvm-svn: 207175
* [PECOFF] Better handling of /OPT option.Rui Ueyama2014-04-221-0/+19
| | | | | | | | | | | Previously LLD would fail if /OPT:icf, /OPT:lbr or such are specified, because these command line flags would be handled as unknown ones. We rather want LLD to ignore these known but yet-to-be-implemented options for now. Added tests for the driver as well. llvm-svn: 206863
* [PECOFF] Win64 DLL entry function name is _DllMainCRTStartup.Rui Ueyama2014-04-181-0/+10
| | | | | | Unlike Win32/x86, it has no "@12" suffix. llvm-svn: 206648
OpenPOWER on IntegriCloud