Skip to content

Commit 039cc3b

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

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

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

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

0 commit comments

Comments
 (0)