- Nov 03, 2016
-
-
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
-
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
-
- Oct 26, 2016
-
-
Rui Ueyama authored
llvm-svn: 285219
-
- Oct 13, 2016
-
-
Rui Ueyama authored
So that we can use the function from anywhere. llvm-svn: 284092
-
- Sep 16, 2016
-
-
Rui Ueyama authored
llvm-svn: 281671
-
- Sep 15, 2016
-
-
George Rimar authored
This is PR30386, SORT_BY_INIT_PRIORITY is a keyword can be used to sort sections by numerical value of the GCC init_priority attribute encoded in the section name. Differential revision: https://reviews.llvm.org/D24611 llvm-svn: 281646
-
- Sep 09, 2016
-
-
George Rimar authored
Fixed code that was not checked before on windows for me, because of testcases that are disabled on that platform atm. Inital commit message: "[ELF] - Versionscript: do not treat non-wildcarded names as wildcards." Previously we incorrectly handled cases when symbol name in extern c++ tag was enclosed in quotes. Next case was treated as wildcard: GLIBCXX_3.4 { extern "C++" { "aaa*" } But it should have not. Quotes around aaa here means that we should have do exact name matching. That is PR30268 which has name with pointer is interpreted as wildcard by lld: extern "C++" { "operator delete[](void*)"; Patch fixes the issue. Differential revision: https://reviews.llvm.org/D24229 llvm-svn: 281049
-
- Sep 02, 2016
-
-
George Rimar authored
Use std::regex instead of hand written matcher. Patch based on code and ideas of Rui Ueyama. Differential revision: https://reviews.llvm.org/D23829 llvm-svn: 280544
-
- Jul 08, 2016
-
-
Rui Ueyama authored
Symbols.cpp contains functions to handle ELF symbols. demangle() function is essentially a function to work on a string rather than on an ELF symbol. So Strings.cpp is a better place to put that function. This change also make demangle to demangle symbols unconditionally. Previously, it demangled symbols only when Config->Demangle is true. llvm-svn: 274804
-
- Jun 29, 2016
-
-
Rui Ueyama authored
llvm-svn: 274112
-
Rui Ueyama authored
llvm-svn: 274109
-
- May 24, 2016
-
-
Rui Ueyama authored
llvm-svn: 270526
-
- Apr 22, 2016
-
-
Peter Collingbourne authored
This patch only implements support for version scripts of the form: { [ global: symbol1; symbol2; [...]; symbolN; ] local: *; }; No wildcards are supported, other than for the local entry. Symbol versioning is also not supported. It works by introducing a new Symbol flag which tracks whether a symbol appears in the global section of a version script. This patch also simplifies the logic in SymbolBody::isPreemptible(), and teaches it to handle the case where symbols with default visibility in DSOs do not appear in the dynamic symbol table because of a version script. Fixes PR27482. Differential Revision: http://reviews.llvm.org/D19430 llvm-svn: 267208
-
- Apr 13, 2016
-
-
Adhemerval Zanella authored
This patch implements the --dynamic-list option, which adds a list of global symbol that either should not be bounded by default definition when creating shared libraries, or add in dynamic symbol table in the case of creating executables. The patch modifies the ScriptParserBase class to use a list of Token instead of StringRef, which contains information if the token is a quoted or unquoted strings. It is used to use a faster search for exact match symbol name. The input file follow a similar format of linker script with some simplifications (it does not have scope or node names). It leads to a simplified parser define in DynamicList.{cpp,h}. Different from ld/gold neither glob pattern nor mangled names (extern 'C++') are currently supported. llvm-svn: 266227
-
- Feb 28, 2016
-
-
Rafael Espindola authored
llvm-svn: 262159
-
- Oct 22, 2015
-
-
Rui Ueyama authored
Section garbage collection is a feature to remove unused sections from outputs. Unused sections are sections that cannot be reachable from known GC-root symbols or sections. Naturally the feature is implemented as a mark-sweep garbage collector. In this patch, I added Live bit to InputSectionBase. If and only if Live bit is on, the section will be written to the output. Starting from GC-root symbols or sections, a new function, markLive(), visits all reachable sections and sets their Live bits. Writer then ignores sections whose Live bit is off, so that such sections are excluded from the output. This change has small negative impact on performance if you use the feature because making sections means more work. The time to link Clang changes from 0.356s to 0.386s, or +8%. It reduces Clang size from 57,764,984 bytes to 55,296,600 bytes. That is 4.3% reduction. http://reviews.llvm.org/D13950 llvm-svn: 251043
-
- Oct 09, 2015
-
-
Rui Ueyama authored
SymbolTable was not a template class. Instead we had switch-case-based type dispatch to call desired functions. We had to do that because SymbolTable was created before we know what ELF type objects had been passed. Every time I tried to add a new function to the symbol table, I had to define a dispatcher which consist of a single switch statement. It also brought an restriction what the driver can do. For example, we cannot add undefined symbols before any files are added to the symbol table. That's because no symbols can be added until the symbol table knows the ELF type, but when it knows about that, it's too late. In this patch, the driver makes a decision on what ELF type objects are being handled. Then the driver creates a SymbolTable object for an appropriate ELF type. http://reviews.llvm.org/D13544 llvm-svn: 249902
-
- Oct 07, 2015
-
-
Rui Ueyama authored
llvm-svn: 249586
-
- Aug 14, 2015
-
-
Rafael Espindola authored
llvm-svn: 245050
-
- Aug 12, 2015
-
-
Rafael Espindola authored
llvm-svn: 244697
-
- Aug 06, 2015
-
-
Rui Ueyama authored
Various parameters are passed implicitly using Config global variable already. Output file path is no different from others, so there was no special reason to handle that differnetly. This patch changes the signature of writeResult(SymbolTable *, StringRef) to writeResult(SymbolTable *). llvm-svn: 244180
-
Rui Ueyama authored
We are using Writer more like a function instead of a class. This patch makes it a function to simplify the interface. All details of Writer class is now hidden from other parts of the linker. llvm-svn: 244169
-
- Aug 05, 2015
-
-
Rafael Espindola authored
The others we have in sight are * common symbols. * entries in SHF_MERGE sections. They will have a substantially different treatment. It is not clear if it is worth it putting them all in a single list just to dispatch based on the kind on the other side. I hope to implement common symbols soon, and then we will be in a position to have a concrete discussion. For now this is simpler for the the implemented features. llvm-svn: 244042
-
- Aug 04, 2015
-
-
Rafael Espindola authored
It was already using just code that is common to all object files. llvm-svn: 243985
-
- Jul 30, 2015
-
-
Michael J. Spencer authored
llvm-svn: 243579
-
- Jul 29, 2015
-
-
Michael J. Spencer authored
llvm-svn: 243506
-
- Jul 26, 2015
-
-
Rui Ueyama authored
llvm-svn: 243231
-
- Jul 24, 2015
-
-
Michael J. Spencer authored
Differential Revision: http://reviews.llvm.org/D11188 llvm-svn: 243161
-
- Jul 14, 2015
-
-
Michael J. Spencer authored
llvm-svn: 242118
-
Michael J. Spencer authored
This is a direct port of the new PE/COFF linker to ELF. It can take a single object file and generate a valid executable that executes at the first byte in the text section. llvm-svn: 242088
-