- Dec 22, 2016
-
-
Rui Ueyama authored
Previously, you had to call initDemangledSyms() before accessing DemangledSyms. Now getDemangledSyms() initializes it and then returns it. So it is now less easy to use it in a wrong way. llvm-svn: 290323
-
Rui Ueyama authored
llvm-svn: 290318
-
- Dec 10, 2016
-
-
Rui Ueyama authored
llvm-svn: 289293
-
- Dec 08, 2016
-
-
Rafael Espindola authored
The feature is documented as ----------------------------- The format of the dynamic list is the same as the version node without scope and node name. See *note VERSION:: for more information. -------------------------------- And indeed qt uses a dynamic list with an 'extern "C++"' in it. With this patch we support that The change to gc-sections-shared makes us match bfd. Just because we kept bar doesn't mean it has to be in the dynamic symbol table. The changes to invalid-dynamic-list.test and reproduce.s are because of the new parser. The changes to version-script.s are the only case where we change behavior with regards to bfd, but I would like to see a mix of --version-script and --dynamic-list used in the wild before complicating the code. llvm-svn: 289082
-
Rafael Espindola authored
llvm-svn: 289067
-
Rafael Espindola authored
llvm-svn: 289065
-
Rafael Espindola authored
llvm-svn: 289064
-
Simon Atanasyan authored
Follow-up to r289025. llvm-svn: 289061
-
Simon Atanasyan authored
These MIPS specific symbols should be global because in general they can have an arbitrary value. By default this value is a fixed offset from .got section. This patch adds more checks to the mips-gp-local.s test case but marks it as XFAIL because LLD does not allow redefinition of absolute symbols value by a linker script. This should be fixed by D27276. Differential revision: https://reviews.llvm.org/D27524 llvm-svn: 289025
-
- Nov 29, 2016
-
-
Rui Ueyama authored
StringRefZ is a class to represent a null-terminated string. String length is computed lazily, so it's more efficient than StringRef to represent strings in string table. The motivation of defining this new class is to merge functions that only differ in string types; we have many constructors that takes `const char *` or `StringRef`. With StringRefZ, we can merge them. Differential Revision: https://reviews.llvm.org/D27037 llvm-svn: 288172
-
- Nov 26, 2016
-
-
Davide Italiano authored
llvm-svn: 287967
-
- Nov 23, 2016
-
-
Rui Ueyama authored
So that we have less number of overloaded functions. llvm-svn: 287745
-
Rui Ueyama authored
There are two ways to set symbol versions. One way is to use symbol definition file, and the other is to embed version names to symbol names. In the latter way, symbol name is in the form of `foo@version1` where `foo` is a real name and `version1` is a version. We were parsing symbol names in insert(). That seems unnecessarily too early. We can do it later after we resolve all symbols. Doing it lazily is a good thing because it makes code easier to read (because now we have a separate pass to parse symbol names). Also it could slightly improve performance because if two identical symbols have versions, we now parse them only once. llvm-svn: 287741
-
- Nov 17, 2016
-
-
Rui Ueyama authored
llvm-svn: 287234
-
Rui Ueyama authored
Because it is uint16_t in the ELF spec. Using size_t was confusing. llvm-svn: 287198
-
Rui Ueyama authored
llvm-svn: 287191
-
- Nov 16, 2016
-
-
Eugene Leviant authored
This allows making symbols containing ADDR(section) synthetic, and defining synthetic symbols outside SECTIONS block. Differential revision: https://reviews.llvm.org/D25441 llvm-svn: 287090
-
- Nov 15, 2016
-
-
Rui Ueyama authored
The code to handle symbol versions is getting tricky and hard to understand, so it is probably time to simplify it. This patch does the following. - Add `DemangledSyms` variable to SymbolTable so that we don't need to pass it around to findDemangled. - Define `initDemangledSyms` to initialize the variable lazily. - hasExternCpp is removed because we no longer have to initialize the map eagerly. - scanScriptVersion is split. - Comments are updated. llvm-svn: 287002
-
George Rimar authored
Patch adds a filename to that error message. I faced next error when debugged one of FreeBSD port: error: relocation R_X86_64_PLT32 cannot refer to absolute symbol __tls_get_addr error message was poor and this patch improves it to show the locations of symbol declaration and using. Differential revision: https://reviews.llvm.org/D26508 llvm-svn: 286940
-
- Nov 10, 2016
-
-
Rui Ueyama authored
This version of addRegular is almost identical to the other except it lacked "size" parameter. llvm-svn: 286416
-
Rafael Espindola authored
The disadvantage is that we use uint64_t instad of uint32_t for some value in 32 bit files. The advantage is a substantially simpler code, faster builds and less code duplication. llvm-svn: 286414
-
- Nov 08, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D26397 llvm-svn: 286244
-
- 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
-
- 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
-
- Nov 02, 2016
-
-
Rui Ueyama authored
llvm-svn: 285776
-
- 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
Now that it is easy to create input section and symbols, this is simple. llvm-svn: 285322
-
- Oct 26, 2016
-
-
Rafael Espindola authored
Another step in making it easier to create symbols without an ELf_Sym. llvm-svn: 285241
-
Rui Ueyama authored
llvm-svn: 285220
-
- Oct 21, 2016
-
-
Rafael Espindola authored
We were already using it in the larger sets/maps. This provides about 1% speedup in linking xul and chromium. llvm-svn: 284862
-
- Oct 18, 2016
-
-
Justin Lebar authored
Summary: This uses one less word on 64-bit platforms, so should be a strict improvement. This change also lets us get rid of llvm::CachedHash. Reviewers: rafael, timshen Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25646 llvm-svn: 284502
-
- Sep 29, 2016
-
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D24492 llvm-svn: 282656
-
- Sep 15, 2016
-
-
George Rimar authored
Previouly bot was failing: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/413/steps/test-stage1-compiler/logs/stdio Fixed possible segfault, so commit should bix the buildbot. Initial commit message: This is PR30312. Info from bug page: Both of these symbols demangle to abc::abc(): _ZN3abcC1Ev _ZN3abcC2Ev (These would be abc's complete object constructor and base object constructor, respectively.) however with "abc::abc()" in the version script only one of the two receives the symbol version. Patch fixes that. It uses testcase created by Ed Maste (D24306). Differential revision: https://reviews.llvm.org/D24336 llvm-svn: 281605
-
- Sep 14, 2016
-
-
Rui Ueyama authored
Previously, all input files were owned by the symbol table. Files were created at various places, such as the Driver, the lazy symbols, or the bitcode compiler, and the ownership of new files was transferred to the symbol table using std::unique_ptr. All input files were then free'd when the symbol table is freed which is on program exit. I think we don't have to transfer ownership just to free all instance at once on exit. In this patch, all instances are automatically collected to a vector and freed on exit. In this way, we no longer have to use std::unique_ptr. Differential Revision: https://reviews.llvm.org/D24493 llvm-svn: 281425
-
George Rimar authored
Something broked BBots: 281318 failed on step 9: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/413 r281317 built step 9 green: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/415 Initial revision commits were: This is PR30312. Info from bug page: Both of these symbols demangle to abc::abc(): _ZN3abcC1Ev _ZN3abcC2Ev (These would be abc's complete object constructor and base object constructor, respectively.) however with "abc::abc()" in the version script only one of the two receives the symbol version. Patch fixes that. It uses testcase created by Ed Maste (D24306). Differential revision: https://reviews.llvm.org/D24336 llvm-svn: 281411
-
- Sep 13, 2016
-
-
Rui Ueyama authored
llvm-svn: 281393
-
George Rimar authored
This is PR30312. Info from bug page: Both of these symbols demangle to abc::abc(): _ZN3abcC1Ev _ZN3abcC2Ev (These would be abc's complete object constructor and base object constructor, respectively.) however with "abc::abc()" in the version script only one of the two receives the symbol version. Patch fixes that. It uses testcase created by Ed Maste (D24306). Differential revision: https://reviews.llvm.org/D24336 llvm-svn: 281318
-
- Sep 10, 2016
-
-
Michael J. Spencer authored
llvm-svn: 281129
-
- 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
-
- Aug 31, 2016
-
-
Rafael Espindola authored
llvm-svn: 280243
-