summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify a switch statement.Rui Ueyama2013-12-031-13/+7
| | | | llvm-svn: 196200
* [PECOFF] Print input file names if /verbose is specified.Rui Ueyama2013-12-032-2/+5
| | | | llvm-svn: 196196
* [PECOFF] Print reason if file parsing failed.Rui Ueyama2013-12-031-2/+6
| | | | llvm-svn: 196185
* [PECOFF] Make /subsystem option parser a separate function.Rui Ueyama2013-12-021-18/+29
| | | | llvm-svn: 196092
* Fix "doesnot", "endsup" typos and "lets" grammar issuesAlp Toker2013-12-021-1/+1
| | | | llvm-svn: 196056
* [PECOFF] Fix /debug option.Rui Ueyama2013-12-011-3/+0
| | | | | | | /DEBUG option is to make the linker to emit debug information to the resulting executable. It's not for enable debugging of the linker itself. llvm-svn: 196040
* [PECOFF] Improve /merge option handling.Rui Ueyama2013-11-271-2/+2
| | | | | | | | | | | | | | | | | /MERGE option is a bit complicated for many reasons. Firstly, it takes both positive and negative arguments. That means we have to have one of three distinctive values (set, clear or unchange) for each permission bit. In this patch we represent the three values using two bitmasks. Secondly, the permissions specified by the parameter is bitwise or-ed with the default permissions of a section. There is an exception for that rule; if one of READ, WRITE or EXECUTE bit is specified, unspecified bits need to be cleared. (So if you specify only WRITE for example, the resulting section will not have WRITE nor EXECUTE bits.) Lastly, multiple /merge options are allowed. llvm-svn: 195882
* [PECOFF] Fix parameter mapping for /section.Rui Ueyama2013-11-261-6/+6
| | | | | | | The current mapping for /section one character options is really bogus. Map to the correct flags. llvm-svn: 195774
* [Gnu] Set the defaults in the ELFLinkingContext.Shankar Easwaran2013-11-251-6/+0
| | | | | | Comment from Rui Ueyema. llvm-svn: 195598
* [Gnu] Ignore unknown arguments, and print message.Shankar Easwaran2013-11-251-0/+7
| | | | llvm-svn: 195597
* [Gnu] Set the type of binary that lld would generate.Shankar Easwaran2013-11-251-27/+42
| | | | | | This is needed before any of the search paths are searched for. llvm-svn: 195596
* [Gnu] -L paths is not positional.Shankar Easwaran2013-11-252-18/+20
| | | | | | | Looks like -L paths are not positional. They need to be added to a list of search paths and those needs to be searched when lld looks for a library. llvm-svn: 195594
* [InputGraph][Gnu] Add LinkerScript support.Shankar Easwaran2013-11-242-6/+115
| | | | | | | | | | | | | | | | This adds LinkerScript support by creating a type Script which is of type FileNode in the InputGraph. Once the LinkerScript Parser converts the LinkerScript into a sequence of command, the commands are handled by the equivalent LinkerScript node for the current Flavor/Target. For ELF, a ELFGNULdScript gets created which converts the commands to ELF nodes and ELF control nodes(ELFGroup for handling Group nodes). Since the Inputfile type has to be determined in the Driver, the Driver needs to determine the complete path of the file that needs to be processed by the Linker. Due to this, few tests have been removed since the Driver uses paths that doesnot exist. llvm-svn: 195583
* [Gnu] Move code from .h to .cpp.Shankar Easwaran2013-11-242-0/+62
| | | | | | No change in functionality. llvm-svn: 195582
* [InputGraph] Add capability to process Hidden nodes.Shankar Easwaran2013-11-221-0/+3
| | | | | | | | | | Hidden nodes could be a result of expansion, where a flavor might decide to keep the node that we want to expand but discard it from being processed by the resolver. Verifies with unittests. llvm-svn: 195516
* [PECOFF] Do not set the entry address if /noentry option is given.Rui Ueyama2013-11-222-1/+9
| | | | | | | This is the first step towards DLL creation support. Resource-only DLLs don't have entry point address. llvm-svn: 195510
* Fix file header comment.Rui Ueyama2013-11-211-1/+1
| | | | llvm-svn: 195393
* [PECOFF] Move files with ".lib" extension to the end of the input file list.Rui Ueyama2013-11-211-2/+15
| | | | | | | | | It's allowed to specify library files *before* object files in the command line. Object files seems to be processed first, and then their undefined symbols are resolved from the libraries. This patch implements the compatible behavior. llvm-svn: 195295
* [PECOFF] Do not check if library is already added.Rui Ueyama2013-11-211-7/+3
| | | | llvm-svn: 195289
* Rename allocateString -> allocate.Rui Ueyama2013-11-212-15/+15
| | | | llvm-svn: 195284
* Reverse the condition for readability.Rui Ueyama2013-11-201-3/+3
| | | | llvm-svn: 195282
* Move member functions to its own cpp file.Rui Ueyama2013-11-203-14/+69
| | | | llvm-svn: 195281
* [PECOFF] Recognize but ignore /implib and /safeseh for now.Rui Ueyama2013-11-201-0/+2
| | | | | | | So that the LLD won't print error message saying that it couldn't find /implib or /safeseh files. llvm-svn: 195276
* [PECOFF] Ignore /tlbid, /tlbout, /idlout and /ignoreigl for now.Rui Ueyama2013-11-191-2/+6
| | | | llvm-svn: 195105
* [PECOFF] Avoid using statically initialized std::vector.Rui Ueyama2013-11-151-4/+8
| | | | | | Also slightly reduces PECOFFLinkingContext's memory footprint (~128B). llvm-svn: 194787
* [PECOFF] Add /stub option.Rui Ueyama2013-11-152-0/+20
| | | | llvm-svn: 194757
* Move InputGraph from Driver to Core. LinkingContext depends on it.Michael J. Spencer2013-11-142-177/+0
| | | | llvm-svn: 194641
* Re-submit r194551: Use empty() instead of size() == 0.Rui Ueyama2013-11-132-3/+3
| | | | llvm-svn: 194556
* Revert "Use empty() instead of size() == 0."Rui Ueyama2013-11-132-3/+3
| | | | | | This reverts commit r194551 because it broke the buildbot. llvm-svn: 194552
* Use empty() instead of size() == 0.Rui Ueyama2013-11-132-3/+3
| | | | llvm-svn: 194551
* [PECOFF] Fix use-after-return.Rui Ueyama2013-11-131-4/+6
| | | | llvm-svn: 194545
* [cleanup] remove readFile and replace with getBuffer.Shankar Easwaran2013-11-111-19/+2
| | | | | | no functionality change. llvm-svn: 194360
* [PECOFF] Rename getSectionAlignment -> getSectionDefaultAlignment.Rui Ueyama2013-11-061-1/+1
| | | | | | | | These fields are for /align option. Section alignment can be set per-section basis with /section option too. In order to avoid name conflicts, rename the existing identifiers to become more specific. No functionality change. llvm-svn: 194160
* [PECOFF] Add /section option.Rui Ueyama2013-11-062-0/+71
| | | | | | | | | | | /section command line option is to set/reset attributes of the Characteristics field in the section header. You can set non-default values with this option. You can make .data section executable with this, for example. This patch implements the parser of the command line option. The code to use the parsed values will be committed in a separate patch. llvm-svn: 194133
* [PECOFF] Make /disallowlib an alias for /nodefaultlib.Rui Ueyama2013-11-061-1/+1
| | | | | | | I'm not sure if it is really an alias for /nodefaultlib, but I can say that they are at least similar. Making it an alias would be better than ignoring it. llvm-svn: 194131
* [PECOFF] Do not expose _noDefaultLibs. No functionality change.Rui Ueyama2013-11-061-2/+1
| | | | llvm-svn: 194130
* [PECOFF] Do not add the same library to the input graph more than once.Rui Ueyama2013-11-061-7/+11
| | | | | | | | /defaultlib options can be specified implicitly via the .drectve section, and it's pretty common that multiple object files add the same library, such as user32.lib, to the input. We shouldn't add the same library multiple times. llvm-svn: 194129
* [PECOFF] Ignore /disallowlib.Rui Ueyama2013-11-061-0/+1
| | | | | | | | msvcrt.lib contains "/disallowlib" command line option in its .drectve section. I couldn't spot any documentation for the option. Ignore it for now so that we can link the library without error. llvm-svn: 194114
* [PECOFF] Report error if there's unknown flag in .drectveRui Ueyama2013-11-051-2/+2
| | | | | | Errors in .drectve section were silently ignored. This patch fixes the issue. llvm-svn: 194110
* Remove extraneous parentheses.Rui Ueyama2013-11-051-5/+3
| | | | llvm-svn: 194089
* Remove unnecessary namespace qualifier.Rui Ueyama2013-11-053-7/+7
| | | | llvm-svn: 194037
* Replace ErrorOr<void> with error_code.Rafael Espindola2013-11-051-1/+1
| | | | | | It was never transporting any value in addition to the error_code. llvm-svn: 194028
* Remove duplicate calls of pm.add() for RoundTrip tests.Rui Ueyama2013-11-011-4/+2
| | | | llvm-svn: 193885
* Remove redundant std::move().Rui Ueyama2013-11-011-3/+3
| | | | llvm-svn: 193883
* [PECOFF] File extension is case-insensitive on Windows.Rui Ueyama2013-10-311-2/+2
| | | | llvm-svn: 193797
* Use StringRef::startswith_lower().Rui Ueyama2013-10-301-17/+9
| | | | llvm-svn: 193712
* [PECOFF] Suppress startup message of background processes.Rui Ueyama2013-10-291-0/+1
| | | | llvm-svn: 193646
* [PassManager] add ReaderWriter{Native,YAML} to the Driver.Shankar Easwaran2013-10-291-2/+12
| | | | | | | | | | | | | Enable this for the following flavors a) core b) gnu c) darwin Its disabled for the flavor PECOFF. Convenient markers are added with FIXME comments in the Driver that would be removed and code removed from each flavor. llvm-svn: 193585
* Rather than rendering an argument to a std::string (which is primarilyChandler Carruth2013-10-271-1/+1
| | | | | | | | | | | | | | intended for debugging and diagnostic output), just inspect the spelling to check for specific prefixes in drectve section flags. In addition to being significantly cheaper and not relying on a debugging interface, this also avoids creating a temporary string and binding it to StringRef variable. We then went on to access it after the memory had been deallocated. This bug too was caught by ASan. I love ASan so much. =] llvm-svn: 193487
* [PECOFF] Parse /merge command line option.Rui Ueyama2013-10-262-0/+15
| | | | | | | | /merge:<from>=<to> option makes the linker to combine "from" section to "to" section. This patch is to parse the option. The actual feature will be implemented in a subsequent patch. llvm-svn: 193454
OpenPOWER on IntegriCloud