Simon Atanasyan
cb576ef415
[Mips] Move the `Elf_RegInfo` structure declaration to the separate file
...
No functional changes.
llvm-svn: 233618
2015-03-30 22:36:07 +00:00
Simon Atanasyan
2693b5a36c
[ELF] Change type of `OutputSection::setType()` argument to int64_t
...
Type of `OutputSection::_type` field is int64_t. This change makes
the field's and the argument's types consistent and allows to assign
full range of values to the `OutputSection::_type` field.
llvm-svn: 233617
2015-03-30 22:36:01 +00:00
Simon Atanasyan
d484653fed
[Mips] clang-format the code
...
No functional changes.
llvm-svn: 233616
2015-03-30 22:35:56 +00:00
Simon Atanasyan
8d08bb2154
[ELF] Use override keyword instead of virtual
...
No functional changes.
llvm-svn: 233550
2015-03-30 15:07:16 +00:00
Simon Atanasyan
6dec97f2c3
[Mips] Do not use llvm::Optional for GP0 value and TLS section address
...
Use of llvm::Optional is redundant here. Initializing by default value 0
is enough.
No functional changes.
llvm-svn: 233549
2015-03-30 15:07:11 +00:00
Simon Atanasyan
a341e38e39
[Mips] Rename class method merge => mergeHeaderFlags
...
No functional changes.
llvm-svn: 233548
2015-03-30 15:07:05 +00:00
Denis Protivensky
48906062df
[ARM] Remove whitespace in rel-ifunc test
...
llvm-svn: 233538
2015-03-30 13:31:05 +00:00
Simon Atanasyan
f9db164355
[Mips] Fix writing R_MIPS_REL32 relocation addendum
...
If input relocation records have RELA format while output dynamic
relocations have REL format the only way to transfer a dynamic
relocation addendum is to save it into the location modified by
the dynamic relocation.
llvm-svn: 233532
2015-03-30 11:39:02 +00:00
Rui Ueyama
4757f3210c
ELF: Use C++11 non-member initialization.
...
Setting _alignment member varaible to 0 look suspicious since
the minimum alignment value is 1. I'm not going to change that
number in this patch, though.
llvm-svn: 233472
2015-03-28 04:17:41 +00:00
Leny Kholodov
4ba377561f
[ARM] Fix group relocations test.
...
The fix is for r233277. This makes tests work.
On some build bots the test failed due to different llvm-objdump behaviour for target detection.
Now test checks .text section with etalon and illustrates correctness of generated
code without using of -disassemble llvm-objdump option.
llvm-svn: 233463
2015-03-28 01:18:10 +00:00
Rui Ueyama
aedd1117e9
ELF: Add a comment about the sysroot path.
...
llvm-svn: 233461
2015-03-28 00:59:37 +00:00
Rui Ueyama
483f05f49b
ELF: Do less if HAVE_CXXABI_H is not defined.
...
If HAVE_CXXABI_H is not defined, this function is the identity function.
Because HAVE_CXXABI_H did not protect the entire function, it did
extra stuffs before returning the argument.
The new code calls fewer functions. This should help developers understand
this piece of code.
llvm-svn: 233460
2015-03-28 00:47:13 +00:00
Rui Ueyama
fa3e8979a5
ELF: make code concise using "using".
...
llvm-svn: 233458
2015-03-28 00:34:09 +00:00
Rui Ueyama
034f627838
Use cast instead of dyn_cast in combination with llvm_unreachable.
...
llvm-svn: 233456
2015-03-28 00:09:26 +00:00
Rui Ueyama
6fab3c73b8
Use lambda for std::find_if.
...
llvm-svn: 233454
2015-03-28 00:00:09 +00:00
Rui Ueyama
286494717f
Remove else after return.
...
llvm-svn: 233453
2015-03-27 23:50:09 +00:00
Rui Ueyama
ccaaa21bc9
Use lambda instead of defining a class with operator().
...
llvm-svn: 233452
2015-03-27 23:47:01 +00:00
Rui Ueyama
cefe5d678d
ELF: make scopes of error code varaibles narrower.
...
llvm-svn: 233450
2015-03-27 23:30:38 +00:00
Rui Ueyama
5332ba8bea
ELF: Simplify SymbolFile.
...
llvm-svn: 233449
2015-03-27 23:26:39 +00:00
Rui Ueyama
49147e30f8
Remove unused forward declaration.
...
llvm-svn: 233444
2015-03-27 22:59:26 +00:00
Rui Ueyama
d5c60d032f
ELF: Use llvm::Optional<StringRef> instead of a bool and a StringRef.
...
llvm-svn: 233442
2015-03-27 22:51:50 +00:00
Rui Ueyama
a57f619133
Remove virtual from some ELFLinkingContext member functions.
...
I expected that these functions are overridden somewhere in the LLD
code base, but they are actually not. Removing virtual for readability
(and performance).
llvm-svn: 233441
2015-03-27 22:47:44 +00:00
Rui Ueyama
0de4ab513f
Reorder ELFLinkingContext member functions and run clang-format.
...
So that they look to be following the same style as other functions
around them.
llvm-svn: 233440
2015-03-27 22:47:42 +00:00
Rui Ueyama
a2ddf07f25
ELF: Do not use llvm::Optional for _maxPageSize.
...
Use of llvm::Optional seems useless here because we can set the
default value 0x1000 as an initial value to the varaible.
This patch also de-virtualize the accessor functions.
llvm-svn: 233438
2015-03-27 22:28:35 +00:00
Rui Ueyama
c470444837
Fix comment style to follow more common style.
...
llvm-svn: 233437
2015-03-27 22:28:33 +00:00
Rui Ueyama
e555684115
ELF: Make addSearchPath return void instead of bool.
...
No one uses return value of the member function, and return value
is always true. Returning a value doesn't make sense.
This patch also de-virtualize the fucntion.
llvm-svn: 233436
2015-03-27 22:20:21 +00:00
Rui Ueyama
9cced88c7a
ELF: Remove redundant =delete.
...
Since we have a (protected) constructor having two parameters,
the default constructor is not defined even if we don't do =delete.
llvm-svn: 233435
2015-03-27 22:13:29 +00:00
Rui Ueyama
b531fe33d5
ELF: Use C++11 non-member initialization.
...
llvm-svn: 233434
2015-03-27 22:10:29 +00:00
Rui Ueyama
adef19778c
Remove unused varaible.
...
llvm-svn: 233433
2015-03-27 22:06:37 +00:00
Rui Ueyama
2d6d7efb00
PECOFF: Use C++11 non-static member initialization.
...
llvm-svn: 233431
2015-03-27 21:59:23 +00:00
Rui Ueyama
89616adb0c
Use override keyword instead of virtual.
...
llvm-svn: 233424
2015-03-27 21:39:15 +00:00
Rui Ueyama
988355c3ae
Remove empty constructors.
...
llvm-svn: 233423
2015-03-27 21:39:13 +00:00
Rui Ueyama
96278ff759
Fix formatting.
...
llvm-svn: 233418
2015-03-27 20:50:56 +00:00
Rui Ueyama
194c21209f
Remove dead code.
...
I actually spend my time to understand this piece of code
and then realized that this is all dead.
llvm-svn: 233417
2015-03-27 20:50:54 +00:00
Rui Ueyama
7b57cef5b0
ELF: Add override.
...
Some virtual member functions in ELF directory don't have
virtual type specifier. Add override to them.
llvm-svn: 233406
2015-03-27 20:15:46 +00:00
Rui Ueyama
674aaaa367
ELF: Remove blank doPreFlight and finalize member functions.
...
Make these functions non-pure and define the default implementations.
llvm-svn: 233405
2015-03-27 20:15:44 +00:00
Rui Ueyama
52cd43e187
Fix formatting.
...
llvm-svn: 233402
2015-03-27 19:46:52 +00:00
Rui Ueyama
395b21e192
Rename all caps class names.
...
We have GOTAtom and PLTAtom classes because GOT or PLT are acronyms.
"Dynamic offset table" or "dynamic" are not acronyms.
llvm-svn: 233401
2015-03-27 19:33:05 +00:00
Rui Ueyama
4f694c873a
Remove this->.
...
llvm-svn: 233400
2015-03-27 19:33:02 +00:00
Denis Protivensky
7eda022521
[ARM] Handle GOT relocations
...
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
2015-03-27 16:29:08 +00:00
Denis Protivensky
4bdaefdcbe
[ARM] Simplify IFUNC code by removing useless handler
...
llvm-svn: 233374
2015-03-27 12:41:36 +00:00
Denis Protivensky
a6e7516ad9
[ARM] Add more IFUNC handlers
...
llvm-svn: 233372
2015-03-27 12:19:33 +00:00
Rui Ueyama
c9ee4de6ca
Rename ELFLinkingContext instances "ctx" intead of "context".
...
llvm-svn: 233344
2015-03-27 01:36:17 +00:00
Rui Ueyama
8b95afa095
Use llvm::make_unique.
...
llvm-svn: 233319
2015-03-26 21:16:26 +00:00
Rui Ueyama
d97b9d8999
Remove duplicate code and empty classes.
...
llvm-svn: 233316
2015-03-26 21:01:13 +00:00
Rui Ueyama
24f2d2a9d5
Remove Makefiles.
...
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
2015-03-26 20:09:47 +00:00
Leny Kholodov
ab57d42dea
[ARM] Fix PLT IFUNC symbol names in Release build
...
The fix is for r233277.
This makes tests work.
llvm-svn: 233280
2015-03-26 15:44:19 +00:00
Leny Kholodov
28074d6e9b
[ARM] Implementation of PLT: handling of IFUNC calls (gnu_indirect_function)
...
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
2015-03-26 14:57:50 +00:00
Leny Kholodov
4fdbf55730
Revert blank line after test commit
...
llvm-svn: 233268
2015-03-26 10:44:14 +00:00
Leny Kholodov
1d01cc7c1b
Commit access verification: blank line has been added
...
llvm-svn: 233267
2015-03-26 10:37:53 +00:00