| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
/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: 205735
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 205663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 205568
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 205469
|
|
|
|
| |
llvm-svn: 205466
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resolver is sending too much information to Input Graph than Input
Graph actually needs. In order to collect the detailed information,
which wouldn't be consumed by anyone, we have a good amount of code
in Resolver, Input Graph and Input Elements. This patch is to
simplify it. No functionality change.
Specifically, this patch replaces ResolverState enum with a boolean
value. The enum defines many bits to notify the progress about
linking to Input Graph using bit masks, however, what Input Graph
actually does is to compare a given value with 0. The details of
the bit mask is simply being ignored, so the efforts to collect
such data is wasted.
This patch also changes the name of the notification interface from
setResolverState to notifyProgress, to make it sounds more like
message passing style. It's not a setter but something to notify of
an update, so the new name should be more appropriate than before.
Differential Revision: http://llvm-reviews.chandlerc.com/D3267
llvm-svn: 205463
|
|
|
|
| |
llvm-svn: 205404
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 205371
|
|
|
|
| |
llvm-svn: 205369
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 204982
|
|
|
|
| |
llvm-svn: 204224
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLD fails to link symbol "_main" if the symbol is in a library file and
the library file is given as a bare argument (i.e. not with /defaultlib
option). It's because library files given as bare arguments are processed
before other libraries given with /defaultlib, so when Linker finds msvcrtd
needs a definition for "_main", the file providing the main function has
already been processed and skipped. Linker don't revisit libraries if it's
not given with /defaultlib.
To fix it this patch change the way of command line handling; files end with
".lib" are treated as if they are given with /defaultlib. I don't believe
it's 100% correct behavior but it's better than before.
llvm-svn: 203892
|
|
|
|
|
|
|
|
| |
This results in some simplifications to the code where an OwningPtr had to
be used with the previous api and then ownership moved to a unique_ptr for
the rest of lld.
llvm-svn: 203809
|
|
|
|
| |
llvm-svn: 203666
|
|
|
|
|
|
|
| |
For the record, I used clang-modernize to add "override" and perl to remove
"virtual".
llvm-svn: 203164
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Syntactically /SAFESEH is a boolean flag -- you can pass /SAFESEH or /SAFESEH:no.
The meaning of /SAFESEH is as follows.
- If /SAFESEH is specified, the linker will produce an executable with SEH table.
If any input files are not compatible with SEH, it's an error.
- If /SAFESEH:no is specified, the linker will not emit SEH table even if all
input files are compatible with SEH.
- If no option is specified, the linker emits SEH table if all input files are
compatible with SEH.
llvm-svn: 201895
|
|
|
|
| |
llvm-svn: 200649
|
|
|
|
|
|
|
| |
This is the first patch to support PE32+ format, which is the image format
to use 64 bit address space on Windows/x86-64.
llvm-svn: 200029
|
|
|
|
| |
llvm-svn: 199259
|
|
|
|
| |
llvm-svn: 199170
|
|
|
|
| |
llvm-svn: 199167
|
|
|
|
| |
llvm-svn: 199166
|
|
|
|
| |
llvm-svn: 199165
|
|
|
|
| |
llvm-svn: 199164
|
|
|
|
| |
llvm-svn: 199163
|
|
|
|
| |
llvm-svn: 199161
|
|
|
|
| |
llvm-svn: 199159
|
|
|
|
| |
llvm-svn: 199155
|
|
|
|
| |
llvm-svn: 199022
|
|
|
|
| |
llvm-svn: 199020
|
|
|
|
| |
llvm-svn: 198994
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main goal of this patch is to allow "mach-o encoded as yaml" and "native
encoded as yaml" documents to be intermixed. They are distinguished via
yaml tags at the start of the document. This will enable all mach-o test cases
to be written using yaml instead of checking in object files.
The Registry was extend to allow yaml tag handlers to be registered. The
mach-o Reader adds a yaml tag handler for the tag "!mach-o".
Additionally, this patch fixes some buffer ownership issues. When parsing
mach-o binaries, the mach-o atoms can have pointers back into the memory
mapped .o file. But with yaml encoded mach-o, name and content are ephemeral,
so a copyRefs parameter was added to cause the mach-o atoms to make their
own copy.
llvm-svn: 198986
|
|
|
|
| |
llvm-svn: 198974
|
|
|
|
| |
llvm-svn: 198797
|
|
|
|
| |
llvm-svn: 198728
|
|
|
|
| |
llvm-svn: 198725
|