forked from OSchip/llvm-project
[ELF] - Linkerscript: Add `~` as separate math token.
Previously we did not support following: foo = ~0xFF; and had to add space before numeric value: foo = ~ 0xFF That was constistent with ld.bfd < 2.30, which shows: script.txt:3: undefined symbol `~2' referenced in expression, but inconsistent with gold. It was fixed for ld.bfd 2.30 as well: https://sourceware.org/bugzilla/show_bug.cgi?id=22267 Differential revision: https://reviews.llvm.org/D36508 llvm-svn: 315569
This commit is contained in:
parent
3f2b00b7b6
commit
81eca18df3
|
@ -164,7 +164,7 @@ bool ScriptLexer::atEOF() { return ErrorCount || Tokens.size() == Pos; }
|
|||
// Split a given string as an expression.
|
||||
// This function returns "3", "*" and "5" for "3*5" for example.
|
||||
static std::vector<StringRef> tokenizeExpr(StringRef S) {
|
||||
StringRef Ops = "+-*/:!"; // List of operators
|
||||
StringRef Ops = "+-*/:!~"; // List of operators
|
||||
|
||||
// Quoted strings are literal strings, so we don't want to split it.
|
||||
if (S.startswith("\""))
|
||||
|
|
Loading…
Reference in New Issue