Skip to content

Commit 458f748

Browse files
committed
Use Err(ctx) instead of fatal and use getLocation in error message
1 parent 9b63209 commit 458f748

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lld/ELF/Relocations.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,10 +1343,11 @@ unsigned RelocationScanner::handleTlsRelocation(RelExpr expr, RelType type,
13431343
}
13441344

13451345
auto errBothAuthAndNonAuth = [this, &sym, offset]() {
1346-
Err(ctx) << "both AUTH and non-AUTH TLSDESC entries for '" << sym.getName()
1347-
<< "' requested, but only one type of TLSDESC entry per symbol is "
1348-
"supported"
1349-
<< getLocation(ctx, *sec, sym, offset);
1346+
auto diag = Err(ctx);
1347+
diag << "both AUTH and non-AUTH TLSDESC entries for '" << sym.getName()
1348+
<< "' requested, but only one type of TLSDESC entry per symbol is "
1349+
"supported";
1350+
printLocation(diag, *sec, sym, offset);
13501351
};
13511352

13521353
// Do not optimize signed TLSDESC (as described in pauthabielf64 to LE/IE).

0 commit comments

Comments
 (0)