summaryrefslogtreecommitdiff
path: root/lld/ELF/ScriptParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r--lld/ELF/ScriptParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp
index f90ce6fa7407..db4626311524 100644
--- a/lld/ELF/ScriptParser.cpp
+++ b/lld/ELF/ScriptParser.cpp
@@ -158,7 +158,8 @@ static void moveAbsRight(ExprValue &a, ExprValue &b) {
if (a.sec == nullptr || (a.forceAbsolute && !b.isAbsolute()))
std::swap(a, b);
if (!b.isAbsolute())
- error(a.loc + ": at least one side of the expression must be absolute");
+ script->recordError(
+ a.loc + ": at least one side of the expression must be absolute");
}
static ExprValue add(ExprValue a, ExprValue b) {
@@ -1384,7 +1385,7 @@ StringRef ScriptParser::readParenLiteral() {
static void checkIfExists(const OutputSection &osec, StringRef location) {
if (osec.location.empty() && script->errorOnMissingSection)
- error(location + ": undefined section " + osec.name);
+ script->recordError(location + ": undefined section " + osec.name);
}
static bool isValidSymbolName(StringRef s) {