| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 210590
|
|
|
|
|
|
|
| |
isCoalescedAway(x) is faster than replacement(x) != x as the former
does not follow the replacement atom chain. Also it's easier to use.
llvm-svn: 210242
|
|
|
|
|
|
| |
Rather than outside of the handler function to make the code simple.
llvm-svn: 210241
|
|
|
|
|
|
|
|
| |
This provides support for the autoconfing & make build style.
The format, style and implementation follows that used within the llvm and clang projects.
TODO: implement out-of-source documentation builds.
llvm-svn: 210177
|
|
|
|
| |
llvm-svn: 210087
|
|
|
|
| |
llvm-svn: 210086
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously section groups are doubly linked to their children.
That is, an atom representing a group has group-child references
to its group contents, and content atoms also have group-parent
references to the group atom. That relationship was invariant;
if X has a group-child edge to Y, Y must have a group-parent
edge to X.
However we were not using group-parent references at all. The
resolver only needs group-child edges.
This patch simplifies the section group by removing the unused
reverse edge. No functionality change intended.
Differential Revision: http://reviews.llvm.org/D3945
llvm-svn: 210066
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Layout-before edges are no longer used for layout, but they are
still there for dead-stripping. If we would just remove them
from code, LLD would wrongly remove live atoms that were
referenced by layout-befores.
This patch fixes the issue. Before dead-stripping, it scans all
atoms to construct a reverse map for layout-after edges. Dead-
stripping pass uses the map to traverse the graph.
Differential Revision: http://reviews.llvm.org/D3986
llvm-svn: 210057
|
|
|
|
|
|
|
|
| |
Reference::target() never returns a nullptr, so NULL check
is not needed and is more harmful than doing nothing.
No functionality change.
llvm-svn: 210008
|
|
|
|
| |
llvm-svn: 209958
|
|
|
|
|
|
|
| |
There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.
llvm-svn: 209948
|
|
|
|
| |
llvm-svn: 209704
|
|
|
|
|
|
|
|
|
|
|
| |
This is a short-term fix to allow lld Readers to return error messages
with dynamic content.
The long term fix will be to enhance ErrorOr<> to work with errors other
than error_code. Or to change the interface to Readers to pass down a
diagnostics object through which all error messages are written.
llvm-svn: 209681
|
|
|
|
|
|
|
|
|
|
| |
Alias symbols are SimpleDefinedAtoms and are platform neutral. They
don't have to belong ELF. This patch is to make it available to all
platforms. No functionality change intended.
Differential Revision: http://reviews.llvm.org/D3862
llvm-svn: 209475
|
|
|
|
| |
llvm-svn: 209357
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r205566, I made a change to Resolver so that Resolver revisit
only archive files in --start-group and --end-group pair. That's
not correct, as it also has to revisit DSO files.
This patch is to fix the issue.
Added a test to demonstrate the fix. I confirmed that it succeeded
before r205566, failed after r205566, and is ok with this patch.
Differential Revision: http://reviews.llvm.org/D3734
llvm-svn: 208797
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to add observers to an Input Graph, so that files
returned from an Input Graph can be examined before they are
passed to Resolver.
To implement some PE/COFF features we need to know all the symbols
that *can* be solved, including ones in archive files that are not
yet to be read.
Currently, Resolver only maintains a set of symbols that are
already read. It has no knowledge on symbols in skipped files in
an archive file.
There are many ways to implement that. I chose to apply the
observer pattern here because it seems most non-intrusive. We don't
want to mess up Resolver with architecture specific features.
Even in PE/COFF, the feature that needs this mechanism is minor.
So I chose not to modify Resolver, but add a hook to Input Graph.
Differential Revision: http://reviews.llvm.org/D3735
llvm-svn: 208753
|
|
|
|
|
|
| |
This reverts accidental commit r208427.
llvm-svn: 208433
|
|
|
|
| |
llvm-svn: 208427
|
|
|
|
| |
llvm-svn: 208256
|
|
|
|
|
|
|
|
| |
Previously only the toplevel elements were expanded by expandElements().
Now we recursively call getReplacements() to expand input elements even
if they are in, say, in a group.
llvm-svn: 208144
|
|
|
|
|
|
|
| |
addInputElement() never fails, and no one checks its return value
except tests. Let's simplify the signature.
llvm-svn: 208109
|
|
|
|
| |
llvm-svn: 207878
|
|
|
|
| |
llvm-svn: 207875
|
|
|
|
| |
llvm-svn: 205643
|
|
|
|
| |
llvm-svn: 205642
|
|
|
|
| |
llvm-svn: 205641
|
|
|
|
| |
llvm-svn: 205639
|
|
|
|
|
|
| |
This reverts commit r205635 that was submitted by mistake.
llvm-svn: 205637
|
|
|
|
| |
llvm-svn: 205635
|
|
|
|
|
|
|
| |
It's better to use the same type rather than a fixed width integer type
that may be different from the return type.
llvm-svn: 205597
|
|
|
|
| |
llvm-svn: 205594
|
|
|
|
|
|
| |
So that it's obvious that we pass these callbacks only to forEachUndefines.
llvm-svn: 205593
|
|
|
|
|
|
|
|
| |
This is cleaner and as efficient as before.
Differential Revision: http://llvm-reviews.chandlerc.com/D3284
llvm-svn: 205590
|
|
|
|
|
|
|
|
|
| |
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: 205579
|
|
|
|
| |
llvm-svn: 205578
|
|
|
|
| |
llvm-svn: 205576
|
|
|
|
|
|
|
|
|
|
| |
Atoms with deadStripNever attribute has already been added to the
dead strip root set at end of Resolver::doDefinedAtom, so no need
to check it for each atom again.
Differential Revision: http://llvm-reviews.chandlerc.com/D3282
llvm-svn: 205575
|
|
|
|
|
|
|
| |
Move code that always runs after doUndefinedAtom into doUndefinedAtom
for readability.
llvm-svn: 205574
|
|
|
|
| |
llvm-svn: 205570
|
|
|
|
| |
llvm-svn: 205569
|
|
|
|
| |
llvm-svn: 205568
|
|
|
|
| |
llvm-svn: 205567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ELFLinkingContext has a method addUndefinedAtomsFromSharedLibrary().
The method is being used to skip a shared library within --start-group
and --end-group if it's not the first iteration of the group.
We have the same, incomplete mechanism to skip a shared library within
a group too. That's implemented in ELFFileNode. It's intended to not
return a shared library on the second or further iterations in the
first place. This mechanism is preferred over
addUndefinedAtomsFromSharedLibrary because the policy is implemented
in Input Graph -- that's what Input Graph is for.
This patch removes the dupluicate feature and fixes ELFFileNode.
Differential Revision: http://llvm-reviews.chandlerc.com/D3280
llvm-svn: 205566
|
|
|
|
| |
llvm-svn: 205564
|
|
|
|
|
|
|
|
|
| |
"x.empty()" is more idiomatic than "x.size() == 0". This patch is to
add such method and use it in LLD.
Differential Revision: http://llvm-reviews.chandlerc.com/D3279
llvm-svn: 205558
|
|
|
|
|
|
|
| |
For most member function calls we do not use "this->" in this file.
Remove the rest for consistency.
llvm-svn: 205550
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|