Skip to content

Commit a9b8335

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

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
@@ -1328,10 +1328,11 @@ unsigned RelocationScanner::handleTlsRelocation(RelExpr expr, RelType type,
13281328
}
13291329

13301330
auto errBothAuthAndNonAuth = [this, &sym, offset]() {
1331-
Err(ctx) << "both AUTH and non-AUTH TLSDESC entries for '" << sym.getName()
1332-
<< "' requested, but only one type of TLSDESC entry per symbol is "
1333-
"supported"
1334-
<< getLocation(ctx, *sec, sym, offset);
1331+
auto diag = Err(ctx);
1332+
diag << "both AUTH and non-AUTH TLSDESC entries for '" << sym.getName()
1333+
<< "' requested, but only one type of TLSDESC entry per symbol is "
1334+
"supported";
1335+
printLocation(diag, *sec, sym, offset);
13351336
};
13361337

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

0 commit comments

Comments
 (0)