- Nov 05, 2016
-
-
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
-
Eugene Zelenko authored
Differential revision: https://reviews.llvm.org/D26320 llvm-svn: 286030
-
Rui Ueyama authored
llvm-svn: 286028
-
- Nov 04, 2016
-
-
Rui Ueyama authored
This change fixes a bug that was introduced by r285851. r285851 converted .interp section as an output section to an input section. But I forgot to make it a "Live" section, so if -gc-section is given, it was garbage collected. llvm-svn: 286025
-
Rui Ueyama authored
It turned ou that we actually want to call std::for_each even if threading is supported. Unless --thread is given, LLD shouldn't use more than one threads. llvm-svn: 286004
-
Rui Ueyama authored
llvm-svn: 286001
-
Eugene Zelenko authored
Differential revision: https://reviews.llvm.org/D26293 llvm-svn: 286000
-
Rafael Espindola authored
llvm-svn: 285996
-
- Nov 03, 2016
-
-
Rui Ueyama authored
If multi-threading is disabled, parallel_for_each will automatically fall back to std::for_each, so we don't have to do that ourselves. llvm-svn: 285968
-
Rafael Espindola authored
llvm-svn: 285966
-
Rafael Espindola authored
This avoids duplicating the buffer in InputFile. llvm-svn: 285965
-
Rafael Espindola authored
llvm-svn: 285962
-
Rafael Espindola authored
llvm-svn: 285956
-
Rui Ueyama authored
llvm-svn: 285952
-
Rui Ueyama authored
Previously, it didn't support the character class, so we couldn't eliminate the use fo llvm::Regex. Now that it is supported, we can remove compileGlobPattern, which converts a glob pattern to a regex. This patch contains optimization for exact/prefix/suffix matches. Differential Revision: https://reviews.llvm.org/D26284 llvm-svn: 285949
-
Rafael Espindola authored
Instead of remembering a raw Elf_Shdr, store the symbol table proper and the index of the first non local. This moves error handling upfront and simplifies it. llvm-svn: 285933
-
Rafael Espindola authored
llvm-svn: 285926
-
Rafael Espindola authored
llvm-svn: 285922
-
Rafael Espindola authored
llvm-svn: 285918
-
Rafael Espindola authored
llvm-svn: 285913
-
Rafael Espindola authored
llvm-svn: 285911
-
Rafael Espindola authored
llvm-svn: 285906
-
Rafael Espindola authored
llvm-svn: 285904
-
George Rimar authored
llvm-svn: 285900
-
Rafael Espindola authored
llvm-svn: 285897
-
Peter Smith authored
An undefined weak reference is given an address of 0 this will incorrectly trigger the creation of a Thumb to ARM interworking Thunk if there is a Thumb branch instruction to the symbol. This results in an error as Thunks only make sense to defined or shared symbols. We prevent this by detecting an undefined symbol and not creating a thunk for it. Differential Revision: https://reviews.llvm.org/D26239 llvm-svn: 285896
-
Eugene Leviant authored
This can speed up lld up to 5 times when linking applications with large number of sections and using linker script. Differential revision: https://reviews.llvm.org/D26241 llvm-svn: 285895
-
George Rimar authored
llvm-svn: 285888
-
George Rimar authored
llvm-svn: 285884
-
Rafael Espindola authored
This avoids fetching it again from the object. llvm-svn: 285875
-
- Nov 02, 2016
-
-
Rui Ueyama authored
llvm-svn: 285854
-
Rui Ueyama authored
Differential Revision: https://reviews.llvm.org/D26225 llvm-svn: 285851
-
Rui Ueyama authored
DIHelper is a class having only one member, and ObjectFile has a unique pointer to a DIHelper. So we can directly have ObjectFile have the member. Differential Revision: https://reviews.llvm.org/D26223 llvm-svn: 285850
-
George Rimar authored
So patch just defines an alias for -Txxx=YYY forms, this is consistent with ld and should fix PR30814. llvm-svn: 285824
-
Rafael Espindola authored
This will let us simplify the llvm side. llvm-svn: 285816
-
Rafael Espindola authored
It is just the size of sections() which we were already calling. llvm-svn: 285811
-
Rafael Espindola authored
llvm-svn: 285808
-
Rafael Espindola authored
While ARM is the only currently user we support this is a general feature. This avoids a second walk over the sections. llvm-svn: 285805
-
George Rimar authored
When we have SHT_GNU_versym section, it is should be associated with symbol table section. Usually (and in out implementation) it is .dynsym. In case when .dynsym is absent (due to broken object for example), lld crashes in parseVerdefs() when accesses null pointer: Versym = reinterpret_cast<const Elf_Versym *>(this->ELFObj.base() + VersymSec->sh_offset) + this->Symtab->sh_info; DIfferential revision: https://reviews.llvm.org/D25553 llvm-svn: 285796
-
Rui Ueyama authored
Previously, we added strings from DynamicSection::finalize(). It was a bit tricky because finalize() is supposed to fix the final size of the section, but adding new strings would change the size of .dynstr section. So there was a dependency between finalize functions of .dynamic and .dynstr. However, I noticed that we can elimiante the dependency by simply add strings early; we don't have to do that in finalize() but can do from DynamicSection's ctor. This patch defines a new function, DynamicSection::addEntries, to add .dynamic entries that doesn't depend on other sections. llvm-svn: 285784
-