Skip to content

Commit 62ab850

Browse files
committed
Use Err(ctx) instead of fatal and use getLocation in error message
1 parent a97339a commit 62ab850

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
@@ -1349,10 +1349,11 @@ unsigned RelocationScanner::handleTlsRelocation(RelExpr expr, RelType type,
13491349
}
13501350

13511351
auto errBothAuthAndNonAuth = [this, &sym, offset]() {
1352-
Err(ctx) << "both AUTH and non-AUTH TLSDESC entries for '" << sym.getName()
1353-
<< "' requested, but only one type of TLSDESC entry per symbol is "
1354-
"supported"
1355-
<< getLocation(ctx, *sec, sym, offset);
1352+
auto diag = Err(ctx);
1353+
diag << "both AUTH and non-AUTH TLSDESC entries for '" << sym.getName()
1354+
<< "' requested, but only one type of TLSDESC entry per symbol is "
1355+
"supported";
1356+
printLocation(diag, *sec, sym, offset);
13561357
};
13571358

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

0 commit comments

Comments
 (0)