| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Because of a bug, the last atom of each section contained a garbage at the
end of its data. In most cases the garbage is harmless but it could have cause
SEGV.
llvm-svn: 189572
|
|
|
|
|
|
|
|
| |
We were creating undefined atoms for common symbols by mistake. That did not
lead to a link failure, for undefined atoms would be resolved by common symbols
in the same file, but that's a waste of resource.
llvm-svn: 189534
|
|
|
|
|
|
|
|
|
| |
We scanned the symbol table twice; first to gather all regular symbols, and
second to process aux symbols. That's a bit inefficient and complicated. We
can instead cache aux symbols in the first pass, to eliminate the need of the
second pass.
llvm-svn: 189525
|
|
|
|
|
|
|
| |
This is a temporary measure because the semantics of the common symbol is
actually more compilcated than the simple mergeable symbol.
llvm-svn: 188235
|
|
|
|
| |
llvm-svn: 188046
|
|
|
|
| |
llvm-svn: 188045
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The COMDAT section is a section with a special attribute to tell the linker
whether the symbols in the section are allowed to be merged or not. This patch
add a function to interpret the COMDAT data and set "merge" attribute to the
atoms accordingly.
LLD supports multiple policies to merge atoms; atoms can be merged by name or
by content. COFF supports them, and in addition to that, it supports
choose-the-largest-atom policy, which LLD currently does not support. I simply
mapped it to merge-by-name attribute for now, but we eventually have to support
that policy in the core linker.
llvm-svn: 188025
|
|
|
|
|
|
|
|
|
| |
Also change some local variable names: "ti" -> "context" and
"_targetInfo" -> "_context".
Differential Revision: http://llvm-reviews.chandlerc.com/D1301
llvm-svn: 187823
|
|
|
|
| |
llvm-svn: 187688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The aim of this patch is to reduce the dependency from COFFDefinedAtom
to COFF structs defined in llvm/Object/COFF.h. Currently many attributes
of the atom are computed in the atom. That provide a simple interface but
does not work well in some cases.
There are some cases that the same type atom is created from different
parts of a COFF file. One example is the BSS atom, which can be created
from the defined symbol in the .bss section or from the undefined symbol.
Computing attributes from different sources in the atom complicates the
code. We should compute it outside the atom.
In the next patch, I'll move more code from Atoms.h to ReaderCOFF.cpp.
llvm-svn: 187681
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The .drectve section contains linker command line options, and the linker is
expected to interpret them as if they were given via the command line. In this
patch, the command line parser in the driver is called from the object file
reader to parse the string.
I think this patch is important, because this is the first step towards mutable
TargetInfo. We had a discussion about that on llvm-commits mailing list before.
I haven't removed "const" from the function signature yet. Instead, I just use
cast to remove "const". This is a temporary aid for an experiment. If we don't
see any issue with this mutable TargetInfo appraoch, I'll change the function
signature, and rename the class LinkerContext from TargetInfo.
Reviewers: kledzik
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1246
llvm-svn: 187677
|
|
|
|
|
|
|
|
| |
For an invalid input we should not call report_fatal_error(), because
when LLD is used as a library, we don't want to kill the whole app
because of a malformed input.
llvm-svn: 187673
|
|
|
|
|
|
| |
file error.
llvm-svn: 187670
|
|
|
|
| |
llvm-svn: 187665
|
|
|
|
|
|
| |
represents a BSS atom.
llvm-svn: 187645
|
|
|
|
|
|
|
| |
A instance of the class always represents a BSS atom, so we don't need
to look at the symbol or the section to retrieve its attributes.
llvm-svn: 187643
|
|
|
|
| |
llvm-svn: 187460
|
|
|
|
|
|
|
|
| |
The BSS atom is similar to the regular defined atom, but it's different
in the sense that it does not have contents. Until now we assumed all the
defined atoms have its contents. That did not fit well to the BSS atom.
llvm-svn: 187453
|
|
|
|
|
|
|
|
|
| |
Member functions to read the symbol table had too many parameters to propagate
all the temporary information from one to another. By storing the information
to data members, we can simplify the function signatures and improve the
readability.
llvm-svn: 187321
|
|
|
|
| |
llvm-svn: 187317
|
|
|
|
|
|
|
| |
Some sections, such as with IMAGE_SCN_LNK_REMOVE attribute, is skipped
in the first pass. Such sections need to be skipped in the latter passes.
llvm-svn: 187281
|
|
|
|
|
|
| |
with the LLD coding style.
llvm-svn: 187215
|
|
|
|
| |
llvm-svn: 187214
|
|
|
|
| |
llvm-svn: 187211
|
|
|
|
|
|
| |
IMAGE_SYM_CLASS_LABEL.
llvm-svn: 187177
|
|
|
|
| |
llvm-svn: 186843
|
|
|
|
| |
llvm-svn: 185517
|
|
|
|
|
|
| |
function is not used in release build.
llvm-svn: 185248
|
|
|
|
| |
llvm-svn: 185129
|
|
|
|
| |
llvm-svn: 184653
|
|
|
|
| |
llvm-svn: 184649
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: shankarke
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D998
llvm-svn: 184327
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
other files.
Extract atom definitions as Atoms.h so that we can use them in other files.
Also applied clang-format to Atoms.h.
Reviewers: shankarke
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D995
llvm-svn: 184124
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first patch toward full DLL support. With this patch, lld can
read .lib file for a DLL.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D987
llvm-svn: 184101
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: shankarke
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D989
llvm-svn: 184085
|
|
|
|
|
|
|
|
| |
Archive file in Windows has file extension of ".lib" but the file format is
in fact the same as Unix. It's an ar archive holding multiple .obj files.
The existing archive reader can read .lib files.
llvm-svn: 184036
|
|
|
|
| |
llvm-svn: 184035
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
COFFReference class is defined to represent relocation information for
COFFDefinedAtom, as ELFReference for ELFDefinedAtom. ReaderCOFF can now
read relocation entries and create COFFReferences accordingly.
I need to make WriterPECOFF to handle the relocation references created by
the reader, but this patch is already big, so I think it's probably better
to get it reviewed now.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D976
llvm-svn: 183964
|
|
|
|
| |
llvm-svn: 183887
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Architecture specific code should reside in architecture specific directory
not in Atom. Looks like there are no efforts being made at this moment to
support ARM, so let's remove it for now.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D959
llvm-svn: 183877
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split FileCOFF's constructor into mainly two private methods.
One method is responsible to iterate over symbol tables, and other
method is to atomize defined atoms. This is for readability and
no changes in functionality.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D940
llvm-svn: 183708
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 182721
|
|
|
|
| |
llvm-svn: 178918
|
|
|
|
| |
llvm-svn: 178914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The major changes are:
1) LinkerOptions has been merged into TargetInfo
2) LinkerInvocation has been merged into Driver
3) Drivers no longer convert arguments into an intermediate (core) argument
list, but instead create a TargetInfo object and call setter methods on
it. This is only how in-process linking would work. That is, you can
programmatically set up a TargetInfo object which controls the linking.
4) Lots of tweaks to test suite to work with driver changes
5) Add the DarwinDriver
6) I heavily doxygen commented TargetInfo.h
Things to do after this patch is committed:
a) Consider renaming TargetInfo, given its new roll.
b) Consider pulling the list of input files out of TargetInfo. This will
enable in-process clients to create one TargetInfo the re-use it with
different input file lists.
c) Work out a way for Drivers to format the warnings and error done in
core linking.
llvm-svn: 178776
|
|
|
|
|
|
| |
This is the standard way of implementing LLVM RTTI.
llvm-svn: 177555
|
|
|
|
| |
llvm-svn: 177079
|
|
|
|
| |
llvm-svn: 173430
|
|
|
|
| |
llvm-svn: 173300
|