| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 188152
|
|
|
|
| |
llvm-svn: 188150
|
|
|
|
| |
llvm-svn: 188090
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__ImageBase is a symbol having 4 byte integer equal to the image base address
of the resultant executable. The linker is expected to create the symbol as if
it were read from a file.
In order to emit the symbol contents only when the symbol is actually
referenced, we created a pseudo library file to wrap the linker generated
symbol. The library file member is emitted to the output only when the member
is actually referenced, which is suitable for our purpose.
llvm-svn: 188052
|
|
|
|
| |
llvm-svn: 188049
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 188021
|
|
|
|
|
|
|
|
|
| |
Also change some local variable names: "ti" -> "context" and
"_targetInfo" -> "_context".
Differential Revision: http://llvm-reviews.chandlerc.com/D1301
llvm-svn: 187823
|
|
|
|
| |
llvm-svn: 187690
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
the relocation site
Patch by Ron Ofir.
llvm-svn: 187664
|
|
|
|
|
|
| |
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: 187548
|
|
|
|
| |
llvm-svn: 187505
|
|
|
|
| |
llvm-svn: 187484
|
|
|
|
| |
llvm-svn: 187461
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This patch removes hacky mangle() function, which strips all decorations
uncondtitionally. LLD now interprets Import Name/Type field in the import
library properly as described in the Microsoft PE/COFF Spec.
llvm-svn: 187388
|
|
|
|
| |
llvm-svn: 187382
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Patch by Ron Ofir.
llvm-svn: 187262
|
|
|
|
|
|
|
|
| |
Missing files will be reported as errors in the later pass, so this patch
does not change the behavior of the LLD linker, but it helps writing unit
tests for the driver.
llvm-svn: 187256
|
|
|
|
|
|
|
|
| |
provided
Based on Ron Ofir's patch.
llvm-svn: 187221
|
|
|
|
|
|
| |
Patch by Ron Ofir.
llvm-svn: 187220
|
|
|
|
|
|
|
|
| |
offset in the file buffer
Patch by Ron Ofir.
llvm-svn: 187219
|
|
|
|
|
|
| |
with the LLD coding style.
llvm-svn: 187215
|
|
|
|
| |
llvm-svn: 187214
|
|
|
|
| |
llvm-svn: 187211
|
|
|
|
|
|
| |
IMAGE_SYM_CLASS_LABEL.
llvm-svn: 187177
|
|
|
|
|
|
|
|
|
|
| |
The /include command line option is equivalent to Unix --undefined
option, which forces the linker to resolve the given symbol name
as if it's an unresolved symbol in one of its input files. This feature
is used to link an additional object file or a shared library that no
input files refer to.
llvm-svn: 187084
|
|
|
|
| |
llvm-svn: 186957
|
|
|
|
| |
llvm-svn: 186911
|
|
|
|
| |
llvm-svn: 186888
|
|
|
|
| |
llvm-svn: 186882
|
|
|
|
| |
llvm-svn: 186843
|
|
|
|
| |
llvm-svn: 186771
|
|
|
|
|
|
| |
location
llvm-svn: 186755
|
|
|
|
| |
llvm-svn: 186739
|
|
|
|
| |
llvm-svn: 186645
|