| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
This reverts commit r222311.
Reverting because of failure in the darwin bot.
llvm-svn: 222329
|
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 222311
|
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 222310
|
|
|
|
| |
llvm-svn: 222021
|
|
|
|
|
|
|
| |
The dynamic section was not aligned properly. The alignment of the section is
determined by the word size of the architecture.
llvm-svn: 221972
|
|
|
|
|
|
|
|
|
|
| |
The dynamic table was creating the entry DT_FINI_ARRAY{SZ} even when there was
no .fini_array section. The entries should be creating in the dynamic section
only if there are sections .init_array/.fini_array in the output.
Fixes the tests that checked for errroneous outputs.
llvm-svn: 221588
|
|
|
|
| |
llvm-svn: 221586
|
|
|
|
|
|
|
|
|
|
| |
ELFLinkingContext had these two functions, which is really not needed since
the Writer uses a llvm::object template composed of Endianness, Alignment,
Is32bit/64bit. We could just use that and not duplicate functionality.
No Change In Functionality.
llvm-svn: 221523
|
|
|
|
|
|
|
|
|
| |
The ELF writer creates a invalid binary for few cases with large filesize and
memory size for segments. This patch addresses the functionality and updates the
test. This patch also cleans up parts of the ELF writer for future enhancements
to support Linker scripts.
llvm-svn: 221233
|
|
|
|
|
|
|
|
|
| |
This would permit the ELF reader to check the architecture that is being
selected by the linking process.
This patch also sorts the include files according to LLVM conventions.
llvm-svn: 220129
|
|
|
|
|
|
|
|
|
|
|
| |
Because we use cast<> at the beginning of this function, it will
abort there if a given atom is not a DefinedAtom.
In the switch statement, we checked if a given atom is a DefinedAtom
again by evaluating definition() == Atom::definitionRegular.
This was always true. So we can remove the outer switch statement.
llvm-svn: 219724
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If one or more dynamic relocation might modify a read-only section,
dynamic table should contain DT_TEXTREL tag.
The patch introduces new `RelocationTable::canModifyReadonlySection()`
method. This method checks through the relocations to see if any modifies
a read-only section. The DynamicTable class calls this method and emits
the DT_TEXTREL tag if necessary.
The patch reviewed by Rui Ueyama and Shankar Easwaran.
llvm-svn: 208670
|
|
|
|
| |
llvm-svn: 206560
|
|
|
|
| |
llvm-svn: 205568
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
using MSVC 2012 or newer.
llvm-svn: 202627
|
|
|
|
|
|
|
|
| |
The sections .rela/.rel.(*) have a alignment of 2 in the final image created by
the linker. This needs to be properly set to the right alignment depending on
the architecture(32/64bits).
llvm-svn: 201740
|
|
|
|
|
|
| |
The patch reviewed by Shankar Easwaran and Rui Ueyama.
llvm-svn: 200630
|
|
|
|
|
|
| |
the descendant classes.
llvm-svn: 200467
|
|
|
|
|
|
|
| |
We need to increase the memory and the filesize when we add a typeZeroFillQuick
atom.
llvm-svn: 200369
|
|
|
|
|
|
|
|
| |
X86_64,X86,PPC,Hexagon,Mips
No change in functionality.
llvm-svn: 200177
|
|
|
|
|
|
|
|
|
|
| |
Add new virtual virtual function `isRelaOutputFormat` to the
`ELFLinkingContext` class. Call this function everywhere we need to
select a relocation table format.
Patch reviewed by Shankar Easwaran and Rui Ueyama.
llvm-svn: 199973
|
|
|
|
| |
llvm-svn: 197788
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main changes are in:
include/lld/Core/Reference.h
include/lld/ReaderWriter/Reader.h
Everything else is details to support the main change.
1) Registration based Readers
Previously, lld had a tangled interdependency with all the Readers. It would
have been impossible to make a streamlined linker (say for a JIT) which
just supported one file format and one architecture (no yaml, no archives, etc).
The old model also required a LinkingContext to read an object file, which
would have made .o inspection tools awkward.
The new model is that there is a global Registry object. You programmatically
register the Readers you want with the registry object. Whenever you need to
read/parse a file, you ask the registry to do it, and the registry tries each
registered reader.
For ease of use with the existing lld code base, there is one Registry
object inside the LinkingContext object.
2) Changing kind value to be a tuple
Beside Readers, the registry also keeps track of the mapping for Reference
Kind values to and from strings. Along with that, this patch also fixes
an ambiguity with the previous Reference::Kind values. The problem was that
we wanted to reuse existing relocation type values as Reference::Kind values.
But then how can the YAML write know how to convert a value to a string? The
fix is to change the 32-bit Reference::Kind into a tuple with an 8-bit namespace
(e.g. ELF, COFFF, etc), an 8-bit architecture (e.g. x86_64, PowerPC, etc), and
a 16-bit value. This tuple system allows conversion to and from strings with
no ambiguities.
llvm-svn: 197727
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following are the most significant peculiarities of MIPS target:
- MIPS ABI requires some special tags in the dynamic table.
- GOT consists of two parts local and global. The local part contains
entries refer locally visible symbols. The global part contains entries
refer global symbols.
- Entries in the .dynsym section which have corresponded entries in the
GOT should be:
* Emitted at the end of .dynsym section
* Sorted accordingly to theirs GOT counterparts
- There are "paired" relocations. One or more R_MIPS_HI16 and R_MIPS_GOT16
relocations should be followed by R_MIPS_LO16 relocation. To calculate
result of R_MIPS_HI16 and R_MIPS_GOT16 relocations we need to combine
addends from these relocations and paired R_MIPS_LO16 relocation.
The patch reviewed by Michael Spencer, Shankar Easwaran, Rui Ueyama.
http://llvm-reviews.chandlerc.com/D2156
llvm-svn: 197342
|
|
|
|
|
|
| |
Use of static is recommended by the style guide.
llvm-svn: 196877
|
|
|
|
| |
llvm-svn: 196056
|
|
|
|
| |
llvm-svn: 196054
|
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 196053
|
|
|
|
| |
llvm-svn: 194556
|
|
|
|
|
|
| |
This reverts commit r194551 because it broke the buildbot.
llvm-svn: 194552
|
|
|
|
| |
llvm-svn: 194551
|
|
|
|
| |
llvm-svn: 194364
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The result of sizeof(SymbolTable<ELFT>::SymbolEntry) in DynamicSymbolTable
<ELFT>::write() was different from the same expression in RelocationTable
<ELFT>::write(), although the same template parameters were passed. They were
40 and 32, respectively. As a result, the same vector was treated as a
vector of 40 byte values in some places and a vector of 32 values in other
places. That caused an weird issue, resulting in collapse of the rela.dyn
section.
I suspect that this is a padding size calculation bug in MSVC 2012, but I
may be wrong. Reordering the fields to eliminate padding seems to fix the
issue.
llvm-svn: 194349
|
|
|
|
| |
llvm-svn: 194037
|
|
|
|
|
|
|
| |
MSVC 2012 raises an error in the lambda passed to vector::find_if, while it
seems valid code. Rewrote without high-order functions.
llvm-svn: 193975
|
|
|
|
| |
llvm-svn: 193662
|
|
|
|
| |
llvm-svn: 193451
|
|
|
|
| |
llvm-svn: 191467
|
|
|
|
|
|
|
|
|
| |
This also makes it support debugging executables built with lld.
Initial patch done by Bigcheese. This is only a revised patch to
have the functionality in the Writer.
llvm-svn: 191032
|
|
|
|
|
|
|
|
|
|
| |
It looks like there is a possibility of seeing RO/RW note sections
and we would need to create an appropriate RO/RW segment associated
with them.
Adds a test too.
llvm-svn: 189907
|
|
|
|
|
|
|
|
| |
Emit note sections if the input contains a note section.
Also emit a note segment.
llvm-svn: 189896
|
|
|
|
|
|
|
|
|
|
| |
The cleanup includes :-
* Rename ambiguous Header class to ELFHeader
* Convert Chunk contentype and kind to be a enumerated class
* Remove functions that are not being used, avoids future confusion
llvm-svn: 189209
|
|
|
|
|
|
|
|
|
|
|
| |
typeTLV content type is used by Darwin to represent thread local
storage. A new contentType has to be made to represent ELF
thread local storage data. These have been set to
- typeThreadZeroFill (represents TBSS storage)
- typeThreadData (represents TDATA storage)
llvm-svn: 189137
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BSS atoms dont take any file space in the Input file. They are associated
with a contentType(typeZeroFill). Similiar zero fill types also exist which
have the same meaning in terms of occupying file space in the Input.
These atoms have to be handled seperately when writing to the
lld's intermediate file or the lld test infrastructure.
Also adds a test.
llvm-svn: 189136
|
|
|
|
|
|
|
|
|
| |
Also change some local variable names: "ti" -> "context" and
"_targetInfo" -> "_context".
Differential Revision: http://llvm-reviews.chandlerc.com/D1301
llvm-svn: 187823
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-ELF writers.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D977
llvm-svn: 184061
|
|
|
|
| |
llvm-svn: 184055
|