summaryrefslogtreecommitdiffstats
path: root/lld/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [PECOFF] Fix possible response file buffer overrun.Rui Ueyama2014-03-211-1/+2
| | | | | | | | Response file is not NUL terminated, so when creating a StringRef for the buffer contents, we need to pass the buffer size as well as the pointer pointing to the buffer. llvm-svn: 204420
* [Mips] Reduce the number of 'const' casts.Simon Atanasyan2014-03-201-14/+14
| | | | llvm-svn: 204355
* [Mips] Join two for loops over defined atoms into the single one.Simon Atanasyan2014-03-201-4/+3
| | | | llvm-svn: 204354
* [Mips] Remove the dead code.Simon Atanasyan2014-03-201-4/+0
| | | | llvm-svn: 204353
* [Mips] Remove unused member function argument.Simon Atanasyan2014-03-201-4/+3
| | | | llvm-svn: 204352
* Revert "[ELF] Order DT_NEEDED entries by command line order."Rui Ueyama2014-03-201-22/+5
| | | | | | This reverts commit r204291 because it broke buildbots. llvm-svn: 204317
* Move RoundTrip tests behind LLVM_RUN_ROUNDTRIP_TEST env flag.Rui Ueyama2014-03-201-2/+6
| | | | | | | | | | | | | If the environment variable is defined and not empty, RoundTrip tests are run. The reason to move the tests behind the flag is because they are too slow to enable by default. LLD linking time on llvm-tblgen improved from 2m7s to 2.3s. About 60x faster now in this case. Differential Revision: http://llvm-reviews.chandlerc.com/D3126 llvm-svn: 204296
* [gnu-ld] Support -m on non-NetBSD targets.Michael J. Spencer2014-03-201-2/+0
| | | | llvm-svn: 204293
* [ELF] Order DT_NEEDED entries by command line order.Michael J. Spencer2014-03-201-5/+22
| | | | | | With this all test-suite tests pass with lld on x86-64 Linux. llvm-svn: 204291
* [Mips] Remove unused function.Simon Atanasyan2014-03-191-7/+0
| | | | llvm-svn: 204248
* [Mips] Fix handling of R_MIPS_GOT16 relocation and building local partSimon Atanasyan2014-03-195-9/+29
| | | | | | | | | 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
* [Mips] Handle R_MIPS_GOT16 relocation for external and local symbols inSimon Atanasyan2014-03-194-9/+0
| | | | | | a uniform way. llvm-svn: 204246
* [Mips] Factor out the code creates GOT entry atoms into the twoSimon Atanasyan2014-03-191-16/+36
| | | | | | | functions. The first one is for local GOT entries. The second one is for global GOT entries. llvm-svn: 204245
* [Mips] Add 'const' qualifier to the function.Simon Atanasyan2014-03-191-2/+2
| | | | llvm-svn: 204244
* [Mips] Move AHL addends calculation to the RelocationPass class.Simon Atanasyan2014-03-193-67/+46
| | | | llvm-svn: 204243
* [Mips] Move RelocationPass class member function definitions out of theSimon Atanasyan2014-03-191-197/+215
| | | | | | class. llvm-svn: 204242
* [PECOFF] Fix -Wsign-compare warning.Simon Atanasyan2014-03-191-1/+1
| | | | llvm-svn: 204223
* [ELF] Remove unused fields (linking context references).Simon Atanasyan2014-03-195-15/+9
| | | | llvm-svn: 204222
* Fix warning 'enumeral and non-enumeral type in conditional expression'.Simon Atanasyan2014-03-191-1/+1
| | | | llvm-svn: 204221
* Remove extra semicolon for -WpedanticAlexey Samsonov2014-03-191-6/+6
| | | | llvm-svn: 204219
* [PECOFF] Support yet another new type of weak symbol.Rui Ueyama2014-03-183-15/+49
| | | | | | | | | | 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
* Fix lld buildAlexey Samsonov2014-03-181-12/+8
| | | | llvm-svn: 204122
* [PECOFF] Data type of SectionNumber is now unsigned (r203986).Rui Ueyama2014-03-151-4/+2
| | | | | | So we don't need static_cast's to convert it from signed to unsigned. llvm-svn: 203992
* Remove redundant "virtual" keyword.Rui Ueyama2014-03-141-1/+1
| | | | llvm-svn: 203903
* [PECOFF] Handle large objects having more than 32768 sections.Rui Ueyama2014-03-141-2/+4
| | | | | | | 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
* [PECOFF] Fix link order.Rui Ueyama2014-03-141-20/+16
| | | | | | | | | | | | | | | | LLD fails to link symbol "_main" if the symbol is in a library file and the library file is given as a bare argument (i.e. not with /defaultlib option). It's because library files given as bare arguments are processed before other libraries given with /defaultlib, so when Linker finds msvcrtd needs a definition for "_main", the file providing the main function has already been processed and skipped. Linker don't revisit libraries if it's not given with /defaultlib. To fix it this patch change the way of command line handling; files end with ".lib" are treated as if they are given with /defaultlib. I don't believe it's 100% correct behavior but it's better than before. llvm-svn: 203892
* [PECOFF] Fix arguments passed to lib.exe.Rui Ueyama2014-03-141-1/+1
| | | | llvm-svn: 203891
* [PECOFF] Make WinLinkDriver::parse() and allocate*() functions thread-safe.Rui Ueyama2014-03-141-3/+15
| | | | | | Looks like a major cause of instability on Windows is this thread-safety bug. llvm-svn: 203889
* [PECOFF] Implement /lib option.Rui Ueyama2014-03-141-2/+30
| | | | | | This option is not documented and seems weird, but yeah we need it anyway. llvm-svn: 203884
* Use short identifier, s/diagnostics/diag/.Rui Ueyama2014-03-141-67/+62
| | | | llvm-svn: 203876
* [PECOFF] Support response files.Rui Ueyama2014-03-141-4/+66
| | | | | | | | If the driver finds a command line option in the form of "@filename", the option will be replaced with the content of the given file. It's an error if a response file cannot be read. llvm-svn: 203875
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-1316-43/+43
| | | | | | | | 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
* [PECOFF] Handle objects with unknown machine type header value.Rui Ueyama2014-03-131-0/+3
| | | | | | | | | 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
* [docs] Add some more information on missing relocations.Michael J. Spencer2014-03-131-7/+30
| | | | llvm-svn: 203744
* [ELF] Fix MSVC warning on conversion from enum to bool.Rui Ueyama2014-03-121-2/+1
| | | | | | | This function returns a boolean value, so returning STT_COMMON does not make sense. llvm-svn: 203731
* [Cleanup] Sort includes.Ahmed Charles2014-03-127-21/+21
| | | | llvm-svn: 203666
* [docs] Add list of missing GNU ld command line options.Michael J. Spencer2014-03-101-0/+107
| | | | llvm-svn: 203491
* [Mips] Fix addendum reading for R_MIPS_26 relocation.Simon Atanasyan2014-03-091-1/+1
| | | | llvm-svn: 203412
* [Mips] Fix addendum reading for R_MIPS_32 relocation.Simon Atanasyan2014-03-091-3/+13
| | | | llvm-svn: 203411
* [Mips] Fix addendum reading for R_MIPS_HI16 / R_MIPS_LO16 relocations.Simon Atanasyan2014-03-091-0/+17
| | | | llvm-svn: 203410
* [Mips] Create ELF object reader for MIPS target.Simon Atanasyan2014-03-093-0/+119
| | | | llvm-svn: 203409
* [ELF] Factor out the code creates a Reference for the specified symbolSimon Atanasyan2014-03-091-23/+38
| | | | | | and relocation entry into the two virtual functions. llvm-svn: 203408
* [Mips] Remove redundant 'mips' prefix from names of MipsELFWriter classSimon Atanasyan2014-03-091-15/+14
| | | | | | fields. llvm-svn: 203406
* [Mips] Reduce the code indentation.Simon Atanasyan2014-03-091-15/+16
| | | | llvm-svn: 203405
* [Mips] Change unused return type from 'bool' to 'void'.Simon Atanasyan2014-03-091-2/+1
| | | | llvm-svn: 203404
* [Mips] Remove unnecessary LLVM_ATTRIBUTE_UNUSED attribute.Simon Atanasyan2014-03-091-1/+1
| | | | llvm-svn: 203403
* [Mips] Do not inherit MipsDynamicLibraryWriter and MipsExecutableWriterSimon Atanasyan2014-03-093-12/+11
| | | | | | from MipsELFWriter class. MipsELFWriter is just a helper. llvm-svn: 203402
* [Mips] Mark class by 'final' keyword.Simon Atanasyan2014-03-091-3/+3
| | | | llvm-svn: 203401
* [Mips] Remove redundant 'mips' prefix from names of MipsTargetHandlerSimon Atanasyan2014-03-092-19/+18
| | | | | | and MipsDynamicSymbolTable classes fields. llvm-svn: 203400
* [Mips] Remove redundant call to the unique_ptr::get() method followedSimon Atanasyan2014-03-092-5/+5
| | | | | | by the returned pointer dereferencing. llvm-svn: 203399
OpenPOWER on IntegriCloud