- Aug 04, 2017
-
-
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
-
-
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
-
- 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
-
-
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
-
- 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
-
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
-
Rafael Espindola authored
With this we only ask LTO to keep a C named section if there is a __start_ or __end symbol. This is not as strict as lld's --gc-sections, but is as good as we can get without having a far more detailed ir summary. llvm-svn: 309232
-
Rafael Espindola authored
It is __stop_<sec>, not __end_<sec>. llvm-svn: 309225
-
Rui Ueyama authored
Rename it because it was too easy to conflict with llvm::object::ObjectFile which broke buildbots several times. llvm-svn: 309199
-
- Jul 26, 2017
-
-
Meador Inge authored
This patch fixes a small issue with respect to how memory region names are parsed on output section descriptions. For example, consider: .text : { *(.text) } > rom That can also be written like: .text : { *(.text) } >rom The latter form is accepted by GNU LD and is fairly common. Differential Revision: https://reviews.llvm.org/D35920 llvm-svn: 309191
-
Rui Ueyama authored
llvm-svn: 309188
-
Rui Ueyama authored
I believe this compiles fine on all platforms, even on Windows. llvm-svn: 309182
-
Rafael Espindola authored
llvm-svn: 309162
-
Rafael Espindola authored
llvm-svn: 309161
-
Rafael Espindola authored
llvm-svn: 309160
-
Rafael Espindola authored
llvm-svn: 309153
-
Rafael Espindola authored
NFC, just makes it easier to access from non templated code. llvm-svn: 309152
-
George Rimar authored
Was discussed in D35797 thread. llvm-svn: 309096
-
George Rimar authored
Previously we handled this option implicitly, only for infering unresolved symbols handling policy. ld man says: "--noinhibit-exec Retain the executable output file whenever it is still usable", and we may want to handle other cases too. Differential revision: https://reviews.llvm.org/D35793 llvm-svn: 309091
-
George Rimar authored
This is PR30422, previously LLD did not render all option aliases in --help. With this patch it will. Differential revision: https://reviews.llvm.org/D35477 llvm-svn: 309089
-
Rui Ueyama authored
Since the flag is ignored anyway, it doesn't matter whether it is an alias or not. llvm-svn: 309055
-
Rafael Espindola authored
llvm-svn: 309053
-