Skip to content

Commit d09aabc

Browse files
committed
Switch to printLocation from getLocation
1 parent 5693770 commit d09aabc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lld/ELF/Relocations.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,10 +1110,11 @@ void RelocationScanner::processAux(RelExpr expr, RelType type, uint64_t offset,
11101110
if (!(flags & NEEDS_GOT)) {
11111111
sym.setFlags(needsGotAuth ? (NEEDS_GOT | NEEDS_GOT_AUTH) : NEEDS_GOT);
11121112
} else if (needsGotAuth != static_cast<bool>(flags & NEEDS_GOT_AUTH)) {
1113-
Err(ctx) << "both AUTH and non-AUTH GOT entries for '" << sym.getName()
1114-
<< "' requested, but only one type of GOT entry per symbol is "
1115-
"supported"
1116-
<< getLocation(ctx, *sec, sym, offset);
1113+
auto diag = Err(ctx);
1114+
diag << "both AUTH and non-AUTH GOT entries for '" << sym.getName()
1115+
<< "' requested, but only one type of GOT entry per symbol is "
1116+
"supported";
1117+
printLocation(diag, *sec, sym, offset);
11171118
}
11181119
}
11191120
} else if (needsPlt(expr)) {

lld/test/ELF/aarch64-got-relocations-pauth.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ _start:
8989
# ERR-NEXT: >>> referenced by err.o:(.text+0x8)
9090
# ERR: error: both AUTH and non-AUTH GOT entries for 'bar' requested, but only one type of GOT entry per symbol is supported
9191
# ERR-NEXT: >>> defined in a.so
92-
# ERR-NEXT: >>> referenced by err.o:(.text+0xC)
92+
# ERR-NEXT: >>> referenced by err.o:(.text+0xc)
9393

9494
.globl _start
9595
_start:

0 commit comments

Comments
 (0)