Skip to content

Commit e47b4bb

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

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

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

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

0 commit comments

Comments
 (0)