- Aug 05, 2017
-
-
Rafael Espindola authored
With this Symbol has the same size as before, but DefinedRegular goes from 72 to 64 bytes. I also find this a bit easier to read. There are fewer places initializing File for example. This has a small but measurable speed improvement on all tests (1% max). llvm-svn: 310142
-
- Aug 04, 2017
-
-
Zachary Turner authored
llvm-svn: 310131
-
Zachary Turner authored
llvm-svn: 310130
-
Zachary Turner authored
llvm-svn: 310112
-
Nico Weber authored
llvm-svn: 310111
-
Zachary Turner authored
This matches the behavior of MSVC's linker. Differential Revision: https://reviews.llvm.org/D36334 llvm-svn: 310108
-
Zachary Turner authored
Image section headers are stored in the DBI stream, but we had no way to dump them. This patch adds dumping support, along with some tests that LLD actually dumps them correctly. Differential Revision: https://reviews.llvm.org/D36332 llvm-svn: 310107
-
Rafael Espindola authored
llvm-svn: 310090
-
Rafael Espindola authored
When reporting an invalid relocation we were blaming the destination file instead of the file with the relocation. llvm-svn: 310084
-
Rafael Espindola authored
llvm-svn: 310079
-
George Rimar authored
It can help to detemplate code. Differential revision: https://reviews.llvm.org/D35936 llvm-svn: 310049
-
George Rimar authored
D35945 introduces change when there is useless to check Error flag in few places, but ErrorCount must be checked instead. But then we probably can just check ErrorCount always. That should simplify things. Patch do that. Differential revision: https://reviews.llvm.org/D36266 llvm-svn: 310046
-
George Rimar authored
This is PR33889, Patch adds support of combination of linkerscript and -symbol-ordering-file option. If no sorting commands are present in script inside section declaration and no --sort-section option specified, code uses sorting from ordering file if any exist. Differential revision: https://reviews.llvm.org/D35843 llvm-svn: 310045
-
James Henderson authored
Following r309829, if a string table appears in an executable segment, the strings will not be null terminated. This is a problem, for example, for the .dynstr section when using -no-rosegment. The strings end up being terminated with 0xcc because prior to this patch, LLD did not explicitly write the null terminators. This change fixes that by always writing the null terminators. Reviewers: rafael Differential Revision: https://reviews.llvm.org/D36267 llvm-svn: 310042
-
George Rimar authored
Makes code a bit more convinent to write/read. Differential revision: https://reviews.llvm.org/D36089 llvm-svn: 310040
-
- Aug 03, 2017
-
-
Reid Kleckner authored
The PDB debug data directory entry has an absolute path in it. This will make it different on every machine. llvm-svn: 309989
-
Reid Kleckner authored
Summary: PDB section contributions are supposed to use output section indices and offsets, not input section indices and offsets. This allows the debugger to look up the index of the module that it should look up in the modules stream for symbol information. With this change, windbg can now find line tables, but it still cannot print local variables. Fixes PR34048 Reviewers: zturner Subscribers: hiraditya, ruiu, llvm-commits Differential Revision: https://reviews.llvm.org/D36285 llvm-svn: 309987
-
George Rimar authored
Following possible scripts triggered accessing to Target when it was not yet initialized (was nullptr). MEMORY { name : ORIGIN = DATA_SEGMENT_RELRO_END; } MEMORY { name : ORIGIN = CONSTANT(COMMONPAGESIZE); } Patch errors out instead. Differential revision: https://reviews.llvm.org/D36140 llvm-svn: 309953
-
Rafael Espindola authored
llvm-svn: 309913
-
Reid Kleckner authored
llvm-svn: 309902
-
Reid Kleckner authored
In order to get dbghelp to load our pdb, we have to fill in the PointerToRawData field as well as the AddressOfRawData field. One is the file offset and the other is the RVA. llvm-svn: 309900
-
- Aug 02, 2017
-
-
Rafael Espindola authored
Reviewing another change I noticed that we use "getSymbols" to mean different things in different files. Depending on the file it can return ArrayRef<StringRef> ArrayRef<SymbolBody*> ArrayRef<Symbol*> ArrayRef<Elf_Sym> With this change it always returns an ArrayRef<SymbolBody*>. The other functions are renamed getELFsyms() and getSymbolNames(). Note that we cannot return ArrayRef<Symbol*> instead of ArreyRef<SymbolBody*> because local symbols have a SymbolBody but not a Symbol. llvm-svn: 309840
-
Petr Hosek authored
When the data segment is the last segment, it is correct to leave it unaligned. However, when the code segment is the last segment, it should be aligned to the page boundary to avoid loading the non-segment parts of the ELF file at the end of the file. Differential Revision: https://reviews.llvm.org/D33630 llvm-svn: 309829
-
George Rimar authored
[ELF] - Recommit r309252 "[ELF] - Fix missing relocation when linking executable with --unresolved-symbols=ignore-all" With fix for undefined weak symbols in executable. Original commit message: This is PR32112. Previously when we linked executable with --unresolved-symbols=ignore-all and undefined symbols, like: _start: callq und@PLT we did not create relocations, though it looks in that case we should delegate handling of such symbols to runtime linker, hence should emit them. Patch fixes that. Differential revision: https://reviews.llvm.org/D35724 llvm-svn: 309796
-
- Aug 01, 2017
-
-
George Rimar authored
Enables multithreaded .gdb_index building. Differential revision: https://reviews.llvm.org/D36090 llvm-svn: 309688
-
Rui Ueyama authored
llvm-svn: 309654
-
Rui Ueyama authored
This change makes -gdb-index 40% faster. My test case is self-linking lld. Differential Revision: https://reviews.llvm.org/D36079 llvm-svn: 309652
-
- Jul 31, 2017
-
-
Zachary Turner authored
We don't write any actual symbols to this stream yet, but for now we just create the stream and hook it up to the appropriate places and give it a valid header. Differential Revision: https://reviews.llvm.org/D35290 llvm-svn: 309608
-
Rafael Espindola authored
Before we were doing it with --export-dynamic. That seems incorrect. The intention of --export-dynamic is to export symbols *defined* in the executable. llvm-svn: 309605
-
- Jul 28, 2017
-
-
Rafael Espindola authored
They were being placed before sections that were listed. llvm-svn: 309391
-
George Rimar authored
* Removed redundant templating. * Added missing `static` keyword. llvm-svn: 309376
-
George Rimar authored
Previously we would crash when tried to ALIGN(0). Patch uses value 1 instead in this case, that looks to be consistent with GNU linkers and reasonable and simple behavior itself. Differential revision: https://reviews.llvm.org/D35942 llvm-svn: 309372
-
Rafael Espindola authored
This would have found the error in r309252. llvm-svn: 309329
-
- Jul 27, 2017
-
-
Rafael Espindola authored
llvm-svn: 309326
-
Rafael Espindola authored
This is a bit of a hack, but it is *so* convenient. Now that we create synthetic linker scripts when none is provided, we always have to handle paired OutputSection and OutputsectionCommand and keep a mapping from one to the other. This patch simplifies things by merging them and creating what used to be OutputSectionCommands really early. llvm-svn: 309311
-
Reid Kleckner authored
Summary: MSVC link.exe records all external symbol names in the publics stream. It provides similar functionality to an ELF .symtab. Reviewers: zturner, ruiu Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35871 llvm-svn: 309303
-
George Rimar authored
Revert r309252 "[ELF] - Fix missing relocation when linking executable with --unresolved-symbols=ignore-all" It broke bot: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/4231 llvm-svn: 309258
-
George Rimar authored
llvm-svn: 309254
-
George Rimar authored
That is slightly more convinent as allows to store pointer on program header entry in a more safe way. Change was used in 2 patches currently on review. Differential revision: https://reviews.llvm.org/D35832 llvm-svn: 309253
-
George Rimar authored
This is PR32112. Previously when we linked executable with --unresolved-symbols=ignore-all and undefined symbols, like: _start: callq und@PLT we did not create relocations, though it looks in that case we should delegate handling of such symbols to runtime linker, hence should emit them. Patch fixes that. Differential revision: https://reviews.llvm.org/D35724 llvm-svn: 309252
-