Simon Atanasyan
134a8a6311
[Mips] Reduce the number of 'const' casts.
...
llvm-svn: 204355
2014-03-20 16:26:25 +00:00
Simon Atanasyan
df0d62a7cb
[Mips] Join two for loops over defined atoms into the single one.
...
llvm-svn: 204354
2014-03-20 16:26:15 +00:00
Simon Atanasyan
7b571f4ee0
[Mips] Remove the dead code.
...
llvm-svn: 204353
2014-03-20 16:26:07 +00:00
Simon Atanasyan
c452d4f89f
[Mips] Remove unused member function argument.
...
llvm-svn: 204352
2014-03-20 16:25:58 +00:00
Rui Ueyama
6d500da3cc
Revert "[ELF] Order DT_NEEDED entries by command line order."
...
This reverts commit r204291 because it broke buildbots.
llvm-svn: 204317
2014-03-20 06:57:28 +00:00
Michael J. Spencer
deefb10fd6
[ELF] Order DT_NEEDED entries by command line order.
...
With this all test-suite tests pass with lld on x86-64 Linux.
llvm-svn: 204291
2014-03-20 01:28:23 +00:00
Simon Atanasyan
6210b2ef6b
[Mips] Remove unused function.
...
llvm-svn: 204248
2014-03-19 16:05:32 +00:00
Simon Atanasyan
e29132d427
[Mips] Fix handling of R_MIPS_GOT16 relocation and building local part
...
of GOT.
* Read addend for R_MIPS_GOT16 relocation.
* Put only high 16 bits of symbol + addend into GOT entries for
locally visible symbols.
llvm-svn: 204247
2014-03-19 15:46:25 +00:00
Simon Atanasyan
b1ba018ed2
[Mips] Handle R_MIPS_GOT16 relocation for external and local symbols in
...
a uniform way.
llvm-svn: 204246
2014-03-19 15:46:15 +00:00
Simon Atanasyan
49fa6a41f4
[Mips] Factor out the code creates GOT entry atoms into the two
...
functions. The first one is for local GOT entries. The second one is for
global GOT entries.
llvm-svn: 204245
2014-03-19 15:46:07 +00:00
Simon Atanasyan
a7b553efd1
[Mips] Add 'const' qualifier to the function.
...
llvm-svn: 204244
2014-03-19 15:46:00 +00:00
Simon Atanasyan
c1b62ea310
[Mips] Move AHL addends calculation to the RelocationPass class.
...
llvm-svn: 204243
2014-03-19 15:45:55 +00:00
Simon Atanasyan
d8259fbcc3
[Mips] Move RelocationPass class member function definitions out of the
...
class.
llvm-svn: 204242
2014-03-19 15:45:49 +00:00
Simon Atanasyan
0edb4bbb4b
[PECOFF] Fix -Wsign-compare warning.
...
llvm-svn: 204223
2014-03-19 11:06:01 +00:00
Simon Atanasyan
0e202224a3
[ELF] Remove unused fields (linking context references).
...
llvm-svn: 204222
2014-03-19 11:05:55 +00:00
Simon Atanasyan
b665ce2c27
Fix warning 'enumeral and non-enumeral type in conditional expression'.
...
llvm-svn: 204221
2014-03-19 11:05:47 +00:00
Alexey Samsonov
8e6829e436
Remove extra semicolon for -Wpedantic
...
llvm-svn: 204219
2014-03-19 09:38:31 +00:00
Rui Ueyama
7ad72ebc5e
[PECOFF] Support yet another new type of weak symbol.
...
COMDAT_SELECT_LARGEST is a COMDAT type that make linker to choose the largest
definition from among all of the definition of a symbol. If the size is the
same, the choice is arbitrary.
Differential Revision: http://llvm-reviews.chandlerc.com/D3011
llvm-svn: 204172
2014-03-18 19:37:50 +00:00
Alexey Samsonov
67dc3e9538
Fix lld build
...
llvm-svn: 204122
2014-03-18 07:24:10 +00:00
Rui Ueyama
a7236598bb
[PECOFF] Data type of SectionNumber is now unsigned (r203986).
...
So we don't need static_cast's to convert it from signed to unsigned.
llvm-svn: 203992
2014-03-15 00:39:12 +00:00
Rui Ueyama
39aa6af23f
Remove redundant "virtual" keyword.
...
llvm-svn: 203903
2014-03-14 07:10:43 +00:00
Rui Ueyama
74af50134b
[PECOFF] Handle large objects having more than 32768 sections.
...
The COFF spec says that the SectionNumber field in the symbol table is 16 bit
signed type, but MSVC treats the field as if it is unsigned.
llvm-svn: 203901
2014-03-14 07:04:01 +00:00
Ahmed Charles
13c70b6d4b
Replace OwningPtr with std::unique_ptr.
...
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
2014-03-13 16:20:38 +00:00
Rui Ueyama
c83b4eb3a1
[PECOFF] Handle objects with unknown machine type header value.
...
An object whose machine type header value is unknown looks a bit odd but
is valid. If an object contains only machine-type-independent data, you
can leave the type field unspecified. Some files in oldname.lib are such
object files.
llvm-svn: 203752
2014-03-13 05:12:36 +00:00
Michael J. Spencer
ac1b1d7bfc
[docs] Add some more information on missing relocations.
...
llvm-svn: 203744
2014-03-13 01:11:03 +00:00
Rui Ueyama
b325b81138
[ELF] Fix MSVC warning on conversion from enum to bool.
...
This function returns a boolean value, so returning STT_COMMON does not
make sense.
llvm-svn: 203731
2014-03-12 23:04:27 +00:00
Ahmed Charles
d6432c8aed
[Cleanup] Sort includes.
...
llvm-svn: 203666
2014-03-12 15:55:13 +00:00
Simon Atanasyan
fe3e0a2abf
[Mips] Fix addendum reading for R_MIPS_26 relocation.
...
llvm-svn: 203412
2014-03-09 13:20:01 +00:00
Simon Atanasyan
c146325b26
[Mips] Fix addendum reading for R_MIPS_32 relocation.
...
llvm-svn: 203411
2014-03-09 13:19:54 +00:00
Simon Atanasyan
0f96aca940
[Mips] Fix addendum reading for R_MIPS_HI16 / R_MIPS_LO16 relocations.
...
llvm-svn: 203410
2014-03-09 13:19:46 +00:00
Simon Atanasyan
cfffe940a8
[Mips] Create ELF object reader for MIPS target.
...
llvm-svn: 203409
2014-03-09 13:19:36 +00:00
Simon Atanasyan
3af8664858
[ELF] Factor out the code creates a Reference for the specified symbol
...
and relocation entry into the two virtual functions.
llvm-svn: 203408
2014-03-09 13:19:29 +00:00
Simon Atanasyan
6928b38c99
[Mips] Remove redundant 'mips' prefix from names of MipsELFWriter class
...
fields.
llvm-svn: 203406
2014-03-09 13:05:33 +00:00
Simon Atanasyan
8d8e340c61
[Mips] Reduce the code indentation.
...
llvm-svn: 203405
2014-03-09 13:05:26 +00:00
Simon Atanasyan
82381f97b9
[Mips] Change unused return type from 'bool' to 'void'.
...
llvm-svn: 203404
2014-03-09 13:05:20 +00:00
Simon Atanasyan
0784422520
[Mips] Remove unnecessary LLVM_ATTRIBUTE_UNUSED attribute.
...
llvm-svn: 203403
2014-03-09 13:05:15 +00:00
Simon Atanasyan
6af34b9661
[Mips] Do not inherit MipsDynamicLibraryWriter and MipsExecutableWriter
...
from MipsELFWriter class. MipsELFWriter is just a helper.
llvm-svn: 203402
2014-03-09 13:05:09 +00:00
Simon Atanasyan
16c425e985
[Mips] Mark class by 'final' keyword.
...
llvm-svn: 203401
2014-03-09 13:05:03 +00:00
Simon Atanasyan
8801c45110
[Mips] Remove redundant 'mips' prefix from names of MipsTargetHandler
...
and MipsDynamicSymbolTable classes fields.
llvm-svn: 203400
2014-03-09 13:04:56 +00:00
Simon Atanasyan
4881a93b73
[Mips] Remove redundant call to the unique_ptr::get() method followed
...
by the returned pointer dereferencing.
llvm-svn: 203399
2014-03-09 13:04:50 +00:00
Simon Atanasyan
f08deab395
[Mips] Remove unused class field.
...
llvm-svn: 203398
2014-03-09 13:04:45 +00:00
Rui Ueyama
0b87794f2b
Remove extra space.
...
llvm-svn: 203331
2014-03-08 01:45:39 +00:00
Michael J. Spencer
95a90099fa
[docs] Add missing features for the x86-64 ELF backend.
...
llvm-svn: 203313
2014-03-07 23:54:27 +00:00
Rui Ueyama
c79dd2f80a
[PECOFF] Support a new type of weak symbol.
...
Summary:
COMDAT_SELECT_SAME_SIZE is a COMDAT type that I presume exist only in COFF.
The semantics of the type is that linker should merge such COMDAT sections if
their sizes are the same. Otherwise it's an error.
Reviewers: Bigcheese, shankarke, kledzik
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2996
llvm-svn: 203308
2014-03-07 23:05:10 +00:00
Simon Atanasyan
e9ba661696
[Mips] Removed extra space. Thanks to dexonsmith's eagle eye.
...
llvm-svn: 203201
2014-03-07 04:50:53 +00:00
Rui Ueyama
16e543bc02
Add "override" and remove "virtual" where appropriate.
...
For the record, I used clang-modernize to add "override" and perl to remove
"virtual".
llvm-svn: 203164
2014-03-06 21:14:04 +00:00
Simon Atanasyan
54f6f7bd77
[Mips] Replace "virtual" by "override" in member function declarations
...
where it is appropriate.
llvm-svn: 203102
2014-03-06 10:29:45 +00:00
Rui Ueyama
d6ad741e5e
Add "override" to member functions where appropriate.
...
llvm-svn: 202998
2014-03-05 19:50:03 +00:00
Rui Ueyama
182437e63f
[PECOFF] Sort x64 exception handler table.
...
Just like x86 exception handler table, the table for x64 needs to be sorted
so that runtime can binary search on it. Unlike x86, the table entry for x64
has multiple fields, and they need to be sorted according to its BeginAddress
field. This patch also fixes a bug in relocations.
llvm-svn: 202874
2014-03-04 18:39:12 +00:00
Ahmed Charles
d779459f21
[C++11] Add #include's for OwningPtr.
...
Allows removing #include's in LLVM while switching to std::unique_ptr.
llvm-svn: 202679
2014-03-03 07:20:05 +00:00