Simon Atanasyan
6313038925
[Mips] Make tests more tolerant to offsets, symbol sizes etc
...
No functional changes.
llvm-svn: 235035
2015-04-15 18:32:22 +00:00
Simon Atanasyan
09129d957c
[Mips] clang-format the code
...
llvm-svn: 235033
2015-04-15 18:32:05 +00:00
Simon Atanasyan
f4a87333ff
[Mips] Remove redundant `.got` section lookup
...
No functional changes.
llvm-svn: 235032
2015-04-15 18:31:59 +00:00
Simon Atanasyan
834632cd1a
[Mips] Create _GLOBAL_OFFSET_TABLE_ only if the .got section exists
...
llvm-svn: 235031
2015-04-15 18:31:53 +00:00
Simon Atanasyan
fa21338a97
[Mips] Check `_gp_disp` symbol using a trivial string comparison
...
No functional changes.
llvm-svn: 235030
2015-04-15 18:31:44 +00:00
Adhemerval Zanella
17d33dc3ec
ELF/Arch64: Fix testcases requirements
...
This patch fixes 2 aarch64 testcases that require dissassemble output
when running on builds that do not enable aarch64 backend.
llvm-svn: 235001
2015-04-15 12:03:42 +00:00
Denis Protivensky
0bcc491318
[ARM] Don't generate veneers when bl->blx fixup is possible
...
llvm-svn: 234991
2015-04-15 10:05:12 +00:00
Denis Protivensky
7f6b22ee84
[ARM] Pass Thumb flag to handler methods instead of atom
...
llvm-svn: 234989
2015-04-15 09:57:04 +00:00
Denis Protivensky
97375dc751
[ELF] Fix gcc -pedantic warnings (remove extra ';')
...
llvm-svn: 234981
2015-04-15 07:45:11 +00:00
Rui Ueyama
bd94dbcf0a
ELF: Attempt to simplify Segment::AssignVirtualAddress.
...
This is a retry of r234944.
llvm-svn: 234955
2015-04-14 23:11:14 +00:00
Rui Ueyama
13e41bcf9c
temporary
...
llvm-svn: 234954
2015-04-14 23:11:12 +00:00
Rui Ueyama
0a57476c20
temporary
...
llvm-svn: 234953
2015-04-14 23:11:10 +00:00
Rui Ueyama
ed796d518c
ELF: Move Instrcution definition to HexagonEncoding.h.
...
HexagonEncodings.h contains a list of bitmasks. The file is used
only by HexagonRelocationHandler.cpp. The header is odd in the sense
that it uses struct Instruction but it doesn't define the data type.
This patch moves the struct definition to the header.
llvm-svn: 234947
2015-04-14 21:41:00 +00:00
Rui Ueyama
ae9168b718
Revert "ELF: Attempt to simplify Segment::assignVirtualAddress()."
...
This reverts commit r234944 because it seems to have broken the buildbots.
llvm-svn: 234946
2015-04-14 21:38:39 +00:00
Rui Ueyama
5ec40d6e73
ELF: Attempt to simplify Segment::assignVirtualAddress().
...
This function is too long and complicated. Looks like new code was
added incrementaly without any refactoring. Maybe no one can describe
its exact semantics any more? It even contains copy-pastes inside it.
This patch is an (incomplete) attempt to simplify the function.
I tried to mechanically translate code to another form more intelligible.
I don't still understand the whole picture, but this patch shouldn't
change the linker's functionality.
llvm-svn: 234944
2015-04-14 21:20:37 +00:00
Davide Italiano
b60453fe29
Rename ExecutableAtom.hpp to ExecutableAtom.h
...
This is for consistency with what's used elsewhere in lld tree.
llvm-svn: 234943
2015-04-14 21:06:56 +00:00
Rui Ueyama
921b8e93bb
ELF: Remove redundant namespace qualifiers.
...
llvm-svn: 234938
2015-04-14 20:39:06 +00:00
Rui Ueyama
16d8e44da5
ELF: Simplify ELFDefinedAtom::contentType().
...
llvm-svn: 234936
2015-04-14 20:31:56 +00:00
Rui Ueyama
569e11af46
ELF: Split Atoms.h to Atoms.{h,cpp}.
...
llvm-svn: 234935
2015-04-14 20:21:53 +00:00
Rui Ueyama
2783469116
ELF: Split SegmentChunks.h to SegmentChunks.{h,cpp}.
...
llvm-svn: 234934
2015-04-14 20:12:50 +00:00
Rui Ueyama
06f70a087b
ELF: Split HeaderChunks.h to HeaderChunks.{h,cpp}.
...
llvm-svn: 234932
2015-04-14 19:48:57 +00:00
Rui Ueyama
befc11e007
ELF: Split SectionChunks.h to SectionChunks.{h,cpp}.
...
The size of AArch64TargetHander.cpp.o is now 4.1MB.
llvm-svn: 234931
2015-04-14 19:31:42 +00:00
Simon Atanasyan
bdaab80160
[ELF] Use type helper Elf_Word instead of plain uint32_t data type
...
That helps to correctly write content of hash table if target and host
endianness are not the same. Right now that commit does not affect
any supported targets.
llvm-svn: 234928
2015-04-14 18:53:21 +00:00
Simon Atanasyan
1bd5d7e623
[ELF] Write whole std::vector using a single `memcpy` call
...
We do not need to iterate over `_buckets` and `_chains` vectors and
write all elements one by one.
No functional changes.
llvm-svn: 234927
2015-04-14 18:53:14 +00:00
Simon Atanasyan
c0c4664618
[ELF] Remove redundant type cast to `char*` before passing array to memcpy
...
No functional changes.
llvm-svn: 234926
2015-04-14 18:53:09 +00:00
Simon Atanasyan
23025c812e
[Mips] Write _DYNAMIC symbol on MIPS targets
...
llvm-svn: 234925
2015-04-14 18:53:03 +00:00
Simon Atanasyan
dd6f1aaa73
[Mips] Make tests more tolerant to the program and section headers offsets
...
No functional changes.
llvm-svn: 234924
2015-04-14 18:52:55 +00:00
Rui Ueyama
a852744a6a
ELF: Split OutputELFWriter.h to OutputELFWriter.{h,cpp}.
...
The size of AArch64TargetHandler.cpp.o is now 4.5MB.
llvm-svn: 234916
2015-04-14 18:14:07 +00:00
Rui Ueyama
9d6ca7e272
ELF: Split TargetLayout.h into TargetLayout.{h,cpp}.
...
This patch makes AArch64TargetHandler.cpp.o from 8.5MB to 6.8MB.
llvm-svn: 234914
2015-04-14 18:04:57 +00:00
Rui Ueyama
cfeb2512fd
ELF: Remove ELFT template argument when referring the base class.
...
We don't need to repeat the template argument. They are not
ambiguous. MIPS is parameterized for ELFT, so we can't do this
for MIPS, though.
llvm-svn: 234913
2015-04-14 17:32:13 +00:00
Rui Ueyama
5557a0e688
Attempt to fix MSVC warning.
...
This patch tries to fix the following MSVC warning.
warning C4661: 'bool
lld:🧝 :ELFFile<lld:🧝 :ELF32LE>::isCompatible(unsigned
char,unsigned char)' : no suitable definition provided for explicit
template instantiation request
llvm-svn: 234909
2015-04-14 17:12:32 +00:00
Denis Protivensky
8f82dff193
[ARM] Implement mapping symbols for PLT0 entry
...
llvm-svn: 234876
2015-04-14 09:33:04 +00:00
Denis Protivensky
72a7581743
[ARM] Move out mapping atom functionality to a separate class
...
llvm-svn: 234874
2015-04-14 09:11:05 +00:00
Denis Protivensky
e80fd18b45
[ARM] Rename IFUNC-related tests
...
llvm-svn: 234873
2015-04-14 08:44:55 +00:00
Denis Protivensky
4c895b189a
[ARM] Improve IFUNC PLT test
...
llvm-svn: 234872
2015-04-14 08:40:02 +00:00
Rui Ueyama
ff499469e0
Simplify short switch-cases.
...
llvm-svn: 234869
2015-04-14 07:19:29 +00:00
Rui Ueyama
707504e0f2
Remove excessive parentheses.
...
llvm-svn: 234868
2015-04-14 07:09:05 +00:00
Rui Ueyama
bf138134b0
ELF: Remove a header which is used only by one .cpp file.
...
The data and the inline function defined in the header is used only
by HexagonRelocationHandler.cpp.
llvm-svn: 234867
2015-04-14 07:09:03 +00:00
Rui Ueyama
92259f7fa3
Fix indentation.
...
llvm-svn: 234866
2015-04-14 06:58:48 +00:00
Rui Ueyama
76dff95a98
ELF: Fix odd initialization code.
...
llvm-svn: 234865
2015-04-14 06:58:47 +00:00
Rui Ueyama
25f9b4b752
temporary
...
llvm-svn: 234864
2015-04-14 06:58:45 +00:00
Rui Ueyama
f9fffa7e11
ELF: Move function definitions from .h to .cpp.
...
llvm-svn: 234863
2015-04-14 06:47:06 +00:00
Rui Ueyama
2f43dbec0a
ELF: Inline ELFReader typedefs which are used only once.
...
llvm-svn: 234862
2015-04-14 06:22:53 +00:00
Rui Ueyama
f3691620da
ELF: Make common strings file-scoped constants.
...
llvm-svn: 234861
2015-04-14 06:08:07 +00:00
Rui Ueyama
f505ccf451
ELF: Make ARMELFMappingAtom a non-template class.
...
llvm-svn: 234860
2015-04-14 05:21:26 +00:00
Rui Ueyama
da3a9a1b0b
ELF: Remove this-> as much as we can.
...
These this-> are there because their classes were templated.
They are no longer templated.
llvm-svn: 234859
2015-04-14 05:14:49 +00:00
Rui Ueyama
4caff31217
ELF: Remove ELFT parameter from ARMELFFile.
...
llvm-svn: 234858
2015-04-14 05:14:46 +00:00
Rui Ueyama
ff8bc5680a
ELF: Make HexagonFile a non-template class.
...
llvm-svn: 234857
2015-04-14 05:14:44 +00:00
Rui Ueyama
3996563428
Remove dead code.
...
llvm-svn: 234854
2015-04-14 04:54:01 +00:00
Rui Ueyama
7bda84d25e
ELF: Remove ELFT and LinkingContext template parameters from ELFReader.
...
Previously, ELFReader takes three template arguments: EFLT,
LinkingContextT and FileT. FileT is itself templated.
So it was a bit complicated. Maybe too much.
Most architectures don't actually need to be parameterized for ELFT.
For example, x86 is always ELF32LE and x86-64 is ELF64LE.
However, because ELFReader requires a ELFT argument, we needed
to parameterize a class even if not needed.
This patch removes the parameter from the class. So now we can
de-templatize such classes (I didn't do that in this patch, though).
This patch also removes ContextT parameter since it didn't have to be
passed as a template argument.
llvm-svn: 234853
2015-04-14 04:53:57 +00:00