aboutsummaryrefslogtreecommitdiff
path: root/lld/ELF/ScriptParser.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-09-09Recommit [ELF] - Versionscript: do not treat non-wildcarded names as wildcards.George Rimar1-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
2016-09-09Revert r281045, it broke BB.George Rimar1-5/+2
Broken BB: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/27211 llvm-svn: 281046
2016-09-09Recommit [ELF] - Versionscript: do not treat non-wildcarded names as wildcards.George Rimar1-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
2016-09-09[ELF] - Revert r281038 to see if that unbreaks build bot.George Rimar1-5/+2
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/19703 llvm-svn: 281041
2016-09-09[ELF] - Versionscript: do not treat non-wildcarded names as wildcards.George Rimar1-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
2016-09-07[ELF] - Fix for: PR29093 - version script does not support [chars] wildcardsGeorge Rimar1-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
2016-09-01Add comments.Rui Ueyama1-2/+4
llvm-svn: 280423
2016-06-29Create Strings.cpp and move string manipulation functions to that file.Rui Ueyama1-15/+0
llvm-svn: 274109
2016-06-22[ELF] - Do not crash on unclosed quote (") in scripts.George Rimar1-1/+1
Found that during investigation of FreeBsd scripts. Unclosed quote just crashed lld. llvm-svn: 273398
2016-06-16Add support for # comments.Rafael Espindola1-1/+8
llvm-svn: 272892
2016-04-25[ELF] - Implemented comparsion operators for linkerscript.George Rimar1-1/+1
Patch adds support of <,>,!=,==,>=,<= operators. Differential revision: http://reviews.llvm.org/D19419 llvm-svn: 267382
2016-04-23Use ScriptParserBase features to parse linker script expressions.Rui Ueyama1-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
2016-04-16[ELF] Include Twine.h header to restore LLD build after r266524. NFCSimon Atanasyan1-0/+1
llvm-svn: 266527
2016-04-06[lld] [ELF] Add ScriptParserBase classAdhemerval Zanella1-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