summaryrefslogtreecommitdiffstats
path: root/lld/ELF/SymbolListFile.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove a file that is too short to be an independent file.Rui Ueyama2016-11-191-58/+0
| | | | | | | We have a .cpp and a .h for parseDynamicList(). This patch moves the function to DriverUtil.cpp. llvm-svn: 287468
* Rename skip(StringRef) -> consume(StringRef).Rui Ueyama2016-10-171-1/+1
| | | | | | | | skip() and skip(StringRef) were overloaded functions that have different semantics. This patch rename one of the functions to avoid function overloading. llvm-svn: 284396
* Recommit [ELF] - Versionscript: do not treat non-wildcarded names as wildcards.George Rimar2016-09-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ELF] - Remove VersionScriptParser class and move the members to ScriptParserGeorge Rimar2016-08-311-110/+0
| | | | | | | | | Patch removes VersionScriptParser class and moves the members to ScriptParser It opens road for implementation of VERSION linkerscript command. Differential revision: https://reviews.llvm.org/D23774 llvm-svn: 280212
* [ELF] - Inline defineSymbolVersion(). NFC.George Rimar2016-08-181-6/+1
| | | | llvm-svn: 279059
* Unpollute the global namespace. lld edition.Benjamin Kramer2016-08-061-0/+4
| | | | llvm-svn: 277926
* Use skip() instead of peek() and expect().Rui Ueyama2016-07-161-2/+1
| | | | llvm-svn: 275692
* Recommit r275257 "[ELF] - Implement extern "c++" version script tag"George Rimar2016-07-161-4/+22
| | | | | | | | | | | | | | | | | | | | | 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
* Rename SymbolVersions VersionDefinitions.Rui Ueyama2016-07-161-3/+3
| | | | | | SymbolVersions sounds like it had versions for a symbol, so rename it. llvm-svn: 275674
* Rename Version VersionDefinition.Rui Ueyama2016-07-161-13/+13
| | | | | | | | | | | 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
* Use ScriptParserBase::skip() instead of peek() and next().Rui Ueyama2016-07-161-37/+23
| | | | | | | skip(S) consumes a token if the next token is S, so it can be used instead of peek() & next(). llvm-svn: 275672
* Simplify default symbol version management. NFC.Rui Ueyama2016-07-161-1/+3
| | | | llvm-svn: 275669
* Reverted r275257 "[ELF] - Implement extern "c++" version script tag"George Rimar2016-07-131-22/+4
| | | | | | | | It broke build bots: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/8204 http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/19432 llvm-svn: 275258
* [ELF] - Implement extern "c++" version script tagGeorge Rimar2016-07-131-4/+22
| | | | | | | | | | | 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: 275257
* [ELF] - Add Id field to Version struct.George Rimar2016-07-121-1/+9
| | | | | | | | | | | That helps to avoid expressions like I + 2 in code that assigns version number to symbols. Change was suggested by Rui Ueyama. Differential revision: http://reviews.llvm.org/D22086 llvm-svn: 275159
* [ELF] - Depricate version references.George Rimar2016-07-011-1/+6
| | | | | | | | | | | | | | | | This is PR28358 According to https://www.akkadia.org/drepper/dsohowto.pdf "The fourth point, the VERS 1.0 version being referred to in the VERS 2.0 definition, is not really important in symbol versioning. It marks the predecessor relationship of the two versions and it is done to maintain the similar- ities with Solaris’ internal versioning. It does not cause any problem it might in fact be useful to a human reader so predecessors should always be mentioned." Patch partially reverts 273423 "[ELF] - Implemented version script hierarchies.", version references are just ignored now. Differential revision: http://reviews.llvm.org/D21888 llvm-svn: 274345
* Handle empty versions.Rafael Espindola2016-06-281-4/+3
| | | | | | They are significant now that we support @ in symbol names. llvm-svn: 274071
* [ELF] - Fix incorrect logic in VersionScriptParser::parseVersion()George Rimar2016-06-241-1/+1
| | | | | | | | | | | | | | | | Previously the next sample script would generate 2 entries in Config->SymbolVersions with the same version name. VERSION { global: c; }; That happened because parseVersionSymbols() was called twice. At first for "global:" and since there is no local tag, it was called again. Patch fixes the issue, testcase was updated to demonstrate. Differential revision: http://reviews.llvm.org/D21640 llvm-svn: 273663
* [ELF] - Reorder expressions in parseVersionSymbols()'s loop. NFC.George Rimar2016-06-231-2/+2
| | | | llvm-svn: 273539
* Revert r273427 "[ELF] - Simplify loop in parseVersionSymbols(). NFC."George Rimar2016-06-231-2/+4
| | | | llvm-svn: 273538
* [ELF] - Simplify loop in parseVersionSymbols(). NFC.George Rimar2016-06-221-4/+2
| | | | llvm-svn: 273427
* [ELF] - Show explicit error if extern keyword is used in version script.George Rimar2016-06-221-0/+2
| | | | | | | Since we do not have plans to support it in closest future, it is better than common script parsing error. llvm-svn: 273426
* [ELF] - Implemented version script hierarchies.George Rimar2016-06-221-0/+2
| | | | | | | | | | | | | | | | | | | | Patch implements hierarchies for version scripts. This allows to handle script files with dependencies, like next one has: LIBSAMPLE_1.0{ global: a; }; LIBSAMPLE_2.0 { global: b; }LIBSAMPLE_1.0; Differential revision: http://reviews.llvm.org/D21556 llvm-svn: 273423
* Don't go on an infinite loop on a missing ";".Rafael Espindola2016-06-201-1/+1
| | | | | | Thanks to Will Dietz for reporting the issue. llvm-svn: 273157
* [ELF] - Recommit r273143("[ELF] - Basic versioned symbols support implemented.")George Rimar2016-06-201-10/+18
| | | | | | | | | | | | | | | | | | With fix: -soname flag was not set in testcase. Hash calculated for base def was different on local and bot machines because filename fos used for calculating. Initial commit message: Patch implements basic support of versioned symbols. There is no wildcards patterns matching except local: *; There is no support for hierarchies. There is no support for symbols overrides (@ vs @@ not handled). This patch allows programs that using simple scripts to link and run. Differential revision: http://reviews.llvm.org/D21018 llvm-svn: 273152
* Revert r273143 "[ELF] - Basic versioned symbols support implemented."George Rimar2016-06-201-18/+10
| | | | | | | It broke buildbot: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast llvm-svn: 273146
* [ELF] - Basic versioned symbols support implemented.George Rimar2016-06-201-10/+18
| | | | | | | | | | | | | Patch implements basic support of versioned symbols. There is no wildcards patterns matching except local: *; There is no support for hierarchies. There is no support for symbols overrides (@ vs @@ not handled). This patch allows programs that using simple scripts to link and run. Differential revision: http://reviews.llvm.org/D21018 llvm-svn: 273143
* Make local: optional.Rafael Espindola2016-06-171-8/+25
| | | | | | | | | | Doing that in an anonymous version is a bit silly, but this opens the way for supporting it in general. Since we don't support actual versions, for now we just disable the version script if we detect that it is missing a local. llvm-svn: 273000
* [ELF] - Handle every global as unversioned export in versioned script.George Rimar2016-06-161-3/+23
| | | | | | | | | Patch updates the version script parser to parse versioned files. In a simple way, just adding them to VersionScriptGlobals list. Differential revision: http://reviews.llvm.org/D21439 llvm-svn: 272934
* Remove unused includes.Rafael Espindola2016-05-031-1/+0
| | | | llvm-svn: 268381
* Devirtualize ScriptParserBase. NFC.Rui Ueyama2016-04-221-2/+2
| | | | | | | | | | | ScriptParserBase class is a container of collection of various methods to parse linker script-ish text. It had a virtual method `run` to run the parser. But we don't have to enforce its descendents to implement that. It's up to them. This patch removes pure virtual function `run`. llvm-svn: 267246
* ELF: Implement basic support for --version-script.Peter Collingbourne2016-04-221-0/+103
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
OpenPOWER on IntegriCloud