summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/WinLinkModuleDef.cpp
Commit message (Collapse)AuthorAgeFilesLines
* COFF: Remove the old COFF linker and make link an alias to link2.Rui Ueyama2015-08-061-295/+0
| | | | | | It's time to remove old COFF linker because the new one is now complete. llvm-svn: 244226
* [PECOFF] Fix exported symbol in the import libraryRui Ueyama2014-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | There are two ways to specify a symbol to be exported in the module definition file. 1) EXPORT <external name> = <symbol> 2) EXPORT <symbol> In (1), you give both external name and internal name. In that case, the linker tries to find a symbol using the internal name, and write that address to the export table with the external name. Thus, from the outer world, the symbol seems to be exported as the external name. In (2), internal name is basically the same as the external name with an exception: if you give an undecorated symbol to the EXPORT directive, and if the linker finds a decorated symbol, the external name for the symbol will become the decorated symbol. LLD didn't implement that exception correctly. This patch fixes that. llvm-svn: 220333
* [PECOFF] Keep unmangled name in the export table descriptorRui Ueyama2014-09-241-1/+1
| | | | | | | | | | | | | | | | | The export table descriptor is a data structure to keep information about the export table. It contains a symbol name, and the name may or may not be mangled. We need unmangled names for the export table, so we demangle them before writing them to the export table. Obviously this is not a correct round-trip conversion. That could drop a leading underscore from a symbol because that's indistinguishable from a mangled name. What we need to do is to keep unmangled names. This patch does that. llvm-svn: 218345
* [PECOFF] Handle PRIVATE keyword in the module definition fileRui Ueyama2014-09-221-10/+15
| | | | | | | | | | | | | | A symbol in a module definition file may be annotated with the PRIVATE keyword like this. EXPORTS func PRIVATE The PRIVATE keyword does not affect the resulting .dll file. But it prevents the symbol to be listed in the .lib (import library) file. llvm-svn: 218273
* [PECOFF] DLL extension can be omitted in .def file.Rui Ueyama2014-05-091-0/+2
| | | | llvm-svn: 208428
* [PECOFF] Support =internalName syntax in .def file.Rui Ueyama2014-05-021-0/+11
| | | | | | | | | | | Export definitions in a module definition file is as follows: exportedname[=internalname] [@ordinal [NONAME]] [PRIVATE] [DATA] Previously we did not support =internalname, so users couldn't export symbols from a DLL with a different name. llvm-svn: 207827
* [PECOFF] Allow multiple directives in one module-definition file.Rui Ueyama2014-04-261-14/+36
| | | | | | | | 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] Fix off-by-one error in .def file parser.Rui Ueyama2014-04-251-1/+1
| | | | | | | | I'm fixing another bug in the parser, and I wanted to submit this fix as a separate change as it's logically independent from the other. I'll add a test for this shortly. llvm-svn: 207294
* [PECOFF] Handle line comment in module-definition file.Rui Ueyama2014-04-221-41/+48
| | | | | | In .def files, ';' is the start of line comment. llvm-svn: 206831
* [PECOFF] Support LIBRARY directive.Rui Ueyama2014-04-181-0/+9
| | | | | | | LIBRARY directive in a module definition file specifies the output DLL file name. It also takes an optional value for the base address. llvm-svn: 206647
* Use switch for readability.Rui Ueyama2014-04-181-12/+15
| | | | llvm-svn: 206638
* [C++11] Work around an incompatibility between llvm::tie and std::tie.Benjamin Kramer2014-03-021-1/+1
| | | | llvm-svn: 202645
* [PECOFF] Support STACKSIZE module-definition file directive.Rui Ueyama2014-01-141-3/+11
| | | | llvm-svn: 199170
* [PECOFF] Support VERSION directive.Rui Ueyama2014-01-111-0/+25
| | | | llvm-svn: 199022
* [PECOFF] Support NAME directive.Rui Ueyama2014-01-111-0/+42
| | | | llvm-svn: 199020
* [PECOFF] Add a helper function to read an integer from .def file.Rui Ueyama2014-01-111-12/+17
| | | | llvm-svn: 199019
* [PECOFF] Print a better error message for unknown module-definition file ↵Rui Ueyama2014-01-111-1/+1
| | | | | | directive. llvm-svn: 199018
* [PECOFF] Support HEAPSIZE directive.Rui Ueyama2014-01-111-2/+37
| | | | llvm-svn: 198994
* [PECOFF] Refactor module-defintion file parser.Rui Ueyama2014-01-111-10/+12
| | | | | | | | Refactor the parser so that the parser can return arbitrary type of parse result other than a vector of ExportDesc. Parsers for non-EXPORTS directives will be implemented in different patches. No functionality change. llvm-svn: 198993
* [PECOFF] Support module-definition file.Rui Ueyama2014-01-101-0/+119
Module-definition (.def) files are the file containing linker directives, such as export symbols. Because link.exe supports the same features as command line options, just as some Linker Script commands overlaps with command line options, use of module-definition file is not really necessary. It provides an alternative way to specify some linker options. This patch implements EXPORTS directive. Other directives will be implemented in the future. llvm-svn: 198925
OpenPOWER on IntegriCloud