| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the input file for the lib.exe command would be removed
as soon as the command exits, so we couldn't write a test to check
the file contents are correct.
This patch adds /lldmoduledeffile: option to retain a copy of the
temporary file at the given file path, so that you can see the file
if you want.
llvm-svn: 207727
|
|
|
|
|
|
|
|
| |
element is a FileNode, request error description. If the element is Group,
print hard coded error message. We need to implement a better diagnostics
here but even current solution is better than a segmentation fault output.
llvm-svn: 207691
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 207688
|
|
|
|
| |
llvm-svn: 207687
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This option is to override the default import file path.
llvm-svn: 207175
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
In .def files, ';' is the start of line comment.
llvm-svn: 206831
|
|
|
|
|
|
| |
Unlike Win32/x86, it has no "@12" suffix.
llvm-svn: 206648
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 206638
|
|
|
|
|
|
|
|
| |
/ignore:<number> is a linker option to disable warning specified by
the number. We ignore the option because it does not make sense for
LLD.
llvm-svn: 206636
|
|
|
|
|
|
|
| |
If the value for /manifestuac is "NO", LLD will create a manifest XM
file but won't emit <trustinfo> element.
llvm-svn: 206633
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently LLD supports --defsym only in the form of
--defsym=<symbol>=<integer>, where the integer is interpreted as the
absolute address of the symbol. This patch extends it to allow other
symbol name to be given as an RHS value. If a RHS value is a symbol
name, the LHS symbol will be defined as an alias for the RHS symbol.
Internally, a LHS symbol is represented as a zero-size defined atom
who has an LayoutAfter reference to an undefined atom, whose name is
the RHS value. Everything else is already implemented -- Resolver
will resolve the undefined symbol, and the layout pass will layout
the two atoms at the same location. Looks like it's working fine.
Note that GNU LD supports --defsym=<symbol>=<symbol>+<addend>. That
feature is out of scope of this patch.
Differential Revision: http://reviews.llvm.org/D3332
llvm-svn: 206417
|
|
|
|
| |
llvm-svn: 206113
|
|
|
|
| |
llvm-svn: 205737
|
|
|
|
| |
llvm-svn: 205736
|
|
|
|
| |
llvm-svn: 205694
|
|
|
|
|
|
|
|
| |
GNU LD-comptaible driver wrongly requires a space after '=' for a few
options such as "-init=<symbol>" or "-entry=<symbol>". This patch is
to fix that bug and add a few tests for it.
llvm-svn: 205693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently LLD accepts only "-soname <string>", but all the following
options are actually valid.
--soname=foo
--soname foo
-soname=foo
-soname foo
-h foo
This patch fixes that issue.
llvm-svn: 205662
|
|
|
|
| |
llvm-svn: 205654
|
|
|
|
|
|
|
|
|
| |
Seems getSomething() is more common naming scheme than just a noun
to get something, so renaming these members.
Differential Revision: http://llvm-reviews.chandlerc.com/D3285
llvm-svn: 205589
|
|
|
|
| |
llvm-svn: 205564
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An ordinal is set to each child of Input Graph, but no one actually
uses it. The only piece of code that gets ordinaly values is
sortInputElements in InputGraph.cpp, but it does not actually do
anything -- we assign ordinals in increasing order just before
calling sort, so when sort is called it's already sorted. It's no-op.
We can simply remove it. No functionality change.
Differential Revision: http://llvm-reviews.chandlerc.com/D3270
llvm-svn: 205501
|
|
|
|
| |
llvm-svn: 205490
|
|
|
|
| |
llvm-svn: 205486
|
|
|
|
| |
llvm-svn: 205395
|
|
|
|
|
|
|
| |
The attribute class holds positional attributes for Input files specified on the
command line for the Gnu flavor.
llvm-svn: 205392
|
|
|
|
|
|
|
|
|
| |
This adds -z muldefs option which is widely used over
--allow-multiple-definition.
This option is supported by the GNU linker.
llvm-svn: 205391
|
|
|
|
|
|
|
|
| |
Group class is designed for GNU LD's --start-group and --end-group. There's
no obvious need to have two classes for it -- one as an abstract base class
and the other as a concrete class.
llvm-svn: 205375
|
|
|
|
|
|
|
| |
insertElementsAt() is removed, so "One" in insertOneElementAt() no longer
make much sense. Rename it for brevity.
llvm-svn: 205372
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
InputGraph has too many knobs and controls that are not being used. This
patch is to remove dead code, unused features and a class. There are two
things that worth noting, besides simple dead code removal:
1. ControlNode class is removed. We had it as the base class of Group
class, but it provides no functionality particularly meaningful. We now
have shallower class hierarchy that is easier to understand.
2. InputGraph provides a feature to replace a node with its internal data.
It is being used to "expand" some type of node, such as a Linker Script
node, with its actual files. We used to have two options when replacing
it -- ExpandOnly or ExpandAndReplace. ExpandOnly was to expand it but not
remove the node from the tree. There is no use of that option in the code,
so it was a dead feature.
Differential Revision: http://llvm-reviews.chandlerc.com/D3252
llvm-svn: 205363
|
|
|
|
|
|
|
|
| |
Asserting with cast<T> did not actually make much sense because there was no
need to use dynamic casting in the first place. We could make the compiler to
statically type check these objects.
llvm-svn: 205350
|
|
|
|
|
|
|
|
| |
cast<X> asserts the type is correct and does not return null on failure.
So we should use cast<X> rather than dyn_cast<X> at such places where we
don't expect type conversion could fail.
llvm-svn: 205332
|
|
|
|
|
|
|
|
| |
PECOFFFileNode::parse can be called twice -- once by WinLink driver and
once more by Driver. We want to make sure that the second call won't mess
up the internal data.
llvm-svn: 205284
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some Clang build uses .imp not .lib file extension for an import library file,
so we need to treat such file as a library file.
Ideally we should not rely on file extensions to detect file type. Instead
we should use magic bytes at beginning of a file. The GNU-compatible driver
actually does that but it made writing unit tests hard, so I chose an ad-hoc
approach for now.
llvm-svn: 205283
|
|
|
|
|
|
| |
Also remove unused vector.
llvm-svn: 205052
|
|
|
|
|
|
|
|
|
| |
Response file is a command line argument in the form of @file. The GNU-
compatible driver expands the file contents, replacing @file argument.
Differential Revision: http://llvm-reviews.chandlerc.com/D3210
llvm-svn: 205038
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is to support --defsym option for ELF file format/GNU-compatible
driver. Currently it takes a symbol name followed by '=' and a number. If such
option is given, the driver sets up an absolute symbol with the specified
address. You can specify multiple --defsym options to define multiple symbols.
GNU LD's --defsym provides many more features. For example, it allows users to
specify another symbol name instead of a number to define a symbol alias, or it
even allows a symbol plus an offset (e.g. --defsym=foo+3) to define symbol-
relative alias. This patch does not support that, but will be supported in
subsequent patches.
Differential Revision: http://llvm-reviews.chandlerc.com/D3208
llvm-svn: 205029
|
|
|
|
|
|
|
|
|
| |
If --allow-multiple-definition option is given, LLD does not treat duplicate
symbol error as a fatal error. GNU LD supports this option.
Differential Revision: http://llvm-reviews.chandlerc.com/D3211
llvm-svn: 205015
|
|
|
|
| |
llvm-svn: 204987
|
|
|
|
| |
llvm-svn: 204986
|
|
|
|
| |
llvm-svn: 204982
|
|
|
|
| |
llvm-svn: 204855
|
|
|
|
| |
llvm-svn: 204853
|
|
|
|
|
|
|
|
|
|
|
| |
If a response file is given via command line, the final command line
arguments will not appear in the log because the actual arguments are
in the given file.
This patch is to show the final command line if /verbose is specified
to help users.
llvm-svn: 204754
|
|
|
|
|
|
|
| |
Creating the file "link.exe" made some confusion, so it's better to
name it lld-link.exe, as we did for CL (clang-cl.exe).
llvm-svn: 204509
|
|
|
|
|
|
|
|
| |
Response file is not NUL terminated, so when creating a StringRef for
the buffer contents, we need to pass the buffer size as well as the
pointer pointing to the buffer.
llvm-svn: 204420
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the environment variable is defined and not empty, RoundTrip tests
are run. The reason to move the tests behind the flag is because they
are too slow to enable by default.
LLD linking time on llvm-tblgen improved from 2m7s to 2.3s. About 60x
faster now in this case.
Differential Revision: http://llvm-reviews.chandlerc.com/D3126
llvm-svn: 204296
|