Rui Ueyama
9d52a94cd1
[PECOFF] Make command line options case insensitive to match link.exe's behavior.
...
llvm-svn: 189505
2013-08-28 20:27:41 +00:00
Rui Ueyama
488d41e6ef
[PECOFF] Add the entry symbol and /include symbols to dead strip root set.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D1527
llvm-svn: 189318
2013-08-27 05:15:20 +00:00
Rui Ueyama
8a5cbadff9
Fix use of temporary strings.
...
llvm-svn: 189310
2013-08-27 04:27:18 +00:00
Rui Ueyama
bc839fcd3e
[PECOFF] Enable dead-stripping by default to match link.exe behavior.
...
llvm-svn: 189308
2013-08-27 03:38:18 +00:00
Rui Ueyama
4c3184f3c0
Treat entry point symbol as an undefined atom.
...
With this patch the entry symbol is treated as an undefined symbol, to force
the resolver to resolve the entry symbol.
Differential Revision: http://llvm-reviews.chandlerc.com/D1524
llvm-svn: 189307
2013-08-27 03:18:11 +00:00
Rui Ueyama
c7ef7a8dd7
[PECOFF] Add Support for entry point symbol name
...
Patch by Jesús Serrano García.
llvm-svn: 189267
2013-08-26 19:55:09 +00:00
Saleem Abdulrasool
1089265a1d
[PECOFF] support additional subsystem identifiers
...
This completes the subsystem name parsing to support the identifiers that the
Microsoft link.exe linker supports. "windows" and "console" are left as the
first items as they are the expected common paths.
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 189181
2013-08-24 20:14:54 +00:00
Rui Ueyama
72165ec8c3
Separates /fixed (no .reloc section) and /dynamicbase (enable ASLR)
...
in order to match link.exe's behaviour.
Patch by Ron Ofir.
llvm-svn: 189159
2013-08-24 00:39:10 +00:00
Rui Ueyama
d07c6f06eb
Fixes an additional temporary string use.
...
Patch by Ron Ofir.
llvm-svn: 189151
2013-08-23 22:06:29 +00:00
Shankar Easwaran
89732e1362
[lld][PECOFF] Fix one more reference to a temporary string
...
llvm-svn: 189035
2013-08-22 17:59:03 +00:00
Shankar Easwaran
c48b9594b6
[lld][PECOFF] Fix use of temporary strings
...
llvm-svn: 189025
2013-08-22 15:37:09 +00:00
Shankar Easwaran
e44104b001
add InputGraph functionality
...
llvm-svn: 188958
2013-08-21 22:57:10 +00:00
Hans Wennborg
04632f1f16
[PECOFF] Handle "--" option explicitly
...
This used to be handled automagically by the option parsing library,
but after LLVM r188314, we should handle it ourselves.
No functionality change, but adds a test.
llvm-svn: 188318
2013-08-13 21:44:44 +00:00
Rui Ueyama
0ca149fce9
Rename TargetInfo -> LinkingContext.
...
Also change some local variable names: "ti" -> "context" and
"_targetInfo" -> "_context".
Differential Revision: http://llvm-reviews.chandlerc.com/D1301
llvm-svn: 187823
2013-08-06 22:31:59 +00:00
Rui Ueyama
35947af012
[PECOFF] Remove special treatment of "--" option.
...
Thanks to Hans' patch (r187675), OptTable now handles "--", so we don't
need this code in LLD.
llvm-svn: 187683
2013-08-02 22:34:12 +00:00
Hans Wennborg
03cd107364
Remove the SUPPORT_ALIASARGS define
...
It is not needed after LLVM r187546.
llvm-svn: 187551
2013-08-01 00:12:38 +00:00
Hans Wennborg
88b7aad3e1
Option parsing tables: pick up AliasArgs from the OPTION macro.
...
This depends on LLVM r187537.
The SUPPORT_ALIASARGS macro will be removed once all option parsing
clients have been updated.
llvm-svn: 187541
2013-07-31 23:17:41 +00:00
Rui Ueyama
3adc09e9fc
Revert "[PECOFF][Driver] Remove quotes from command line arguments."
...
This reverts commit r187390 because we should not handle argv's quotes ourselves.
In Windows, unlike Unix, quotes are not processed by the shell. Instead the C
startup routine parses it as described in
http://msdn.microsoft.com/en-us/library/a1y7w461.aspx and pass the results to
main(). So, at the time when the control reaches main(), quotes that should be
removed has already been removed.
We still need to handle quotes in the response file and in .drectve section
ourselves. That will be addressed in different patches.
llvm-svn: 187534
2013-07-31 22:13:15 +00:00
Rui Ueyama
85cd10ffa0
[PECOFF][Driver] Remove quotes from command line arguments.
...
The command line option in .drectve section may be quoted by double
quotes, and if that's the case we have to remove them.
llvm-svn: 187390
2013-07-29 23:32:22 +00:00
Rui Ueyama
28084dc6cd
[PECOFF][Driver] Add ".lib" extension to the path given with /defaultlib.
...
llvm-svn: 187259
2013-07-26 22:22:26 +00:00
Rui Ueyama
50e67c7371
[PECOFF][Driver] Split WinLinkDriver::parse for readability.
...
llvm-svn: 187161
2013-07-25 22:33:08 +00:00
Rui Ueyama
de25a69531
[PECOFF][Driver] Allow multiple /include options.
...
llvm-svn: 187100
2013-07-25 02:57:39 +00:00
Rui Ueyama
1e3e8752a8
[PECOFF] Add /failifmismatch option.
...
llvm-svn: 187095
2013-07-25 01:23:50 +00:00
Rui Ueyama
d1d116aa89
[PECOFF] Use Windows style options instead of Unix style as primary options.
...
LLD still accepts both Unix and Windows style options when it's run as
link.exe. This patch does not change functionality.
llvm-svn: 187086
2013-07-24 23:18:02 +00:00
Rui Ueyama
fd50283c3c
[PECOFF] Add /include command line option.
...
The /include command line option is equivalent to Unix --undefined
option, which forces the linker to resolve the given symbol name
as if it's an unresolved symbol in one of its input files. This feature
is used to link an additional object file or a shared library that no
input files refer to.
llvm-svn: 187084
2013-07-24 22:53:23 +00:00
Rui Ueyama
fbf5763708
[PECOFF] Support -tsaware:no command line option.
...
llvm-svn: 186957
2013-07-23 17:17:19 +00:00
Rui Ueyama
6a41fca856
[PECOFF] Support -fixed command line option to disable base relocations.
...
llvm-svn: 186911
2013-07-23 01:29:50 +00:00
Rui Ueyama
8e6c8f850d
[PECOFF][Driver] Add -base command line option.
...
llvm-svn: 186739
2013-07-20 00:45:00 +00:00
Rui Ueyama
99f80cf4a7
[PECOFF][Driver] Process "LINK" environment variable.
...
llvm-svn: 186654
2013-07-19 05:06:20 +00:00
Rui Ueyama
64b29d616b
[PECOFF][Driver] Add -defaultlib command line option.
...
llvm-svn: 186650
2013-07-19 04:11:37 +00:00
Rui Ueyama
5a7bbce587
[PECOFF][Driver] Interpret "LIB" environment variable.
...
llvm-svn: 186648
2013-07-19 03:27:03 +00:00
Rui Ueyama
2897feb7e0
[PECOFF] Use library search path when looking for a .lib file.
...
llvm-svn: 186645
2013-07-19 02:18:25 +00:00
Rui Ueyama
9f24922bd1
[PECOFF][Driver] Add -libpath command line option.
...
The logic to search a library from the library paths will be implemented
in a different patch.
llvm-svn: 186644
2013-07-19 01:38:49 +00:00
Rui Ueyama
4227022673
[PECOFF] Use replace_extension() instead of doing it myself.
...
llvm-svn: 186612
2013-07-18 21:38:44 +00:00
Rui Ueyama
b0b1d590ab
[WinLink] Add /LargeAddressAware command line option.
...
llvm-svn: 186428
2013-07-16 17:20:38 +00:00
Rafael Espindola
66c0a65ba1
Revert "Don't pass llvm::errs() all over the place. Diagnostics always go to stderr."
...
This reverts commit 185657. It will be used by unit tests.
llvm-svn: 186366
2013-07-15 23:55:07 +00:00
Rafael Espindola
2530f67116
Don't pass llvm::errs() all over the place. Diagnostics always go to stderr.
...
llvm-svn: 185657
2013-07-04 17:06:04 +00:00
Rui Ueyama
4a4079e839
[WinLink] Support /nxcompat command line option.
...
llvm-svn: 184050
2013-06-16 03:07:08 +00:00
Rafael Espindola
70d0c820ef
Include Path.h instead of PathV2.h.
...
I am about to move PathV2.h to Path.h.
llvm-svn: 183796
2013-06-11 22:17:04 +00:00
Rui Ueyama
daadcc59ad
[WinLink] Add -force command line option to allow undefined symbols.
...
llvm-svn: 183724
2013-06-11 04:52:14 +00:00
Rui Ueyama
9dd08d912d
[PECOFF][Driver] Add -heap command line option.
...
llvm-svn: 183622
2013-06-08 22:59:10 +00:00
Rui Ueyama
eb0cc96e4b
[PECOFF][Driver] Add -stack command line option.
...
llvm-svn: 183604
2013-06-08 03:59:00 +00:00
Rui Ueyama
7b5592bc0b
[WinLink] Fix use-after-return.
...
llvm-svn: 183603
2013-06-08 03:39:35 +00:00
Rui Ueyama
feaa72a4b0
Fix typo in comment.
...
llvm-svn: 183050
2013-05-31 22:08:30 +00:00
Rui Ueyama
739730e299
[WinLink][Driver] Add -entry command line option.
...
llvm-svn: 183034
2013-05-31 19:34:29 +00:00
Rui Ueyama
ce42bcc304
[WinLink][Driver] Add support for -subsystem optional OS version number.
...
llvm-svn: 182988
2013-05-31 06:30:10 +00:00
Rui Ueyama
5f037590de
[lld][WinLink] Fix use-after-return and add unit tests.
...
llvm-svn: 182970
2013-05-30 23:17:58 +00:00
Rui Ueyama
b33e8bcef8
[WinLink][Driver] Handle file extensions and defualt output file name.
...
llvm-svn: 182912
2013-05-30 06:00:10 +00:00
Rui Ueyama
81247063bf
[WinLink] Add -subsystem and -out command line option parsing.
...
The code to actually consume these flags will be added soon.
llvm-svn: 182824
2013-05-29 05:07:49 +00:00
Rui Ueyama
9e56839a83
[lld][PECOFF] Add WinLinkDriver and PECOFFTargetInfo.
...
Add WinLinkDriver and connect it to the existing COFF reader. Remaining
parts are still stubs, so while it can now read a COFF file, it still
cannot link or output PE/COFF files yet.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D865
llvm-svn: 182784
2013-05-28 18:13:31 +00:00