- Jul 20, 2016
-
-
Rafael Espindola authored
In here we are iterating relocations in order, so we can do the same with the pieces of .eh_frame and avoid a binary search. The link times I got with this patch were: firefox master 7.22977811 patch 7.141041442 0.987726225252 chromium master 4.478966851 patch 4.506602207 1.00617002914 chromium fast master 1.894713371 patch 1.866446889 0.98508139414 the gold plugin master 0.386193907 patch 0.382374918 0.990111213743 clang master 0.654849589 patch 0.647899815 0.989387220949 llvm-as master 0.037212718 patch 0.036858172 0.990472450843 the gold plugin fsds master 0.410876711 patch 0.407418613 0.991583611562 clang fsds master 0.734623069 patch 0.728237526 0.991307728726 llvm-as fsds master 0.033446197 patch 0.03302833 0.987506292569 scylla master 3.38134402 patch 3.414188846 1.00971354166 llvm-svn: 276108
-
Peter Smith authored
Add relocations and identification functions for the Initial Exec and Global Dynamic TLS model defined in Addenda to, and Errata in, the ABI for the ARM Architecture. ARM uses variant 1 of the thread local storage data structures as defined in ELF Handling for Thread-Local Storage. The "experimental" descriptor based model that can be selected in gcc, but not clang with -mtls-dialect=gnu2 is not supported. The relocations R_ARM_TLS_LE12 and R_ARM_TLS_IE12GP are not supported, I know of no ARM Toolchain that supports these relocations as they limit the size of the TLS block. No code relaxation is supported as the standard ARM TLS model puts the relocations on literal data. Support for the local dynamic model will come in a follow up patch. Differential Revision: https://reviews.llvm.org/D22462 llvm-svn: 276095
-
- Jul 19, 2016
-
-
Rafael Espindola authored
llvm-svn: 275972
-
Eugene Leviant authored
llvm-svn: 275965
-
George Rimar authored
llvm-svn: 275961
-
George Rimar authored
llvm-svn: 275959
-
- Jul 18, 2016
-
-
Rafael Espindola authored
And make it easier to spot code going dead by using elf::. llvm-svn: 275858
-
Rafael Espindola authored
llvm-svn: 275803
-
Rui Ueyama authored
In the last patch for --trace-symbol, I introduced a new symbol type PlaceholderKind and store it to SymVector storage. It made all code that iterates over SymVector to recognize and skip PlaceholderKind symbols. I found that that's annoying. In this patch, I removed PlaceholderKind and stop storing them to SymVector. Now the information whether a symbol is being watched by --trace-symbol is stored to the Symtab hash table. llvm-svn: 275747
-
Rui Ueyama authored
SymVector contains all symbols, so we can iterate either Symtab or SymVector to visit all symbols. Iterating over SymVector makes the next change for --trace-symbol possible. llvm-svn: 275746
-
- Jul 17, 2016
-
-
Rui Ueyama authored
llvm-svn: 275728
-
Rui Ueyama authored
llvm-svn: 275724
-
Rui Ueyama authored
--trace-symbol is a command line option to watch a symbol. Previosly, we looked up a hash table for a new symbol if the option is given. Any code that looks up a hash table for each symbol is expensive because the linker handles a lot of symbols. In our design, we look up a hash table strictly only once for a symbol, so --trace-symbol was an exception. This patch improves efficiency of the option by merging the hash table into the symbol table. Instead of looking up a separate hash table with a string, this patch sets `Traced` flag to symbols specified by --trace-symbol. So, if you insert a symbol and get a symbol with `Traced` flag on, you know that you need to print out a log message for the symbol. This is nearly zero cost. llvm-svn: 275716
-
Rui Ueyama authored
llvm-svn: 275715
-
Rui Ueyama authored
llvm-svn: 275714
-
Rui Ueyama authored
Previously, there was no way to get a file name for a DefinedCommon symbol. This patch adds it. llvm-svn: 275712
-
Rui Ueyama authored
Versions can be assigned to symbols in two different ways. One is the usual version scripts, and the other is special symbol suffix '@'. If a symbol contains '@', the string after that is considered to specify a version name. Previously, we look for '@' for all symbols. Anything that works on every symbol can be expensive because the linker has to handle a lot of symbols. The search for '@' was not an exception. In this patch, I made two optimizations. The first optimization is to handle '@' only when at least one version is defined. If no versions are defined, no versions can be assigned to any symbols, so it's waste of time to search for '@'. The second optimization is to scan only suffixes of symbol names instead of entire symbol names. Symbol names can be very long, but symbol versions are usually short, so scanning entire symbol names is waste of time, too. There are some error cases which we no longer be able to detect with this patch. I don't think it's a major drawback because they are minor errors. Speed is more important. This change improves LLD with debug info self-link time from 6.6993 seconds to 6.3426 seconds (or -5.3%). Differential Revision: https://reviews.llvm.org/D22433 llvm-svn: 275711
-
Rui Ueyama authored
Previously, each subclass of SymbolBody had a pointer to a source file from which it was created. So, there was no single way to get a source file for a symbol. We had getSourceFile<ELFT>(), but the function was a bit inconvenient as it's a template. This patch makes SymbolBody have a pointer to a source file. If a symbol is not created from a file, the pointer has a nullptr. llvm-svn: 275701
-
- Jul 16, 2016
-
-
Rui Ueyama authored
llvm-svn: 275695
-
Rui Ueyama authored
llvm-svn: 275694
-
Rui Ueyama authored
llvm-svn: 275693
-
Rui Ueyama authored
llvm-svn: 275692
-
George Rimar authored
BSD toolchain contains a bug: https://sourceforge.net/p/elftoolchain/tickets/491/ In short demangler works differently, fix was to update the testcase. It should fix the FreeBSD bot failture: http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/19432/steps/test_lld/logs/stdio Original commit message was: [ELF] - Implement extern "c++" version script tag Patch implements 'extern' version script tag. Currently only values in quotes(") are supported. Matching of externs is performed in the same pass as exact match of globals. Differential revision: http://reviews.llvm.org/D21930 llvm-svn: 275682
-
Rui Ueyama authored
llvm-svn: 275675
-
Rui Ueyama authored
SymbolVersions sounds like it had versions for a symbol, so rename it. llvm-svn: 275674
-
Rui Ueyama authored
The identifier `Version` was used too often in the code to handle symbol versions. The struct that contains version definitions is named `Version`. Local variables for version ID are named `Version`. Local varaible for version string are named `Version`. This patch give them different names. llvm-svn: 275673
-
Rui Ueyama authored
skip(S) consumes a token if the next token is S, so it can be used instead of peek() & next(). llvm-svn: 275672
-
Rui Ueyama authored
llvm-svn: 275670
-
Rui Ueyama authored
llvm-svn: 275669
-
Rui Ueyama authored
llvm-svn: 275667
-
Rui Ueyama authored
llvm-svn: 275666
-
Rui Ueyama authored
Previously, Verdefs and Verdauxs are separated in the section. The new layout is easier to write as we do not have to maintain two pointers and can avoid passing a reference to a pointer. llvm-svn: 275665
-
Rui Ueyama authored
llvm-svn: 275660
-
- Jul 15, 2016
-
-
Rui Ueyama authored
llvm-svn: 275608
-
Rui Ueyama authored
llvm-svn: 275605
-
Eugene Leviant authored
llvm-svn: 275549
-
Rui Ueyama authored
llvm-svn: 275531
-
Rui Ueyama authored
llvm-svn: 275530
-
Rui Ueyama authored
llvm-svn: 275528
-
Rui Ueyama authored
In a linker script, `.` is a special symbol indicating a counter. Previously, we had two expression types, ExprKind and SymbolAssignmentKind for `.` and all the other symbol names, respectively. But we could merge them because the former is a special case of the latter. llvm-svn: 275527
-