| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 210502
|
|
|
|
| |
llvm-svn: 210461
|
|
|
|
|
|
| |
R_MIPS_TLS_LDM etc.
llvm-svn: 210394
|
|
|
|
|
|
| |
This reverts accidental commit r210240.
llvm-svn: 210243
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
COFF supports a feature similar to ELF's section groups. This
patch implements it.
In ELF, section groups are identified by their names, and they are
treated somewhat differently from regular symbols. In COFF, the
feature is realized in a more straightforward way. A section can
have an annotation saying "if Nth section is linked, link this
section too."
Implementing such feature is easy. We can add a reference from a
target atom to an original atom, so that if the target is linked,
the original atom is also linked. If not linked, both will be
dead-stripped. So they are treated as a group.
I added a new reference type, kindAssociate. It does nothing except
preventing referenced atoms from being dead-stripped.
No change to the Resolver is needed.
Reviewers: Bigcheese, shankarke, atanasyan
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D3946
llvm-svn: 210240
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Previously FileArchive ctor comment said that only its subclasses
can be instantiated, but the ctor is actually public and is
instantiated by ArchiveReader.
Remove the wrong comment and reorder the member functions so that
public members appear before private ones.
llvm-svn: 210175
|
|
|
|
| |
llvm-svn: 210174
|
|
|
|
| |
llvm-svn: 210172
|
|
|
|
|
|
|
|
| |
In sections that are broken into atoms at symbols, if the first symbol in the
section is not at the start of the section, then make an anonymous atom for
the section content that is before the first symbol.
llvm-svn: 210142
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously each section kind had its own code to loop over the section and
parse it into atoms. This refactoring has two tables. The first maps sections
to ContentType. The second maps ContentType to information on how to find
the atom boundaries.
A few bugs in test cases were discovered as part of the refactoring.
No change in functionality intended.
llvm-svn: 210138
|
|
|
|
|
|
|
| |
Previously the parser always printed out an error message followed
by "Invalid file type" even if the file type is correct.
llvm-svn: 210093
|
|
|
|
| |
llvm-svn: 210071
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 210015
|
|
|
|
| |
llvm-svn: 210014
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arrange .ctors/.dtors sections in the following order:
.ctors from crtbegin.o or crtbegin?.o
.ctors from regular object files
.ctors.* (sorted) from regular object files
.ctors from crtend.o or crtend?.o
This order is specific for MIPS traget. For example, on X86
the .ctors.* sections are merged into the .init_array section.
llvm-svn: 209987
|
|
|
|
|
|
|
| |
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: 209928
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main problem is in the predicate passed to the `std::stable_sort()`.
This predicate always returns false if **both** section's names do not
start with `.init_array` or `.fini_array` prefixes. In short, it does not
define a strict weak orderng. Suppose we have the following sections:
.A .init_array.1 .init_array.2
The predicate states that:
not .init_array.1 < .A
not .A < .init_array.2
but .init_array.1 < .init_array.2 !!!
The second problem is that `.init_array` section without number should
go last in the list. Not it has the lowest priority '0' and goes first.
The patch fixes both of the problems.
llvm-svn: 209875
|
|
|
|
| |
llvm-svn: 209868
|
|
|
|
| |
llvm-svn: 209865
|
|
|
|
|
|
| |
whether symbols in a section are ignored or illegal
llvm-svn: 209858
|
|
|
|
| |
llvm-svn: 209844
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 209709
|
|
|
|
| |
llvm-svn: 209707
|
|
|
|
| |
llvm-svn: 209704
|
|
|
|
| |
llvm-svn: 209700
|
|
|
|
| |
llvm-svn: 209685
|
|
|
|
| |
llvm-svn: 209684
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 209644
|
|
|
|
|
|
| |
size of global GOT entries map for that.
llvm-svn: 209616
|
|
|
|
|
|
| |
perform calculations for R_MIPS_GOT16 and R_MIPS_CALL16 relocations.
llvm-svn: 209594
|
|
|
|
|
|
| |
separate function.
llvm-svn: 209593
|
|
|
|
|
|
| |
the MipsELFWriters member function.
llvm-svn: 209592
|
|
|
|
| |
llvm-svn: 209591
|
|
|
|
|
|
| |
perform similar calculations.
llvm-svn: 209590
|
|
|
|
| |
llvm-svn: 209582
|
|
|
|
| |
llvm-svn: 209497
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/alternatename is a command line option to define a weak alias. You
can use it as /alternatename:foo=bar to define "foo" as a weak alias
for "bar".
Because it's a command line option, the weak alias mapping is in the
LinkingContext object, and not in a object file being read.
Previously, we looked up the mapping each time we read a new symbol
from a file, to check if there is a weak alias defined for the symbol.
That's not wrong, but had made function signature's a bit complicated --
we had to pass the mapping object to many functions. Now their
parameter lists are much cleaner.
This also has another (unrealized) benefit. parseFile() now read a
file and then add alias symbols to the file. In the first pass a
LinkingContext object is not used at all. That should make it easy
to read files from archive files speculatively, as the first pass
is free from side effect.
llvm-svn: 209486
|
|
|
|
|
|
|
|
|
|
| |
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: 209469
|
|
|
|
| |
llvm-svn: 209379
|
|
|
|
| |
llvm-svn: 209323
|
|
|
|
| |
llvm-svn: 209317
|
|
|
|
|
|
| |
against _gp_disp symbol.
llvm-svn: 209315
|
|
|
|
| |
llvm-svn: 209274
|
|
|
|
| |
llvm-svn: 209271
|
|
|
|
|
|
|
|
|
|
|
| |
addResolvableSymbols() queues input files, and readAllSymbols() reads
from them. In practice it's currently safe because they are called from
a single thread. But it's not guaranteed.
Also, acquiring the same mutex is needed not to see inconsistent memory
contents that is allowed in the C++ memory model.
llvm-svn: 209254
|