| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 233423
|
|
|
|
| |
llvm-svn: 233418
|
|
|
|
|
|
|
| |
I actually spend my time to understand this piece of code
and then realized that this is all dead.
llvm-svn: 233417
|
|
|
|
|
|
|
| |
Some virtual member functions in ELF directory don't have
virtual type specifier. Add override to them.
llvm-svn: 233406
|
|
|
|
|
|
| |
Make these functions non-pure and define the default implementations.
llvm-svn: 233405
|
|
|
|
| |
llvm-svn: 233402
|
|
|
|
|
|
|
| |
We have GOTAtom and PLTAtom classes because GOT or PLT are acronyms.
"Dynamic offset table" or "dynamic" are not acronyms.
llvm-svn: 233401
|
|
|
|
| |
llvm-svn: 233400
|
|
|
|
|
|
|
|
|
|
| |
This includes relocs needed to link against glibc:
R_ARM_BASE_PREL
R_ARM_GOT_BREL
Every reloc is accompanied with a test case.
llvm-svn: 233383
|
|
|
|
| |
llvm-svn: 233374
|
|
|
|
| |
llvm-svn: 233372
|
|
|
|
| |
llvm-svn: 233344
|
|
|
|
| |
llvm-svn: 233319
|
|
|
|
| |
llvm-svn: 233316
|
|
|
|
|
|
|
|
| |
Most developers prefer to not have them, and we agreed to
remove them from LLD.
http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/083368.html
llvm-svn: 233313
|
|
|
|
|
|
|
|
|
|
| |
This diff includes implementation of linking calls to ifunc functions.
It provides ifunc entries in PLT and corresponding relocations (R_ARM_ALU_PC_G0_NC,
R_ARM_ALU_PC_G1_NC, R_ARM_LDR_PC_G2 for link-time and R_ARM_IRELATIVE for run-time).
Differential Revision: http://reviews.llvm.org/D7833
llvm-svn: 233277
|
|
|
|
| |
llvm-svn: 233268
|
|
|
|
| |
llvm-svn: 233267
|
|
|
|
|
|
|
|
|
|
|
| |
Mapping symbols should have their own code models,
and in some places must be treated in a specific way.
Make $t denote Thumb code, and $a and $d denote ARM code.
Set size, binding and type of mapping symbols to what the specification says.
Differential Revision: http://reviews.llvm.org/D8601
llvm-svn: 233259
|
|
|
|
|
|
| |
I believe "2" stands for log2. Just "align" would be appropriate now.
llvm-svn: 233248
|
|
|
|
| |
llvm-svn: 233247
|
|
|
|
|
|
|
| |
This is the final step of conversion. Now log2 numbers are removed
from everywhere!
llvm-svn: 233246
|
|
|
|
|
|
|
|
| |
This patch defines implicit conversion between integers and PowerOf2
instances, so uses of the classes is now implicit and look like
regular integers. Now we are ready to remove the scaffolding.
llvm-svn: 233245
|
|
|
|
|
|
|
| |
The new constructor's type is the same, but this one takes not a log2
value but an alignment value itself, so the meaning is totally differnet.
llvm-svn: 233244
|
|
|
|
|
|
|
| |
Ban conversion from integers to PowerOf2 even if explicit
to make all places we create PowerOf2 instances visible.
llvm-svn: 233243
|
|
|
|
|
|
|
|
|
|
| |
This patch is to make instantiation and conversion to an integer explicit,
so that we can mechanically replace all occurrences of the class with
integer in the next step.
Now get() returns an alignment value rather than its log2 value.
llvm-svn: 233242
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are using log2 values and values themselves to represent alignments.
For example, alignment 8 is sometimes represented as 3 (8 == 2^3).
We want to stop using log2 values.
Because both types are regular arithmetic types, we cannot get help from
a compiler to find places we mix two representations. That makes this
merging work surprisingly hard because if I make a mistake, I'll just get
wrong results at runtime (Yay types!). In this patch, I introduced
a class to represents power-of-two values, which is basically an alias
for an integer type.
Once the migration is done, the class will be removed.
llvm-svn: 233232
|
|
|
|
| |
llvm-svn: 233222
|
|
|
|
|
|
|
| |
We cannot use "using" to inherit constructors because the feature
is not supported by MSVC 2013.
llvm-svn: 233218
|
|
|
|
|
|
|
|
|
| |
the separate function
That keeps "extracting" logic into the single place and removes a VC++
compilation warning.
llvm-svn: 233186
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Import Lookup Table in Import Directory Table has the same contents
as Hint/Name Table. Symbol names imported from DLLs are pointed by
both Import Directory Table and Hint/Name Table. We had duplicate
strings there.
This patch eliminates that duplication to make the table smaller.
This should reduce binary size by the sum of lengths of imported
symbols.
llvm-svn: 233128
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Visual C++ shows the "right shift by too large amount" warning if
`MipsELFReference` is instantiated for 32-bit target and `Elf_Rel_Impl::getType`
method has `unsigned char` return type. We can freely suppress the warning in
that case because MIPS 32-bit ABI does not pack multiple relocation types into
the single field `r_type` and the `MipsELFReference::_tag` should be always
zero in that case.
No functional changes.
llvm-svn: 233088
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 233058
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
N64 ABI relocation record r_info field in fact consists of five subfields:
* r_sym - symbol index
* r_ssym - special symbol
* r_type3 - third relocation type
* r_type2 - second relocation type
* r_type - first relocation type
Up to three these relocations applied one by one. The first relocation
uses an addendum from the relocation record. Each subsequent relocation
takes as its addend the result of the previous operation. Only the final
operation actually modifies the location relocated. The first relocation
uses as a reference symbol specified by the `r_sym` field. The third
relocation assumes NULL symbol.
The patch represents these data using LLD model and takes in account
additional relocation types during a relocation calculation.
Additional relocations do not introduce any new relations between two
atoms and just specify operations need to be done during a relocation
calculation. The first relocation type (`r_type`) stored in the
`Reference::_kindValue`. The rest of relocations and `r_ssym` value are
stored in the new `Reference::_tag` field "as-is". I decided to do not
"decode" these data on the core LLD level to prevent pollution of the
core LLD model by very target specific data.
Also I have to override writing of relocation records in the `RelocationTable`
class to convert MIPS N64 ABI relocation information from the `Reference`
class back to the ELF relocation record.
http://reviews.llvm.org/D8533
llvm-svn: 233057
|
|
|
|
| |
llvm-svn: 233054
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The aforementioned relocation generate a GOT entry with a
R_X86_64_TPOFF64. The new relocation is processed at startup
time by the loader. lld didn't generate the outstanding relocation,
now it does. This bug was found while trying to link ls(1) on FreeBSD.
Simplified repro:
#include <stdio.h>
#include <wchar.h>
#include <wctype.h>
int
main(void)
{
wchar_t wc = 98;
if (!iswprint(wc))
printf("blah\n");
else
printf("foo\n");
return (0);
}
which incorrectly outputs "blah" when linked with lld before this patch.
llvm-svn: 233051
|
|
|
|
| |
llvm-svn: 232985
|
|
|
|
|
|
|
| |
The ELF backends now depend on lld::script::Sema, which is in libReaderWriter.
Link it explicitly.
llvm-svn: 232953
|
|
|
|
|
|
|
| |
Test cases for both entry functions in ARM and Thumb
code are added.
llvm-svn: 232942
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 232938
|
|
|
|
|
|
|
|
|
|
|
| |
separately
This change reduce difference between the trunk and upcoming patch and
simplify the future code review.
No functional changes.
llvm-svn: 232919
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 232915
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 232914
|
|
|
|
| |
llvm-svn: 232868
|
|
|
|
|
|
|
| |
Unable to add a unit test for this, as there is only one local undefined
symbol in regular shared libraries without a name.
llvm-svn: 232867
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the init array/fini array sorting to the Output ELF writer.
AFAIK, this is only needed by the X86_64/ARM ABI.
This shaves time taken to self host lld by 0.2 seconds.
Before patch
----------------
4791.062059 task-clock # 1.634 CPUs utilized ( +- 0.28% )
61,107 context-switches # 0.013 M/sec ( +- 0.56% )
2.932902671 seconds time elapsed ( +- 0.84% )
After patch
-------------
4608.417248 task-clock # 1.669 CPUs utilized ( +- 0.30% )
61,616 context-switches # 0.013 M/sec ( +- 0.63% )
2.761012703 seconds time elapsed ( +- 0.63% )
llvm-svn: 232866
|
|
|
|
| |
llvm-svn: 232865
|
|
|
|
|
|
| |
Fix a leftover class during implementation.
llvm-svn: 232864
|
|
|
|
|
|
| |
Order is still deterministic and we dont need a sorted order.
llvm-svn: 232863
|
|
|
|
| |
llvm-svn: 232862
|