summaryrefslogtreecommitdiffstats
path: root/lld/ELF/ScriptParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Split getPos into getLineNumber and getColumnNumber.Rui Ueyama2016-12-011-30/+29
| | | | llvm-svn: 288306
* [ELF] Print file:line for 'undefined section' errorsEugene Leviant2016-11-281-0/+7
| | | | | | Differential revision: https://reviews.llvm.org/D27108 llvm-svn: 288019
* [ELF] Better error reporting for linker scriptsEugene Leviant2016-11-211-28/+55
| | | | | | Differential revision: https://reviews.llvm.org/D26795 llvm-svn: 287547
* Simplify. NFC.Rui Ueyama2016-10-211-9/+4
| | | | llvm-svn: 284806
* ELF: Implement skip() as (void)next()Justin Bogner2016-10-171-9/+1
| | | | | | Thanks to Rafael for pointing out the simplification. llvm-svn: 284407
* 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
* ELF: Add a skip() overload to ignore any tokenJustin Bogner2016-10-171-0/+10
| | | | | | | | | Most functions that return StringRef should check their return values, so I'm planning on marking StringRef [[nodiscard]]. This requires splitting up functions like next() that are sometimes just used for side effects. llvm-svn: 284363
* Recommit [ELF] - Versionscript: do not treat non-wildcarded names as wildcards.George Rimar2016-09-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert r281045, it broke BB.George Rimar2016-09-091-5/+2
| | | | | | | Broken BB: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/27211 llvm-svn: 281046
* Recommit [ELF] - Versionscript: do not treat non-wildcarded names as wildcards.George Rimar2016-09-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixed code that was not checked by testcases that are disabled on windows. 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: 281045
* [ELF] - Revert r281038 to see if that unbreaks build bot.George Rimar2016-09-091-5/+2
| | | | | | http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/19703 llvm-svn: 281041
* [ELF] - Versionscript: do not treat non-wildcarded names as wildcards.George Rimar2016-09-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | 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: 281038
* [ELF] - Fix for: PR29093 - version script does not support [chars] wildcardsGeorge Rimar2016-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | GNU ld supports [chars] wildcards in version scripts, to match a single instance of any of the chars. Here is an extern example from libstdc++'s version script in FreeBSD: extern "C++" { ... std::locale::_[T-Za-z]*; std::[A-Zm]*; std::n[^u]*; std::nu[^m]*; std::num[^e]*; ... } Patch adds support for scripts above. This is PR29093. Differential revision: https://reviews.llvm.org/D23803 llvm-svn: 280799
* Add comments.Rui Ueyama2016-09-011-2/+4
| | | | llvm-svn: 280423
* Create Strings.cpp and move string manipulation functions to that file.Rui Ueyama2016-06-291-15/+0
| | | | llvm-svn: 274109
* [ELF] - Do not crash on unclosed quote (") in scripts.George Rimar2016-06-221-1/+1
| | | | | | | Found that during investigation of FreeBsd scripts. Unclosed quote just crashed lld. llvm-svn: 273398
* Add support for # comments.Rafael Espindola2016-06-161-1/+8
| | | | llvm-svn: 272892
* [ELF] - Implemented comparsion operators for linkerscript.George Rimar2016-04-251-1/+1
| | | | | | | | Patch adds support of <,>,!=,==,>=,<= operators. Differential revision: http://reviews.llvm.org/D19419 llvm-svn: 267382
* Use ScriptParserBase features to parse linker script expressions.Rui Ueyama2016-04-231-2/+6
| | | | | | | | Previously, we have re-implemented utility functions such as `expect` or `next` in LinkerScript.cpp. This patch reuses the existing implementation that is in ScriptParser.cpp. llvm-svn: 267255
* [ELF] Include Twine.h header to restore LLD build after r266524. NFCSimon Atanasyan2016-04-161-0/+1
| | | | llvm-svn: 266527
* [lld] [ELF] Add ScriptParserBase classAdhemerval Zanella2016-04-061-0/+166
This patch add a base script tokenizer class to decouple parsing from linker script handling. The idea is to use this base class on dynamic list parsing (--dynamic-list option). No functionality added. llvm-svn: 265600
OpenPOWER on IntegriCloud