- Nov 23, 2016
-
-
Rui Ueyama authored
This is in the context of https://llvm.org/bugs/show_bug.cgi?id=31109. When LLD prints out errors for relocations, it tends to print out extremely large number of errors (like millions) because it would print out one error per relocation. This patch makes LLD bail out if it prints out more than 20 errors. You can configure the limitation using -error-limit argument. -error-limit=0 means no limit. I chose the flag name because Clang has the same feature as -ferror-limit. "f" doesn't make sense to us, so I omitted it. Differential Revision: https://reviews.llvm.org/D26981 llvm-svn: 287789
-
Simon Atanasyan authored
For now MipsGotSection class is not ready for concurrent access from multiple threads. The problem is in the getPageEntryOffset method. It changes state of MipsGotSection object and might be called from different threads at the same time. So turn Threads off for this target. It's a temporary solution. The patch fixes MipsGotSection::getPageEntryOffset is almost ready. Differential revision: https://reviews.llvm.org/D27035 llvm-svn: 287740
-
- Nov 21, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D26852 llvm-svn: 287527
-
- Nov 20, 2016
-
-
Rui Ueyama authored
We have a .cpp and a .h for parseDynamicList(). This patch moves the function to DriverUtil.cpp. llvm-svn: 287468
-
- Nov 19, 2016
-
-
Rui Ueyama authored
llvm-svn: 287456
-
George Rimar authored
GNU linkers disagree here. Though both -version and -v are mentioned in help to print the version information, GNU ld just normally exits, while gold can continue linking. We are compatible with ld.bfd here. This fixes PR31057. Differential revision: https://reviews.llvm.org/D26865 llvm-svn: 287448
-
- Nov 17, 2016
-
-
Rui Ueyama authored
LLD supports multi-threading, and it seems to be working well as you can see in r287140. In short, LLD runs a few percent to 30% faster with -threads and more than 50% faster if you are using -build-id (your mileage may vary depending on your computer). However, I don't think most users even don't know about that because -threads is not a default option. This patch enables it by default. Discussion thread: http://lists.llvm.org/pipermail/llvm-dev/2016-November/107160.html llvm-svn: 287237
-
- Nov 16, 2016
-
-
Rui Ueyama authored
Our build-id is a tree hash anyway, so I'll define this as a synonym for sha1. GNU gold takes this parameter, so this is for compatibility with that. llvm-svn: 287119
-
Rui Ueyama authored
llvm-svn: 287072
-
- Nov 11, 2016
-
-
Peter Collingbourne authored
The functions getBitcodeTargetTriple(), isBitcodeContainingObjCCategory(), getBitcodeProducerString() and hasGlobalValueSummary() now return errors via their return value rather than via the diagnostic handler. To make this work, re-implement these functions using non-member functions so that they can be used without the LLVMContext required by BitcodeReader. Differential Revision: https://reviews.llvm.org/D26532 llvm-svn: 286623
-
Mehdi Amini authored
This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
-
Rui Ueyama authored
The previous code didn't make sense at all. Now an error condition is handled with fatal(). Thanks to Mehdi for pointing out the issue. llvm-svn: 286547
-
- Nov 10, 2016
-
-
George Rimar authored
Patch allows to pass a symbols file to linker. LLD will map symbols to sections and sort sections in output according to symbol ordering file. That can help to reduce the startup time and/or amount of pagefaults during startup. Also, interesting benchmark result was produced by Rafael Espíndola. After applying the symbols file for clang he timed compiling X86MCTargetDesc.ii to an object file. The page faults went from just 56,988 to 56,946 since most faults are not in the binary. Running time went from 4.403053515 to 4.178112244. The speedup seems to be because of better cache locality. Differential revision: https://reviews.llvm.org/D26130 llvm-svn: 286440
-
- Nov 09, 2016
-
-
Rui Ueyama authored
llvm-svn: 286406
-
- Nov 08, 2016
-
-
Rafael Espindola authored
Avoids having to skip them multiple times. llvm-svn: 286261
-
- Nov 05, 2016
-
-
Simon Atanasyan authored
In short the patch introduces support for linking object file conform MIPS N32 ABI [1]. This ABI is similar to N64 ABI but uses 32-bit pointer size. The most non-trivial requirement of this ABI is one more relocation packing format. N64 ABI puts multiple relocation type into the single relocation record. The N32 ABI uses series of successive relocations with the same offset for this purpose. In this patch, new function `mergeMipsN32RelTypes` handle this case and "convert" N32 relocation to the N64 relocation so the rest of the code keep unchanged. For now, linker does not support series of relocations applied to sections without SHF_ALLOC bit. Probably later I will add the support or insert some sort of assert into the `relocateNonAlloc` routine to catch this case. [1] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf Differential revision: https://reviews.llvm.org/D26298 llvm-svn: 286052
-
Rui Ueyama authored
Previously, we do this piece of code to iterate over all input sections. for (elf::ObjectFile<ELFT> *F : Symtab.getObjectFiles()) for (InputSectionBase<ELFT> *S : F->getSections()) It turned out that this mechanisms doesn't work well with synthetic input sections because synthetic input sections don't belong to any input file. This patch defines a vector that contains all input sections including synthetic ones. llvm-svn: 286051
-
- Nov 01, 2016
-
-
Rui Ueyama authored
You can now write make<T>(Args) instead of new (alloc<T>()) T(Args). llvm-svn: 285760
-
Rafael Espindola authored
This patch replaces GAlloc<ELFT>::<sometype>.Allocate() with alloc<sometype<ELFT>>(). Patch by Rui! llvm-svn: 285748
-
- Oct 28, 2016
-
-
Rui Ueyama authored
Previously, we have a lot of BumpPtrAllocators, but all these allocators virtually have the same lifetime because they are not freed until the linker finishes its job. This patch aggregates them into a single allocator. Differential revision: https://reviews.llvm.org/D26042 llvm-svn: 285452
-
- Oct 27, 2016
-
-
Rafael Espindola authored
This allows us to set a value for it based on -m. llvm-svn: 285294
-
- Oct 26, 2016
-
-
Rafael Espindola authored
As the state of lld gets more complicated, shutting down gets more expensive. In a normal lld run we can just call _exit immediately after renaming the temporary output file. We still want the ability to run a full shutdown since that is useful for detecting memory leaks. This patch adds a --full-shutdown flag and changes lit to use it. llvm-svn: 285224
-
Rafael Espindola authored
We used to have one allocator per file, which reduces the advantage of using an allocator in the first place. This is a small speed up is most cases. The largest speedup was in 1.014X in chromium no-gc. The largest slowdown was scylla at 1.003X. llvm-svn: 285205
-
Rui Ueyama authored
llvm-svn: 285169
-
Rui Ueyama authored
llvm-svn: 285164
-
Rui Ueyama authored
This is in sync with what clang does. llvm-svn: 285163
-
- Oct 20, 2016
-
-
George Rimar authored
In this patch partial gdb_index section is created. For costructing the .gdb_index section 6 steps should be performed (details are in SplitDebugInfo.cpp file header), this patch do first 3: Creates proper section header. Fills list of compilation units. Types CU list area is not supposed to be supported, so it is ignored and therefore can be treated as implemented either. Differential revision: https://reviews.llvm.org/D24706 llvm-svn: 284708
-
George Rimar authored
llvm-svn: 284705
-
Rui Ueyama authored
llvm-svn: 284697
-
Rui Ueyama authored
This member is used only by LinkerDriver, so move it to LinkerDriver. llvm-svn: 284696
-
Rui Ueyama authored
llvm-svn: 284695
-
Rui Ueyama authored
llvm-svn: 284694
-
Rui Ueyama authored
-format=<foo>, -format <foo> and -b <foo> are all the same. Previous code was intended to produce an error message with the same spelling as given from the command line, but it actually always printed out this string: "unknown -format= value:". This is probably more confusing than "unknown -format value:". So I changed the message. llvm-svn: 284693
-
Rui Ueyama authored
llvm-svn: 284692
-
Rui Ueyama authored
Previously, we were checking the existence of an entry symbol too early. It was done before the linker script processor creates symbols defined in scripts. Fixes bug 30743. llvm-svn: 284676
-
- Oct 19, 2016
-
-
Rui Ueyama authored
llvm-svn: 284641
-
Rui Ueyama authored
This is what other linkers and clang driver do. Differential Revision: https://reviews.llvm.org/D25780 llvm-svn: 284634
-
Rui Ueyama authored
Other error messages don't end with ".". llvm-svn: 284625
-
- Oct 17, 2016
-
-
Peter Smith authored
The R_ARM_TARGET2 relocation is used in ARM exception tables to encode a data dependency that will only be dereferenced by code in the run-time support library. In a similar way to R_ARM_TARGET1 the handling of the relocation is target specific, it maps to one of R_ARM_ABS32, R_ARM_REL32 or R_ARM_GOT_PREL. The choice depends on the run-time library. R_ARM_GOT_PREL is used for linux and BSD, R_ARM_ABS32 and R_ARM_REL32 are used for bare-metal. The command line option --target2=<target> can be used to select the relocation used for R_ARM_TARGET2. The default is R_ARM_GOT_PREL. Differential revision: https://reviews.llvm.org/D25684 llvm-svn: 284404
-
George Rimar authored
This is https://llvm.org/bugs/show_bug.cgi?id=30696, Differential revision: https://reviews.llvm.org/D25676 llvm-svn: 284388
-